From 4f08cd4c4794d5a5fbc3edb973ea34017e72154c Mon Sep 17 00:00:00 2001 From: Andrey Akhmichin Date: Fri, 3 Jan 2020 06:33:34 +0500 Subject: [PATCH] Remove useless casts. --- dlls/hs/ak47.cpp | 2 +- dlls/hs/beamkatana.cpp | 2 +- dlls/hs/bow.cpp | 4 ++-- dlls/hs/ctf_gameplay.cpp | 12 ++++++------ dlls/hs/fotn.cpp | 2 +- dlls/hs/fotns.cpp | 2 +- dlls/hs/goldengun.cpp | 2 +- dlls/hs/jackal.cpp | 2 +- dlls/hs/modman.cpp | 4 ++-- dlls/hs/mw2.cpp | 2 +- dlls/hs/nstar.cpp | 2 +- dlls/hs/scipg.cpp | 2 +- dlls/hs/soda_can.cpp | 2 +- dlls/hs/zapper.cpp | 2 +- 14 files changed, 21 insertions(+), 21 deletions(-) diff --git a/dlls/hs/ak47.cpp b/dlls/hs/ak47.cpp index 5d77cde0..c5963b9b 100644 --- a/dlls/hs/ak47.cpp +++ b/dlls/hs/ak47.cpp @@ -181,7 +181,7 @@ void CAK47::PrimaryAttack() flags = 0; #endif - PLAYBACK_EVENT_FULL( flags, m_pPlayer->edict(), m_usAK47, 0.0, (float *)&g_vecZero, (float *)&g_vecZero, vecDir.x, vecDir.y, 0, 0, 0, 0 ); + PLAYBACK_EVENT_FULL( flags, m_pPlayer->edict(), m_usAK47, 0.0, g_vecZero, g_vecZero, vecDir.x, vecDir.y, 0, 0, 0, 0 ); if (!m_iClip && m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] <= 0) // HEV suit - indicate out of ammo condition diff --git a/dlls/hs/beamkatana.cpp b/dlls/hs/beamkatana.cpp index ff7f3222..39b2ffa9 100644 --- a/dlls/hs/beamkatana.cpp +++ b/dlls/hs/beamkatana.cpp @@ -224,7 +224,7 @@ int CBeamKatana::Swing( int fFirst ) #endif PLAYBACK_EVENT_FULL( FEV_NOTHOST, m_pPlayer->edict(), m_usBeamKatana, - 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 ); diff --git a/dlls/hs/bow.cpp b/dlls/hs/bow.cpp index ba5a7ca9..d8070c1f 100644 --- a/dlls/hs/bow.cpp +++ b/dlls/hs/bow.cpp @@ -334,7 +334,7 @@ void CBow::PrimaryAttack( void ) flags = 0; #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 m_pPlayer->SetAnimation( PLAYER_ATTACK1 ); @@ -378,7 +378,7 @@ void CBow::FireBolt() flags = 0; #endif - PLAYBACK_EVENT_FULL( flags, m_pPlayer->edict(), m_usBow, 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_usBow, 0.0, g_vecZero, g_vecZero, 0, 0, m_iClip, m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType], 0, 0 ); // player "shoot" animation m_pPlayer->SetAnimation( PLAYER_ATTACK1 ); diff --git a/dlls/hs/ctf_gameplay.cpp b/dlls/hs/ctf_gameplay.cpp index 1b83231f..7de0293b 100644 --- a/dlls/hs/ctf_gameplay.cpp +++ b/dlls/hs/ctf_gameplay.cpp @@ -86,7 +86,7 @@ void CObjectFlag :: Touch(CBaseEntity *pOther) pPlayer->m_fHasObject = true; // Set the client attachment using an event - PLAYBACK_EVENT_FULL(0, pPlayer->edict(), g_usObject, 0, (float *)&g_vecZero, (float *)&g_vecZero, 0, 0, FLAG_STOLEN, 0, 0, 0); + PLAYBACK_EVENT_FULL(0, pPlayer->edict(), g_usObject, 0, g_vecZero, g_vecZero, 0, 0, FLAG_STOLEN, 0, 0, 0); m_fIsInPlay = true; @@ -167,7 +167,7 @@ void CDroppedFlag :: Touch(CBaseEntity *pOther) pPlayer->m_fHasObject = true; // Set the client attachment using an event - PLAYBACK_EVENT_FULL(0, pPlayer->edict(), g_usObject, 0, (float *)&g_vecZero, (float *)&g_vecZero, 0, 0, FLAG_STOLEN, 0, 0, 0); + PLAYBACK_EVENT_FULL(0, pPlayer->edict(), g_usObject, 0, g_vecZero, g_vecZero, 0, 0, FLAG_STOLEN, 0, 0, 0); // remove this item SetThink(SUB_Remove); @@ -265,8 +265,8 @@ void CCaptureTeam1 :: Touch( CBaseEntity* pOther ) // Remove the flag pPlayer->m_fHasObject = false; - PLAYBACK_EVENT_FULL(0, pPlayer->edict(), g_usObject, 0, (float *)&g_vecZero, - (float *)&g_vecZero, 0, 0, FLAG_CAPTURE, 0, 0, 0); + PLAYBACK_EVENT_FULL(0, pPlayer->edict(), g_usObject, 0, g_vecZero, + g_vecZero, 0, 0, FLAG_CAPTURE, 0, 0, 0); // Reset the flag @@ -379,8 +379,8 @@ void CCaptureTeam2 :: Touch( CBaseEntity* pOther ) // Remove the object pPlayer->m_fHasObject = false; - PLAYBACK_EVENT_FULL(0, pPlayer->edict(), g_usObject, 0, (float *)&g_vecZero, - (float *)&g_vecZero, 0, 0, FLAG_CAPTURE, 0, 0, 0); + PLAYBACK_EVENT_FULL(0, pPlayer->edict(), g_usObject, 0, g_vecZero, + g_vecZero, 0, 0, FLAG_CAPTURE, 0, 0, 0); // Reset the object CObjectFlag *pFlag = (CObjectFlag *)UTIL_FindEntityByClassname(NULL, "object_flag"); diff --git a/dlls/hs/fotn.cpp b/dlls/hs/fotn.cpp index ff92944f..10dde77d 100644 --- a/dlls/hs/fotn.cpp +++ b/dlls/hs/fotn.cpp @@ -193,7 +193,7 @@ int CFOTN::Swing( int fFirst ) #endif PLAYBACK_EVENT_FULL( FEV_NOTHOST, m_pPlayer->edict(), m_usFotn, - 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 ); diff --git a/dlls/hs/fotns.cpp b/dlls/hs/fotns.cpp index 2abad37a..f97f97e5 100644 --- a/dlls/hs/fotns.cpp +++ b/dlls/hs/fotns.cpp @@ -249,7 +249,7 @@ int CFOTN::Swing( int fFirst ) #endif PLAYBACK_EVENT_FULL( FEV_NOTHOST, m_pPlayer->edict(), m_usFOTN, - 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 ); diff --git a/dlls/hs/goldengun.cpp b/dlls/hs/goldengun.cpp index 5429607e..aaff3694 100644 --- a/dlls/hs/goldengun.cpp +++ b/dlls/hs/goldengun.cpp @@ -104,7 +104,7 @@ void CGOLDENGUN::GOLDENGUNFire( float flSpread , float flCycleTime, BOOL fUseAut flags = 0; #endif - PLAYBACK_EVENT_FULL( flags, m_pPlayer->edict(), fUseAutoAim ? m_usFireGOLDENGUN : m_usFireGOLDENGUN, 0.0, (float *)&g_vecZero, (float *)&g_vecZero, 0.0, 0.0, 0, 0, ( m_iClip == 0 ) ? 1 : 0, 0 ); + PLAYBACK_EVENT_FULL( flags, m_pPlayer->edict(), fUseAutoAim ? m_usFireGOLDENGUN : m_usFireGOLDENGUN, 0.0, g_vecZero, g_vecZero, 0.0, 0.0, 0, 0, ( m_iClip == 0 ) ? 1 : 0, 0 ); m_pPlayer->SetAnimation( PLAYER_ATTACK1 ); Vector vecSrc = m_pPlayer->GetGunPosition( ); diff --git a/dlls/hs/jackal.cpp b/dlls/hs/jackal.cpp index 77ac97ff..f79d9722 100644 --- a/dlls/hs/jackal.cpp +++ b/dlls/hs/jackal.cpp @@ -102,7 +102,7 @@ void CJackal::JackalFire( float flSpread , float flCycleTime, BOOL fUseAutoAim ) flags = 0; #endif - PLAYBACK_EVENT_FULL( flags, m_pPlayer->edict(), fUseAutoAim ? m_usFireJackal : m_usFireJackal, 0.0, (float *)&g_vecZero, (float *)&g_vecZero, 0.0, 0.0, 0, 0, ( m_iClip == 0 ) ? 1 : 0, 0 ); + PLAYBACK_EVENT_FULL( flags, m_pPlayer->edict(), fUseAutoAim ? m_usFireJackal : m_usFireJackal, 0.0, g_vecZero, g_vecZero, 0.0, 0.0, 0, 0, ( m_iClip == 0 ) ? 1 : 0, 0 ); m_pPlayer->SetAnimation( PLAYER_ATTACK1 ); Vector vecSrc = m_pPlayer->GetGunPosition( ); diff --git a/dlls/hs/modman.cpp b/dlls/hs/modman.cpp index 5cee9966..c05239da 100644 --- a/dlls/hs/modman.cpp +++ b/dlls/hs/modman.cpp @@ -352,7 +352,7 @@ void CModman::FireSniperHorn() flags = 0; #endif - PLAYBACK_EVENT_FULL( flags, m_pPlayer->edict(), m_usModman2, 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_usModman2, 0.0, g_vecZero, g_vecZero, 0, 0, m_iClip, m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType], 0, 0 ); // player "shoot" animation m_pPlayer->SetAnimation( PLAYER_ATTACK1 ); @@ -395,7 +395,7 @@ void CModman::FireHorn() flags = 0; #endif - PLAYBACK_EVENT_FULL( flags, m_pPlayer->edict(), m_usModman, 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_usModman, 0.0, g_vecZero, g_vecZero, 0, 0, m_iClip, m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType], 0, 0 ); // player "shoot" animation m_pPlayer->SetAnimation( PLAYER_ATTACK1 ); diff --git a/dlls/hs/mw2.cpp b/dlls/hs/mw2.cpp index 9bb50ab2..c428cd50 100644 --- a/dlls/hs/mw2.cpp +++ b/dlls/hs/mw2.cpp @@ -169,7 +169,7 @@ void CMW2::PrimaryAttack() UTIL_ScreenShake( m_pPlayer->pev->origin, 250.0, 200.0, 2.5, 1 ); #endif - PLAYBACK_EVENT_FULL( flags, m_pPlayer->edict(), m_usMW2, 0.0, (float *)&g_vecZero, (float *)&g_vecZero, vecDir.x, vecDir.y, 0, 0, 0, 0 ); + PLAYBACK_EVENT_FULL( flags, m_pPlayer->edict(), m_usMW2, 0.0, g_vecZero, g_vecZero, vecDir.x, vecDir.y, 0, 0, 0, 0 ); if (!m_iClip && m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] <= 0) // HEV suit - indicate out of ammo condition diff --git a/dlls/hs/nstar.cpp b/dlls/hs/nstar.cpp index 67fb69f3..2307226c 100644 --- a/dlls/hs/nstar.cpp +++ b/dlls/hs/nstar.cpp @@ -311,7 +311,7 @@ void CNStar::FireStar() flags = 0; #endif - PLAYBACK_EVENT_FULL( flags, m_pPlayer->edict(), m_usNStar, 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_usNStar, 0.0, g_vecZero, g_vecZero, 0, 0, m_iClip, m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType], 0, 0 ); // player "shoot" animation m_pPlayer->SetAnimation( PLAYER_ATTACK1 ); diff --git a/dlls/hs/scipg.cpp b/dlls/hs/scipg.cpp index 98ea2888..c4b64264 100644 --- a/dlls/hs/scipg.cpp +++ b/dlls/hs/scipg.cpp @@ -334,7 +334,7 @@ void CSciPG::FireBolt() flags = 0; #endif - PLAYBACK_EVENT_FULL( flags, m_pPlayer->edict(), m_usScientist, 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_usScientist, 0.0, g_vecZero, g_vecZero, 0, 0, m_iClip, m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType], 0, 0 ); // player "shoot" animation m_pPlayer->SetAnimation( PLAYER_ATTACK1 ); diff --git a/dlls/hs/soda_can.cpp b/dlls/hs/soda_can.cpp index 3392cafd..ae9f28cc 100644 --- a/dlls/hs/soda_can.cpp +++ b/dlls/hs/soda_can.cpp @@ -130,7 +130,7 @@ void CSodaCan::PrimaryAttack() flags = 0; #endif - PLAYBACK_EVENT_FULL( flags, m_pPlayer->edict(), m_usSodaDrink, 0.0, (float *)&g_vecZero, (float *)&g_vecZero, 0.0, 0.0, 1, 0, 0, 0 ); + PLAYBACK_EVENT_FULL( flags, m_pPlayer->edict(), m_usSodaDrink, 0.0, g_vecZero, g_vecZero, 0.0, 0.0, 1, 0, 0, 0 ); // player "shoot" animation m_pPlayer->SetAnimation( PLAYER_ATTACK1 ); diff --git a/dlls/hs/zapper.cpp b/dlls/hs/zapper.cpp index d07de0bc..16500729 100644 --- a/dlls/hs/zapper.cpp +++ b/dlls/hs/zapper.cpp @@ -99,7 +99,7 @@ void CZAPPER::ZAPPERFire( float flSpread , float flCycleTime, BOOL fUseAutoAim ) flags = 0; #endif - PLAYBACK_EVENT_FULL( flags, m_pPlayer->edict(), fUseAutoAim ? m_usFireZAPPER : m_usFireZAPPER, 0.0, (float *)&g_vecZero, (float *)&g_vecZero, 0.0, 0.0, 0, 0, ( m_iClip == 0 ) ? 1 : 0, 0 ); + PLAYBACK_EVENT_FULL( flags, m_pPlayer->edict(), fUseAutoAim ? m_usFireZAPPER : m_usFireZAPPER, 0.0, g_vecZero, g_vecZero, 0.0, 0.0, 0, 0, ( m_iClip == 0 ) ? 1 : 0, 0 ); m_pPlayer->SetAnimation( PLAYER_ATTACK1 ); Vector vecSrc = m_pPlayer->GetGunPosition( );