diff --git a/cl_dll/ammo.cpp b/cl_dll/ammo.cpp index 4ceba208..031fbfd5 100644 --- a/cl_dll/ammo.cpp +++ b/cl_dll/ammo.cpp @@ -533,7 +533,7 @@ int CHudAmmo::MsgFunc_HideWeapon( const char *pszName, int iSize, void *pbuf ) return 1; if( !( gHUD.m_iHideHUDDisplay & HIDEHUD_WEAPONS ) ) - gHUD.m_flScaleColorTime = gHUD.m_flTime + 2.0; + gHUD.m_flScaleColorTime = gHUD.m_flTime + 2.0f; if( gHUD.m_iHideHUDDisplay & ( HIDEHUD_WEAPONS | HIDEHUD_ALL ) ) { diff --git a/cl_dll/ev_hldm.cpp b/cl_dll/ev_hldm.cpp index 2edb4cfd..51723235 100644 --- a/cl_dll/ev_hldm.cpp +++ b/cl_dll/ev_hldm.cpp @@ -731,9 +731,9 @@ void EV_TrainPitchAdjust( event_args_t *args ) us_params = (unsigned short)args->iparam1; stop = args->bparam1; - m_flVolume = (float)( us_params & 0x003f ) / 40.0; + m_flVolume = (float)( us_params & 0x003f ) / 40.0f; noise = (int)( ( ( us_params ) >> 12 ) & 0x0007 ); - pitch = (int)( 10.0 * (float)( ( us_params >> 6 ) & 0x003f ) ); + pitch = (int)( 10.0f * (float)( ( us_params >> 6 ) & 0x003f ) ); switch( noise ) { diff --git a/cl_dll/health.cpp b/cl_dll/health.cpp index 169865fb..00debbf8 100644 --- a/cl_dll/health.cpp +++ b/cl_dll/health.cpp @@ -180,7 +180,7 @@ void CHudHealth::GetPainColor( int &r, int &g, int &b ) else { UnpackRGB( r, g, b, RGB_YELLOWISH ); - float f = ( sin( ( 16 - gHUD.m_flTime ) * m_iHealth ) + 1.0 ) * 0.5; + float f = ( sin( ( 16 - gHUD.m_flTime ) * m_iHealth ) + 1.0f ) * 0.5f; r = (int)( r * f * 58.0f ); g = (int)( g * f ); b = (int)( b * f ); diff --git a/dlls/crossbow.cpp b/dlls/crossbow.cpp index c9027e32..1a60210f 100644 --- a/dlls/crossbow.cpp +++ b/dlls/crossbow.cpp @@ -407,7 +407,7 @@ void CCrossbow::ZoomOut() m_fInZoom = 0; m_pPlayer->pev->iuser4 = m_fInZoom; m_pPlayer->pev->viewmodel = MAKE_STRING( "models/v_cmlwbr.mdl" ); - UTIL_ScreenFade( m_pPlayer, g_vecZero, 0.2, 0.1, 255, FFADE_IN ); + UTIL_ScreenFade( m_pPlayer, g_vecZero, 0.2f, 0.1f, 255, FFADE_IN ); } void CCrossbow::SecondaryAttack() @@ -415,7 +415,7 @@ void CCrossbow::SecondaryAttack() if( m_fInZoom == 2 ) { ZoomOut(); - m_flNextPrimaryAttack = m_flNextSecondaryAttack = m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 0.7; + m_flNextPrimaryAttack = m_flNextSecondaryAttack = m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 0.7f; } else { @@ -423,10 +423,11 @@ void CCrossbow::SecondaryAttack() ++m_fInZoom; m_pPlayer->pev->iuser4 = m_fInZoom; m_pPlayer->pev->viewmodel = 0; - UTIL_ScreenFade( m_pPlayer, g_vecZero, 0.1, 0.1, 255, FFADE_IN ); - m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 0.5; + UTIL_ScreenFade( m_pPlayer, g_vecZero, 0.1f, 0.1f, 255, FFADE_IN ); + m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 0.5f; } - EMIT_SOUND_DYN( ENT( m_pPlayer->pev ), CHAN_ITEM, "weapons/cmlwbr_zoom.wav", RANDOM_FLOAT( 0.95, 1.0 ), ATTN_NORM, 0, 93 + RANDOM_LONG( 0, 0xF ) ); + + EMIT_SOUND_DYN( ENT( m_pPlayer->pev ), CHAN_ITEM, "weapons/cmlwbr_zoom.wav", RANDOM_FLOAT( 0.95f, 1.0f ), ATTN_NORM, 0, 93 + RANDOM_LONG( 0, 0xF ) ); } void CCrossbow::ToggleDrawn() @@ -479,10 +480,11 @@ void CCrossbow::WeaponIdle( void ) if( m_flTimeWeaponIdle < UTIL_WeaponTimeBase() ) { int iAnim; + if( m_fInAttack || !m_iClip ) { float flRand = UTIL_SharedRandomFloat( m_pPlayer->random_seed, 0, 1 ); - if( flRand <= 0.75 || m_fInZoom ) + if( flRand <= 0.75f || m_fInZoom ) { iAnim = m_fInAttack ? CROSSBOW_IDLE1 : CROSSBOW_IDLE2; m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 3.1f; @@ -496,7 +498,7 @@ void CCrossbow::WeaponIdle( void ) else { iAnim = CROSSBOW_DRAWBACK; - EMIT_SOUND_DYN( ENT( m_pPlayer->pev ), CHAN_ITEM, "weapons/cmlwbr_drawback.wav", RANDOM_FLOAT( 0.9, 1.0 ), ATTN_NORM, 0, 93 + RANDOM_LONG( 0, 0xF ) ); + EMIT_SOUND_DYN( ENT( m_pPlayer->pev ), CHAN_ITEM, "weapons/cmlwbr_drawback.wav", RANDOM_FLOAT( 0.9f, 1.0f ), ATTN_NORM, 0, 93 + RANDOM_LONG( 0, 0xF ) ); m_flNextSecondaryAttack = m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 1.3f; SetThink( &CCrossbow::ToggleDrawn ); pev->nextthink = gpGlobals->time + 1.2f; diff --git a/dlls/gauss.cpp b/dlls/gauss.cpp index e7bd26d2..b8701f29 100644 --- a/dlls/gauss.cpp +++ b/dlls/gauss.cpp @@ -60,7 +60,6 @@ float CXS::GetFullChargeTime( void ) return 4.0f; } - void CXS::Spawn() { Precache(); @@ -289,15 +288,15 @@ void CXS::SecondaryAttack() if( m_pPlayer->m_flStartCharge < gpGlobals->time - 10.0f ) { // Player charged up too long. Zap him. - EMIT_SOUND_DYN( ENT( m_pPlayer->pev ), CHAN_WEAPON, "weapons/xs_moan1.wav", 1.0, ATTN_NORM, 0, 80 + RANDOM_LONG( 0, 0x3f ) ); - EMIT_SOUND_DYN( ENT( m_pPlayer->pev ), CHAN_ITEM, "weapons/xs_moan3.wav", 1.0, ATTN_NORM, 0, 75 + RANDOM_LONG( 0, 0x3f ) ); + EMIT_SOUND_DYN( ENT( m_pPlayer->pev ), CHAN_WEAPON, "weapons/xs_moan1.wav", 1.0f, ATTN_NORM, 0, 80 + RANDOM_LONG( 0, 0x3f ) ); + EMIT_SOUND_DYN( ENT( m_pPlayer->pev ), CHAN_ITEM, "weapons/xs_moan3.wav", 1.0f, ATTN_NORM, 0, 75 + RANDOM_LONG( 0, 0x3f ) ); m_fInAttack = 0; - m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 2.2; - m_pPlayer->m_flNextAttack = UTIL_WeaponTimeBase() + 1.0; + m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 2.2f; + m_pPlayer->m_flNextAttack = UTIL_WeaponTimeBase() + 1.0f; #ifndef CLIENT_DLL m_pPlayer->TakeDamage( VARS( eoNullEntity ), VARS( eoNullEntity ), 50, DMG_POISON ); - UTIL_ScreenFade( m_pPlayer, Vector( 192, 224, 0 ), 2, 0.5, 128, FFADE_IN ); + UTIL_ScreenFade( m_pPlayer, Vector( 192, 224, 0 ), 2, 0.5f, 128, FFADE_IN ); #endif SendWeaponAnim( XS_IDLE ); @@ -380,12 +379,12 @@ void CXS::Fire( Vector vecOrigSrc, Vector vecDir, float flDamage ) pXSBeam->pev->owner = m_pPlayer->edict(); pXSBeam->Init(); - EMIT_SOUND_DYN( ENT( m_pPlayer->pev ), CHAN_WEAPON, "weapons/xs_shot.wav", flDamage * 0.0025 + 0.5, ATTN_NORM, 0, 85 + RANDOM_LONG( 0, 16 ) ); + EMIT_SOUND_DYN( ENT( m_pPlayer->pev ), CHAN_WEAPON, "weapons/xs_shot.wav", flDamage * 0.0025f + 0.5f, ATTN_NORM, 0, 85 + RANDOM_LONG( 0, 16 ) ); // 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 sent reliably anyway, which could lead to other delays - PLAYBACK_EVENT_FULL( FEV_RELIABLE, m_pPlayer->edict(), m_usXSSpin, 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, m_pPlayer->edict(), m_usXSSpin, 0.01f, (float *)&m_pPlayer->pev->origin, (float *)&m_pPlayer->pev->angles, 0.0f, 0.0f, 0, 0, 0, 1 ); pev->effects |= EF_MUZZLEFLASH; } @@ -395,9 +394,9 @@ void CXS::Reload() if( m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] <= 0 || m_iClip == XS_MAX_CLIP ) return; - if( !m_fInAttack && DefaultReload( XS_MAX_CLIP, XS_RELOAD, 3.5 ) ) + if( !m_fInAttack && DefaultReload( XS_MAX_CLIP, XS_RELOAD, 3.5f ) ) { - EMIT_SOUND_DYN( ENT( m_pPlayer->pev ), CHAN_WEAPON, "weapons/xs_reload.wav", 0.8, ATTN_NORM, 0, ATTN_NORM ); + EMIT_SOUND_DYN( ENT( m_pPlayer->pev ), CHAN_WEAPON, "weapons/xs_reload.wav", 0.8f, ATTN_NORM, 0, ATTN_NORM ); } } @@ -432,11 +431,11 @@ void CXS::WeaponIdle( void ) { StartFire(); m_fInAttack = 0; - m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 2.2; + m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 2.2f; // Need to set m_flNextPrimaryAttack so the weapon gets a chance to complete its secondary fire animation. - Solokiller if( m_iClip <= 0 ) - m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.5; + m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.5f; } else { @@ -465,7 +464,7 @@ class CXSAmmo : public CBasePlayerAmmo { void EXPORT FallThink() { - pev->nextthink = gpGlobals->time + 0.1; + pev->nextthink = gpGlobals->time + 0.1f; if( pev->flags & FL_ONGROUND ) { @@ -491,7 +490,7 @@ class CXSAmmo : public CBasePlayerAmmo CBasePlayerAmmo::Spawn(); SetThink( &CXSAmmo::FallThink ); - pev->nextthink = gpGlobals->time + 0.1; + pev->nextthink = gpGlobals->time + 0.1f; } void Precache( void ) { diff --git a/dlls/mortar.cpp b/dlls/mortar.cpp index e8c7bef3..bb0862c9 100644 --- a/dlls/mortar.cpp +++ b/dlls/mortar.cpp @@ -256,7 +256,7 @@ void CMortar::MortarExplode( void ) WRITE_COORD( pev->origin.z + 32 ); WRITE_COORD( pev->origin.x ); WRITE_COORD( pev->origin.y ); - WRITE_COORD( pev->origin.z + 32 + pev->dmg * 2 / .2 ); // reach damage radius over .3 seconds + WRITE_COORD( pev->origin.z + 32 + pev->dmg * 2 / 0.2f ); // reach damage radius over .3 seconds WRITE_SHORT( m_blastwave ); WRITE_BYTE( 0 ); // startframe WRITE_BYTE( 0 ); // framerate diff --git a/dlls/poke646/firetrail.cpp b/dlls/poke646/firetrail.cpp index b87d1848..e3629309 100644 --- a/dlls/poke646/firetrail.cpp +++ b/dlls/poke646/firetrail.cpp @@ -24,9 +24,9 @@ class CFireTrail : public CBaseEntity { public: - void Spawn(void); - void Think(void); - void Touch(CBaseEntity *pOther); + void Spawn( void ); + void Think( void ); + void Touch( CBaseEntity *pOther ); int ObjectCaps(void) { return FCAP_DONT_SAVE; } int Save( CSave &save ); @@ -36,7 +36,7 @@ private: int m_spriteScale; // what's the exact fireball sprite scale? }; -LINK_ENTITY_TO_CLASS( fire_trail, CFireTrail ); +LINK_ENTITY_TO_CLASS( fire_trail, CFireTrail ) TYPEDESCRIPTION CFireTrail::m_SaveData[] = { @@ -47,37 +47,37 @@ IMPLEMENT_SAVERESTORE( CFireTrail, CBaseEntity ) void CFireTrail::Spawn( void ) { - pev->velocity = RANDOM_FLOAT(100.0f, 150.0f) * pev->angles; + pev->velocity = RANDOM_FLOAT( 100.0f, 150.0f ) * pev->angles; if( RANDOM_LONG( 0, 1 ) ) - pev->velocity.x += RANDOM_FLOAT(-300.f, -100.f); + pev->velocity.x += RANDOM_FLOAT(-300.0f, -100.0f); else - pev->velocity.x += RANDOM_FLOAT(100.f, 300.f); + pev->velocity.x += RANDOM_FLOAT(100.0f, 300.0f); if( RANDOM_LONG( 0, 1 ) ) - pev->velocity.y += RANDOM_FLOAT(-300.f, -100.f); + pev->velocity.y += RANDOM_FLOAT(-300.0f, -100.0f); else - pev->velocity.y += RANDOM_FLOAT(100.f, 300.f); + pev->velocity.y += RANDOM_FLOAT(100.0f, 300.0f); if( pev->velocity.z >= 0 ) - pev->velocity.z += 200; + pev->velocity.z += 200.0f; else - pev->velocity.z -= 200; + pev->velocity.z -= 200.0f; m_spriteScale = RANDOM_LONG( 7, 13 ); pev->movetype = MOVETYPE_BOUNCE; - pev->gravity = 0.5; - pev->nextthink = gpGlobals->time + 0.1; + pev->gravity = 0.5f; + pev->nextthink = gpGlobals->time + 0.1f; pev->solid = SOLID_NOT; - SET_MODEL(edict(), "models/grenade.mdl"); // Need a model, just use the grenade, we don't draw it anyway - UTIL_SetSize(pev, g_vecZero, g_vecZero); + SET_MODEL( edict(), "models/grenade.mdl" ); // Need a model, just use the grenade, we don't draw it anyway + UTIL_SetSize( pev, g_vecZero, g_vecZero ); pev->effects |= EF_NODRAW; - pev->speed = RANDOM_FLOAT(0.5, 1.5); + pev->speed = RANDOM_FLOAT( 0.5f, 1.5f ); pev->maxspeed = pev->speed; pev->angles = g_vecZero; } -void CFireTrail::Think(void) +void CFireTrail::Think( void ) { MESSAGE_BEGIN( MSG_PAS, SVC_TEMPENTITY, pev->origin ); WRITE_BYTE( TE_EXPLOSION); @@ -90,22 +90,23 @@ void CFireTrail::Think(void) WRITE_BYTE( TE_EXPLFLAG_NOSOUND ); MESSAGE_END(); - pev->speed -= 0.1; - if (pev->speed > 0) - pev->nextthink = gpGlobals->time + 0.1; + pev->speed -= 0.1f; + + if( pev->speed > 0 ) + pev->nextthink = gpGlobals->time + 0.1f; else - UTIL_Remove(this); + UTIL_Remove( this ); pev->flags &= ~FL_ONGROUND; } -void CFireTrail::Touch(CBaseEntity *pOther) +void CFireTrail::Touch( CBaseEntity *pOther ) { - if (pev->flags & FL_ONGROUND) - pev->velocity = pev->velocity * 0.1; + if( pev->flags & FL_ONGROUND ) + pev->velocity = pev->velocity * 0.1f; else - pev->velocity = pev->velocity * 0.6; + pev->velocity = pev->velocity * 0.6f; - if ((pev->velocity.x*pev->velocity.x + pev->velocity.y*pev->velocity.y) < 10.0) + if( ( pev->velocity.x * pev->velocity.x + pev->velocity.y * pev->velocity.y ) < 10.0f ) pev->speed = 0; } diff --git a/dlls/poke646/mp3.cpp b/dlls/poke646/mp3.cpp index 9806ff5f..82e1b591 100644 --- a/dlls/poke646/mp3.cpp +++ b/dlls/poke646/mp3.cpp @@ -46,7 +46,7 @@ void CAmbientMP3::Spawn( void ) } else { - ALERT( at_console, "ambient_mp3 without soundfile at: %f, %f, %f, removing self...\n", pev->origin.x, pev->origin.y, pev->origin.z ); + ALERT( at_console, "ambient_mp3 without soundfile at: %f, %f, %f, removing self...\n", (double)pev->origin.x, (double)pev->origin.y, (double)pev->origin.z ); UTIL_Remove( this ); } } diff --git a/dlls/poke646/nail.cpp b/dlls/poke646/nail.cpp index 6be1dc54..4c3bf8be 100644 --- a/dlls/poke646/nail.cpp +++ b/dlls/poke646/nail.cpp @@ -24,17 +24,16 @@ #include "game.h" #include "nail.h" - LINK_ENTITY_TO_CLASS( nailgun_nail, CNailGunNail ) CNailGunNail *CNailGunNail::NailCreate( BOOL bIsBradnailer ) { // Create a new entity with CCrossbowBolt private data - CNailGunNail *pNail = GetClassPtr((CNailGunNail *)NULL); - pNail->pev->classname = MAKE_STRING("nailgun_nail"); + CNailGunNail *pNail = GetClassPtr( (CNailGunNail *)NULL ); + pNail->pev->classname = MAKE_STRING( "nailgun_nail" ); pNail->m_bIsBradnailer = bIsBradnailer; pNail->Spawn(); - + return pNail; } @@ -44,24 +43,24 @@ void CNailGunNail::Spawn() pev->movetype = MOVETYPE_FLY; pev->solid = SOLID_BBOX; - pev->gravity = 0.5; + pev->gravity = 0.5f; - SET_MODEL(ENT(pev), "models/nail.mdl"); + SET_MODEL( ENT( pev ), "models/nail.mdl" ); - UTIL_SetOrigin(pev, pev->origin); - UTIL_SetSize(pev, g_vecZero, g_vecZero); + UTIL_SetOrigin( pev, pev->origin ); + UTIL_SetSize( pev, g_vecZero, g_vecZero ); - SetTouch(&CNailGunNail::NailTouch); - SetThink(&CNailGunNail::BubbleThink); - pev->nextthink = gpGlobals->time + 0.2; + SetTouch( &CNailGunNail::NailTouch ); + SetThink( &CNailGunNail::BubbleThink ); + pev->nextthink = gpGlobals->time + 0.2f; } void CNailGunNail::Precache() { - PRECACHE_MODEL("models/nail.mdl"); - PRECACHE_SOUND("weapons/brad_hit1.wav"); - PRECACHE_SOUND("weapons/brad_hit2.wav"); + PRECACHE_MODEL( "models/nail.mdl" ); + PRECACHE_SOUND( "weapons/brad_hit1.wav" ); + PRECACHE_SOUND( "weapons/brad_hit2.wav" ); } int CNailGunNail::Classify() @@ -87,6 +86,7 @@ void CNailGunNail::NailTouch( CBaseEntity *pOther ) ApplyMultiDamage( pev, pevOwner ); pev->velocity = g_vecZero; + // play body "thwack" sound switch( RANDOM_LONG( 0, 1 ) ) { @@ -106,7 +106,7 @@ void CNailGunNail::NailTouch( CBaseEntity *pOther ) // EMIT_SOUND_DYN(ENT(pev), CHAN_BODY, "weapons/brad_hit1.wav", RANDOM_FLOAT(0.95, 1.0), ATTN_NORM, 0, 98 + RANDOM_LONG(0, 7)); SetThink( &CBaseEntity::SUB_Remove ); - pev->nextthink = gpGlobals->time;// this will get changed below if the bolt is allowed to stick in what it hit. + pev->nextthink = gpGlobals->time; // this will get changed below if the bolt is allowed to stick in what it hit. if( FClassnameIs( pOther->pev, "worldspawn" ) ) { @@ -119,7 +119,7 @@ void CNailGunNail::NailTouch( CBaseEntity *pOther ) pev->velocity = g_vecZero; pev->avelocity.z = 0; pev->angles.z = RANDOM_LONG( 0, 360 ); - pev->nextthink = gpGlobals->time + 2.0; + pev->nextthink = gpGlobals->time + 2.0f; } if( UTIL_PointContents( pev->origin ) != CONTENTS_WATER && RANDOM_LONG( 0, 4 ) == 4 ) @@ -131,10 +131,10 @@ void CNailGunNail::NailTouch( CBaseEntity *pOther ) void CNailGunNail::BubbleThink() { - pev->nextthink = gpGlobals->time + 0.1; + pev->nextthink = gpGlobals->time + 0.1f; if( pev->waterlevel == 0 ) return; - UTIL_BubbleTrail( pev->origin - pev->velocity * 0.1, pev->origin, 1 ); + UTIL_BubbleTrail( pev->origin - pev->velocity * 0.1f, pev->origin, 1 ); } diff --git a/dlls/poke646/xsbeam.cpp b/dlls/poke646/xsbeam.cpp index 1b98f647..114c0810 100644 --- a/dlls/poke646/xsbeam.cpp +++ b/dlls/poke646/xsbeam.cpp @@ -98,12 +98,14 @@ CXSBeam* CXSBeam::CXSBeamCreate( float flDamage ) void CXSBeam::Init() { int i; + for( i = 0; i < m_iBeamCount; i++ ) { m_pBeam[i] = CSprite::SpriteCreate( "sprites/hotglow.spr", pev->origin, FALSE ); + if( m_pBeam[i] ) { - m_pBeam[i]->pev->scale = 0.5; + m_pBeam[i]->pev->scale = 0.5f; m_pBeam[i]->SetTransparency( kRenderGlow, 255, 255, 255, 255, kRenderFxNoDissipation ); UTIL_SetOrigin( m_pBeam[i]->pev, pev->origin ); @@ -148,7 +150,7 @@ void CXSBeam::BeamTouch( CBaseEntity *pOther ) UTIL_DecalTrace( &tr, DECAL_SMALLSCORCH1 + RANDOM_LONG( 0, 2 ) ); - float flRadius = m_flDmg * 0.08 + 8; + float flRadius = m_flDmg * 0.08f + 8; MESSAGE_BEGIN( MSG_PVS, SVC_TEMPENTITY, pev->origin ); WRITE_BYTE( TE_DLIGHT ); @@ -175,7 +177,7 @@ void CXSBeam::BeamTouch( CBaseEntity *pOther ) m_pBeam[0]->pev->origin = tr.vecEndPos; float flQuarterRadius = flRadius / 4.0f; - m_pBeam[0]->Expand(0, 255.0f / flQuarterRadius ); + m_pBeam[0]->Expand( 0, 255.0f / flQuarterRadius ); SetThink( &CXSBeam::RemoveThink ); pev->nextthink = gpGlobals->time + flQuarterRadius; @@ -198,11 +200,12 @@ void CXSBeam::FlyThink() for( i = 0; i < m_iBeamCount; i++ ) { - float flDist = m_flDeflectionDot[i] * 360.0f * ( M_PI / 180.0f ) + flCenter; + float flDist = m_flDeflectionDot[i] * 360.0f * ( M_PI_F / 180.0f ) + flCenter; Vector vecSin = sin( flDist ) * m_flDeflectionDist * gpGlobals->v_up; Vector vecCos = cos( flDist ) * m_flDeflectionDist * gpGlobals->v_right; m_pBeam[i]->pev->origin = pev->origin + vecSin + vecCos; } + pev->nextthink = gpGlobals->time + 0.05f; } diff --git a/dlls/satchel.cpp b/dlls/satchel.cpp index 8e21c98e..79aa97be 100644 --- a/dlls/satchel.cpp +++ b/dlls/satchel.cpp @@ -487,7 +487,7 @@ void CPipebomb::PipebombReload() if( i < 2 ) { - m_flNextPrimaryAttack = m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 0.5; + m_flNextPrimaryAttack = m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 0.5f; m_flTimeWeaponIdle = UTIL_WeaponTimeBase(); m_chargeReady = SATCHEL_RELOAD; } diff --git a/dlls/shotgun.cpp b/dlls/shotgun.cpp index f3879749..f63dbddd 100644 --- a/dlls/shotgun.cpp +++ b/dlls/shotgun.cpp @@ -155,11 +155,11 @@ void CShotgun::PrimaryAttack() PLAYBACK_EVENT_FULL( flags, m_pPlayer->edict(), m_usSingleFire, 0.0, g_vecZero, g_vecZero, vecDir.x, vecDir.y, 0, 0, 0, 0 ); - m_flNextPrimaryAttack = m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 1.2; + m_flNextPrimaryAttack = m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 1.2f; if( m_iClip != 0 ) m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 6.0f; else - m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 1.2; + m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 1.2f; m_fInSpecialReload = 0;