Browse Source

Add a missing const qualifiers. Remove unneeded casts.

hltopdown
Andrey Akhmichin 5 years ago
parent
commit
93d1ed0294
  1. 4
      cl_dll/com_weapons.cpp
  2. 4
      dlls/client.cpp
  3. 4
      dlls/crossbow.cpp
  4. 2
      dlls/crowbar.cpp
  5. 6
      dlls/egon.cpp
  6. 10
      dlls/gauss.cpp
  7. 2
      dlls/glock.cpp
  8. 4
      dlls/hornetgun.cpp
  9. 2
      dlls/mp5.cpp
  10. 4
      dlls/plats.cpp
  11. 2
      dlls/python.cpp
  12. 4
      dlls/shotgun.cpp
  13. 2
      dlls/squeakgrenade.cpp
  14. 2
      dlls/tripmine.cpp
  15. 4
      dlls/util.h
  16. 14
      engine/cdll_int.h
  17. 10
      engine/eiface.h

4
cl_dll/com_weapons.cpp

@ -116,7 +116,7 @@ void HUD_PlaySound( const char *sound, float volume )
if( !g_runfuncs || !g_finalstate ) if( !g_runfuncs || !g_finalstate )
return; return;
gEngfuncs.pfnPlaySoundByNameAtLocation( sound, volume, (float *)&g_finalstate->playerstate.origin ); gEngfuncs.pfnPlaySoundByNameAtLocation( sound, volume, g_finalstate->playerstate.origin );
} }
/* /*
@ -138,7 +138,7 @@ void HUD_PlaybackEvent( int flags, const edict_t *pInvoker, unsigned short event
// Weapon prediction events are assumed to occur at the player's origin // Weapon prediction events are assumed to occur at the player's origin
org = g_finalstate->playerstate.origin; org = g_finalstate->playerstate.origin;
ang = v_angles; ang = v_angles;
gEngfuncs.pfnPlaybackEvent( flags, pInvoker, eventindex, delay, (float *)&org, (float *)&ang, fparam1, fparam2, iparam1, iparam2, bparam1, bparam2 ); gEngfuncs.pfnPlaybackEvent( flags, pInvoker, eventindex, delay, org, ang, fparam1, fparam2, iparam1, iparam2, bparam1, bparam2 );
} }
/* /*

4
dlls/client.cpp

@ -1102,8 +1102,8 @@ void SetupVisibility( edict_t *pViewEntity, edict_t *pClient, unsigned char **pv
} }
} }
*pvs = ENGINE_SET_PVS( (float *)&org ); *pvs = ENGINE_SET_PVS( org );
*pas = ENGINE_SET_PAS( (float *)&org ); *pas = ENGINE_SET_PAS( org );
} }
#include "entity_state.h" #include "entity_state.h"

4
dlls/crossbow.cpp

@ -373,7 +373,7 @@ void CCrossbow::FireSniperBolt()
flags = 0; flags = 0;
#endif #endif
PLAYBACK_EVENT_FULL( flags, m_pPlayer->edict(), m_usCrossbow2, 0.0, (float *)&g_vecZero, (float *)&g_vecZero, 0, 0, m_iClip, m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType], 0, 0 ); PLAYBACK_EVENT_FULL( flags, m_pPlayer->edict(), m_usCrossbow2, 0.0, g_vecZero, g_vecZero, 0, 0, m_iClip, m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType], 0, 0 );
// player "shoot" animation // player "shoot" animation
m_pPlayer->SetAnimation( PLAYER_ATTACK1 ); m_pPlayer->SetAnimation( PLAYER_ATTACK1 );
@ -416,7 +416,7 @@ void CCrossbow::FireBolt()
flags = 0; flags = 0;
#endif #endif
PLAYBACK_EVENT_FULL( flags, m_pPlayer->edict(), m_usCrossbow, 0.0, (float *)&g_vecZero, (float *)&g_vecZero, 0, 0, m_iClip, m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType], 0, 0 ); PLAYBACK_EVENT_FULL( flags, m_pPlayer->edict(), m_usCrossbow, 0.0, g_vecZero, g_vecZero, 0, 0, m_iClip, m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType], 0, 0 );
// player "shoot" animation // player "shoot" animation
m_pPlayer->SetAnimation( PLAYER_ATTACK1 ); m_pPlayer->SetAnimation( PLAYER_ATTACK1 );

2
dlls/crowbar.cpp

@ -204,7 +204,7 @@ int CCrowbar::Swing( int fFirst )
if( fFirst ) if( fFirst )
{ {
PLAYBACK_EVENT_FULL( FEV_NOTHOST, m_pPlayer->edict(), m_usCrowbar, PLAYBACK_EVENT_FULL( FEV_NOTHOST, m_pPlayer->edict(), m_usCrowbar,
0.0, (float *)&g_vecZero, (float *)&g_vecZero, 0, 0, 0, 0.0, g_vecZero, g_vecZero, 0, 0, 0,
0, 0, 0 ); 0, 0, 0 );
} }

6
dlls/egon.cpp

@ -197,7 +197,7 @@ void CEgon::Attack( void )
m_flAmmoUseTime = gpGlobals->time;// start using ammo ASAP. m_flAmmoUseTime = gpGlobals->time;// start using ammo ASAP.
PLAYBACK_EVENT_FULL( flags, m_pPlayer->edict(), m_usEgonFire, 0.0, (float *)&g_vecZero, (float *)&g_vecZero, 0.0, 0.0, m_fireState, m_fireMode, 1, 0 ); PLAYBACK_EVENT_FULL( flags, m_pPlayer->edict(), m_usEgonFire, 0.0, g_vecZero, g_vecZero, 0.0, 0.0, m_fireState, m_fireMode, 1, 0 );
m_shakeTime = 0; m_shakeTime = 0;
@ -216,7 +216,7 @@ void CEgon::Attack( void )
if( pev->fuser1 <= UTIL_WeaponTimeBase() ) if( pev->fuser1 <= UTIL_WeaponTimeBase() )
{ {
PLAYBACK_EVENT_FULL( flags, m_pPlayer->edict(), m_usEgonFire, 0, (float *)&g_vecZero, (float *)&g_vecZero, 0.0, 0.0, m_fireState, m_fireMode, 0, 0 ); PLAYBACK_EVENT_FULL( flags, m_pPlayer->edict(), m_usEgonFire, 0, g_vecZero, g_vecZero, 0.0, 0.0, m_fireState, m_fireMode, 0, 0 );
pev->fuser1 = 1000; pev->fuser1 = 1000;
} }
@ -504,7 +504,7 @@ void CEgon::EndAttack( void )
if( m_fireState != FIRE_OFF ) //Checking the button just in case!. if( m_fireState != FIRE_OFF ) //Checking the button just in case!.
bMakeNoise = true; bMakeNoise = true;
PLAYBACK_EVENT_FULL( FEV_GLOBAL | FEV_RELIABLE, m_pPlayer->edict(), m_usEgonStop, 0, (float *)&m_pPlayer->pev->origin, (float *)&m_pPlayer->pev->angles, 0.0, 0.0, bMakeNoise, 0, 0, 0 ); PLAYBACK_EVENT_FULL( FEV_GLOBAL | FEV_RELIABLE, m_pPlayer->edict(), m_usEgonStop, 0, m_pPlayer->pev->origin, m_pPlayer->pev->angles, 0.0, 0.0, bMakeNoise, 0, 0, 0 );
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 2.0; m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 2.0;
m_flNextPrimaryAttack = m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 0.5; m_flNextPrimaryAttack = m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 0.5;

10
dlls/gauss.cpp

@ -138,7 +138,7 @@ BOOL CGauss::Deploy()
void CGauss::Holster( int skiplocal /* = 0 */ ) void CGauss::Holster( int skiplocal /* = 0 */ )
{ {
PLAYBACK_EVENT_FULL( FEV_RELIABLE | FEV_GLOBAL, m_pPlayer->edict(), m_usGaussFire, 0.01, (float *)&m_pPlayer->pev->origin, (float *)&m_pPlayer->pev->angles, 0.0, 0.0, 0, 0, 0, 1 ); PLAYBACK_EVENT_FULL( FEV_RELIABLE | FEV_GLOBAL, m_pPlayer->edict(), m_usGaussFire, 0.01, m_pPlayer->pev->origin, m_pPlayer->pev->angles, 0.0, 0.0, 0, 0, 0, 1 );
m_pPlayer->m_flNextAttack = UTIL_WeaponTimeBase() + 0.5; m_pPlayer->m_flNextAttack = UTIL_WeaponTimeBase() + 0.5;
@ -217,7 +217,7 @@ void CGauss::SecondaryAttack()
m_pPlayer->m_flStartCharge = gpGlobals->time; m_pPlayer->m_flStartCharge = gpGlobals->time;
m_pPlayer->m_flAmmoStartCharge = UTIL_WeaponTimeBase() + GetFullChargeTime(); m_pPlayer->m_flAmmoStartCharge = UTIL_WeaponTimeBase() + GetFullChargeTime();
PLAYBACK_EVENT_FULL( FEV_NOTHOST, m_pPlayer->edict(), m_usGaussSpin, 0.0, (float *)&g_vecZero, (float *)&g_vecZero, 0.0, 0.0, 110, 0, 0, 0 ); PLAYBACK_EVENT_FULL( FEV_NOTHOST, m_pPlayer->edict(), m_usGaussSpin, 0.0, g_vecZero, g_vecZero, 0.0, 0.0, 110, 0, 0, 0 );
m_iSoundState = SND_CHANGE_PITCH; m_iSoundState = SND_CHANGE_PITCH;
} }
@ -281,7 +281,7 @@ void CGauss::SecondaryAttack()
if( m_iSoundState == 0 ) if( m_iSoundState == 0 )
ALERT( at_console, "sound state %d\n", m_iSoundState ); ALERT( at_console, "sound state %d\n", m_iSoundState );
PLAYBACK_EVENT_FULL( FEV_NOTHOST, m_pPlayer->edict(), m_usGaussSpin, 0.0, (float *)&g_vecZero, (float *)&g_vecZero, 0.0, 0.0, pitch, 0, ( m_iSoundState == SND_CHANGE_PITCH ) ? 1 : 0, 0 ); PLAYBACK_EVENT_FULL( FEV_NOTHOST, m_pPlayer->edict(), m_usGaussSpin, 0.0, g_vecZero, g_vecZero, 0.0, 0.0, pitch, 0, ( m_iSoundState == SND_CHANGE_PITCH ) ? 1 : 0, 0 );
m_iSoundState = SND_CHANGE_PITCH; // hack for going through level transitions m_iSoundState = SND_CHANGE_PITCH; // hack for going through level transitions
@ -389,13 +389,13 @@ void CGauss::Fire( Vector vecOrigSrc, Vector vecDir, float flDamage )
g_irunninggausspred = true; g_irunninggausspred = true;
#endif #endif
// The main firing event is sent unreliably so it won't be delayed. // The main firing event is sent unreliably so it won't be delayed.
PLAYBACK_EVENT_FULL( FEV_NOTHOST, m_pPlayer->edict(), m_usGaussFire, 0.0, (float *)&m_pPlayer->pev->origin, (float *)&m_pPlayer->pev->angles, flDamage, 0.0, 0, 0, m_fPrimaryFire ? 1 : 0, 0 ); PLAYBACK_EVENT_FULL( FEV_NOTHOST, m_pPlayer->edict(), m_usGaussFire, 0.0, m_pPlayer->pev->origin, m_pPlayer->pev->angles, flDamage, 0.0, 0, 0, m_fPrimaryFire ? 1 : 0, 0 );
// This reliable event is used to stop the spinning sound // This reliable event is used to stop the spinning sound
// It's delayed by a fraction of second to make sure it is delayed by 1 frame on the client // It's delayed by a fraction of second to make sure it is delayed by 1 frame on the client
// It's sent reliably anyway, which could lead to other delays // It's sent reliably anyway, which could lead to other delays
PLAYBACK_EVENT_FULL( FEV_NOTHOST | FEV_RELIABLE, m_pPlayer->edict(), m_usGaussFire, 0.01, (float *)&m_pPlayer->pev->origin, (float *)&m_pPlayer->pev->angles, 0.0, 0.0, 0, 0, 0, 1 ); PLAYBACK_EVENT_FULL( FEV_NOTHOST | FEV_RELIABLE, m_pPlayer->edict(), m_usGaussFire, 0.01, m_pPlayer->pev->origin, m_pPlayer->pev->angles, 0.0, 0.0, 0, 0, 0, 1 );
/*ALERT( at_console, "%f %f %f\n%f %f %f\n", /*ALERT( at_console, "%f %f %f\n%f %f %f\n",
vecSrc.x, vecSrc.y, vecSrc.z, vecSrc.x, vecSrc.y, vecSrc.z,

2
dlls/glock.cpp

@ -168,7 +168,7 @@ void CGlock::GlockFire( float flSpread, float flCycleTime, BOOL fUseAutoAim )
Vector vecDir; Vector vecDir;
vecDir = m_pPlayer->FireBulletsPlayer( 1, vecSrc, vecAiming, Vector( flSpread, flSpread, flSpread ), 8192, BULLET_PLAYER_9MM, 0, 0, m_pPlayer->pev, m_pPlayer->random_seed ); vecDir = m_pPlayer->FireBulletsPlayer( 1, vecSrc, vecAiming, Vector( flSpread, flSpread, flSpread ), 8192, BULLET_PLAYER_9MM, 0, 0, m_pPlayer->pev, m_pPlayer->random_seed );
PLAYBACK_EVENT_FULL( flags, m_pPlayer->edict(), fUseAutoAim ? m_usFireGlock1 : m_usFireGlock2, 0.0, (float *)&g_vecZero, (float *)&g_vecZero, vecDir.x, vecDir.y, 0, 0, ( m_iClip == 0 ) ? 1 : 0, 0 ); PLAYBACK_EVENT_FULL( flags, m_pPlayer->edict(), fUseAutoAim ? m_usFireGlock1 : m_usFireGlock2, 0.0, g_vecZero, g_vecZero, vecDir.x, vecDir.y, 0, 0, ( m_iClip == 0 ) ? 1 : 0, 0 );
m_flNextPrimaryAttack = m_flNextSecondaryAttack = GetNextAttackDelay( flCycleTime ); m_flNextPrimaryAttack = m_flNextSecondaryAttack = GetNextAttackDelay( flCycleTime );

4
dlls/hornetgun.cpp

@ -150,7 +150,7 @@ void CHgun::PrimaryAttack()
#else #else
flags = 0; flags = 0;
#endif #endif
PLAYBACK_EVENT_FULL( flags, m_pPlayer->edict(), m_usHornetFire, 0.0, (float *)&g_vecZero, (float *)&g_vecZero, 0.0, 0.0, FIREMODE_TRACK, 0, 0, 0 ); PLAYBACK_EVENT_FULL( flags, m_pPlayer->edict(), m_usHornetFire, 0.0, g_vecZero, g_vecZero, 0.0, 0.0, FIREMODE_TRACK, 0, 0, 0 );
// player "shoot" animation // player "shoot" animation
m_pPlayer->SetAnimation( PLAYER_ATTACK1 ); m_pPlayer->SetAnimation( PLAYER_ATTACK1 );
@ -231,7 +231,7 @@ void CHgun::SecondaryAttack( void )
#else #else
flags = 0; flags = 0;
#endif #endif
PLAYBACK_EVENT_FULL( flags, m_pPlayer->edict(), m_usHornetFire, 0.0, (float *)&g_vecZero, (float *)&g_vecZero, 0.0, 0.0, FIREMODE_FAST, 0, 0, 0 ); PLAYBACK_EVENT_FULL( flags, m_pPlayer->edict(), m_usHornetFire, 0.0, g_vecZero, g_vecZero, 0.0, 0.0, FIREMODE_FAST, 0, 0, 0 );
m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType]--; m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType]--;
m_pPlayer->m_iWeaponVolume = NORMAL_GUN_VOLUME; m_pPlayer->m_iWeaponVolume = NORMAL_GUN_VOLUME;

2
dlls/mp5.cpp

@ -171,7 +171,7 @@ void CMP5::PrimaryAttack()
#else #else
flags = 0; flags = 0;
#endif #endif
PLAYBACK_EVENT_FULL( flags, m_pPlayer->edict(), m_usMP5, 0.0, (float *)&g_vecZero, (float *)&g_vecZero, vecDir.x, vecDir.y, 0, 0, 0, 0 ); PLAYBACK_EVENT_FULL( flags, m_pPlayer->edict(), m_usMP5, 0.0, g_vecZero, g_vecZero, vecDir.x, vecDir.y, 0, 0, 0, 0 );
if( !m_iClip && m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] <= 0 ) if( !m_iClip && m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] <= 0 )
// HEV suit - indicate out of ammo condition // HEV suit - indicate out of ammo condition

4
dlls/plats.cpp

@ -1059,7 +1059,7 @@ void CFuncTrackTrain::StopSound( void )
us_encode = us_sound; us_encode = us_sound;
PLAYBACK_EVENT_FULL( FEV_RELIABLE | FEV_UPDATE, edict(), m_usAdjustPitch, 0.0, PLAYBACK_EVENT_FULL( FEV_RELIABLE | FEV_UPDATE, edict(), m_usAdjustPitch, 0.0,
(float *)&g_vecZero, (float *)&g_vecZero, 0.0, 0.0, us_encode, 0, 1, 0 ); g_vecZero, g_vecZero, 0.0, 0.0, us_encode, 0, 1, 0 );
/* /*
STOP_SOUND( ENT( pev ), CHAN_STATIC, STRING( pev->noise ) ); STOP_SOUND( ENT( pev ), CHAN_STATIC, STRING( pev->noise ) );
*/ */
@ -1107,7 +1107,7 @@ void CFuncTrackTrain::UpdateSound( void )
us_encode = us_sound | us_pitch | us_volume; us_encode = us_sound | us_pitch | us_volume;
PLAYBACK_EVENT_FULL( FEV_RELIABLE | FEV_UPDATE, edict(), m_usAdjustPitch, 0.0, PLAYBACK_EVENT_FULL( FEV_RELIABLE | FEV_UPDATE, edict(), m_usAdjustPitch, 0.0,
(float *)&g_vecZero, (float *)&g_vecZero, 0.0, 0.0, us_encode, 0, 0, 0 ); g_vecZero, g_vecZero, 0.0, 0.0, us_encode, 0, 0, 0 );
} }
} }

2
dlls/python.cpp

@ -200,7 +200,7 @@ void CPython::PrimaryAttack()
#else #else
flags = 0; flags = 0;
#endif #endif
PLAYBACK_EVENT_FULL( flags, m_pPlayer->edict(), m_usFirePython, 0.0, (float *)&g_vecZero, (float *)&g_vecZero, vecDir.x, vecDir.y, 0, 0, 0, 0 ); PLAYBACK_EVENT_FULL( flags, m_pPlayer->edict(), m_usFirePython, 0.0, g_vecZero, g_vecZero, vecDir.x, vecDir.y, 0, 0, 0, 0 );
if( !m_iClip && m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] <= 0 ) if( !m_iClip && m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] <= 0 )
// HEV suit - indicate out of ammo condition // HEV suit - indicate out of ammo condition

4
dlls/shotgun.cpp

@ -166,7 +166,7 @@ void CShotgun::PrimaryAttack()
vecDir = m_pPlayer->FireBulletsPlayer( 6, vecSrc, vecAiming, VECTOR_CONE_10DEGREES, 2048, BULLET_PLAYER_BUCKSHOT, 0, 0, m_pPlayer->pev, m_pPlayer->random_seed ); vecDir = m_pPlayer->FireBulletsPlayer( 6, vecSrc, vecAiming, VECTOR_CONE_10DEGREES, 2048, BULLET_PLAYER_BUCKSHOT, 0, 0, m_pPlayer->pev, m_pPlayer->random_seed );
} }
PLAYBACK_EVENT_FULL( flags, m_pPlayer->edict(), m_usSingleFire, 0.0, (float *)&g_vecZero, (float *)&g_vecZero, vecDir.x, vecDir.y, 0, 0, 0, 0 ); PLAYBACK_EVENT_FULL( flags, m_pPlayer->edict(), m_usSingleFire, 0.0, g_vecZero, g_vecZero, vecDir.x, vecDir.y, 0, 0, 0, 0 );
if( !m_iClip && m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] <= 0 ) if( !m_iClip && m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] <= 0 )
// HEV suit - indicate out of ammo condition // HEV suit - indicate out of ammo condition
@ -237,7 +237,7 @@ void CShotgun::SecondaryAttack( void )
vecDir = m_pPlayer->FireBulletsPlayer( 12, vecSrc, vecAiming, VECTOR_CONE_10DEGREES, 2048, BULLET_PLAYER_BUCKSHOT, 0, 0, m_pPlayer->pev, m_pPlayer->random_seed ); vecDir = m_pPlayer->FireBulletsPlayer( 12, vecSrc, vecAiming, VECTOR_CONE_10DEGREES, 2048, BULLET_PLAYER_BUCKSHOT, 0, 0, m_pPlayer->pev, m_pPlayer->random_seed );
} }
PLAYBACK_EVENT_FULL( flags, m_pPlayer->edict(), m_usDoubleFire, 0.0, (float *)&g_vecZero, (float *)&g_vecZero, vecDir.x, vecDir.y, 0, 0, 0, 0 ); PLAYBACK_EVENT_FULL( flags, m_pPlayer->edict(), m_usDoubleFire, 0.0, g_vecZero, g_vecZero, vecDir.x, vecDir.y, 0, 0, 0, 0 );
if( !m_iClip && m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] <= 0 ) if( !m_iClip && m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] <= 0 )
// HEV suit - indicate out of ammo condition // HEV suit - indicate out of ammo condition

2
dlls/squeakgrenade.cpp

@ -508,7 +508,7 @@ void CSqueak::PrimaryAttack()
#else #else
flags = 0; flags = 0;
#endif #endif
PLAYBACK_EVENT_FULL( flags, m_pPlayer->edict(), m_usSnarkFire, 0.0, (float *)&g_vecZero, (float *)&g_vecZero, 0.0, 0.0, 0, 0, 0, 0 ); PLAYBACK_EVENT_FULL( flags, m_pPlayer->edict(), m_usSnarkFire, 0.0, g_vecZero, g_vecZero, 0.0, 0.0, 0, 0, 0, 0 );
if( tr.fAllSolid == 0 && tr.fStartSolid == 0 && tr.flFraction > 0.25 ) if( tr.fAllSolid == 0 && tr.fStartSolid == 0 && tr.flFraction > 0.25 )
{ {

2
dlls/tripmine.cpp

@ -444,7 +444,7 @@ void CTripmine::PrimaryAttack( void )
#else #else
flags = 0; flags = 0;
#endif #endif
PLAYBACK_EVENT_FULL( flags, m_pPlayer->edict(), m_usTripFire, 0.0, (float *)&g_vecZero, (float *)&g_vecZero, 0.0, 0.0, 0, 0, 0, 0 ); PLAYBACK_EVENT_FULL( flags, m_pPlayer->edict(), m_usTripFire, 0.0, g_vecZero, g_vecZero, 0.0, 0.0, 0, 0, 0, 0 );
if( tr.flFraction < 1.0 ) if( tr.flFraction < 1.0 )
{ {

4
dlls/util.h

@ -552,8 +552,8 @@ void EMIT_GROUPNAME_SUIT(edict_t *entity, const char *groupname);
#define RANDOM_SOUND_ARRAY( array ) (array) [ RANDOM_LONG(0,ARRAYSIZE( (array) )-1) ] #define RANDOM_SOUND_ARRAY( array ) (array) [ RANDOM_LONG(0,ARRAYSIZE( (array) )-1) ]
#define PLAYBACK_EVENT( flags, who, index ) PLAYBACK_EVENT_FULL( flags, who, index, 0, (float *)&g_vecZero, (float *)&g_vecZero, 0.0, 0.0, 0, 0, 0, 0 ); #define PLAYBACK_EVENT( flags, who, index ) PLAYBACK_EVENT_FULL( flags, who, index, 0, g_vecZero, g_vecZero, 0.0, 0.0, 0, 0, 0, 0 );
#define PLAYBACK_EVENT_DELAY( flags, who, index, delay ) PLAYBACK_EVENT_FULL( flags, who, index, delay, (float *)&g_vecZero, (float *)&g_vecZero, 0.0, 0.0, 0, 0, 0, 0 ); #define PLAYBACK_EVENT_DELAY( flags, who, index, delay ) PLAYBACK_EVENT_FULL( flags, who, index, delay, g_vecZero, g_vecZero, 0.0, 0.0, 0, 0, 0, 0 );
#define GROUP_OP_AND 0 #define GROUP_OP_AND 0
#define GROUP_OP_NAND 1 #define GROUP_OP_NAND 1

14
engine/cdll_int.h

@ -169,7 +169,7 @@ typedef struct cl_enginefuncs_s
int (*GetWindowCenterX)( void ); int (*GetWindowCenterX)( void );
int (*GetWindowCenterY)( void ); int (*GetWindowCenterY)( void );
void (*GetViewAngles)( float * ); void (*GetViewAngles)( float * );
void (*SetViewAngles)( float * ); void (*SetViewAngles)( const float * );
int (*GetMaxClients)( void ); int (*GetMaxClients)( void );
void (*Cvar_SetValue)( const char *cvar, float value ); void (*Cvar_SetValue)( const char *cvar, float value );
@ -195,20 +195,20 @@ typedef struct cl_enginefuncs_s
float (*GetClientTime)( void ); float (*GetClientTime)( void );
void (*V_CalcShake)( void ); void (*V_CalcShake)( void );
void (*V_ApplyShake)( float *origin, float *angles, float factor ); void (*V_ApplyShake)( const float *origin, const float *angles, float factor );
int (*PM_PointContents)( float *point, int *truecontents ); int (*PM_PointContents)( const float *point, int *truecontents );
int (*PM_WaterEntity)( float *p ); int (*PM_WaterEntity)( const float *p );
struct pmtrace_s *(*PM_TraceLine)( float *start, float *end, int flags, int usehull, int ignore_pe ); struct pmtrace_s *(*PM_TraceLine)( const float *start, const float *end, int flags, int usehull, int ignore_pe );
struct model_s *(*CL_LoadModel)( const char *modelname, int *index ); struct model_s *(*CL_LoadModel)( const char *modelname, int *index );
int (*CL_CreateVisibleEntity)( int type, struct cl_entity_s *ent ); int (*CL_CreateVisibleEntity)( int type, struct cl_entity_s *ent );
const struct model_s* (*GetSpritePointer)( HSPRITE hSprite ); const struct model_s* (*GetSpritePointer)( HSPRITE hSprite );
void (*pfnPlaySoundByNameAtLocation)( const char *szSound, float volume, float *origin ); void (*pfnPlaySoundByNameAtLocation)( const char *szSound, float volume, const float *origin );
unsigned short (*pfnPrecacheEvent)( int type, const char* psz ); unsigned short (*pfnPrecacheEvent)( int type, const char* psz );
void (*pfnPlaybackEvent)( int flags, const struct edict_s *pInvoker, unsigned short eventindex, float delay, float *origin, float *angles, float fparam1, float fparam2, int iparam1, int iparam2, int bparam1, int bparam2 ); void (*pfnPlaybackEvent)( int flags, const struct edict_s *pInvoker, unsigned short eventindex, float delay, const float *origin, const float *angles, float fparam1, float fparam2, int iparam1, int iparam2, int bparam1, int bparam2 );
void (*pfnWeaponAnim)( int iAnim, int body ); void (*pfnWeaponAnim)( int iAnim, int body );
float (*pfnRandomFloat)( float flLow, float flHigh ); float (*pfnRandomFloat)( float flLow, float flHigh );
int (*pfnRandomLong)( int lLow, int lHigh ); int (*pfnRandomLong)( int lLow, int lHigh );

10
engine/eiface.h

@ -124,7 +124,7 @@ typedef struct enginefuncs_s
int (*pfnWalkMove)( edict_t *ent, float yaw, float dist, int iMode ); int (*pfnWalkMove)( edict_t *ent, float yaw, float dist, int iMode );
void (*pfnSetOrigin)( edict_t *e, const float *rgflOrigin ); void (*pfnSetOrigin)( edict_t *e, const float *rgflOrigin );
void (*pfnEmitSound)( edict_t *entity, int channel, const char *sample, /*int*/float volume, float attenuation, int fFlags, int pitch ); void (*pfnEmitSound)( edict_t *entity, int channel, const char *sample, /*int*/float volume, float attenuation, int fFlags, int pitch );
void (*pfnEmitAmbientSound)( edict_t *entity, float *pos, const char *samp, float vol, float attenuation, int fFlags, int pitch ); void (*pfnEmitAmbientSound)( edict_t *entity, const float *pos, const char *samp, float vol, float attenuation, int fFlags, int pitch );
void (*pfnTraceLine)( const float *v1, const float *v2, int fNoMonsters, edict_t *pentToSkip, TraceResult *ptr ); void (*pfnTraceLine)( const float *v1, const float *v2, int fNoMonsters, edict_t *pentToSkip, TraceResult *ptr );
void (*pfnTraceToss)( edict_t* pent, edict_t* pentToIgnore, TraceResult *ptr ); void (*pfnTraceToss)( edict_t* pent, edict_t* pentToIgnore, TraceResult *ptr );
int (*pfnTraceMonsterHull)( edict_t *pEdict, const float *v1, const float *v2, int fNoMonsters, edict_t *pentToSkip, TraceResult *ptr ); int (*pfnTraceMonsterHull)( edict_t *pEdict, const float *v1, const float *v2, int fNoMonsters, edict_t *pentToSkip, TraceResult *ptr );
@ -219,10 +219,10 @@ typedef struct enginefuncs_s
void (*pfnSetPhysicsKeyValue)( const edict_t *pClient, const char *key, const char *value ); void (*pfnSetPhysicsKeyValue)( const edict_t *pClient, const char *key, const char *value );
const char *(*pfnGetPhysicsInfoString)( const edict_t *pClient ); const char *(*pfnGetPhysicsInfoString)( const edict_t *pClient );
unsigned short (*pfnPrecacheEvent)( int type, const char*psz ); unsigned short (*pfnPrecacheEvent)( int type, const char*psz );
void (*pfnPlaybackEvent)( int flags, const edict_t *pInvoker, unsigned short eventindex, float delay, float *origin, float *angles, float fparam1, float fparam2, int iparam1, int iparam2, int bparam1, int bparam2 ); void (*pfnPlaybackEvent)( int flags, const edict_t *pInvoker, unsigned short eventindex, float delay, const float *origin, const float *angles, float fparam1, float fparam2, int iparam1, int iparam2, int bparam1, int bparam2 );
unsigned char *(*pfnSetFatPVS)( float *org ); unsigned char *(*pfnSetFatPVS)( const float *org );
unsigned char *(*pfnSetFatPAS)( float *org ); unsigned char *(*pfnSetFatPAS)( const float *org );
int (*pfnCheckVisibility )( const edict_t *entity, unsigned char *pset ); int (*pfnCheckVisibility )( const edict_t *entity, unsigned char *pset );
@ -241,7 +241,7 @@ typedef struct enginefuncs_s
// Forces the client and server to be running with the same version of the specified file // Forces the client and server to be running with the same version of the specified file
// ( e.g., a player model ). // ( e.g., a player model ).
// Calling this has no effect in single player // Calling this has no effect in single player
void (*pfnForceUnmodified)( FORCE_TYPE type, float *mins, float *maxs, const char *filename ); void (*pfnForceUnmodified)( FORCE_TYPE type, const float *mins, const float *maxs, const char *filename );
void (*pfnGetPlayerStats)( const edict_t *pClient, int *ping, int *packet_loss ); void (*pfnGetPlayerStats)( const edict_t *pClient, int *ping, int *packet_loss );

Loading…
Cancel
Save