diff --git a/dlls/bubblemod/BMOD_CameraPoint.cpp b/dlls/bubblemod/BMOD_CameraPoint.cpp index ad9d2083..4dbeb118 100644 --- a/dlls/bubblemod/BMOD_CameraPoint.cpp +++ b/dlls/bubblemod/BMOD_CameraPoint.cpp @@ -51,7 +51,7 @@ void CCamPoint::Spawn( void ) pev->rendermode = kRenderTransTexture; SetThink( &CCamPoint::Think ); - pev->nextthink = gpGlobals->time + 0.1; + pev->nextthink = gpGlobals->time + 0.1f; } void CCamPoint::Think( void ) @@ -68,7 +68,7 @@ void CCamPoint::Think( void ) ) { // UTIL_ClientPrintAll( HUD_PRINTTALK, " Camera point destroyed.\n"); UTIL_Remove( this ); - pev->nextthink = gpGlobals->time + .1; + pev->nextthink = gpGlobals->time + 0.1f; return; } @@ -78,5 +78,5 @@ void CCamPoint::Think( void ) 0), // Wait until it's time to think again. - pev->nextthink = gpGlobals->time + 0.01; + pev->nextthink = gpGlobals->time + 0.01f; } diff --git a/dlls/bubblemod/BMOD_egon.cpp b/dlls/bubblemod/BMOD_egon.cpp index e02fa239..01ac0620 100644 --- a/dlls/bubblemod/BMOD_egon.cpp +++ b/dlls/bubblemod/BMOD_egon.cpp @@ -226,7 +226,7 @@ int CEgon::AddToPlayer( CBasePlayer *pPlayer ) void CEgon::Holster( int skiplocal /* = 0 */ ) { - m_pPlayer->m_flNextAttack = UTIL_WeaponTimeBase() + 0.5; + m_pPlayer->m_flNextAttack = UTIL_WeaponTimeBase() + 0.5f; // m_flTimeWeaponIdle = gpGlobals->time + UTIL_RandomFloat ( 10, 15 ); SendWeaponAnim( EGON_HOLSTER ); @@ -266,7 +266,7 @@ float CEgon::GetPulseInterval( void ) { if ( g_pGameRules->IsMultiplayer() ) { - return 0.1; + return 0.1f; } return EGON_PULSE_INTERVAL; @@ -276,7 +276,7 @@ float CEgon::GetDischargeInterval( void ) { if ( g_pGameRules->IsMultiplayer() ) { - return 0.1; + return 0.1f; } return EGON_DISCHARGE_INTERVAL; @@ -294,9 +294,9 @@ void CEgon::BubbleAttack( void ) { if ( !HasAmmo() ) { - m_flNextPrimaryAttack = gpGlobals->time + 0.25; + m_flNextPrimaryAttack = gpGlobals->time + 0.25f; if (m_flNextSecondaryAttack <= gpGlobals->time) - m_flNextSecondaryAttack = gpGlobals->time + 0.25; + m_flNextSecondaryAttack = gpGlobals->time + 0.25f; PlayEmptySound( ); return; } @@ -307,9 +307,9 @@ void CEgon::BubbleAttack( void ) m_shakeTime = 0; m_pPlayer->m_iWeaponVolume = EGON_PRIMARY_VOLUME; - m_flTimeWeaponIdle = gpGlobals->time + 0.1; - // m_shootTime = gpGlobals->time + 2; - m_shootTime = gpGlobals->time + .2; + m_flTimeWeaponIdle = gpGlobals->time + 0.1f; + // m_shootTime = gpGlobals->time + 2.0f; + m_shootTime = gpGlobals->time + 0.2f; if ( m_fireMode == FIRE_WIDE ) { @@ -347,15 +347,15 @@ void CEgon::BubbleAttack( void ) EMIT_SOUND_DYN(ENT(m_pPlayer->pev), CHAN_STATIC, BUBB_SOUND_RUN, 0.9, ATTN_NORM, 0, 50 + (m_healAmmoUsed * 2) ); } - m_shootTime += (.1 + RANDOM_FLOAT(0,.1)); + m_shootTime += (0.1f + RANDOM_FLOAT(0.0f, 0.1f)); } if ( !HasAmmo() ) { EndBubbleAttack(); m_fireState = FIRE_OFF; - m_flNextPrimaryAttack = gpGlobals->time + 1.0; + m_flNextPrimaryAttack = gpGlobals->time + 1.0f; if (m_flNextSecondaryAttack <= gpGlobals->time) - m_flNextSecondaryAttack = gpGlobals->time + 1.0; + m_flNextSecondaryAttack = gpGlobals->time + 1.0f; } } @@ -393,7 +393,7 @@ void CEgon::BubbleFire( const Vector &vecOrigSrc, const Vector &vecDir ) if (!(m_bubbletime <= gpGlobals->time)) return; - m_bubbletime = gpGlobals->time + .05; + m_bubbletime = gpGlobals->time + 0.05f; UTIL_MakeVectors( m_pPlayer->pev->v_angle + m_pPlayer->pev->punchangle ); m_pPlayer->pev->velocity = m_pPlayer->pev->velocity - gpGlobals->v_forward * bm_thrust.value; @@ -455,7 +455,7 @@ void CEgon::FireHeal( void ) { // Only do this every once in a while to save bandwidth. if (!(m_bubbletime <= gpGlobals->time)) return; - m_bubbletime = gpGlobals->time + .1; + m_bubbletime = gpGlobals->time + 0.1f; Vector vecOrigSrc = m_pPlayer->GetGunPosition( ); int bubbleRadius = 1; @@ -463,7 +463,7 @@ void CEgon::FireHeal( void ) { int bubbleSpeed = 8; if (m_healAmmoUseTime <= gpGlobals->time) { - m_healAmmoUseTime = gpGlobals->time +.5; + m_healAmmoUseTime = gpGlobals->time + 0.5f; UseAmmo(5); m_healAmmoUsed += 5; @@ -642,7 +642,7 @@ void CEgon::WeaponIdle( void ) float flRand = RANDOM_FLOAT(0,1); - if ( flRand <= 0.5 ) + if ( flRand <= 0.5f ) { iAnim = EGON_IDLE1; m_flTimeWeaponIdle = gpGlobals->time + RANDOM_FLOAT(10,15); @@ -662,9 +662,9 @@ void CEgon::EndBubbleAttack( void ) STOP_SOUND( ENT(m_pPlayer->pev), CHAN_STATIC, BUBB_SOUND_RUN ); EMIT_SOUND_DYN(ENT(m_pPlayer->pev), CHAN_WEAPON, BUBB_SOUND_OFF, 0.98, ATTN_NORM, 0, 100); m_fireState = FIRE_OFF; - m_flTimeWeaponIdle = gpGlobals->time + 2.0; - m_flNextPrimaryAttack = gpGlobals->time + 0.5; - // m_flNextSecondaryAttack = gpGlobals->time + 30; + m_flTimeWeaponIdle = gpGlobals->time + 2.0f; + m_flNextPrimaryAttack = gpGlobals->time + 0.5f; + // m_flNextSecondaryAttack = gpGlobals->time + 30.0f; DestroyEffect(); } @@ -673,9 +673,9 @@ void CEgon::EndAttack( void ) STOP_SOUND( ENT(m_pPlayer->pev), CHAN_STATIC, EGON_SOUND_RUN ); EMIT_SOUND_DYN(ENT(m_pPlayer->pev), CHAN_WEAPON, EGON_SOUND_OFF, 0.98, ATTN_NORM, 0, 100); m_fireState = FIRE_OFF; - m_flTimeWeaponIdle = gpGlobals->time + 2.0; - m_flNextPrimaryAttack = gpGlobals->time + 0.5; - // m_flNextSecondaryAttack = gpGlobals->time + 30; + m_flTimeWeaponIdle = gpGlobals->time + 2.0f; + m_flNextPrimaryAttack = gpGlobals->time + 0.5f; + // m_flNextSecondaryAttack = gpGlobals->time + 30.0f; DestroyEffect(); } @@ -713,7 +713,7 @@ void CEgon::Attack( void ) { if ( !HasAmmo() ) { - m_flNextPrimaryAttack = m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 0.25; + m_flNextPrimaryAttack = m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 0.25f; PlayEmptySound( ); return; } @@ -725,9 +725,9 @@ void CEgon::Attack( void ) m_shakeTime = 0; m_pPlayer->m_iWeaponVolume = EGON_PRIMARY_VOLUME; - m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 0.1; - pev->fuser1 = UTIL_WeaponTimeBase() + 2; - m_shootTime = gpGlobals->time +2; + m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 0.1f; + pev->fuser1 = UTIL_WeaponTimeBase() + 2.0f; + m_shootTime = gpGlobals->time + 2.0f; if ( m_fireMode == FIRE_WIDE ) { @@ -764,7 +764,7 @@ void CEgon::Attack( void ) if ( !HasAmmo() ) { EndAttack(); - m_flNextPrimaryAttack = m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 1.0; + m_flNextPrimaryAttack = m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 1.0f; } } @@ -831,7 +831,7 @@ void CEgon::Fire( const Vector &vecOrigSrc, const Vector &vecDir ) if ( gpGlobals->time >= m_flAmmoUseTime ) { UseAmmo( 1 ); - m_flAmmoUseTime = gpGlobals->time + 0.1; + m_flAmmoUseTime = gpGlobals->time + 0.1f; } } else @@ -840,7 +840,7 @@ void CEgon::Fire( const Vector &vecOrigSrc, const Vector &vecDir ) if ( gpGlobals->time >= m_flAmmoUseTime ) { UseAmmo( 1 ); - m_flAmmoUseTime = gpGlobals->time + 0.166; + m_flAmmoUseTime = gpGlobals->time + 0.166f; } } @@ -877,7 +877,7 @@ void CEgon::Fire( const Vector &vecOrigSrc, const Vector &vecDir ) if ( gpGlobals->time >= m_flAmmoUseTime ) { UseAmmo( 1 ); - m_flAmmoUseTime = gpGlobals->time + 0.2; + m_flAmmoUseTime = gpGlobals->time + 0.2f; } } else @@ -886,7 +886,7 @@ void CEgon::Fire( const Vector &vecOrigSrc, const Vector &vecDir ) if ( gpGlobals->time >= m_flAmmoUseTime ) { UseAmmo( 1 ); - m_flAmmoUseTime = gpGlobals->time + 0.1; + m_flAmmoUseTime = gpGlobals->time + 0.1f; } } @@ -894,7 +894,7 @@ void CEgon::Fire( const Vector &vecOrigSrc, const Vector &vecDir ) if ( m_shakeTime < gpGlobals->time ) { UTIL_ScreenShake( tr.vecEndPos, 5.0, 150.0, 0.75, 250.0 ); - m_shakeTime = gpGlobals->time + 1.5; + m_shakeTime = gpGlobals->time + 1.5f; } } #endif diff --git a/dlls/bubblemod/BMOD_flyingcrowbar.cpp b/dlls/bubblemod/BMOD_flyingcrowbar.cpp index dd2cec2c..3d87e1a0 100644 --- a/dlls/bubblemod/BMOD_flyingcrowbar.cpp +++ b/dlls/bubblemod/BMOD_flyingcrowbar.cpp @@ -62,7 +62,7 @@ void CFlyingCrowbar::Spawn( ) // Set the think funtion. SetThink( &CFlyingCrowbar::BubbleThink ); - pev->nextthink = gpGlobals->time + 0.25; + pev->nextthink = gpGlobals->time + 0.25f; // Set the touch function. SetTouch( &CFlyingCrowbar::SpinTouch ); @@ -146,7 +146,7 @@ void CFlyingCrowbar::SpinTouch( CBaseEntity *pOther ) // // REMOVE THIS IF YOU ARE NOT USING THE RUNE CODE if (m_pPlayer->m_RuneFlags == RUNE_CROWBAR) - pWeaponBox->pev->nextthink = gpGlobals->time + 3; + pWeaponBox->pev->nextthink = gpGlobals->time + 3.0f; // *** End BubbleMod Rune Code *** // Get the unit vector in the direction of motion. @@ -164,7 +164,7 @@ void CFlyingCrowbar::SpinTouch( CBaseEntity *pOther ) // Remove this flying_crowbar from the world. SetThink( &CBaseEntity::SUB_Remove ); - pev->nextthink = gpGlobals->time + .1; + pev->nextthink = gpGlobals->time + 0.1f; } void CFlyingCrowbar::BubbleThink( void ) @@ -175,7 +175,7 @@ void CFlyingCrowbar::BubbleThink( void ) pev->owner = NULL; // Only think every .25 seconds. - pev->nextthink = gpGlobals->time + 0.25; + pev->nextthink = gpGlobals->time + 0.25f; // Make a whooshy sound. EMIT_SOUND_DYN(ENT(pev), CHAN_VOICE, "weapons/cbar_miss1.wav", @@ -183,5 +183,5 @@ void CFlyingCrowbar::BubbleThink( void ) // If the crowbar enters water, make some bubbles. if (pev->waterlevel) - 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/bubblemod/BMOD_hornetgun.h b/dlls/bubblemod/BMOD_hornetgun.h index 2e80feca..75c4b472 100644 --- a/dlls/bubblemod/BMOD_hornetgun.h +++ b/dlls/bubblemod/BMOD_hornetgun.h @@ -17,8 +17,8 @@ extern cvar_t bm_hornet_mod; #define HGUN_MAX_BEAMS 6 -#define HGUN_CHARGE_TIME .8 / HGUN_MAX_BEAMS -#define HGUN_ZAP_TIME 1 +#define HGUN_CHARGE_TIME 0.8f / HGUN_MAX_BEAMS +#define HGUN_ZAP_TIME 1.0f class CHgun : public CBasePlayerWeapon { @@ -69,4 +69,4 @@ private: }; -#endif \ No newline at end of file +#endif diff --git a/dlls/bubblemod/BMOD_player.cpp b/dlls/bubblemod/BMOD_player.cpp index c5e18185..612af244 100644 --- a/dlls/bubblemod/BMOD_player.cpp +++ b/dlls/bubblemod/BMOD_player.cpp @@ -132,7 +132,7 @@ void CBasePlayer::StartObserver( Vector vecPosition, Vector vecViewAngle ) // WRITE_STRING( "" ); //MESSAGE_END(); - m_fMsgTimer = gpGlobals->time + .5; + m_fMsgTimer = gpGlobals->time + 0.5f; m_bSentMsg = FALSE; } @@ -246,14 +246,14 @@ void CBasePlayer::Observer_HandleButtons() Observer_SetMode( OBS_CHASE_FREE ); else Observer_SetMode( OBS_ROAMING ); - m_fMsgTimer = gpGlobals->time + 0.2; + m_fMsgTimer = gpGlobals->time + 0.2f; } // Attack2 cycles player targets if ( pev->button & IN_ATTACK2 && pev->iuser1 != OBS_ROAMING ) { Observer_FindNextPlayer( false ); - m_fMsgTimer = gpGlobals->time + 0.2; + m_fMsgTimer = gpGlobals->time + 0.2f; } // Attack Spawns @@ -262,7 +262,7 @@ void CBasePlayer::Observer_HandleButtons() { // g_engfuncs.pfnServerPrint( "Player spawned from Obs!\n" ); StopObserver(); - m_fMsgTimer = gpGlobals->time + 0.2; + m_fMsgTimer = gpGlobals->time + 0.2f; } } @@ -431,8 +431,8 @@ void CBasePlayer::BMOD_PreThink(void) WRITE_BYTE( 255 ); // alpha MESSAGE_END(); } - float fCos = cos( gpGlobals->time * 4.00) * 8; - float fSin = sin( gpGlobals->time * 4.00) * 8; + float fCos = cos( gpGlobals->time * 4.0f) * 8; + float fSin = sin( gpGlobals->time * 4.0f) * 8; MESSAGE_BEGIN( MSG_PVS, SVC_TEMPENTITY, pev->origin ); WRITE_BYTE( TE_BUBBLES ); WRITE_COORD( pev->origin.x + fCos); @@ -484,7 +484,7 @@ void CBasePlayer::BMOD_Think( void ) // counts tenths of seconds. if (m_fMessageTimer < gpGlobals->time) { - m_fMessageTimer = gpGlobals->time + .1; + m_fMessageTimer = gpGlobals->time + 0.1f; m_iMessageCounter++; m_iMessageFire = TRUE; } @@ -611,7 +611,7 @@ void CBasePlayer::BMOD_Identify( void ) szExtra ) ); - timer = gpGlobals->time + .5; + timer = gpGlobals->time + 0.5f; LastIdentPlayer = (CBasePlayer *)pOther; } else if (!pOther->IsPlayer()) { @@ -697,7 +697,7 @@ void CBasePlayer::BMOD_ResetTypeKill( void ) } m_bTypeMode = FALSE; // EnableControl(TRUE); - m_flTypeKillStamp = gpGlobals->time + 4; + m_flTypeKillStamp = gpGlobals->time + 4.0f; } return; } diff --git a/dlls/bubblemod/BMOD_rune.cpp b/dlls/bubblemod/BMOD_rune.cpp index 1e423a53..dcbee5da 100644 --- a/dlls/bubblemod/BMOD_rune.cpp +++ b/dlls/bubblemod/BMOD_rune.cpp @@ -65,7 +65,7 @@ void CRune::Spawn( void ) if (DROP_TO_FLOOR(ENT(pev)) == 0) { - ALERT(at_error, "Item %s fell out of level at %f,%f,%f", STRING( pev->classname ), pev->origin.x, pev->origin.y, pev->origin.z); + ALERT(at_error, "Item %s fell out of level at %f,%f,%f", STRING( pev->classname ), (double)pev->origin.x, (double)pev->origin.y, (double)pev->origin.z); UTIL_Remove( this ); return; } @@ -84,10 +84,10 @@ void CRune::RuneTouch( CBaseEntity *pOther ) TraceResult tr; UTIL_TraceLine( pev->origin, pev->origin - Vector(0,0,10), ignore_monsters, edict(), &tr ); - if ( tr.flFraction < 1.0 ) + if ( tr.flFraction < 1.0f ) { // add a bit of static friction - pev->velocity = pev->velocity * 0.5; + pev->velocity = pev->velocity * 0.5f; } return; } @@ -206,7 +206,7 @@ void CRune::Materialize( void ) SetTouch( &CRune::RuneTouch ); } // EMIT_SOUND_DYN( ENT(pev), CHAN_WEAPON, "buttons/blip2.wav", 1, ATTN_NORM, 0, 150 ); - pev->nextthink = gpGlobals->time + 2; + pev->nextthink = gpGlobals->time + 2.0f; } void CRune::Precache( void ) @@ -243,7 +243,7 @@ class CCrowbarRune : public CRune float respawn = Q_max(1, CVAR_GET_FLOAT("bm_rune_cbar_r")); //RuneMsg( pPlayer, MSG_RUNE_CROWBAR, m_vRuneColor, time - .5); - PrintMessage( pPlayer, BMOD_CHAN_RUNE, m_vRuneColor, Vector (.1, time - .5, .1), "SUPER CROWBAR\nIncreased crowbar damage / infinite throws."); + PrintMessage( pPlayer, BMOD_CHAN_RUNE, m_vRuneColor, Vector (0.1f, time - 0.5f, 0.1f), "SUPER CROWBAR\nIncreased crowbar damage / infinite throws."); EMIT_SOUND( pPlayer->edict(), CHAN_ITEM, "items/gunpickup2.wav", 1, ATTN_NORM ); pPlayer->m_RuneFlags = RUNE_CROWBAR; @@ -281,7 +281,7 @@ class CGrenadeRune : public CRune float time = Q_max(1, CVAR_GET_FLOAT("bm_rune_gren_t")); float respawn = Q_max(1, CVAR_GET_FLOAT("bm_rune_gren_r")); - PrintMessage( pPlayer, BMOD_CHAN_RUNE, m_vRuneColor, Vector (.1, time - .5, .1), "MEGA GRENADE\nIncreased hand grenade damage."); + PrintMessage( pPlayer, BMOD_CHAN_RUNE, m_vRuneColor, Vector (0.1f, time - 0.5f, 0.1f), "MEGA GRENADE\nIncreased hand grenade damage."); EMIT_SOUND( pPlayer->edict(), CHAN_ITEM, "items/gunpickup2.wav", 1, ATTN_NORM ); pPlayer->m_RuneFlags = RUNE_GRENADE; pPlayer->m_RuneTime = gpGlobals->time + time; @@ -318,7 +318,7 @@ class CHealthRune : public CRune { float time = Q_max(1, CVAR_GET_FLOAT("bm_rune_health_t")); float respawn = Q_max(1, CVAR_GET_FLOAT("bm_rune_health_r")); - PrintMessage( pPlayer, BMOD_CHAN_RUNE, m_vRuneColor, Vector (.1, time - .5, .1), "DOUBLE HEALTH PICKUPS\nMed packs / machines give 2X health. Fast Heal on Bubble Gun."); + PrintMessage( pPlayer, BMOD_CHAN_RUNE, m_vRuneColor, Vector (0.1f, time - 0.5f, 0.1f), "DOUBLE HEALTH PICKUPS\nMed packs / machines give 2X health. Fast Heal on Bubble Gun."); EMIT_SOUND( pPlayer->edict(), CHAN_ITEM, "items/gunpickup2.wav", 1, ATTN_NORM ); pPlayer->m_RuneFlags = RUNE_HEALTH; @@ -356,7 +356,7 @@ class CBatteryRune : public CRune float time = Q_max(1, CVAR_GET_FLOAT("bm_rune_armor_t")); float respawn = Q_max(1, CVAR_GET_FLOAT("bm_rune_armor_r")); - PrintMessage( pPlayer, BMOD_CHAN_RUNE, m_vRuneColor, Vector (.1, time - .5, .1), "DOUBLE ARMOR PICKUPS\nArmor batteries / machines give 2X armor. Bubble Gun gives armor."); + PrintMessage( pPlayer, BMOD_CHAN_RUNE, m_vRuneColor, Vector (0.1f, time - 0.5f, 0.1f), "DOUBLE ARMOR PICKUPS\nArmor batteries / machines give 2X armor. Bubble Gun gives armor."); EMIT_SOUND( pPlayer->edict(), CHAN_ITEM, "items/gunpickup2.wav", 1, ATTN_NORM ); pPlayer->m_RuneFlags = RUNE_BATTERY; pPlayer->m_RuneTime = gpGlobals->time + time; @@ -393,7 +393,7 @@ class C357Rune : public CRune float time = Q_max(1, CVAR_GET_FLOAT("bm_rune_357_t")); float respawn = Q_max(1, CVAR_GET_FLOAT("bm_rune_357_r")); - PrintMessage( pPlayer, BMOD_CHAN_RUNE, m_vRuneColor, Vector (.1, time - .5, .1), "SUPER MAGNUM\nIncreased magnum damage."); + PrintMessage( pPlayer, BMOD_CHAN_RUNE, m_vRuneColor, Vector (0.1f, time - 0.5f, 0.1f), "SUPER MAGNUM\nIncreased magnum damage."); EMIT_SOUND( pPlayer->edict(), CHAN_ITEM, "items/gunpickup2.wav", 1, ATTN_NORM ); pPlayer->m_RuneFlags = RUNE_357; pPlayer->m_RuneTime = gpGlobals->time + time; @@ -430,7 +430,7 @@ class CShotgunRune : public CRune float time = Q_max(1, CVAR_GET_FLOAT("bm_rune_shotty_t")); float respawn = Q_max(1, CVAR_GET_FLOAT("bm_rune_shotty_r")); - PrintMessage( pPlayer, BMOD_CHAN_RUNE, m_vRuneColor, Vector (.1, time - .5, .1), "SUPER SHOTGUN\nIncreased shotgun speed / fast reload."); + PrintMessage( pPlayer, BMOD_CHAN_RUNE, m_vRuneColor, Vector (0.1f, time - 0.5f, 0.1f), "SUPER SHOTGUN\nIncreased shotgun speed / fast reload."); EMIT_SOUND( pPlayer->edict(), CHAN_ITEM, "items/gunpickup2.wav", 1, ATTN_NORM ); pPlayer->m_RuneFlags = RUNE_SHOTGUN; pPlayer->m_RuneTime = gpGlobals->time + time; diff --git a/dlls/bubblemod/BMOD_snarkmine.cpp b/dlls/bubblemod/BMOD_snarkmine.cpp index 1d8e4f27..3375ee02 100644 --- a/dlls/bubblemod/BMOD_snarkmine.cpp +++ b/dlls/bubblemod/BMOD_snarkmine.cpp @@ -91,16 +91,16 @@ void CTripSnarkGrenade :: Spawn( void ) if (pev->spawnflags & 1) { // power up quickly - m_flPowerUp = gpGlobals->time + 1.0; + m_flPowerUp = gpGlobals->time + 1.0f; } else { // power up in 2.5 seconds - m_flPowerUp = gpGlobals->time + 2.5; + m_flPowerUp = gpGlobals->time + 2.5f; } SetThink( &CTripSnarkGrenade::PowerupThink ); - pev->nextthink = gpGlobals->time + 0.2; + pev->nextthink = gpGlobals->time + 0.2f; pev->takedamage = DAMAGE_YES; // pev->dmg = gSkillData.plrDmgTripmine; @@ -141,7 +141,7 @@ void CTripSnarkGrenade :: WarningThink( void ) // set to power up SetThink( &CTripSnarkGrenade::PowerupThink ); - pev->nextthink = gpGlobals->time + 1.0; + pev->nextthink = gpGlobals->time + 1.0f; } @@ -158,11 +158,11 @@ void CTripSnarkGrenade :: PowerupThink( void ) if (tr.fStartSolid || (oldowner && tr.pHit == oldowner)) { pev->owner = oldowner; - m_flPowerUp += 0.1; - pev->nextthink = gpGlobals->time + 0.1; + m_flPowerUp += 0.1f; + pev->nextthink = gpGlobals->time + 0.1f; return; } - if (tr.flFraction < 1.0) + if (tr.flFraction < 1.0f) { pev->owner = tr.pHit; m_hOwner = CBaseEntity::Instance( pev->owner ); @@ -174,8 +174,8 @@ void CTripSnarkGrenade :: PowerupThink( void ) STOP_SOUND( ENT(pev), CHAN_VOICE, "weapons/mine_deploy.wav" ); STOP_SOUND( ENT(pev), CHAN_BODY, "weapons/mine_charge.wav" ); SetThink( &CBaseEntity::SUB_Remove ); - pev->nextthink = gpGlobals->time + 0.1; - ALERT( at_console, "WARNING:Tripmine at %.0f, %.0f, %.0f removed\n", pev->origin.x, pev->origin.y, pev->origin.z ); + pev->nextthink = gpGlobals->time + 0.1f; + ALERT( at_console, "WARNING:Tripmine at %.0f, %.0f, %.0f removed\n", (double)pev->origin.x, (double)pev->origin.y, (double)pev->origin.z ); KillBeam(); return; } @@ -189,7 +189,7 @@ void CTripSnarkGrenade :: PowerupThink( void ) pMine->pev->spawnflags |= SF_NORESPAWN; SetThink( &CBaseEntity::SUB_Remove ); KillBeam(); - pev->nextthink = gpGlobals->time + 0.1; + pev->nextthink = gpGlobals->time + 0.1f; return; /* @@ -213,7 +213,7 @@ void CTripSnarkGrenade :: PowerupThink( void ) // play enabled sound EMIT_SOUND_DYN( ENT(pev), CHAN_VOICE, "squeek/sqk_deploy1.wav", 0.5, ATTN_NORM, 1.0, 75 ); } - pev->nextthink = gpGlobals->time + 0.1; + pev->nextthink = gpGlobals->time + 0.1f; } @@ -239,7 +239,7 @@ void CTripSnarkGrenade :: MakeBeam( void ) // set to follow laser spot SetThink( &CTripSnarkGrenade::BeamBreakThink ); - pev->nextthink = gpGlobals->time + 0.1; + pev->nextthink = gpGlobals->time + 0.1f; Vector vecTmpEnd = pev->origin + m_vecDir * 2048 * m_flBeamLength; @@ -283,7 +283,7 @@ void CTripSnarkGrenade :: BeamBreakThink( void ) m_hOwner = CBaseEntity::Instance( tr.pHit ); // reset owner too } - if (fabs( m_flBeamLength - tr.flFraction ) > 0.001) + if (fabs( m_flBeamLength - tr.flFraction ) > 0.001f) { bBlowup = 1; } @@ -309,7 +309,7 @@ void CTripSnarkGrenade :: BeamBreakThink( void ) return; } - pev->nextthink = gpGlobals->time + 0.1; + pev->nextthink = gpGlobals->time + 0.1f; } int CTripSnarkGrenade :: TakeDamage( entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType ) @@ -319,7 +319,7 @@ int CTripSnarkGrenade :: TakeDamage( entvars_t *pevInflictor, entvars_t *pevAtta // disable // Create( "weapon_tripsnark", pev->origin + m_vecDir * 24, pev->angles ); SetThink( &CBaseEntity::SUB_Remove ); - pev->nextthink = gpGlobals->time + 0.1; + pev->nextthink = gpGlobals->time + 0.1f; KillBeam(); return FALSE; } @@ -337,7 +337,7 @@ void CTripSnarkGrenade::Killed( entvars_t *pevAttacker, int iGib ) } SetThink( &CTripSnarkGrenade::DelayDeathThink ); - pev->nextthink = gpGlobals->time + RANDOM_FLOAT( 0.1, 0.3 ); + pev->nextthink = gpGlobals->time + RANDOM_FLOAT( 0.1f, 0.3f ); EMIT_SOUND( ENT(pev), CHAN_BODY, "common/null.wav", 0.5, ATTN_NORM ); // shut off chargeup } @@ -352,7 +352,7 @@ void CTripSnarkGrenade::Explode( TraceResult *pTrace ) pev->takedamage = DAMAGE_NO; // Pull out of the wall a bit - if ( pTrace->flFraction != 1.0 ) + if ( pTrace->flFraction != 1.0f ) { pev->origin = pTrace->vecEndPos + (pTrace->vecPlaneNormal * 20); } @@ -381,14 +381,14 @@ void CTripSnarkGrenade::Explode( TraceResult *pTrace ) // Tell the mine what do do for the next little while. SetThink( &CTripSnarkGrenade::RiftThink ); - pev->nextthink = gpGlobals->time + 0.1; - m_RiftTime = gpGlobals->time + 3; + pev->nextthink = gpGlobals->time + 0.1f; + m_RiftTime = gpGlobals->time + 3.0f; } void CTripSnarkGrenade::RiftThink( void ) { // Setup next think time - pev->nextthink = gpGlobals->time + 0.1; + pev->nextthink = gpGlobals->time + 0.1f; // Make a lightning strike Vector vecEnd; @@ -478,9 +478,9 @@ BOOL CTripSnarkGrenade::IsSpawnMine() UTIL_TraceLine( pEntity->pev->origin, pEntity->pev->origin - Vector(0,0,1024), ignore_monsters, ENT(pev), &tr); Vector vecTop = pEntity->pev->origin + Vector(0,0,36); - float height = fabs(vecTop.z - tr.vecEndPos.z) / 2; + float height = fabs(vecTop.z - tr.vecEndPos.z) * 0.5f; - if (UTIL_OBB_LineTest(vecSrc, vecSpot, Vector(vecTop.x, vecTop.y, (vecTop.z + tr.vecEndPos.z) / 2), Vector(16,16,height) )) + if (UTIL_OBB_LineTest(vecSrc, vecSpot, Vector(vecTop.x, vecTop.y, (vecTop.z + tr.vecEndPos.z) * 0.5f), Vector(16,16,height) )) result = TRUE; } } diff --git a/dlls/bubblemod/BMOD_squeakgrenade.cpp b/dlls/bubblemod/BMOD_squeakgrenade.cpp index 5de37fdd..dfb39f32 100644 --- a/dlls/bubblemod/BMOD_squeakgrenade.cpp +++ b/dlls/bubblemod/BMOD_squeakgrenade.cpp @@ -43,7 +43,7 @@ if (!bm_snarks_mod.value || m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] < 5) UTIL_TraceLine( vecSrc, vecSrc + vecAiming * 128, dont_ignore_monsters, ENT( m_pPlayer->pev ), &tr ); - if (tr.flFraction < 1.0) + if (tr.flFraction < 1.0f) { // ALERT( at_console, "hit %f\n", tr.flFraction ); @@ -82,7 +82,7 @@ if (!bm_snarks_mod.value || m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] < 5) } - m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 0.3; + m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 0.3f; m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + RANDOM_FLOAT ( 10, 15 ); } @@ -150,4 +150,4 @@ CBaseEntity *CSqueakGrenade :: BMOD_BestVisibleEnemy ( void ) } return pReturn; -} \ No newline at end of file +} diff --git a/dlls/bubblemod/BMOD_tripmines.cpp b/dlls/bubblemod/BMOD_tripmines.cpp index f615b729..1d55d563 100644 --- a/dlls/bubblemod/BMOD_tripmines.cpp +++ b/dlls/bubblemod/BMOD_tripmines.cpp @@ -44,7 +44,7 @@ BOOL CTripmineGrenade::BMOD_IsSpawnMine() TraceResult tr; Vector vecSpot; Vector vecSrc = pev->origin; - float flRadius = pev->dmg * 2.5; + float flRadius = pev->dmg * 2.5f; int bInWater = (UTIL_PointContents ( vecSrc ) == CONTENTS_WATER); @@ -69,9 +69,9 @@ BOOL CTripmineGrenade::BMOD_IsSpawnMine() UTIL_TraceLine( pEntity->pev->origin, pEntity->pev->origin - Vector(0,0,1024), ignore_monsters, ENT(pev), &tr); Vector vecTop = pEntity->pev->origin + Vector(0,0,36); - float height = fabs(vecTop.z - tr.vecEndPos.z) / 2; + float height = fabs(vecTop.z - tr.vecEndPos.z) * 0.5f; - if (UTIL_OBB_LineTest(vecSrc, vecSpot, Vector(vecTop.x, vecTop.y, (vecTop.z + tr.vecEndPos.z) / 2), Vector(16,16,height) )) + if (UTIL_OBB_LineTest(vecSrc, vecSpot, Vector(vecTop.x, vecTop.y, (vecTop.z + tr.vecEndPos.z) * 0.5f), Vector(16,16,height) )) result = TRUE; } } @@ -81,7 +81,7 @@ BOOL CTripmineGrenade::BMOD_IsSpawnMine() void CTripmineGrenade::FlashBang( void ) { #define FLASH_RANGE 600 - pev->nextthink = gpGlobals->time + 0.3; + pev->nextthink = gpGlobals->time + 0.3f; SetThink( &CTripmineGrenade::Smoke ); // Find all players in range @@ -101,7 +101,7 @@ void CTripmineGrenade::FlashBang( void ) // Trace a small line from the trip out to the player. UTIL_TraceLine ( pev->origin, vecSpot, dont_ignore_monsters, ENT(pev), &tr ); - if (tr.flFraction == 1.0 || tr.pHit == pEntity->edict()) + if (tr.flFraction == 1.0f || tr.pHit == pEntity->edict()) { range = (vecSpot - pev->origin).Length(); amount = range diff --git a/dlls/bubblemod/BMOD_zapgunrift.cpp b/dlls/bubblemod/BMOD_zapgunrift.cpp index 8eb9508e..0c59e262 100644 --- a/dlls/bubblemod/BMOD_zapgunrift.cpp +++ b/dlls/bubblemod/BMOD_zapgunrift.cpp @@ -77,16 +77,16 @@ void CZapRift::Spawn( void ) m_pSprite->pev->spawnflags |= SF_SPRITE_TEMPORARY; SetThink( &CZapRift::Animate ); - pev->nextthink = gpGlobals->time + 0.1; - m_fLifeSpan = gpGlobals->time + 3; - m_fNextElectrify = gpGlobals->time + 0.1; + pev->nextthink = gpGlobals->time + 0.1f; + m_fLifeSpan = gpGlobals->time + 3.0f; + m_fNextElectrify = gpGlobals->time + 0.1f; EMIT_SOUND_DYN( ENT(pev), CHAN_WEAPON, "debris/zap4.wav", 1, ATTN_NORM, 0,100 ); } void CZapRift::Animate( void ) { - pev->nextthink = gpGlobals->time + 0.1; + pev->nextthink = gpGlobals->time + 0.1f; @@ -105,7 +105,7 @@ void CZapRift::Animate( void ) pev->effects |= EF_NODRAW; m_pSprite->Expand( 10, 100 ); SetThink( &CBaseEntity::SUB_Remove ); - pev->nextthink = gpGlobals->time + 5; + pev->nextthink = gpGlobals->time + 5.0f; } if ( m_fNextElectrify < gpGlobals->time ) @@ -164,7 +164,7 @@ void CZapRift::Animate( void ) // Trace to the target UTIL_TraceLine( pev->origin, pEntity->BodyTarget( pev->origin ) , dont_ignore_monsters, ENT(pev), &tr); - if (tr.flFraction == 1.0 || tr.pHit == pEntity->edict()) + if (tr.flFraction == 1.0f || tr.pHit == pEntity->edict()) { ClearMultiDamage( ); pEntity->TraceAttack( VARS( pev->owner ), 30, Vector(0,0,1), &tr, DMG_SHOCK | DMG_ALWAYSGIB ); @@ -209,7 +209,7 @@ Vector CZapRift::FindBeam( void ) Vector vecMid; float diff = fDist; - while (diff > 1.0) + while (diff > 1.0f) { vecMid = vecMin + (vecMax - vecMin).Normalize() * diff / 2; if (UTIL_PointContents(vecMid) == CONTENTS_WATER) @@ -256,7 +256,7 @@ void CZapBounce::Spawn( void ) m_bFirstZap = TRUE; SetThink( &CZapBounce::BounceThink ); - pev->nextthink = gpGlobals->time + 0.2; + pev->nextthink = gpGlobals->time + 0.2f; EMIT_SOUND_DYN( ENT(pev), CHAN_WEAPON, "debris/zap4.wav", 1, ATTN_NORM, 0,100 ); } @@ -266,7 +266,7 @@ void CZapBounce::BounceThink( void ) TraceResult tr; CBaseEntity *pEntity; - pev->nextthink = gpGlobals->time + 0.05; + pev->nextthink = gpGlobals->time + 0.05f; // Zap Forward with some randomness. if (!m_bFirstZap) @@ -332,7 +332,7 @@ void CZapBounce::BounceThink( void ) n = -DotProduct(tr.vecPlaneNormal, m_vecDir); Vector r; - r = 2.0 * tr.vecPlaneNormal * n + m_vecDir; + r = 2.0f * tr.vecPlaneNormal * n + m_vecDir; m_vecDir = r; } pentIgnore = ENT(pEntity->pev); @@ -347,14 +347,14 @@ void CZapBounce::BounceThink( void ) { // UTIL_ClientPrintAll( HUD_PRINTTALK, " Zap bounce point destroyed.\n"); SetThink( &CBaseEntity::SUB_Remove ); - pev->nextthink = gpGlobals->time + .1; + pev->nextthink = gpGlobals->time + 0.1f; return; } // split beam? if (RANDOM_LONG(0,100) < 80) { - m_fDamage *= .75; + m_fDamage *= 0.75f; CZapBounce* pRift = (CZapBounce*)CBaseEntity::Create( "zapbounce", m_vecStart, diff --git a/dlls/combat.cpp b/dlls/combat.cpp index 4621977a..ff50a0f7 100644 --- a/dlls/combat.cpp +++ b/dlls/combat.cpp @@ -1577,7 +1577,7 @@ Vector CBaseEntity::FireBulletsPlayer( ULONG cShots, Vector vecSrc, Vector vecDi break; case BULLET_PLAYER_357: if( pThisPlayer->m_RuneFlags == RUNE_357 ) - pEntity->TraceAttack( pevAttacker, gSkillData.plrDmg357 * 2.5, vecDir, &tr, DMG_BULLET ); + pEntity->TraceAttack( pevAttacker, gSkillData.plrDmg357 * 2.5f, vecDir, &tr, DMG_BULLET ); else pEntity->TraceAttack( pevAttacker, gSkillData.plrDmg357, vecDir, &tr, DMG_BULLET ); break; diff --git a/dlls/crowbar.cpp b/dlls/crowbar.cpp index 0a6e25d3..fd2732d7 100644 --- a/dlls/crowbar.cpp +++ b/dlls/crowbar.cpp @@ -404,7 +404,7 @@ void CCrowbar::SecondaryAttack() // Control the speed of the next crowbar toss if // this is a rune. - m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + .5; + m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 0.5f; // Crowbar Rune? if( m_pPlayer->m_RuneFlags != RUNE_CROWBAR ) diff --git a/dlls/ggrenade.cpp b/dlls/ggrenade.cpp index 7205e57a..283d73f7 100644 --- a/dlls/ggrenade.cpp +++ b/dlls/ggrenade.cpp @@ -162,7 +162,7 @@ void CGrenade::MegaSmoke( void ) WRITE_COORD( pev->origin.z - 50 ); WRITE_COORD( pev->origin.x ); WRITE_COORD( pev->origin.y ); - WRITE_COORD( pev->origin.z - 50 + ( pev->dmg * 2.5 ) ); + WRITE_COORD( pev->origin.z - 50 + ( pev->dmg * 2.5f ) ); WRITE_SHORT( g_sModelIndexLaser ); WRITE_BYTE( 0 ); // start frame? WRITE_BYTE( 10 ); // rame rate? @@ -199,12 +199,12 @@ void CGrenade::MegaSmoke( void ) WRITE_COORD( pev->origin.y ); WRITE_COORD( pev->origin.z ); WRITE_SHORT( g_sModelIndexSmoke ); - WRITE_BYTE( ( pev->dmg - 50 ) * 0.80 ); // scale * 10 + WRITE_BYTE( ( pev->dmg - 50 ) * 0.8f ); // scale * 10 WRITE_BYTE( 12 ); // framerate MESSAGE_END(); } - pev->dmg *= .80; + pev->dmg *= 0.8f; pev->origin.z += pev->dmg / 2; if( m_iMegaSmokeFrame < 4 ) @@ -225,7 +225,7 @@ void CGrenade::MegaSmoke( void ) { WRITE_SHORT( g_sModelIndexWExplosion ); } - WRITE_BYTE( ( pev->dmg - 50 ) * .60 ); // scale * 10 + WRITE_BYTE( ( pev->dmg - 50 ) * 0.6f ); // scale * 10 WRITE_BYTE( 15 ); // framerate WRITE_BYTE( TE_EXPLFLAG_NONE ); MESSAGE_END(); @@ -252,7 +252,7 @@ void CGrenade::MegaSmoke( void ) Create( "spark_shower", pev->origin, Vector( 0, 0, 1 ), NULL ); } } - pev->nextthink = gpGlobals->time + 0.1; + pev->nextthink = gpGlobals->time + 0.1f; if( m_iMegaSmokeFrame == 4 ) UTIL_Remove( this ); diff --git a/dlls/hornetgun.cpp b/dlls/hornetgun.cpp index 9c71b75c..a2b407fe 100644 --- a/dlls/hornetgun.cpp +++ b/dlls/hornetgun.cpp @@ -113,7 +113,7 @@ void BMODSquidSpit:: Spawn( void ) void BMODSquidSpit::Animate( void ) { - pev->nextthink = gpGlobals->time + 0.1; + pev->nextthink = gpGlobals->time + 0.1f; if( pev->frame++ ) { @@ -135,7 +135,7 @@ void BMODSquidSpit::Shoot( entvars_t *Owner, Vector vecStart, Vector vecVelocity pSpit->pevOwner = Owner; pSpit->SetThink( &BMODSquidSpit::Animate ); - pSpit->pev->nextthink = gpGlobals->time + 0.1; + pSpit->pev->nextthink = gpGlobals->time + 0.1f; } void BMODSquidSpit::Touch( CBaseEntity *pOther ) @@ -238,7 +238,7 @@ void CHgun::ArmBeam( Vector color ) } // Couldn't find anything close enough - if( flDist == 1.0 ) + if( flDist == 1.0f ) return; // DecalGunshot( &tr, BULLET_PLAYER_CROWBAR ); @@ -412,7 +412,7 @@ void CHgun::FreezeRay( void ) pPlayer->pev->renderamt = 60; // glow shell distance from entity - float freezetime = Q_max (.6, bm_freezetime.value); + float freezetime = Q_max (0.6f, bm_freezetime.value); // freeze the player and set the "unfreeze" time... pPlayer->EnableControl(FALSE); @@ -421,16 +421,16 @@ void CHgun::FreezeRay( void ) pPlayer->m_flFreezeTime = gpGlobals->time + freezetime; //RuneMsg( pPlayer, "YOU ARE FROZEN!!!", Vector(100,100,255), freezetime - .5); - PrintMessage( pPlayer, BMOD_CHAN_RUNE, Vector(100,100,255), Vector (.1, freezetime - .5, .1), "YOU ARE FROZEN!!!"); + PrintMessage( pPlayer, BMOD_CHAN_RUNE, Vector(100,100,255), Vector (.1, freezetime - 0.5f, .1), "YOU ARE FROZEN!!!"); } UTIL_EmitAmbientSound( ENT(m_pPlayer->pev), tr.vecEndPos, "weapons/electro4.wav", 0.5, ATTN_NORM, 0, RANDOM_LONG( 140, 160 )); m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] = 0; - m_flNextPrimaryAttack = gpGlobals->time + .25; + m_flNextPrimaryAttack = gpGlobals->time + 0.25f; - m_flRechargeTime = gpGlobals->time + 0.5; + m_flRechargeTime = gpGlobals->time + 0.5f; m_pPlayer->m_iWeaponVolume = NORMAL_GUN_VOLUME; m_pPlayer->m_iWeaponFlash = DIM_GUN_FLASH; @@ -599,7 +599,7 @@ void CHgun::SecondaryAttack() } EMIT_SOUND( ENT( m_pPlayer->pev ), CHAN_WEAPON, "leech/leech_bite1.wav", 1, ATTN_NORM ); - m_flNextSecondaryAttack = gpGlobals->time + .5; + m_flNextSecondaryAttack = gpGlobals->time + 0.5f; } void CHgun::ZapGun() @@ -622,7 +622,7 @@ void CHgun::ZapGun() m_pPlayer->TakeDamage( m_pPlayer->pev, m_pPlayer->pev, 100, DMG_SHOCK ); EMIT_SOUND_DYN( ENT( m_pPlayer->pev ), CHAN_WEAPON, "debris/zap4.wav", 1, ATTN_NORM, 0, 100 + m_iBeams * 10 ); - m_flNextPrimaryAttack = m_flNextPrimaryAttack + 1.5; + m_flNextPrimaryAttack = m_flNextPrimaryAttack + 1.5f; return; } @@ -647,7 +647,7 @@ void CHgun::ZapGun() else { m_iFirePhase = HGUN_ZAP; - m_fNextPhaseTime = gpGlobals->time + .1; + m_fNextPhaseTime = gpGlobals->time + 0.1f; } } break; @@ -663,13 +663,13 @@ void CHgun::ZapGun() m_pPlayer->SetAnimation( PLAYER_ATTACK1 ); m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] -= 4; - m_flRechargeTime = gpGlobals->time + 0.5; + m_flRechargeTime = gpGlobals->time + 0.5f; m_pPlayer->pev->punchangle.x = RANDOM_FLOAT( 0, 2 ); break; case HGUN_ZAP_DONE: ClearBeams(); - m_flNextPrimaryAttack = gpGlobals->time + .25; - m_flTimeWeaponIdle = gpGlobals->time + .1; + m_flNextPrimaryAttack = gpGlobals->time + 0.25f; + m_flTimeWeaponIdle = gpGlobals->time + 0.1f; break; } } @@ -691,7 +691,7 @@ void CHgun::MultiZapGun() UTIL_ScreenFade( this, Vector( 180, 255, 96 ), 2, 0.5, 128, FFADE_IN ); m_pPlayer->TakeDamage( m_pPlayer->pev, m_pPlayer->pev, 100, DMG_SHOCK ); EMIT_SOUND_DYN( ENT( m_pPlayer->pev ), CHAN_WEAPON, "debris/zap4.wav", 1, ATTN_NORM, 0, 100 + m_iBeams * 10 ); - m_flNextPrimaryAttack = m_flNextPrimaryAttack + 1.5; + m_flNextPrimaryAttack = m_flNextPrimaryAttack + 1.5f; return; } @@ -715,7 +715,7 @@ void CHgun::MultiZapGun() } else m_iFirePhase = HGUN_ZAP; - m_fNextPhaseTime = gpGlobals->time + .1; + m_fNextPhaseTime = gpGlobals->time + 0.1f; } break; case HGUN_ZAP: @@ -740,13 +740,13 @@ void CHgun::MultiZapGun() m_pPlayer->SetAnimation( PLAYER_ATTACK1 ); m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] -= 12; - m_flRechargeTime = gpGlobals->time + 0.5; + m_flRechargeTime = gpGlobals->time + 0.5f; m_pPlayer->pev->punchangle.x = RANDOM_FLOAT( 0, 2 ); break; case HGUN_ZAP_DONE: ClearBeams(); - m_flNextPrimaryAttack = gpGlobals->time + .25; - m_flTimeWeaponIdle = gpGlobals->time + .1; + m_flNextPrimaryAttack = gpGlobals->time + 0.25f; + m_flTimeWeaponIdle = gpGlobals->time + 0.1f; break; } } @@ -819,7 +819,7 @@ void CHgun::SquidSpit( void ) iSpitSpeed = 80; } - m_flNextPrimaryAttack = gpGlobals->time + .25; + m_flNextPrimaryAttack = gpGlobals->time + 0.25f; // spew the spittle temporary ents. MESSAGE_BEGIN( MSG_PVS, SVC_TEMPENTITY, vecSrc ); @@ -847,7 +847,7 @@ void CHgun::SquidSpit( void ) } m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] -= 3; - m_flRechargeTime = gpGlobals->time + 0.5; + m_flRechargeTime = gpGlobals->time + 0.5f; m_pPlayer->m_iWeaponVolume = NORMAL_GUN_VOLUME; m_pPlayer->m_iWeaponFlash = DIM_GUN_FLASH; @@ -896,7 +896,7 @@ void CHgun::LaunchSnark( void ) iSpitSpeed = 80; } - m_flNextPrimaryAttack = gpGlobals->time + .4; + m_flNextPrimaryAttack = gpGlobals->time + 0.4f; // spew the spittle temporary ents. MESSAGE_BEGIN( MSG_PVS, SVC_TEMPENTITY, vecSrc ); @@ -924,7 +924,7 @@ void CHgun::LaunchSnark( void ) } m_pPlayer->m_rgAmmo[m_pPlayer->GetAmmoIndex( "Snarks" )] -= 1; - m_flRechargeTime = gpGlobals->time + 0.5; + m_flRechargeTime = gpGlobals->time + 0.5f; m_pPlayer->m_iWeaponVolume = NORMAL_GUN_VOLUME; m_pPlayer->m_iWeaponFlash = DIM_GUN_FLASH; diff --git a/dlls/mp5.cpp b/dlls/mp5.cpp index bc7432ae..f68c57b0 100644 --- a/dlls/mp5.cpp +++ b/dlls/mp5.cpp @@ -249,7 +249,7 @@ void CMP5::SecondaryAttack( void ) // BMOD Begin - mp5 mod if( bm_mp5_mod.value ) - m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 1.5.0f; + m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 1.5f; else m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 1.0f; // BMOD End - mp5 mod diff --git a/dlls/multiplay_gamerules.cpp b/dlls/multiplay_gamerules.cpp index dbdbfdb4..5ae8895d 100644 --- a/dlls/multiplay_gamerules.cpp +++ b/dlls/multiplay_gamerules.cpp @@ -655,7 +655,7 @@ void CHalfLifeMultiplay::PlayerSpawn( CBasePlayer *pPlayer ) } // BMOD Edit - spawn kills - pPlayer->m_fSpawnTimeStamp = gpGlobals->time + .1; + pPlayer->m_fSpawnTimeStamp = gpGlobals->time + 0.1f; pPlayer->pev->rendermode = kRenderTransAdd; pPlayer->pev->renderfx = kRenderFxHologram; pPlayer->pev->renderamt = 255; @@ -967,7 +967,7 @@ void CHalfLifeMultiplay::DeathNotice( CBasePlayer *pVictim, entvars_t *pKiller, g_engfuncs.pfnInfoKeyValue( g_engfuncs.pfnGetInfoKeyBuffer( ENT( pKiller ) ), "model" ), (int)bm_bantime.value ); ( (CBasePlayer *)Killer )->m_bBanMe = TRUE; - ( (CBasePlayer *)Killer )->m_fMessageTimer = gpGlobals->time + .1; + ( (CBasePlayer *)Killer )->m_fMessageTimer = gpGlobals->time + 0.1f; } } // BMOD End - Spawn kills @@ -1005,7 +1005,7 @@ void CHalfLifeMultiplay::DeathNotice( CBasePlayer *pVictim, entvars_t *pKiller, g_engfuncs.pfnInfoKeyValue( g_engfuncs.pfnGetInfoKeyBuffer( ENT( pKiller ) ), "model" ), (int)bm_bantime.value ); ( (CBasePlayer *)Killer )->m_bBanMe = TRUE; - ( (CBasePlayer *)Killer )->m_fMessageTimer = gpGlobals->time + .1; + ( (CBasePlayer *)Killer )->m_fMessageTimer = gpGlobals->time + 0.1f; } } // BMOD End - Type kills diff --git a/dlls/shotgun.cpp b/dlls/shotgun.cpp index 0c193922..0ab64dd6 100644 --- a/dlls/shotgun.cpp +++ b/dlls/shotgun.cpp @@ -265,26 +265,21 @@ void CShotgun::SecondaryAttack( void ) //if( m_iClip != 0 ) m_flPumpTime = gpGlobals->time + 0.95f; -<<<<<<< HEAD - m_flNextPrimaryAttack = GetNextAttackDelay( 1.5 ); - m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 1.5; + m_flNextPrimaryAttack = GetNextAttackDelay( 1.5f ); + m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 1.5f; if( bm_shotty_mod.value ) { - m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + .9; - m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + .9; + m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.9f; + m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 0.9f; } if( m_pPlayer->m_RuneFlags == RUNE_SHOTGUN ) { - m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.5; - m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 0.5; + m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.5f; + m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 0.5f; } -======= - m_flNextPrimaryAttack = GetNextAttackDelay( 1.5f ); - m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 1.5f; ->>>>>>> master if( m_iClip != 0 ) m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 6.0f; else