diff --git a/dlls/CAd/displacer.cpp b/dlls/CAd/displacer.cpp index 30ab58e4..f55cbe03 100644 --- a/dlls/CAd/displacer.cpp +++ b/dlls/CAd/displacer.cpp @@ -87,7 +87,7 @@ void CDisplacerBall::Spawn(void) SetTouch( &CDisplacerBall::Touch ); SetThink( &CDisplacerBall::FlyThink ); - pev->nextthink = gpGlobals->time + 0.2; + pev->nextthink = gpGlobals->time + 0.2f; UTIL_SetSize(pev, Vector(0, 0, 0), Vector(0, 0, 0)); m_iBeams = 0; @@ -97,7 +97,7 @@ void CDisplacerBall::FlyThink() { ArmBeam( -1 ); ArmBeam( 1 ); - pev->nextthink = gpGlobals->time + 0.05; + pev->nextthink = gpGlobals->time + 0.05f; } void CDisplacerBall::ArmBeam( int iSide ) @@ -110,16 +110,16 @@ void CDisplacerBall::ArmBeam( int iSide ) float flDist = 1.0; UTIL_MakeAimVectors( pev->angles ); - Vector vecSrc = gpGlobals->v_forward * 32.0 + iSide * gpGlobals->v_right * 16.0 + gpGlobals->v_up * 36.0 + pev->origin; + Vector vecSrc = gpGlobals->v_forward * 32.0f + iSide * gpGlobals->v_right * 16.0f + gpGlobals->v_up * 36.0f + pev->origin; Vector vecAim = gpGlobals->v_up * RANDOM_FLOAT( -1.0, 1.0 ); - Vector vecEnd = (iSide * gpGlobals->v_right * RANDOM_FLOAT( 0.0, 1.0 ) + vecAim) * 512.0 + vecSrc; + Vector vecEnd = (iSide * gpGlobals->v_right * RANDOM_FLOAT( 0.0, 1.0 ) + vecAim) * 512.0f + vecSrc; UTIL_TraceLine( &vecSrc.x, &vecEnd.x, dont_ignore_monsters, ENT( pev ), &tr ); if( flDist > tr.flFraction ) flDist = tr.flFraction; // Couldn't find anything close enough - if( flDist == 1.0 ) + if( flDist == 1.0f ) return; // The beam might already exist if we've created all beams before. @@ -458,7 +458,7 @@ void CDisplacer::SecondaryAttack(void) SetThink (&CDisplacer::SpinUp); - m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 4.0; + m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 4.0f; pev->nextthink = gpGlobals->time; } @@ -476,7 +476,7 @@ void CDisplacer::PrimaryAttack() m_iFireMode = FIREMODE_FORWARD; SetThink (&CDisplacer::SpinUp); - m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 1.6; + m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 1.6f; pev->nextthink = gpGlobals->time; } @@ -494,7 +494,7 @@ void CDisplacer::WeaponIdle(void) int iAnim; float flRand = UTIL_SharedRandomFloat(m_pPlayer->random_seed, 0, 1); - if (flRand <= 0.5) + if (flRand <= 0.5f) { iAnim = DISPLACER_IDLE1; m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 3.0f; @@ -544,8 +544,8 @@ void CDisplacer::SpinUp( void ) EMIT_SOUND( edict(), CHAN_WEAPON, "weapons/displacer_spin2.wav", 1, ATTN_NORM ); SetThink (&CDisplacer::Teleport); } - pev->nextthink = gpGlobals->time + 0.9; - m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 1.3; + pev->nextthink = gpGlobals->time + 0.9f; + m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 1.3f; } //========================================================= @@ -639,16 +639,16 @@ void CDisplacer::Teleport( void ) { m_pPlayer->m_fInXen = !m_pPlayer->m_fInXen; /*if (m_pPlayer->m_fInXen) - m_pPlayer->pev->gravity = 0.5; + m_pPlayer->pev->gravity = 0.5f; else - m_pPlayer->pev->gravity = 1.0;*/ + m_pPlayer->pev->gravity = 1.0f;*/ } } else { EMIT_SOUND( edict(), CHAN_BODY, "buttons/button10.wav", 1, ATTN_NORM ); - m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 3.0; - m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 0.9; + m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 3.0f; + m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 0.9f; } SetThink( NULL ); diff --git a/dlls/CAd/eagle.cpp b/dlls/CAd/eagle.cpp index 8cd75c9d..fded0bfc 100644 --- a/dlls/CAd/eagle.cpp +++ b/dlls/CAd/eagle.cpp @@ -1,9 +1,9 @@ -//========= Copyright (c) 2004-2008, Raven City Team, All rights reserved. ============// -// // -// Purpose: // -// // -// $NoKeywords: $ // -//===================================================================================// +//========= Copyright (c) 2004-2008, Raven City Team, All rights reserved. =========// +// // +// Purpose: // +// // +// $NoKeywords: $ // +//==================================================================================// //Modifided by Lost_Gamer_ #include "extdll.h" @@ -100,7 +100,7 @@ BOOL CEagle::Deploy( ) void CEagle::Holster( int skiplocal /* = 0 */ ) { m_fInReload = FALSE;// cancel any reload in progress. - m_pPlayer->m_flNextAttack = UTIL_WeaponTimeBase() + 0.5; + m_pPlayer->m_flNextAttack = UTIL_WeaponTimeBase() + 0.5f; SendWeaponAnim( DEAGLE_HOLSTER ); if (m_pEagleLaser) @@ -123,7 +123,7 @@ void CEagle::SecondaryAttack() { EMIT_SOUND_DYN(ENT(m_pPlayer->pev), CHAN_ITEM, "weapons/desert_eagle_sight.wav", 1.0, ATTN_NORM, 0, PITCH_NORM); } - m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 0.5; + m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 0.5f; } void CEagle::PrimaryAttack() @@ -133,7 +133,7 @@ void CEagle::PrimaryAttack() if (m_fFireOnEmpty) { PlayEmptySound(); - m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.2; + m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.2f; } return; } @@ -141,9 +141,9 @@ void CEagle::PrimaryAttack() // don't fire underwater if (m_pPlayer->pev->waterlevel == 3) { - UpdateSpot( ); - PlayEmptySound( ); - m_flNextPrimaryAttack = UTIL_WeaponTimeBase()+ 0.15; + UpdateSpot(); + PlayEmptySound(); + m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.15f; return; } @@ -177,7 +177,7 @@ void CEagle::PrimaryAttack() if (m_pEagleLaser) { vecDir = m_pPlayer->FireBulletsPlayer( 1, vecSrc, vecAiming, Vector( flSpread, flSpread, flSpread ), 8192, BULLET_PLAYER_357, 0, 0, m_pPlayer->pev, m_pPlayer->random_seed ); - m_flNextPrimaryAttack = UTIL_WeaponTimeBase()+ 0.5; + m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.5f; #ifndef CLIENT_DLL m_pEagleLaser->Suspend( 0.6 ); #endif @@ -187,7 +187,7 @@ void CEagle::PrimaryAttack() { flSpread = 0.1; vecDir = m_pPlayer->FireBulletsPlayer( 1, vecSrc, vecAiming, VECTOR_CONE_10DEGREES, 8192, BULLET_PLAYER_357, 0, 0, m_pPlayer->pev, m_pPlayer->random_seed ); - m_flNextPrimaryAttack = UTIL_WeaponTimeBase()+ 0.22; + m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.22f; m_fLaserOn = FALSE; } @@ -209,9 +209,9 @@ void CEagle::Reload( void ) if ( m_pEagleLaser && m_fEagleLaserActive ) { #ifndef CLIENT_DLL - m_pEagleLaser->Suspend( 1.6 ); + m_pEagleLaser->Suspend( 1.6f ); #endif - m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 1.5; + m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 1.5f; } int iResult; @@ -251,14 +251,13 @@ void CEagle::UpdateSpot( void ) #endif } - void CEagle::WeaponIdle( void ) { - UpdateSpot( ); + UpdateSpot(); - if (m_flTimeWeaponIdle < UTIL_WeaponTimeBase() ) + if (m_flTimeWeaponIdle < UTIL_WeaponTimeBase() ) { - ResetEmptySound( ); + ResetEmptySound(); m_pPlayer->GetAutoaimVector( AUTOAIM_10DEGREES ); // only idle if the slid isn't back @@ -269,7 +268,7 @@ void CEagle::WeaponIdle( void ) if (m_pEagleLaser) { - if (flRand > 0.5 ) + if (flRand > 0.5f ) { iAnim = DEAGLE_IDLE5;//Done m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 2.0f; @@ -282,12 +281,12 @@ void CEagle::WeaponIdle( void ) } else { - if (flRand <= 0.3 ) + if (flRand <= 0.3f ) { iAnim = DEAGLE_IDLE1;//Done m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 2.5f; } - else if (flRand <= 0.6 ) + else if (flRand <= 0.6f ) { iAnim = DEAGLE_IDLE2; m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 2.5f; diff --git a/dlls/CAd/gonome.cpp b/dlls/CAd/gonome.cpp index a7412f60..5c8e8596 100644 --- a/dlls/CAd/gonome.cpp +++ b/dlls/CAd/gonome.cpp @@ -34,8 +34,8 @@ #define GONOME_TOLERANCE_MELEE1_RANGE 85 #define GONOME_TOLERANCE_MELEE2_RANGE 48 -#define GONOME_TOLERANCE_MELEE1_DOT 0.7 -#define GONOME_TOLERANCE_MELEE2_DOT 0.7 +#define GONOME_TOLERANCE_MELEE1_DOT 0.7f +#define GONOME_TOLERANCE_MELEE2_DOT 0.7f #define GONOME_MELEE_ATTACK_RADIUS 70 @@ -97,7 +97,7 @@ void CGonomeGuts::Shoot( entvars_t *pevOwner, Vector vecStart, Vector vecVelocit pSpit->pev->owner = ENT( pevOwner ); pSpit->SetThink( &CSquidSpit::Animate ); - pSpit->pev->nextthink = gpGlobals->time + 0.1; + pSpit->pev->nextthink = gpGlobals->time + 0.1f; } void CGonomeGuts::Touch( CBaseEntity *pOther ) @@ -315,11 +315,11 @@ int CGonome::TakeDamage(entvars_t *pevInflictor, entvars_t *pevAttacker, float f // Take 15% damage from bullets if( bitsDamageType == DMG_BULLET ) { - Vector vecDir = pev->origin - (pevInflictor->absmin + pevInflictor->absmax) * 0.5; + Vector vecDir = pev->origin - (pevInflictor->absmin + pevInflictor->absmax) * 0.5f; vecDir = vecDir.Normalize(); float flForce = DamageForce( flDamage ); pev->velocity = pev->velocity + vecDir * flForce; - flDamage *= 0.15; + flDamage *= 0.15f; } // HACK HACK -- until we fix this. @@ -340,7 +340,7 @@ BOOL CGonome::CheckRangeAttack1(float flDot, float flDist) return FALSE; } - if (flDist > 64 && flDist <= 784 && flDot >= 0.5 && gpGlobals->time >= m_flNextSpitTime) + if (flDist > 64 && flDist <= 784 && flDot >= 0.5f && gpGlobals->time >= m_flNextSpitTime) { if (m_hEnemy != 0) { @@ -354,12 +354,12 @@ BOOL CGonome::CheckRangeAttack1(float flDot, float flDist) if (IsMoving()) { // don't spit again for a long time, resume chasing enemy. - m_flNextSpitTime = gpGlobals->time + 5; + m_flNextSpitTime = gpGlobals->time + 5.0f; } else { // not moving, so spit again pretty soon. - m_flNextSpitTime = gpGlobals->time + 0.5; + m_flNextSpitTime = gpGlobals->time + 0.5f; } return TRUE; @@ -508,7 +508,7 @@ void CGonome::Spawn() pev->movetype = MOVETYPE_STEP; m_bloodColor = BLOOD_COLOR_GREEN; pev->effects = 0; - pev->health = gSkillData.bullsquidHealth * 2; + pev->health = gSkillData.bullsquidHealth * 2.0f; m_flFieldOfView = 0.2;// indicates the width of this monster's forward view cone ( as a dotproduct result ) m_MonsterState = MONSTERSTATE_NONE; diff --git a/dlls/CAd/helmet.cpp b/dlls/CAd/helmet.cpp index 2e268342..f5bc00b9 100644 --- a/dlls/CAd/helmet.cpp +++ b/dlls/CAd/helmet.cpp @@ -245,7 +245,7 @@ static BOOL IsFacing( entvars_t *pevTest, const Vector &reference ) UTIL_MakeVectorsPrivate( angle, forward, NULL, NULL ); // He's facing me, he meant it - if( DotProduct( forward, vecDir ) > 0.96 ) // +/- 15 degrees or so + if( DotProduct( forward, vecDir ) > 0.96f ) // +/- 15 degrees or so { return TRUE; } @@ -353,7 +353,7 @@ void CHelmet::TraceAttack( entvars_t *pevAttacker, float flDamage, Vector vecDir if( flDamage <= 0 ) { UTIL_Ricochet( ptr->vecEndPos, 1.0 ); - flDamage = 0.01; + flDamage = 0.01f; } } diff --git a/dlls/CAd/massn.cpp b/dlls/CAd/massn.cpp index 09498566..387a81e2 100644 --- a/dlls/CAd/massn.cpp +++ b/dlls/CAd/massn.cpp @@ -936,7 +936,7 @@ void CMassnRepel::RepelUse( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_T pBeam->SetFlags( BEAM_FSOLID ); pBeam->SetColor( 255, 255, 255 ); pBeam->SetThink( &CBaseEntity::SUB_Remove ); - pBeam->pev->nextthink = gpGlobals->time + -4096.0 * tr.flFraction / pGrunt->pev->velocity.z + 0.5; + pBeam->pev->nextthink = gpGlobals->time + -4096.0f * tr.flFraction / pGrunt->pev->velocity.z + 0.5f; UTIL_Remove( this ); } diff --git a/dlls/CAd/otis.cpp b/dlls/CAd/otis.cpp index 8334fc46..92094fa3 100644 --- a/dlls/CAd/otis.cpp +++ b/dlls/CAd/otis.cpp @@ -282,7 +282,7 @@ static BOOL IsFacing(entvars_t *pevTest, const Vector &reference) angle.x = 0; UTIL_MakeVectorsPrivate(angle, forward, NULL, NULL); // He's facing me, he meant it - if (DotProduct(forward, vecDir) > 0.96) // +/- 15 degrees or so + if (DotProduct(forward, vecDir) > 0.96f) // +/- 15 degrees or so { return TRUE; } diff --git a/dlls/items.cpp b/dlls/items.cpp index 2871de1d..e30882a3 100644 --- a/dlls/items.cpp +++ b/dlls/items.cpp @@ -237,7 +237,7 @@ class CItemBattery : public CItem char szcharge[64]; if( FClassnameIs( pev, "item_armor" ) ) - pPlayer->pev->armorvalue += gSkillData.batteryCapacity * 1.5; + pPlayer->pev->armorvalue += gSkillData.batteryCapacity * 1.5f; else pPlayer->pev->armorvalue += gSkillData.batteryCapacity; pPlayer->pev->armorvalue = Q_min( pPlayer->pev->armorvalue, MAX_NORMAL_BATTERY ); diff --git a/dlls/zombie.cpp b/dlls/zombie.cpp index 858d6865..3d2509fd 100644 --- a/dlls/zombie.cpp +++ b/dlls/zombie.cpp @@ -143,18 +143,18 @@ void CZombie::Killed( entvars_t *pevAttacker, int iGib ) float height = ( m_hEnemy->pev->origin.z + m_hEnemy->pev->view_ofs.z - pCrab->pev->origin.z ); if( height < 4 ) height = 4; - float speed = sqrt( 1.5 * gravity * height ); + float speed = sqrt( 1.5f * gravity * height ); float time = speed / gravity; vecJumpDir = ( m_hEnemy->pev->origin + m_hEnemy->pev->view_ofs - pCrab->pev->origin ); - vecJumpDir = vecJumpDir * ( 1.0 / time ); + vecJumpDir = vecJumpDir * ( 1.0f / time ); vecJumpDir.z = speed; float distance = vecJumpDir.Length(); if( distance > 100 ) - vecJumpDir = vecJumpDir * ( 100.0 / distance ); + vecJumpDir = vecJumpDir * ( 100.0f / distance ); } else vecJumpDir = Vector( gpGlobals->v_forward.x, gpGlobals->v_forward.y, gpGlobals->v_up.z ) * 20;