Browse Source

Remove useless casts.

dmc
Andrey Akhmichin 5 years ago
parent
commit
93444b9692
  1. 4
      cl_dll/quake/quake_weapons.cpp
  2. 8
      dlls/3wave/flags.cpp
  3. 6
      dlls/3wave/grapple.cpp
  4. 4
      dlls/3wave/threewave_gamerules.cpp
  5. 2
      dlls/combat.cpp
  6. 2
      dlls/dmc/quake_items.cpp
  7. 7
      dlls/dmc/quake_rocket.cpp
  8. 27
      dlls/dmc/quake_weapons_all.cpp
  9. 16
      dlls/doors.cpp
  10. 6
      dlls/player.cpp
  11. 2
      dlls/triggers.cpp
  12. 2
      dlls/weapons.cpp

4
cl_dll/quake/quake_weapons.cpp

@ -337,7 +337,7 @@ void CBasePlayerWeapon::ItemPostFrame( void )
m_bPlayedIdleAnim = TRUE; m_bPlayedIdleAnim = TRUE;
if ( m_pPlayer->m_iQuakeWeapon == IT_LIGHTNING ) if ( m_pPlayer->m_iQuakeWeapon == IT_LIGHTNING )
PLAYBACK_EVENT_FULL( FEV_NOTHOST, m_pPlayer->edict(), m_pPlayer->m_usLightning, 0, (float *)&m_pPlayer->pev->origin, (float *)&m_pPlayer->pev->angles, 0.0, 0.0, 0, 1, 0, 0 ); PLAYBACK_EVENT_FULL( FEV_NOTHOST, m_pPlayer->edict(), m_pPlayer->m_usLightning, 0, m_pPlayer->pev->origin, m_pPlayer->pev->angles, 0.0, 0.0, 0, 1, 0, 0 );
} }
WeaponIdle( ); WeaponIdle( );
@ -421,7 +421,7 @@ void CBasePlayer::Killed( entvars_t *pevAttacker, int iGib )
{ {
if ( m_iQuakeWeapon == IT_LIGHTNING ) if ( m_iQuakeWeapon == IT_LIGHTNING )
{ {
PLAYBACK_EVENT_FULL( FEV_NOTHOST, edict(), m_usLightning, 0, (float *)&pev->origin, (float *)&pev->angles, 0.0, 0.0, 0, 1, 0, 0 ); PLAYBACK_EVENT_FULL( FEV_NOTHOST, edict(), m_usLightning, 0, pev->origin, pev->angles, 0.0, 0.0, 0, 1, 0, 0 );
} }
// Holster weapon immediately, to allow it to cleanup // Holster weapon immediately, to allow it to cleanup

8
dlls/3wave/flags.cpp

@ -176,7 +176,7 @@ void CItemFlag::FlagTouch( CBaseEntity *pToucher )
Capture( pPlayer, RED ); Capture( pPlayer, RED );
PLAYBACK_EVENT_FULL( FEV_GLOBAL | FEV_RELIABLE, PLAYBACK_EVENT_FULL( FEV_GLOBAL | FEV_RELIABLE,
pPlayer->edict(), g_usCarried, 0, (float*)&g_vecZero, (float*)&g_vecZero, pPlayer->edict(), g_usCarried, 0, g_vecZero, g_vecZero,
0.0, 0.0, pPlayer->entindex(), pPlayer->pev->team, 1, 0 ); 0.0, 0.0, pPlayer->entindex(), pPlayer->pev->team, 1, 0 );
return; return;
} }
@ -223,7 +223,7 @@ void CItemFlag::FlagTouch( CBaseEntity *pToucher )
pCarriedFlag->Owner = pPlayer; pCarriedFlag->Owner = pPlayer;
PLAYBACK_EVENT_FULL( FEV_GLOBAL | FEV_RELIABLE, PLAYBACK_EVENT_FULL( FEV_GLOBAL | FEV_RELIABLE,
pPlayer->edict(), g_usCarried, 0, (float*)&g_vecZero, (float*)&g_vecZero, pPlayer->edict(), g_usCarried, 0, g_vecZero, g_vecZero,
0.0, 0.0, pPlayer->entindex(), pPlayer->pev->team, 0, 0 ); 0.0, 0.0, pPlayer->entindex(), pPlayer->pev->team, 0, 0 );
UTIL_Remove( this ); UTIL_Remove( this );
@ -269,7 +269,7 @@ void CItemFlag::FlagTouch( CBaseEntity *pToucher )
pCarriedFlag->Owner = pPlayer; pCarriedFlag->Owner = pPlayer;
PLAYBACK_EVENT_FULL( FEV_GLOBAL | FEV_RELIABLE, PLAYBACK_EVENT_FULL( FEV_GLOBAL | FEV_RELIABLE,
pPlayer->edict(), g_usCarried, 0, (float*)&g_vecZero, (float*)&g_vecZero, pPlayer->edict(), g_usCarried, 0, g_vecZero, g_vecZero,
0.0, 0.0, pPlayer->entindex(), pPlayer->pev->team, 0, 0 ); 0.0, 0.0, pPlayer->entindex(), pPlayer->pev->team, 0, 0 );
} }
@ -382,7 +382,7 @@ void CItemFlag::Materialize()
} }
PLAYBACK_EVENT_FULL( FEV_GLOBAL | FEV_RELIABLE, PLAYBACK_EVENT_FULL( FEV_GLOBAL | FEV_RELIABLE,
edict(), g_usFlagSpawn, 0, (float*)&g_vecZero, (float*)&g_vecZero, edict(), g_usFlagSpawn, 0, g_vecZero, g_vecZero,
0.0, 0.0, pev->team, 0, 0, 0 ); 0.0, 0.0, pev->team, 0, 0, 0 );
Dropped = FALSE; Dropped = FALSE;

6
dlls/3wave/grapple.cpp

@ -36,7 +36,7 @@ void CGrapple::Reset_Grapple()
pOwner->m_bHook_Out = FALSE; pOwner->m_bHook_Out = FALSE;
PLAYBACK_EVENT_FULL( FEV_GLOBAL | FEV_RELIABLE, PLAYBACK_EVENT_FULL( FEV_GLOBAL | FEV_RELIABLE,
pOwner->edict(), g_usCable, 0, (float*)&g_vecZero, (float*)&g_vecZero, pOwner->edict(), g_usCable, 0, g_vecZero, g_vecZero,
0.0, 0.0, entindex(), pev->team, 1, 0 ); 0.0, 0.0, entindex(), pev->team, 1, 0 );
STOP_SOUND( edict(), CHAN_WEAPON, "weapons/grhang.wav" ); STOP_SOUND( edict(), CHAN_WEAPON, "weapons/grhang.wav" );
@ -261,7 +261,7 @@ void CBasePlayer::Service_Grapple()
m_ppHook->m_flNextIdleTime = gpGlobals->time + RANDOM_LONG( 1, 3 ); m_ppHook->m_flNextIdleTime = gpGlobals->time + RANDOM_LONG( 1, 3 );
PLAYBACK_EVENT_FULL( FEV_GLOBAL | FEV_RELIABLE, PLAYBACK_EVENT_FULL( FEV_GLOBAL | FEV_RELIABLE,
edict(), g_usCable, 0, (float *)&g_vecZero, (float *)&g_vecZero, edict(), g_usCable, 0, g_vecZero, g_vecZero,
0.0, 0.0, m_ppHook->entindex(), pev->team, 1, 0 ); 0.0, 0.0, m_ppHook->entindex(), pev->team, 1, 0 );
} }
else if( m_ppHook->m_flNextIdleTime <= gpGlobals->time ) else if( m_ppHook->m_flNextIdleTime <= gpGlobals->time )
@ -343,7 +343,7 @@ void CBasePlayer::Throw_Grapple()
m_ppHook->pev->fixangle = TRUE; m_ppHook->pev->fixangle = TRUE;
PLAYBACK_EVENT_FULL( FEV_GLOBAL | FEV_RELIABLE, PLAYBACK_EVENT_FULL( FEV_GLOBAL | FEV_RELIABLE,
edict(), g_usCable, 0, (float*)&g_vecZero, (float*)&g_vecZero, edict(), g_usCable, 0, g_vecZero, g_vecZero,
0.0, 0.0, m_ppHook->entindex(), pev->team, 0, 0 ); 0.0, 0.0, m_ppHook->entindex(), pev->team, 0, 0 );
m_bHook_Out = TRUE; m_bHook_Out = TRUE;

4
dlls/3wave/threewave_gamerules.cpp

@ -663,7 +663,7 @@ void CThreeWave::ClientDisconnected( edict_t *pClient )
pFlag->m_flDroppedTime = gpGlobals->time + TEAM_CAPTURE_FLAG_RETURN_TIME; pFlag->m_flDroppedTime = gpGlobals->time + TEAM_CAPTURE_FLAG_RETURN_TIME;
PLAYBACK_EVENT_FULL( FEV_GLOBAL | FEV_RELIABLE, PLAYBACK_EVENT_FULL( FEV_GLOBAL | FEV_RELIABLE,
pPlayer->edict(), g_usCarried, 0, (float*)&g_vecZero, (float*)&g_vecZero, pPlayer->edict(), g_usCarried, 0, g_vecZero, g_vecZero,
0.0, 0.0, pPlayer->entindex(), pPlayer->pev->team, 1, 0 ); 0.0, 0.0, pPlayer->entindex(), pPlayer->pev->team, 1, 0 );
MESSAGE_BEGIN( MSG_ALL, gmsgCTFMsgs, NULL ); MESSAGE_BEGIN( MSG_ALL, gmsgCTFMsgs, NULL );
@ -902,7 +902,7 @@ void CThreeWave::PlayerKilled( CBasePlayer *pVictim, entvars_t *pKiller, entvars
pFlag->Dropped = TRUE; pFlag->Dropped = TRUE;
PLAYBACK_EVENT_FULL( FEV_GLOBAL | FEV_RELIABLE, PLAYBACK_EVENT_FULL( FEV_GLOBAL | FEV_RELIABLE,
pVictim->edict(), g_usCarried, 0, (float *)&g_vecZero, (float *)&g_vecZero, pVictim->edict(), g_usCarried, 0, g_vecZero, g_vecZero,
0.0, 0.0, pVictim->entindex(), pVictim->pev->team, 1, 0 ); 0.0, 0.0, pVictim->entindex(), pVictim->pev->team, 1, 0 );
pFlag->m_flDroppedTime = gpGlobals->time + TEAM_CAPTURE_FLAG_RETURN_TIME; pFlag->m_flDroppedTime = gpGlobals->time + TEAM_CAPTURE_FLAG_RETURN_TIME;

2
dlls/combat.cpp

@ -270,7 +270,7 @@ void CBaseMonster::GibMonster( void )
if( CVAR_GET_FLOAT( "violence_hgibs" ) != 0 ) // Only the player will ever get here if( CVAR_GET_FLOAT( "violence_hgibs" ) != 0 ) // Only the player will ever get here
{ {
if( IsPlayer() ) if( IsPlayer() )
PLAYBACK_EVENT_FULL ( FEV_GLOBAL, edict(), g_sGibbed, 0.0, (float *)&pev->origin, (float *)&g_vecAttackDir, 0.0, 0.0, 0, 0, 0, 0 ); PLAYBACK_EVENT_FULL ( FEV_GLOBAL, edict(), g_sGibbed, 0.0, pev->origin, g_vecAttackDir, 0.0, 0.0, 0, 0, 0, 0 );
/*CGib::SpawnHeadGib( pev ); /*CGib::SpawnHeadGib( pev );
CGib::SpawnRandomGibs( pev, 4, 1 );// throw some human gibs.*/ CGib::SpawnRandomGibs( pev, 4, 1 );// throw some human gibs.*/

2
dlls/dmc/quake_items.cpp

@ -1162,7 +1162,7 @@ BOOL CItemPowerup::MyTouch( CBasePlayer *pPlayer )
pPlayer->W_SetCurrentAmmo(); pPlayer->W_SetCurrentAmmo();
PLAYBACK_EVENT_FULL( FEV_GLOBAL | FEV_RELIABLE, PLAYBACK_EVENT_FULL( FEV_GLOBAL | FEV_RELIABLE,
pPlayer->edict(), g_usPowerUp, 0, (float *)&g_vecZero, (float *)&g_vecZero, pPlayer->edict(), g_usPowerUp, 0, g_vecZero, g_vecZero,
(float)iPowerUp, 0.0, pPlayer->entindex(), pPlayer->pev->team, 0, 0 ); (float)iPowerUp, 0.0, pPlayer->entindex(), pPlayer->pev->team, 0, 0 );
return TRUE; return TRUE;

7
dlls/dmc/quake_rocket.cpp

@ -59,7 +59,7 @@ CQuakeRocket *CQuakeRocket::CreateRocket( Vector vecOrigin, Vector vecAngles, CB
// pRocket->pev->effects |= EF_LIGHT; // pRocket->pev->effects |= EF_LIGHT;
PLAYBACK_EVENT_FULL (FEV_GLOBAL, pRocket->edict(), g_sTrail, 0.0, PLAYBACK_EVENT_FULL (FEV_GLOBAL, pRocket->edict(), g_sTrail, 0.0,
(float *)&pRocket->pev->origin, (float *)&pRocket->pev->angles, 0.7, 0.0, pRocket->entindex(), ROCKET_TRAIL, 0, 0); pRocket->pev->origin, pRocket->pev->angles, 0.7, 0.0, pRocket->entindex(), ROCKET_TRAIL, 0, 0);
return pRocket; return pRocket;
} }
@ -101,8 +101,7 @@ CQuakeRocket *CQuakeRocket::CreateGrenade( Vector vecOrigin, Vector vecVelocity,
pRocket->SetThink( &CQuakeRocket::GrenadeExplode ); pRocket->SetThink( &CQuakeRocket::GrenadeExplode );
PLAYBACK_EVENT_FULL (FEV_GLOBAL, pRocket->edict(), g_sTrail, 0.0, PLAYBACK_EVENT_FULL (FEV_GLOBAL, pRocket->edict(), g_sTrail, 0.0,
(float *)&g_vecZero, (float *)&g_vecZero, 0.7, 0.0, pRocket->entindex(), GRENADE_TRAIL, 0, 0); g_vecZero, g_vecZero, 0.7, 0.0, pRocket->entindex(), GRENADE_TRAIL, 0, 0);
return pRocket; return pRocket;
} }
@ -184,7 +183,7 @@ void CQuakeRocket::GrenadeExplode()
void CQuakeRocket::Explode() void CQuakeRocket::Explode()
{ {
//We use the angles field to send the rocket velocity. //We use the angles field to send the rocket velocity.
PLAYBACK_EVENT_FULL( FEV_GLOBAL, edict(), g_sExplosion, 0.0, (float *)&pev->origin, (float *)&pev->velocity, 0.0, 0.0, 0, 0, 0, 0 ); PLAYBACK_EVENT_FULL( FEV_GLOBAL, edict(), g_sExplosion, 0.0, pev->origin, pev->velocity, 0.0, 0.0, 0, 0, 0, 0 );
UTIL_Remove( this ); UTIL_Remove( this );
} }

27
dlls/dmc/quake_weapons_all.cpp

@ -319,7 +319,7 @@ BOOL CBasePlayer::W_CheckNoAmmo()
if ( m_iQuakeWeapon == IT_LIGHTNING ) if ( m_iQuakeWeapon == IT_LIGHTNING )
{ {
PLAYBACK_EVENT_FULL( FEV_NOTHOST, edict(), m_usLightning, 0, (float *)&pev->origin, (float *)&pev->angles, 0.0, 0.0, 0, 1, 0, 0 ); PLAYBACK_EVENT_FULL( FEV_NOTHOST, edict(), m_usLightning, 0, pev->origin, pev->angles, 0.0, 0.0, 0, 1, 0, 0 );
if ( m_pActiveItem ) if ( m_pActiveItem )
((CQuakeGun*)m_pActiveItem)->DestroyEffect(); ((CQuakeGun*)m_pActiveItem)->DestroyEffect();
@ -335,7 +335,7 @@ void CBasePlayer::W_ChangeWeapon( int iWeaponNumber )
{ {
if ( m_iQuakeWeapon == IT_LIGHTNING ) if ( m_iQuakeWeapon == IT_LIGHTNING )
{ {
PLAYBACK_EVENT_FULL( FEV_NOTHOST, edict(), m_usLightning, 0, (float *)&pev->origin, (float *)&pev->angles, 0.0, 0.0, 0, 1, 0, 0 ); PLAYBACK_EVENT_FULL( FEV_NOTHOST, edict(), m_usLightning, 0, pev->origin, pev->angles, 0.0, 0.0, 0, 1, 0, 0 );
if ( m_pActiveItem ) if ( m_pActiveItem )
((CQuakeGun*)m_pActiveItem)->DestroyEffect(); ((CQuakeGun*)m_pActiveItem)->DestroyEffect();
@ -759,7 +759,7 @@ void CBasePlayer::W_FireAxe()
// Single barrel shotgun // Single barrel shotgun
void CBasePlayer::W_FireShotgun( int iQuadSound ) void CBasePlayer::W_FireShotgun( int iQuadSound )
{ {
PLAYBACK_EVENT_FULL( FEV_NOTHOST, edict(), m_usShotgunSingle, 0, (float *)&g_vecZero, (float *)&g_vecZero, 0.0, 0.0, iQuadSound, 0, 0, 0 ); PLAYBACK_EVENT_FULL( FEV_NOTHOST, edict(), m_usShotgunSingle, 0, g_vecZero, g_vecZero, 0.0, 0.0, iQuadSound, 0, 0, 0 );
if (gpGlobals->deathmatch != 4 ) if (gpGlobals->deathmatch != 4 )
*m_pCurrentAmmo -= 1; *m_pCurrentAmmo -= 1;
@ -770,7 +770,7 @@ void CBasePlayer::W_FireShotgun( int iQuadSound )
void CBasePlayer::W_FireHook( void ) void CBasePlayer::W_FireHook( void )
{ {
PLAYBACK_EVENT_FULL( FEV_NOTHOST | FEV_GLOBAL, edict(), g_usHook, 0, (float *)&pev->origin, (float *)&pev->angles, 0.0, 0.0, 0, 0, 0, 0 ); PLAYBACK_EVENT_FULL( FEV_NOTHOST | FEV_GLOBAL, edict(), g_usHook, 0, pev->origin, pev->angles, 0.0, 0.0, 0, 0, 0, 0 );
Throw_Grapple(); Throw_Grapple();
} }
@ -794,7 +794,7 @@ void CBasePlayer::W_FireSuperShotgun( int iQuadSound )
return; return;
} }
PLAYBACK_EVENT_FULL( FEV_NOTHOST, edict(), m_usShotgunDouble, 0, (float *)&g_vecZero, (float *)&g_vecZero, 0.0, 0.0, iQuadSound, 0, 0, 0 ); PLAYBACK_EVENT_FULL( FEV_NOTHOST, edict(), m_usShotgunDouble, 0, g_vecZero, g_vecZero, 0.0, 0.0, iQuadSound, 0, 0, 0 );
if (gpGlobals->deathmatch != 4 ) if (gpGlobals->deathmatch != 4 )
*m_pCurrentAmmo -= 2; *m_pCurrentAmmo -= 2;
@ -805,7 +805,7 @@ void CBasePlayer::W_FireSuperShotgun( int iQuadSound )
// Rocket launcher // Rocket launcher
void CBasePlayer::W_FireRocket( int iQuadSound ) void CBasePlayer::W_FireRocket( int iQuadSound )
{ {
PLAYBACK_EVENT_FULL( FEV_NOTHOST, edict(), m_usRocket, 0, (float *)&g_vecZero, (float *)&g_vecZero, 0.0, 0.0, iQuadSound, 0, 0, 0 ); PLAYBACK_EVENT_FULL( FEV_NOTHOST, edict(), m_usRocket, 0, g_vecZero, g_vecZero, 0.0, 0.0, iQuadSound, 0, 0, 0 );
if (gpGlobals->deathmatch != 4 ) if (gpGlobals->deathmatch != 4 )
*m_pCurrentAmmo -= 1; *m_pCurrentAmmo -= 1;
@ -820,7 +820,7 @@ void CBasePlayer::W_FireRocket( int iQuadSound )
// Grenade launcher // Grenade launcher
void CBasePlayer::W_FireGrenade( int iQuadSound ) void CBasePlayer::W_FireGrenade( int iQuadSound )
{ {
PLAYBACK_EVENT_FULL( FEV_NOTHOST, edict(), m_usGrenade, 0, (float *)&g_vecZero, (float *)&g_vecZero, 0.0, 0.0, iQuadSound, 0, 0, 0 ); PLAYBACK_EVENT_FULL( FEV_NOTHOST, edict(), m_usGrenade, 0, g_vecZero, g_vecZero, 0.0, 0.0, iQuadSound, 0, 0, 0 );
if (gpGlobals->deathmatch != 4 ) if (gpGlobals->deathmatch != 4 )
*m_pCurrentAmmo -= 1; *m_pCurrentAmmo -= 1;
@ -851,7 +851,7 @@ void CBasePlayer::W_FireLightning( int iQuadSound )
//This should already be IT_LIGHTNING but what the heck. //This should already be IT_LIGHTNING but what the heck.
if ( m_iQuakeWeapon == IT_LIGHTNING ) if ( m_iQuakeWeapon == IT_LIGHTNING )
{ {
PLAYBACK_EVENT_FULL( FEV_NOTHOST, edict(), m_usLightning, 0, (float *)&pev->origin, (float *)&pev->angles, 0.0, 0.0, 0, 1, 0, 0 ); PLAYBACK_EVENT_FULL( FEV_NOTHOST, edict(), m_usLightning, 0, pev->origin, pev->angles, 0.0, 0.0, 0, 1, 0, 0 );
if ( m_pActiveItem ) if ( m_pActiveItem )
((CQuakeGun*)m_pActiveItem)->DestroyEffect(); ((CQuakeGun*)m_pActiveItem)->DestroyEffect();
@ -891,7 +891,7 @@ void CBasePlayer::W_FireLightning( int iQuadSound )
} }
} }
PLAYBACK_EVENT_FULL( FEV_NOTHOST, edict(), m_usLightning, 0, (float *)&pev->origin, (float *)&pev->angles, 0.0, 0.0, iQuadSound, 0, playsound, 0 ); PLAYBACK_EVENT_FULL( FEV_NOTHOST, edict(), m_usLightning, 0, pev->origin, pev->angles, 0.0, 0.0, iQuadSound, 0, playsound, 0 );
#if !defined( CLIENT_DLL ) #if !defined( CLIENT_DLL )
@ -914,7 +914,7 @@ void CBasePlayer::W_FireLightning( int iQuadSound )
// Super Nailgun // Super Nailgun
void CBasePlayer::W_FireSuperSpikes( int iQuadSound ) void CBasePlayer::W_FireSuperSpikes( int iQuadSound )
{ {
PLAYBACK_EVENT_FULL( FEV_NOTHOST, edict(), m_usSuperSpike, 0.0, (float *)&g_vecZero, (float *)&g_vecZero, 0.0, 0.0, iQuadSound, 0, m_iNailOffset > 0.0 ? 1 : 0, 0 ); PLAYBACK_EVENT_FULL( FEV_NOTHOST, edict(), m_usSuperSpike, 0.0, g_vecZero, g_vecZero, 0.0, 0.0, iQuadSound, 0, m_iNailOffset > 0.0 ? 1 : 0, 0 );
if (gpGlobals->deathmatch != 4 ) if (gpGlobals->deathmatch != 4 )
*m_pCurrentAmmo -= 2; *m_pCurrentAmmo -= 2;
@ -943,7 +943,7 @@ void CBasePlayer::W_FireSpikes( int iQuadSound )
return; return;
} }
PLAYBACK_EVENT_FULL( FEV_NOTHOST, edict(), m_usSpike, 0.0, (float *)&g_vecZero, (float *)&g_vecZero, 0.0, 0.0, iQuadSound, 0, m_iNailOffset > 0.0f ? 1 : 0, 0 ); PLAYBACK_EVENT_FULL( FEV_NOTHOST, edict(), m_usSpike, 0.0, g_vecZero, g_vecZero, 0.0, 0.0, iQuadSound, 0, m_iNailOffset > 0.0f ? 1 : 0, 0 );
// Fire left then right // Fire left then right
if (m_iNailOffset == 2) if (m_iNailOffset == 2)
@ -980,13 +980,12 @@ void CBasePlayer::W_Attack( int iQuadSound )
else else
m_flNextAttack = UTIL_WeaponTimeBase() + 0.5f; m_flNextAttack = UTIL_WeaponTimeBase() + 0.5f;
PLAYBACK_EVENT_FULL( FEV_NOTHOST, edict(), m_usAxeSwing, 0, (float *)&g_vecZero, (float *)&g_vecZero, 0.0, 0.0, iQuadSound, 0, 0, 0 ); PLAYBACK_EVENT_FULL( FEV_NOTHOST, edict(), m_usAxeSwing, 0, g_vecZero, g_vecZero, 0.0, 0.0, iQuadSound, 0, 0, 0 );
// Delay attack for 0.3 // Delay attack for 0.3
m_flAxeFire = gpGlobals->time + 0.3f; m_flAxeFire = gpGlobals->time + 0.3f;
PLAYBACK_EVENT_FULL( FEV_NOTHOST, edict(), m_usAxe, 0.3, (float *)&g_vecZero, (float *)&g_vecZero, 0.0, 0.0, iQuadSound, 0, 0, 0 ); PLAYBACK_EVENT_FULL( FEV_NOTHOST, edict(), m_usAxe, 0.3, g_vecZero, g_vecZero, 0.0, 0.0, iQuadSound, 0, 0, 0 );
} }
else if (m_iQuakeWeapon == IT_SHOTGUN) else if (m_iQuakeWeapon == IT_SHOTGUN)
{ {

16
dlls/doors.cpp

@ -626,8 +626,8 @@ void CBaseDoor::DoorGoUp( void )
if( m_fNextSoundPlay < gpGlobals->time ) if( m_fNextSoundPlay < gpGlobals->time )
{ {
Vector vecCenter( Center() ); Vector vecCenter( Center() );
float *pCenter = (float *)&vecCenter;
PLAYBACK_EVENT_FULL( FEV_RELIABLE, NULL, m_usDoorGoUp, 0.0, pCenter, (float *)&g_vecZero, 0.0, 0.0, ( m_bMoveSnd << 8 ) | ( m_bStopSnd & 0xff ), 0, 0, 0 ); PLAYBACK_EVENT_FULL( FEV_RELIABLE, NULL, m_usDoorGoUp, 0.0, vecCenter, g_vecZero, 0.0, 0.0, ( m_bMoveSnd << 8 ) | ( m_bStopSnd & 0xff ), 0, 0, 0 );
#if defined ( OLD_SOUNDS ) #if defined ( OLD_SOUNDS )
STOP_SOUND( ENT( pev ), CHAN_STATIC, (char*)STRING( pev->noiseMoving ) ); STOP_SOUND( ENT( pev ), CHAN_STATIC, (char*)STRING( pev->noiseMoving ) );
if( m_toggle_state != TS_GOING_UP && m_toggle_state != TS_GOING_DOWN ) if( m_toggle_state != TS_GOING_UP && m_toggle_state != TS_GOING_DOWN )
@ -678,8 +678,8 @@ void CBaseDoor::DoorHitTop( void )
{ {
m_bStoppedOpenSound = true; m_bStoppedOpenSound = true;
Vector vecCenter( Center() ); Vector vecCenter( Center() );
float *pCenter = (float *)&vecCenter;
PLAYBACK_EVENT_FULL( FEV_RELIABLE, NULL, m_usDoorHitTop, 0.0, pCenter, (float *)&g_vecZero, 0.0, 0.0, ( m_bMoveSnd << 8 ) | ( m_bStopSnd & 0xff ), 0, 0, 0 ); PLAYBACK_EVENT_FULL( FEV_RELIABLE, NULL, m_usDoorHitTop, 0.0, vecCenter, g_vecZero, 0.0, 0.0, ( m_bMoveSnd << 8 ) | ( m_bStopSnd & 0xff ), 0, 0, 0 );
#if defined ( OLD_SOUNDS ) #if defined ( OLD_SOUNDS )
STOP_SOUND( ENT( pev ), CHAN_STATIC, (char*)STRING( pev->noiseMoving ) ); STOP_SOUND( ENT( pev ), CHAN_STATIC, (char*)STRING( pev->noiseMoving ) );
@ -729,8 +729,8 @@ void CBaseDoor::DoorGoDown( void )
if( m_fNextSoundPlay < gpGlobals->time ) if( m_fNextSoundPlay < gpGlobals->time )
{ {
Vector vecCenter( Center() ); Vector vecCenter( Center() );
float *pCenter = (float *)&vecCenter;
PLAYBACK_EVENT_FULL( FEV_RELIABLE, NULL, m_usDoorGoDown, 0.0, pCenter, (float *)&g_vecZero, 0.0, 0.0, ( m_bMoveSnd << 8 ) | ( m_bStopSnd & 0xff ), 0, 0, 0 ); PLAYBACK_EVENT_FULL( FEV_RELIABLE, NULL, m_usDoorGoDown, 0.0, vecCenter, g_vecZero, 0.0, 0.0, ( m_bMoveSnd << 8 ) | ( m_bStopSnd & 0xff ), 0, 0, 0 );
#if defined ( OLD_SOUNDS ) #if defined ( OLD_SOUNDS )
STOP_SOUND( ENT( pev ), CHAN_STATIC, (char*)STRING( pev->noiseMoving ) ); STOP_SOUND( ENT( pev ), CHAN_STATIC, (char*)STRING( pev->noiseMoving ) );
if( m_toggle_state != TS_GOING_UP && m_toggle_state != TS_GOING_DOWN ) if( m_toggle_state != TS_GOING_UP && m_toggle_state != TS_GOING_DOWN )
@ -761,8 +761,8 @@ void CBaseDoor::DoorHitBottom( void )
if( m_fNextSoundPlay < gpGlobals->time ) if( m_fNextSoundPlay < gpGlobals->time )
{ {
Vector vecCenter( Center() ); Vector vecCenter( Center() );
float *pCenter = (float *)&vecCenter;
PLAYBACK_EVENT_FULL( FEV_RELIABLE, NULL, m_usDoorHitBottom, 0.0, pCenter, (float *)&g_vecZero, 0.0, 0.0, ( m_bMoveSnd << 8 ) | ( m_bStopSnd & 0xff ), 0, 0, 0 ); PLAYBACK_EVENT_FULL( FEV_RELIABLE, NULL, m_usDoorHitBottom, 0.0, vecCenter, g_vecZero, 0.0, 0.0, ( m_bMoveSnd << 8 ) | ( m_bStopSnd & 0xff ), 0, 0, 0 );
#if defined ( OLD_SOUNDS ) #if defined ( OLD_SOUNDS )
STOP_SOUND( ENT( pev ), CHAN_STATIC, (char*)STRING( pev->noiseMoving ) ); STOP_SOUND( ENT( pev ), CHAN_STATIC, (char*)STRING( pev->noiseMoving ) );
EMIT_SOUND( ENT( pev ), CHAN_STATIC, (char*)STRING( pev->noiseArrived ), 1, ATTN_NORM ); EMIT_SOUND( ENT( pev ), CHAN_STATIC, (char*)STRING( pev->noiseArrived ), 1, ATTN_NORM );

6
dlls/player.cpp

@ -599,7 +599,7 @@ void CBasePlayer::Killed( entvars_t *pevAttacker, int iGib )
ClearBits( pev->flags, FL_ONGROUND ); ClearBits( pev->flags, FL_ONGROUND );
if( m_iQuakeWeapon == IT_LIGHTNING ) if( m_iQuakeWeapon == IT_LIGHTNING )
{ {
PLAYBACK_EVENT_FULL( FEV_NOTHOST, edict(), m_usLightning, 0, (float *)&pev->origin, (float *)&pev->angles, 0.0, 0.0, 0, 1, 0, 0 ); PLAYBACK_EVENT_FULL( FEV_NOTHOST, edict(), m_usLightning, 0, pev->origin, pev->angles, 0.0, 0.0, 0, 1, 0, 0 );
if( m_pActiveItem ) if( m_pActiveItem )
( (CQuakeGun*)m_pActiveItem )->DestroyEffect(); ( (CQuakeGun*)m_pActiveItem )->DestroyEffect();
@ -1640,7 +1640,7 @@ void CBasePlayer::PowerUpThink( void )
W_SetCurrentAmmo(); W_SetCurrentAmmo();
PLAYBACK_EVENT_FULL( FEV_GLOBAL | FEV_RELIABLE, PLAYBACK_EVENT_FULL( FEV_GLOBAL | FEV_RELIABLE,
edict(), g_usPowerUp, 0, (float *)&g_vecZero, (float *)&g_vecZero, edict(), g_usPowerUp, 0, g_vecZero, g_vecZero,
(float)iPowerUp, 0.0, entindex(), pev->team, 1, 0 ); (float)iPowerUp, 0.0, entindex(), pev->team, 1, 0 );
} }
} }
@ -2653,7 +2653,7 @@ void CBasePlayer::Spawn( void )
//++ BulliT //++ BulliT
Spectate_UpdatePosition(); Spectate_UpdatePosition();
//-- Martin Webrant //-- Martin Webrant
PLAYBACK_EVENT_FULL( FEV_GLOBAL, edict(), g_sTeleport, 0.0, (float *)&pev->origin, (float *)&g_vecZero, 0.0, 0.0, 0, 0, 0, 0 ); PLAYBACK_EVENT_FULL( FEV_GLOBAL, edict(), g_sTeleport, 0.0, pev->origin, g_vecZero, 0.0, 0.0, 0, 0, 0, 0 );
m_fKnownItem = false; m_fKnownItem = false;
} }

2
dlls/triggers.cpp

@ -2066,7 +2066,7 @@ void CTeleDeath::DeathTouch( CBaseEntity *pOther )
void CBaseEntity::Spawn_Telefog( Vector vecOrg, CBaseEntity *pOther ) void CBaseEntity::Spawn_Telefog( Vector vecOrg, CBaseEntity *pOther )
{ {
//Moved to the client //Moved to the client
PLAYBACK_EVENT_FULL( FEV_GLOBAL | FEV_NOTHOST, pOther->edict(), g_sTeleport, 0.0, (float *)&vecOrg, (float *)&g_vecZero, 0.0, 0.0, 0, 0, 0, 0 ); PLAYBACK_EVENT_FULL( FEV_GLOBAL | FEV_NOTHOST, pOther->edict(), g_sTeleport, 0.0, vecOrg, g_vecZero, 0.0, 0.0, 0, 0, 0, 0 );
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------

2
dlls/weapons.cpp

@ -597,7 +597,7 @@ void CBasePlayerWeapon::ItemPostFrame( void )
if( m_pPlayer->m_iQuakeWeapon == IT_LIGHTNING ) if( m_pPlayer->m_iQuakeWeapon == IT_LIGHTNING )
{ {
PLAYBACK_EVENT_FULL( FEV_NOTHOST, m_pPlayer->edict(), m_pPlayer->m_usLightning, 0, (float *)&m_pPlayer->pev->origin, (float *)&m_pPlayer->pev->angles, 0.0, 0.0, 0, 1, 0, 0 ); PLAYBACK_EVENT_FULL( FEV_NOTHOST, m_pPlayer->edict(), m_pPlayer->m_usLightning, 0, m_pPlayer->pev->origin, m_pPlayer->pev->angles, 0.0, 0.0, 0, 1, 0, 0 );
if( m_pPlayer->m_pActiveItem ) if( m_pPlayer->m_pActiveItem )
( (CQuakeGun*)m_pPlayer->m_pActiveItem )->DestroyEffect(); ( (CQuakeGun*)m_pPlayer->m_pActiveItem )->DestroyEffect();

Loading…
Cancel
Save