This repository has been archived on 2022-06-27. You can view files and clone it, but cannot push or open issues or pull requests.
Xash3DArchive/client/global/tempents.cpp

55 lines
1.3 KiB
C++

//=======================================================================
// Copyright XashXT Group 2008 ©
// tempents.cpp - client side entity management functions
//=======================================================================
#include "extdll.h"
#include "hud_iface.h"
#include "studio_event.h"
void HUD_CreateEntities( void )
{
}
void HUD_StudioEvent( const dstudioevent_t *event, edict_t *entity )
{
float pitch;
switch( event->event )
{
case 5001:
// MullzeFlash at attachment 0
break;
case 5011:
// MullzeFlash at attachment 1
break;
case 5021:
// MullzeFlash at attachment 2
break;
case 5031:
// MullzeFlash at attachment 3
break;
case 5002:
// SparkEffect at attachment 0
break;
case 5004:
// Client side sound
CL_PlaySound( event->options, 1.0f, entity->v.attachment[0] );
ALERT( at_console, "CL_PlaySound( %s )\n", event->options );
break;
case 5005:
// Client side sound with random pitch
pitch = 85 + RANDOM_LONG( 0, 0x1F );
ALERT( at_console, "CL_PlaySound( %s )\n", event->options );
CL_PlaySound( event->options, RANDOM_FLOAT( 0.7f, 0.9f ), entity->v.attachment[0], pitch );
break;
case 5050:
// Special event for displacer
break;
case 5060:
// eject shellEV_EjectShell( event, entity );
break;
default:
break;
}
}