Night Owl 8 years ago
parent
commit
4ddf4232f1
  1. 25
      cl_dll/ev_hldm.cpp

25
cl_dll/ev_hldm.cpp

@ -35,10 +35,11 @@
#include "r_studioint.h" #include "r_studioint.h"
#include "com_model.h" #include "com_model.h"
#include "eiface.h"
extern engine_studio_api_t IEngineStudio; extern engine_studio_api_t IEngineStudio;
static int tracerCount[32]; static int tracerCount[4096];
extern "C" char PM_FindTextureType( char *name ); extern "C" char PM_FindTextureType( char *name );
@ -329,13 +330,12 @@ int EV_HLDM_CheckTracer( int idx, float *vecSrc, float *end, float *forward, flo
{ {
int tracer = 0; int tracer = 0;
int i; int i;
qboolean player = idx >= 1 && idx <= gEngfuncs.GetMaxClients() ? true : false;
if( iTracerFreq != 0 && ( (*tracerCount)++ % iTracerFreq ) == 0 ) if( iTracerFreq != 0 && ( (*tracerCount)++ % iTracerFreq ) == 0 )
{ {
vec3_t vecTracerSrc; vec3_t vecTracerSrc;
if( player ) if( EV_IsPlayer( idx ) )
{ {
vec3_t offset( 0, 0, -4 ); vec3_t offset( 0, 0, -4 );
@ -546,7 +546,7 @@ void EV_FireGlock2( event_args_t *args )
VectorCopy( forward, vecAiming ); VectorCopy( forward, vecAiming );
EV_HLDM_FireBullets( idx, forward, right, up, 1, vecSrc, vecAiming, 8192, BULLET_PLAYER_9MM, 0, &tracerCount[idx - 1], args->fparam1, args->fparam2 ); EV_HLDM_FireBullets( idx, forward, right, up, 1, vecSrc, vecAiming, 8192, BULLET_PLAYER_9MM, 0, 0, args->fparam1, args->fparam2 );
} }
//====================== //======================
// GLOCK END // GLOCK END
@ -602,11 +602,11 @@ void EV_FireShotGunDouble( event_args_t *args )
if( gEngfuncs.GetMaxClients() > 1 ) if( gEngfuncs.GetMaxClients() > 1 )
{ {
EV_HLDM_FireBullets( idx, forward, right, up, 8, vecSrc, vecAiming, 2048, BULLET_PLAYER_BUCKSHOT, 0, &tracerCount[idx - 1], 0.17365, 0.04362 ); EV_HLDM_FireBullets( idx, forward, right, up, 8, vecSrc, vecAiming, 2048, BULLET_PLAYER_BUCKSHOT, 0, 0, 0.17365, 0.04362 );
} }
else else
{ {
EV_HLDM_FireBullets( idx, forward, right, up, 12, vecSrc, vecAiming, 2048, BULLET_PLAYER_BUCKSHOT, 0, &tracerCount[idx - 1], 0.08716, 0.08716 ); EV_HLDM_FireBullets( idx, forward, right, up, 12, vecSrc, vecAiming, 2048, BULLET_PLAYER_BUCKSHOT, 0, 0, 0.08716, 0.08716 );
} }
} }
@ -654,11 +654,11 @@ void EV_FireShotGunSingle( event_args_t *args )
if( gEngfuncs.GetMaxClients() > 1 ) if( gEngfuncs.GetMaxClients() > 1 )
{ {
EV_HLDM_FireBullets( idx, forward, right, up, 4, vecSrc, vecAiming, 2048, BULLET_PLAYER_BUCKSHOT, 0, &tracerCount[idx - 1], 0.08716, 0.04362 ); EV_HLDM_FireBullets( idx, forward, right, up, 4, vecSrc, vecAiming, 2048, BULLET_PLAYER_BUCKSHOT, 0, 0, 0.08716, 0.04362 );
} }
else else
{ {
EV_HLDM_FireBullets( idx, forward, right, up, 6, vecSrc, vecAiming, 2048, BULLET_PLAYER_BUCKSHOT, 0, &tracerCount[idx - 1], 0.08716, 0.08716 ); EV_HLDM_FireBullets( idx, forward, right, up, 6, vecSrc, vecAiming, 2048, BULLET_PLAYER_BUCKSHOT, 0, 0, 0.08716, 0.08716 );
} }
} }
//====================== //======================
@ -717,14 +717,7 @@ void EV_FireMP5( event_args_t *args )
EV_GetGunPosition( args, vecSrc, origin ); EV_GetGunPosition( args, vecSrc, origin );
VectorCopy( forward, vecAiming ); VectorCopy( forward, vecAiming );
if( gEngfuncs.GetMaxClients() > 1 ) EV_HLDM_FireBullets( idx, forward, right, up, 1, vecSrc, vecAiming, 8192, BULLET_PLAYER_MP5, 2, &tracerCount[idx % ARRAYSIZE( tracerCount )- 1], args->fparam1, args->fparam2 );
{
EV_HLDM_FireBullets( idx, forward, right, up, 1, vecSrc, vecAiming, 8192, BULLET_PLAYER_MP5, 2, &tracerCount[idx - 1], args->fparam1, args->fparam2 );
}
else
{
EV_HLDM_FireBullets( idx, forward, right, up, 1, vecSrc, vecAiming, 8192, BULLET_PLAYER_MP5, 2, &tracerCount[idx - 1], args->fparam1, args->fparam2 );
}
} }
// We only predict the animation and sound // We only predict the animation and sound

Loading…
Cancel
Save