Browse Source

double promotion fixes.

bubblemod
Andrey Akhmichin 5 years ago
parent
commit
89cf2028c5
  1. 6
      dlls/bubblemod/BMOD_CameraPoint.cpp
  2. 62
      dlls/bubblemod/BMOD_egon.cpp
  3. 10
      dlls/bubblemod/BMOD_flyingcrowbar.cpp
  4. 4
      dlls/bubblemod/BMOD_hornetgun.h
  5. 18
      dlls/bubblemod/BMOD_player.cpp
  6. 20
      dlls/bubblemod/BMOD_rune.cpp
  7. 44
      dlls/bubblemod/BMOD_snarkmine.cpp
  8. 4
      dlls/bubblemod/BMOD_squeakgrenade.cpp
  9. 10
      dlls/bubblemod/BMOD_tripmines.cpp
  10. 24
      dlls/bubblemod/BMOD_zapgunrift.cpp
  11. 2
      dlls/combat.cpp
  12. 2
      dlls/crowbar.cpp
  13. 10
      dlls/ggrenade.cpp
  14. 44
      dlls/hornetgun.cpp
  15. 2
      dlls/mp5.cpp
  16. 6
      dlls/multiplay_gamerules.cpp
  17. 17
      dlls/shotgun.cpp

6
dlls/bubblemod/BMOD_CameraPoint.cpp

@ -51,7 +51,7 @@ void CCamPoint::Spawn( void )
pev->rendermode = kRenderTransTexture; pev->rendermode = kRenderTransTexture;
SetThink( &CCamPoint::Think ); SetThink( &CCamPoint::Think );
pev->nextthink = gpGlobals->time + 0.1; pev->nextthink = gpGlobals->time + 0.1f;
} }
void CCamPoint::Think( void ) void CCamPoint::Think( void )
@ -68,7 +68,7 @@ void CCamPoint::Think( void )
) { ) {
// UTIL_ClientPrintAll( HUD_PRINTTALK, "<SERVER> Camera point destroyed.\n"); // UTIL_ClientPrintAll( HUD_PRINTTALK, "<SERVER> Camera point destroyed.\n");
UTIL_Remove( this ); UTIL_Remove( this );
pev->nextthink = gpGlobals->time + .1; pev->nextthink = gpGlobals->time + 0.1f;
return; return;
} }
@ -78,5 +78,5 @@ void CCamPoint::Think( void )
0), 0),
// Wait until it's time to think again. // Wait until it's time to think again.
pev->nextthink = gpGlobals->time + 0.01; pev->nextthink = gpGlobals->time + 0.01f;
} }

62
dlls/bubblemod/BMOD_egon.cpp

@ -226,7 +226,7 @@ int CEgon::AddToPlayer( CBasePlayer *pPlayer )
void CEgon::Holster( int skiplocal /* = 0 */ ) 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 ); // m_flTimeWeaponIdle = gpGlobals->time + UTIL_RandomFloat ( 10, 15 );
SendWeaponAnim( EGON_HOLSTER ); SendWeaponAnim( EGON_HOLSTER );
@ -266,7 +266,7 @@ float CEgon::GetPulseInterval( void )
{ {
if ( g_pGameRules->IsMultiplayer() ) if ( g_pGameRules->IsMultiplayer() )
{ {
return 0.1; return 0.1f;
} }
return EGON_PULSE_INTERVAL; return EGON_PULSE_INTERVAL;
@ -276,7 +276,7 @@ float CEgon::GetDischargeInterval( void )
{ {
if ( g_pGameRules->IsMultiplayer() ) if ( g_pGameRules->IsMultiplayer() )
{ {
return 0.1; return 0.1f;
} }
return EGON_DISCHARGE_INTERVAL; return EGON_DISCHARGE_INTERVAL;
@ -294,9 +294,9 @@ void CEgon::BubbleAttack( void )
{ {
if ( !HasAmmo() ) if ( !HasAmmo() )
{ {
m_flNextPrimaryAttack = gpGlobals->time + 0.25; m_flNextPrimaryAttack = gpGlobals->time + 0.25f;
if (m_flNextSecondaryAttack <= gpGlobals->time) if (m_flNextSecondaryAttack <= gpGlobals->time)
m_flNextSecondaryAttack = gpGlobals->time + 0.25; m_flNextSecondaryAttack = gpGlobals->time + 0.25f;
PlayEmptySound( ); PlayEmptySound( );
return; return;
} }
@ -307,9 +307,9 @@ void CEgon::BubbleAttack( void )
m_shakeTime = 0; m_shakeTime = 0;
m_pPlayer->m_iWeaponVolume = EGON_PRIMARY_VOLUME; m_pPlayer->m_iWeaponVolume = EGON_PRIMARY_VOLUME;
m_flTimeWeaponIdle = gpGlobals->time + 0.1; m_flTimeWeaponIdle = gpGlobals->time + 0.1f;
// m_shootTime = gpGlobals->time + 2; // m_shootTime = gpGlobals->time + 2.0f;
m_shootTime = gpGlobals->time + .2; m_shootTime = gpGlobals->time + 0.2f;
if ( m_fireMode == FIRE_WIDE ) 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) ); 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() ) if ( !HasAmmo() )
{ {
EndBubbleAttack(); EndBubbleAttack();
m_fireState = FIRE_OFF; m_fireState = FIRE_OFF;
m_flNextPrimaryAttack = gpGlobals->time + 1.0; m_flNextPrimaryAttack = gpGlobals->time + 1.0f;
if (m_flNextSecondaryAttack <= gpGlobals->time) 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)) if (!(m_bubbletime <= gpGlobals->time))
return; return;
m_bubbletime = gpGlobals->time + .05; m_bubbletime = gpGlobals->time + 0.05f;
UTIL_MakeVectors( m_pPlayer->pev->v_angle + m_pPlayer->pev->punchangle ); 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; 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. // Only do this every once in a while to save bandwidth.
if (!(m_bubbletime <= gpGlobals->time)) if (!(m_bubbletime <= gpGlobals->time))
return; return;
m_bubbletime = gpGlobals->time + .1; m_bubbletime = gpGlobals->time + 0.1f;
Vector vecOrigSrc = m_pPlayer->GetGunPosition( ); Vector vecOrigSrc = m_pPlayer->GetGunPosition( );
int bubbleRadius = 1; int bubbleRadius = 1;
@ -463,7 +463,7 @@ void CEgon::FireHeal( void ) {
int bubbleSpeed = 8; int bubbleSpeed = 8;
if (m_healAmmoUseTime <= gpGlobals->time) { if (m_healAmmoUseTime <= gpGlobals->time) {
m_healAmmoUseTime = gpGlobals->time +.5; m_healAmmoUseTime = gpGlobals->time + 0.5f;
UseAmmo(5); UseAmmo(5);
m_healAmmoUsed += 5; m_healAmmoUsed += 5;
@ -642,7 +642,7 @@ void CEgon::WeaponIdle( void )
float flRand = RANDOM_FLOAT(0,1); float flRand = RANDOM_FLOAT(0,1);
if ( flRand <= 0.5 ) if ( flRand <= 0.5f )
{ {
iAnim = EGON_IDLE1; iAnim = EGON_IDLE1;
m_flTimeWeaponIdle = gpGlobals->time + RANDOM_FLOAT(10,15); 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 ); 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); EMIT_SOUND_DYN(ENT(m_pPlayer->pev), CHAN_WEAPON, BUBB_SOUND_OFF, 0.98, ATTN_NORM, 0, 100);
m_fireState = FIRE_OFF; m_fireState = FIRE_OFF;
m_flTimeWeaponIdle = gpGlobals->time + 2.0; m_flTimeWeaponIdle = gpGlobals->time + 2.0f;
m_flNextPrimaryAttack = gpGlobals->time + 0.5; m_flNextPrimaryAttack = gpGlobals->time + 0.5f;
// m_flNextSecondaryAttack = gpGlobals->time + 30; // m_flNextSecondaryAttack = gpGlobals->time + 30.0f;
DestroyEffect(); DestroyEffect();
} }
@ -673,9 +673,9 @@ void CEgon::EndAttack( void )
STOP_SOUND( ENT(m_pPlayer->pev), CHAN_STATIC, EGON_SOUND_RUN ); 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); EMIT_SOUND_DYN(ENT(m_pPlayer->pev), CHAN_WEAPON, EGON_SOUND_OFF, 0.98, ATTN_NORM, 0, 100);
m_fireState = FIRE_OFF; m_fireState = FIRE_OFF;
m_flTimeWeaponIdle = gpGlobals->time + 2.0; m_flTimeWeaponIdle = gpGlobals->time + 2.0f;
m_flNextPrimaryAttack = gpGlobals->time + 0.5; m_flNextPrimaryAttack = gpGlobals->time + 0.5f;
// m_flNextSecondaryAttack = gpGlobals->time + 30; // m_flNextSecondaryAttack = gpGlobals->time + 30.0f;
DestroyEffect(); DestroyEffect();
} }
@ -713,7 +713,7 @@ void CEgon::Attack( void )
{ {
if ( !HasAmmo() ) if ( !HasAmmo() )
{ {
m_flNextPrimaryAttack = m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 0.25; m_flNextPrimaryAttack = m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 0.25f;
PlayEmptySound( ); PlayEmptySound( );
return; return;
} }
@ -725,9 +725,9 @@ void CEgon::Attack( void )
m_shakeTime = 0; m_shakeTime = 0;
m_pPlayer->m_iWeaponVolume = EGON_PRIMARY_VOLUME; m_pPlayer->m_iWeaponVolume = EGON_PRIMARY_VOLUME;
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 0.1; m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 0.1f;
pev->fuser1 = UTIL_WeaponTimeBase() + 2; pev->fuser1 = UTIL_WeaponTimeBase() + 2.0f;
m_shootTime = gpGlobals->time +2; m_shootTime = gpGlobals->time + 2.0f;
if ( m_fireMode == FIRE_WIDE ) if ( m_fireMode == FIRE_WIDE )
{ {
@ -764,7 +764,7 @@ void CEgon::Attack( void )
if ( !HasAmmo() ) if ( !HasAmmo() )
{ {
EndAttack(); 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 ) if ( gpGlobals->time >= m_flAmmoUseTime )
{ {
UseAmmo( 1 ); UseAmmo( 1 );
m_flAmmoUseTime = gpGlobals->time + 0.1; m_flAmmoUseTime = gpGlobals->time + 0.1f;
} }
} }
else else
@ -840,7 +840,7 @@ void CEgon::Fire( const Vector &vecOrigSrc, const Vector &vecDir )
if ( gpGlobals->time >= m_flAmmoUseTime ) if ( gpGlobals->time >= m_flAmmoUseTime )
{ {
UseAmmo( 1 ); 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 ) if ( gpGlobals->time >= m_flAmmoUseTime )
{ {
UseAmmo( 1 ); UseAmmo( 1 );
m_flAmmoUseTime = gpGlobals->time + 0.2; m_flAmmoUseTime = gpGlobals->time + 0.2f;
} }
} }
else else
@ -886,7 +886,7 @@ void CEgon::Fire( const Vector &vecOrigSrc, const Vector &vecDir )
if ( gpGlobals->time >= m_flAmmoUseTime ) if ( gpGlobals->time >= m_flAmmoUseTime )
{ {
UseAmmo( 1 ); 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 ) if ( m_shakeTime < gpGlobals->time )
{ {
UTIL_ScreenShake( tr.vecEndPos, 5.0, 150.0, 0.75, 250.0 ); 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 #endif

10
dlls/bubblemod/BMOD_flyingcrowbar.cpp

@ -62,7 +62,7 @@ void CFlyingCrowbar::Spawn( )
// Set the think funtion. // Set the think funtion.
SetThink( &CFlyingCrowbar::BubbleThink ); SetThink( &CFlyingCrowbar::BubbleThink );
pev->nextthink = gpGlobals->time + 0.25; pev->nextthink = gpGlobals->time + 0.25f;
// Set the touch function. // Set the touch function.
SetTouch( &CFlyingCrowbar::SpinTouch ); SetTouch( &CFlyingCrowbar::SpinTouch );
@ -146,7 +146,7 @@ void CFlyingCrowbar::SpinTouch( CBaseEntity *pOther )
// //
// REMOVE THIS IF YOU ARE NOT USING THE RUNE CODE // REMOVE THIS IF YOU ARE NOT USING THE RUNE CODE
if (m_pPlayer->m_RuneFlags == RUNE_CROWBAR) if (m_pPlayer->m_RuneFlags == RUNE_CROWBAR)
pWeaponBox->pev->nextthink = gpGlobals->time + 3; pWeaponBox->pev->nextthink = gpGlobals->time + 3.0f;
// *** End BubbleMod Rune Code *** // *** End BubbleMod Rune Code ***
// Get the unit vector in the direction of motion. // 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. // Remove this flying_crowbar from the world.
SetThink( &CBaseEntity::SUB_Remove ); SetThink( &CBaseEntity::SUB_Remove );
pev->nextthink = gpGlobals->time + .1; pev->nextthink = gpGlobals->time + 0.1f;
} }
void CFlyingCrowbar::BubbleThink( void ) void CFlyingCrowbar::BubbleThink( void )
@ -175,7 +175,7 @@ void CFlyingCrowbar::BubbleThink( void )
pev->owner = NULL; pev->owner = NULL;
// Only think every .25 seconds. // Only think every .25 seconds.
pev->nextthink = gpGlobals->time + 0.25; pev->nextthink = gpGlobals->time + 0.25f;
// Make a whooshy sound. // Make a whooshy sound.
EMIT_SOUND_DYN(ENT(pev), CHAN_VOICE, "weapons/cbar_miss1.wav", 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 the crowbar enters water, make some bubbles.
if (pev->waterlevel) 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 );
} }

4
dlls/bubblemod/BMOD_hornetgun.h

@ -17,8 +17,8 @@
extern cvar_t bm_hornet_mod; extern cvar_t bm_hornet_mod;
#define HGUN_MAX_BEAMS 6 #define HGUN_MAX_BEAMS 6
#define HGUN_CHARGE_TIME .8 / HGUN_MAX_BEAMS #define HGUN_CHARGE_TIME 0.8f / HGUN_MAX_BEAMS
#define HGUN_ZAP_TIME 1 #define HGUN_ZAP_TIME 1.0f
class CHgun : public CBasePlayerWeapon class CHgun : public CBasePlayerWeapon
{ {

18
dlls/bubblemod/BMOD_player.cpp

@ -132,7 +132,7 @@ void CBasePlayer::StartObserver( Vector vecPosition, Vector vecViewAngle )
// WRITE_STRING( "" ); // WRITE_STRING( "" );
//MESSAGE_END(); //MESSAGE_END();
m_fMsgTimer = gpGlobals->time + .5; m_fMsgTimer = gpGlobals->time + 0.5f;
m_bSentMsg = FALSE; m_bSentMsg = FALSE;
} }
@ -246,14 +246,14 @@ void CBasePlayer::Observer_HandleButtons()
Observer_SetMode( OBS_CHASE_FREE ); Observer_SetMode( OBS_CHASE_FREE );
else else
Observer_SetMode( OBS_ROAMING ); Observer_SetMode( OBS_ROAMING );
m_fMsgTimer = gpGlobals->time + 0.2; m_fMsgTimer = gpGlobals->time + 0.2f;
} }
// Attack2 cycles player targets // Attack2 cycles player targets
if ( pev->button & IN_ATTACK2 && pev->iuser1 != OBS_ROAMING ) if ( pev->button & IN_ATTACK2 && pev->iuser1 != OBS_ROAMING )
{ {
Observer_FindNextPlayer( false ); Observer_FindNextPlayer( false );
m_fMsgTimer = gpGlobals->time + 0.2; m_fMsgTimer = gpGlobals->time + 0.2f;
} }
// Attack Spawns // Attack Spawns
@ -262,7 +262,7 @@ void CBasePlayer::Observer_HandleButtons()
{ {
// g_engfuncs.pfnServerPrint( "Player spawned from Obs!\n" ); // g_engfuncs.pfnServerPrint( "Player spawned from Obs!\n" );
StopObserver(); 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 WRITE_BYTE( 255 ); // alpha
MESSAGE_END(); MESSAGE_END();
} }
float fCos = cos( gpGlobals->time * 4.00) * 8; float fCos = cos( gpGlobals->time * 4.0f) * 8;
float fSin = sin( gpGlobals->time * 4.00) * 8; float fSin = sin( gpGlobals->time * 4.0f) * 8;
MESSAGE_BEGIN( MSG_PVS, SVC_TEMPENTITY, pev->origin ); MESSAGE_BEGIN( MSG_PVS, SVC_TEMPENTITY, pev->origin );
WRITE_BYTE( TE_BUBBLES ); WRITE_BYTE( TE_BUBBLES );
WRITE_COORD( pev->origin.x + fCos); WRITE_COORD( pev->origin.x + fCos);
@ -484,7 +484,7 @@ void CBasePlayer::BMOD_Think( void )
// counts tenths of seconds. // counts tenths of seconds.
if (m_fMessageTimer < gpGlobals->time) if (m_fMessageTimer < gpGlobals->time)
{ {
m_fMessageTimer = gpGlobals->time + .1; m_fMessageTimer = gpGlobals->time + 0.1f;
m_iMessageCounter++; m_iMessageCounter++;
m_iMessageFire = TRUE; m_iMessageFire = TRUE;
} }
@ -611,7 +611,7 @@ void CBasePlayer::BMOD_Identify( void )
szExtra szExtra
) ); ) );
timer = gpGlobals->time + .5; timer = gpGlobals->time + 0.5f;
LastIdentPlayer = (CBasePlayer *)pOther; LastIdentPlayer = (CBasePlayer *)pOther;
} }
else if (!pOther->IsPlayer()) { else if (!pOther->IsPlayer()) {
@ -697,7 +697,7 @@ void CBasePlayer::BMOD_ResetTypeKill( void )
} }
m_bTypeMode = FALSE; m_bTypeMode = FALSE;
// EnableControl(TRUE); // EnableControl(TRUE);
m_flTypeKillStamp = gpGlobals->time + 4; m_flTypeKillStamp = gpGlobals->time + 4.0f;
} }
return; return;
} }

20
dlls/bubblemod/BMOD_rune.cpp

@ -65,7 +65,7 @@ void CRune::Spawn( void )
if (DROP_TO_FLOOR(ENT(pev)) == 0) 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 ); UTIL_Remove( this );
return; return;
} }
@ -84,10 +84,10 @@ void CRune::RuneTouch( CBaseEntity *pOther )
TraceResult tr; TraceResult tr;
UTIL_TraceLine( pev->origin, pev->origin - Vector(0,0,10), ignore_monsters, edict(), &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 // add a bit of static friction
pev->velocity = pev->velocity * 0.5; pev->velocity = pev->velocity * 0.5f;
} }
return; return;
} }
@ -206,7 +206,7 @@ void CRune::Materialize( void )
SetTouch( &CRune::RuneTouch ); SetTouch( &CRune::RuneTouch );
} }
// EMIT_SOUND_DYN( ENT(pev), CHAN_WEAPON, "buttons/blip2.wav", 1, ATTN_NORM, 0, 150 ); // 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 ) void CRune::Precache( void )
@ -243,7 +243,7 @@ class CCrowbarRune : public CRune
float respawn = Q_max(1, CVAR_GET_FLOAT("bm_rune_cbar_r")); float respawn = Q_max(1, CVAR_GET_FLOAT("bm_rune_cbar_r"));
//RuneMsg( pPlayer, MSG_RUNE_CROWBAR, m_vRuneColor, time - .5); //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 ); EMIT_SOUND( pPlayer->edict(), CHAN_ITEM, "items/gunpickup2.wav", 1, ATTN_NORM );
pPlayer->m_RuneFlags = RUNE_CROWBAR; 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 time = Q_max(1, CVAR_GET_FLOAT("bm_rune_gren_t"));
float respawn = Q_max(1, CVAR_GET_FLOAT("bm_rune_gren_r")); 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 ); EMIT_SOUND( pPlayer->edict(), CHAN_ITEM, "items/gunpickup2.wav", 1, ATTN_NORM );
pPlayer->m_RuneFlags = RUNE_GRENADE; pPlayer->m_RuneFlags = RUNE_GRENADE;
pPlayer->m_RuneTime = gpGlobals->time + time; 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 time = Q_max(1, CVAR_GET_FLOAT("bm_rune_health_t"));
float respawn = Q_max(1, CVAR_GET_FLOAT("bm_rune_health_r")); 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 ); EMIT_SOUND( pPlayer->edict(), CHAN_ITEM, "items/gunpickup2.wav", 1, ATTN_NORM );
pPlayer->m_RuneFlags = RUNE_HEALTH; 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 time = Q_max(1, CVAR_GET_FLOAT("bm_rune_armor_t"));
float respawn = Q_max(1, CVAR_GET_FLOAT("bm_rune_armor_r")); 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 ); EMIT_SOUND( pPlayer->edict(), CHAN_ITEM, "items/gunpickup2.wav", 1, ATTN_NORM );
pPlayer->m_RuneFlags = RUNE_BATTERY; pPlayer->m_RuneFlags = RUNE_BATTERY;
pPlayer->m_RuneTime = gpGlobals->time + time; 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 time = Q_max(1, CVAR_GET_FLOAT("bm_rune_357_t"));
float respawn = Q_max(1, CVAR_GET_FLOAT("bm_rune_357_r")); 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 ); EMIT_SOUND( pPlayer->edict(), CHAN_ITEM, "items/gunpickup2.wav", 1, ATTN_NORM );
pPlayer->m_RuneFlags = RUNE_357; pPlayer->m_RuneFlags = RUNE_357;
pPlayer->m_RuneTime = gpGlobals->time + time; 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 time = Q_max(1, CVAR_GET_FLOAT("bm_rune_shotty_t"));
float respawn = Q_max(1, CVAR_GET_FLOAT("bm_rune_shotty_r")); 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 ); EMIT_SOUND( pPlayer->edict(), CHAN_ITEM, "items/gunpickup2.wav", 1, ATTN_NORM );
pPlayer->m_RuneFlags = RUNE_SHOTGUN; pPlayer->m_RuneFlags = RUNE_SHOTGUN;
pPlayer->m_RuneTime = gpGlobals->time + time; pPlayer->m_RuneTime = gpGlobals->time + time;

44
dlls/bubblemod/BMOD_snarkmine.cpp

@ -91,16 +91,16 @@ void CTripSnarkGrenade :: Spawn( void )
if (pev->spawnflags & 1) if (pev->spawnflags & 1)
{ {
// power up quickly // power up quickly
m_flPowerUp = gpGlobals->time + 1.0; m_flPowerUp = gpGlobals->time + 1.0f;
} }
else else
{ {
// power up in 2.5 seconds // power up in 2.5 seconds
m_flPowerUp = gpGlobals->time + 2.5; m_flPowerUp = gpGlobals->time + 2.5f;
} }
SetThink( &CTripSnarkGrenade::PowerupThink ); SetThink( &CTripSnarkGrenade::PowerupThink );
pev->nextthink = gpGlobals->time + 0.2; pev->nextthink = gpGlobals->time + 0.2f;
pev->takedamage = DAMAGE_YES; pev->takedamage = DAMAGE_YES;
// pev->dmg = gSkillData.plrDmgTripmine; // pev->dmg = gSkillData.plrDmgTripmine;
@ -141,7 +141,7 @@ void CTripSnarkGrenade :: WarningThink( void )
// set to power up // set to power up
SetThink( &CTripSnarkGrenade::PowerupThink ); 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)) if (tr.fStartSolid || (oldowner && tr.pHit == oldowner))
{ {
pev->owner = oldowner; pev->owner = oldowner;
m_flPowerUp += 0.1; m_flPowerUp += 0.1f;
pev->nextthink = gpGlobals->time + 0.1; pev->nextthink = gpGlobals->time + 0.1f;
return; return;
} }
if (tr.flFraction < 1.0) if (tr.flFraction < 1.0f)
{ {
pev->owner = tr.pHit; pev->owner = tr.pHit;
m_hOwner = CBaseEntity::Instance( pev->owner ); 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_VOICE, "weapons/mine_deploy.wav" );
STOP_SOUND( ENT(pev), CHAN_BODY, "weapons/mine_charge.wav" ); STOP_SOUND( ENT(pev), CHAN_BODY, "weapons/mine_charge.wav" );
SetThink( &CBaseEntity::SUB_Remove ); SetThink( &CBaseEntity::SUB_Remove );
pev->nextthink = gpGlobals->time + 0.1; pev->nextthink = gpGlobals->time + 0.1f;
ALERT( at_console, "WARNING:Tripmine at %.0f, %.0f, %.0f removed\n", pev->origin.x, pev->origin.y, pev->origin.z ); ALERT( at_console, "WARNING:Tripmine at %.0f, %.0f, %.0f removed\n", (double)pev->origin.x, (double)pev->origin.y, (double)pev->origin.z );
KillBeam(); KillBeam();
return; return;
} }
@ -189,7 +189,7 @@ void CTripSnarkGrenade :: PowerupThink( void )
pMine->pev->spawnflags |= SF_NORESPAWN; pMine->pev->spawnflags |= SF_NORESPAWN;
SetThink( &CBaseEntity::SUB_Remove ); SetThink( &CBaseEntity::SUB_Remove );
KillBeam(); KillBeam();
pev->nextthink = gpGlobals->time + 0.1; pev->nextthink = gpGlobals->time + 0.1f;
return; return;
/* /*
@ -213,7 +213,7 @@ void CTripSnarkGrenade :: PowerupThink( void )
// play enabled sound // play enabled sound
EMIT_SOUND_DYN( ENT(pev), CHAN_VOICE, "squeek/sqk_deploy1.wav", 0.5, ATTN_NORM, 1.0, 75 ); 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 // set to follow laser spot
SetThink( &CTripSnarkGrenade::BeamBreakThink ); SetThink( &CTripSnarkGrenade::BeamBreakThink );
pev->nextthink = gpGlobals->time + 0.1; pev->nextthink = gpGlobals->time + 0.1f;
Vector vecTmpEnd = pev->origin + m_vecDir * 2048 * m_flBeamLength; 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 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; bBlowup = 1;
} }
@ -309,7 +309,7 @@ void CTripSnarkGrenade :: BeamBreakThink( void )
return; 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 ) 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 // disable
// Create( "weapon_tripsnark", pev->origin + m_vecDir * 24, pev->angles ); // Create( "weapon_tripsnark", pev->origin + m_vecDir * 24, pev->angles );
SetThink( &CBaseEntity::SUB_Remove ); SetThink( &CBaseEntity::SUB_Remove );
pev->nextthink = gpGlobals->time + 0.1; pev->nextthink = gpGlobals->time + 0.1f;
KillBeam(); KillBeam();
return FALSE; return FALSE;
} }
@ -337,7 +337,7 @@ void CTripSnarkGrenade::Killed( entvars_t *pevAttacker, int iGib )
} }
SetThink( &CTripSnarkGrenade::DelayDeathThink ); 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 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; pev->takedamage = DAMAGE_NO;
// Pull out of the wall a bit // Pull out of the wall a bit
if ( pTrace->flFraction != 1.0 ) if ( pTrace->flFraction != 1.0f )
{ {
pev->origin = pTrace->vecEndPos + (pTrace->vecPlaneNormal * 20); 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. // Tell the mine what do do for the next little while.
SetThink( &CTripSnarkGrenade::RiftThink ); SetThink( &CTripSnarkGrenade::RiftThink );
pev->nextthink = gpGlobals->time + 0.1; pev->nextthink = gpGlobals->time + 0.1f;
m_RiftTime = gpGlobals->time + 3; m_RiftTime = gpGlobals->time + 3.0f;
} }
void CTripSnarkGrenade::RiftThink( void ) void CTripSnarkGrenade::RiftThink( void )
{ {
// Setup next think time // Setup next think time
pev->nextthink = gpGlobals->time + 0.1; pev->nextthink = gpGlobals->time + 0.1f;
// Make a lightning strike // Make a lightning strike
Vector vecEnd; 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); 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); 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; result = TRUE;
} }
} }

4
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 ); 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 ); // 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 ); m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + RANDOM_FLOAT ( 10, 15 );
} }

10
dlls/bubblemod/BMOD_tripmines.cpp

@ -44,7 +44,7 @@ BOOL CTripmineGrenade::BMOD_IsSpawnMine()
TraceResult tr; TraceResult tr;
Vector vecSpot; Vector vecSpot;
Vector vecSrc = pev->origin; Vector vecSrc = pev->origin;
float flRadius = pev->dmg * 2.5; float flRadius = pev->dmg * 2.5f;
int bInWater = (UTIL_PointContents ( vecSrc ) == CONTENTS_WATER); 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); 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); 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; result = TRUE;
} }
} }
@ -81,7 +81,7 @@ BOOL CTripmineGrenade::BMOD_IsSpawnMine()
void CTripmineGrenade::FlashBang( void ) void CTripmineGrenade::FlashBang( void )
{ {
#define FLASH_RANGE 600 #define FLASH_RANGE 600
pev->nextthink = gpGlobals->time + 0.3; pev->nextthink = gpGlobals->time + 0.3f;
SetThink( &CTripmineGrenade::Smoke ); SetThink( &CTripmineGrenade::Smoke );
// Find all players in range // Find all players in range
@ -101,7 +101,7 @@ void CTripmineGrenade::FlashBang( void )
// Trace a small line from the trip out to the player. // Trace a small line from the trip out to the player.
UTIL_TraceLine ( pev->origin, vecSpot, dont_ignore_monsters, ENT(pev), &tr ); 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(); range = (vecSpot - pev->origin).Length();
amount = range amount = range

24
dlls/bubblemod/BMOD_zapgunrift.cpp

@ -77,16 +77,16 @@ void CZapRift::Spawn( void )
m_pSprite->pev->spawnflags |= SF_SPRITE_TEMPORARY; m_pSprite->pev->spawnflags |= SF_SPRITE_TEMPORARY;
SetThink( &CZapRift::Animate ); SetThink( &CZapRift::Animate );
pev->nextthink = gpGlobals->time + 0.1; pev->nextthink = gpGlobals->time + 0.1f;
m_fLifeSpan = gpGlobals->time + 3; m_fLifeSpan = gpGlobals->time + 3.0f;
m_fNextElectrify = gpGlobals->time + 0.1; m_fNextElectrify = gpGlobals->time + 0.1f;
EMIT_SOUND_DYN( ENT(pev), CHAN_WEAPON, "debris/zap4.wav", 1, ATTN_NORM, 0,100 ); EMIT_SOUND_DYN( ENT(pev), CHAN_WEAPON, "debris/zap4.wav", 1, ATTN_NORM, 0,100 );
} }
void CZapRift::Animate( void ) 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; pev->effects |= EF_NODRAW;
m_pSprite->Expand( 10, 100 ); m_pSprite->Expand( 10, 100 );
SetThink( &CBaseEntity::SUB_Remove ); SetThink( &CBaseEntity::SUB_Remove );
pev->nextthink = gpGlobals->time + 5; pev->nextthink = gpGlobals->time + 5.0f;
} }
if ( m_fNextElectrify < gpGlobals->time ) if ( m_fNextElectrify < gpGlobals->time )
@ -164,7 +164,7 @@ void CZapRift::Animate( void )
// Trace to the target // Trace to the target
UTIL_TraceLine( pev->origin, pEntity->BodyTarget( pev->origin ) , dont_ignore_monsters, ENT(pev), &tr); 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( ); ClearMultiDamage( );
pEntity->TraceAttack( VARS( pev->owner ), 30, Vector(0,0,1), &tr, DMG_SHOCK | DMG_ALWAYSGIB ); 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; Vector vecMid;
float diff = fDist; float diff = fDist;
while (diff > 1.0) while (diff > 1.0f)
{ {
vecMid = vecMin + (vecMax - vecMin).Normalize() * diff / 2; vecMid = vecMin + (vecMax - vecMin).Normalize() * diff / 2;
if (UTIL_PointContents(vecMid) == CONTENTS_WATER) if (UTIL_PointContents(vecMid) == CONTENTS_WATER)
@ -256,7 +256,7 @@ void CZapBounce::Spawn( void )
m_bFirstZap = TRUE; m_bFirstZap = TRUE;
SetThink( &CZapBounce::BounceThink ); 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 ); 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; TraceResult tr;
CBaseEntity *pEntity; CBaseEntity *pEntity;
pev->nextthink = gpGlobals->time + 0.05; pev->nextthink = gpGlobals->time + 0.05f;
// Zap Forward with some randomness. // Zap Forward with some randomness.
if (!m_bFirstZap) if (!m_bFirstZap)
@ -332,7 +332,7 @@ void CZapBounce::BounceThink( void )
n = -DotProduct(tr.vecPlaneNormal, m_vecDir); n = -DotProduct(tr.vecPlaneNormal, m_vecDir);
Vector r; Vector r;
r = 2.0 * tr.vecPlaneNormal * n + m_vecDir; r = 2.0f * tr.vecPlaneNormal * n + m_vecDir;
m_vecDir = r; m_vecDir = r;
} }
pentIgnore = ENT(pEntity->pev); pentIgnore = ENT(pEntity->pev);
@ -347,14 +347,14 @@ void CZapBounce::BounceThink( void )
{ {
// UTIL_ClientPrintAll( HUD_PRINTTALK, "<SERVER> Zap bounce point destroyed.\n"); // UTIL_ClientPrintAll( HUD_PRINTTALK, "<SERVER> Zap bounce point destroyed.\n");
SetThink( &CBaseEntity::SUB_Remove ); SetThink( &CBaseEntity::SUB_Remove );
pev->nextthink = gpGlobals->time + .1; pev->nextthink = gpGlobals->time + 0.1f;
return; return;
} }
// split beam? // split beam?
if (RANDOM_LONG(0,100) < 80) if (RANDOM_LONG(0,100) < 80)
{ {
m_fDamage *= .75; m_fDamage *= 0.75f;
CZapBounce* pRift = (CZapBounce*)CBaseEntity::Create( "zapbounce", CZapBounce* pRift = (CZapBounce*)CBaseEntity::Create( "zapbounce",
m_vecStart, m_vecStart,

2
dlls/combat.cpp

@ -1577,7 +1577,7 @@ Vector CBaseEntity::FireBulletsPlayer( ULONG cShots, Vector vecSrc, Vector vecDi
break; break;
case BULLET_PLAYER_357: case BULLET_PLAYER_357:
if( pThisPlayer->m_RuneFlags == RUNE_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 else
pEntity->TraceAttack( pevAttacker, gSkillData.plrDmg357, vecDir, &tr, DMG_BULLET ); pEntity->TraceAttack( pevAttacker, gSkillData.plrDmg357, vecDir, &tr, DMG_BULLET );
break; break;

2
dlls/crowbar.cpp

@ -404,7 +404,7 @@ void CCrowbar::SecondaryAttack()
// Control the speed of the next crowbar toss if // Control the speed of the next crowbar toss if
// this is a rune. // this is a rune.
m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + .5; m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 0.5f;
// Crowbar Rune? // Crowbar Rune?
if( m_pPlayer->m_RuneFlags != RUNE_CROWBAR ) if( m_pPlayer->m_RuneFlags != RUNE_CROWBAR )

10
dlls/ggrenade.cpp

@ -162,7 +162,7 @@ void CGrenade::MegaSmoke( void )
WRITE_COORD( pev->origin.z - 50 ); WRITE_COORD( pev->origin.z - 50 );
WRITE_COORD( pev->origin.x ); WRITE_COORD( pev->origin.x );
WRITE_COORD( pev->origin.y ); 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_SHORT( g_sModelIndexLaser );
WRITE_BYTE( 0 ); // start frame? WRITE_BYTE( 0 ); // start frame?
WRITE_BYTE( 10 ); // rame rate? WRITE_BYTE( 10 ); // rame rate?
@ -199,12 +199,12 @@ void CGrenade::MegaSmoke( void )
WRITE_COORD( pev->origin.y ); WRITE_COORD( pev->origin.y );
WRITE_COORD( pev->origin.z ); WRITE_COORD( pev->origin.z );
WRITE_SHORT( g_sModelIndexSmoke ); 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 WRITE_BYTE( 12 ); // framerate
MESSAGE_END(); MESSAGE_END();
} }
pev->dmg *= .80; pev->dmg *= 0.8f;
pev->origin.z += pev->dmg / 2; pev->origin.z += pev->dmg / 2;
if( m_iMegaSmokeFrame < 4 ) if( m_iMegaSmokeFrame < 4 )
@ -225,7 +225,7 @@ void CGrenade::MegaSmoke( void )
{ {
WRITE_SHORT( g_sModelIndexWExplosion ); 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( 15 ); // framerate
WRITE_BYTE( TE_EXPLFLAG_NONE ); WRITE_BYTE( TE_EXPLFLAG_NONE );
MESSAGE_END(); MESSAGE_END();
@ -252,7 +252,7 @@ void CGrenade::MegaSmoke( void )
Create( "spark_shower", pev->origin, Vector( 0, 0, 1 ), NULL ); 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 ) if( m_iMegaSmokeFrame == 4 )
UTIL_Remove( this ); UTIL_Remove( this );

44
dlls/hornetgun.cpp

@ -113,7 +113,7 @@ void BMODSquidSpit:: Spawn( void )
void BMODSquidSpit::Animate( void ) void BMODSquidSpit::Animate( void )
{ {
pev->nextthink = gpGlobals->time + 0.1; pev->nextthink = gpGlobals->time + 0.1f;
if( pev->frame++ ) if( pev->frame++ )
{ {
@ -135,7 +135,7 @@ void BMODSquidSpit::Shoot( entvars_t *Owner, Vector vecStart, Vector vecVelocity
pSpit->pevOwner = Owner; pSpit->pevOwner = Owner;
pSpit->SetThink( &BMODSquidSpit::Animate ); pSpit->SetThink( &BMODSquidSpit::Animate );
pSpit->pev->nextthink = gpGlobals->time + 0.1; pSpit->pev->nextthink = gpGlobals->time + 0.1f;
} }
void BMODSquidSpit::Touch( CBaseEntity *pOther ) void BMODSquidSpit::Touch( CBaseEntity *pOther )
@ -238,7 +238,7 @@ void CHgun::ArmBeam( Vector color )
} }
// Couldn't find anything close enough // Couldn't find anything close enough
if( flDist == 1.0 ) if( flDist == 1.0f )
return; return;
// DecalGunshot( &tr, BULLET_PLAYER_CROWBAR ); // DecalGunshot( &tr, BULLET_PLAYER_CROWBAR );
@ -412,7 +412,7 @@ void CHgun::FreezeRay( void )
pPlayer->pev->renderamt = 60; // glow shell distance from entity 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... // freeze the player and set the "unfreeze" time...
pPlayer->EnableControl(FALSE); pPlayer->EnableControl(FALSE);
@ -421,16 +421,16 @@ void CHgun::FreezeRay( void )
pPlayer->m_flFreezeTime = gpGlobals->time + freezetime; pPlayer->m_flFreezeTime = gpGlobals->time + freezetime;
//RuneMsg( pPlayer, "YOU ARE FROZEN!!!", Vector(100,100,255), freezetime - .5); //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 )); 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_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_iWeaponVolume = NORMAL_GUN_VOLUME;
m_pPlayer->m_iWeaponFlash = DIM_GUN_FLASH; 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 ); 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() void CHgun::ZapGun()
@ -622,7 +622,7 @@ void CHgun::ZapGun()
m_pPlayer->TakeDamage( m_pPlayer->pev, m_pPlayer->pev, 100, DMG_SHOCK ); 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 ); 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; return;
} }
@ -647,7 +647,7 @@ void CHgun::ZapGun()
else else
{ {
m_iFirePhase = HGUN_ZAP; m_iFirePhase = HGUN_ZAP;
m_fNextPhaseTime = gpGlobals->time + .1; m_fNextPhaseTime = gpGlobals->time + 0.1f;
} }
} }
break; break;
@ -663,13 +663,13 @@ void CHgun::ZapGun()
m_pPlayer->SetAnimation( PLAYER_ATTACK1 ); m_pPlayer->SetAnimation( PLAYER_ATTACK1 );
m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] -= 4; 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 ); m_pPlayer->pev->punchangle.x = RANDOM_FLOAT( 0, 2 );
break; break;
case HGUN_ZAP_DONE: case HGUN_ZAP_DONE:
ClearBeams(); ClearBeams();
m_flNextPrimaryAttack = gpGlobals->time + .25; m_flNextPrimaryAttack = gpGlobals->time + 0.25f;
m_flTimeWeaponIdle = gpGlobals->time + .1; m_flTimeWeaponIdle = gpGlobals->time + 0.1f;
break; break;
} }
} }
@ -691,7 +691,7 @@ void CHgun::MultiZapGun()
UTIL_ScreenFade( this, Vector( 180, 255, 96 ), 2, 0.5, 128, FFADE_IN ); 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 ); 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 ); 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; return;
} }
@ -715,7 +715,7 @@ void CHgun::MultiZapGun()
} }
else else
m_iFirePhase = HGUN_ZAP; m_iFirePhase = HGUN_ZAP;
m_fNextPhaseTime = gpGlobals->time + .1; m_fNextPhaseTime = gpGlobals->time + 0.1f;
} }
break; break;
case HGUN_ZAP: case HGUN_ZAP:
@ -740,13 +740,13 @@ void CHgun::MultiZapGun()
m_pPlayer->SetAnimation( PLAYER_ATTACK1 ); m_pPlayer->SetAnimation( PLAYER_ATTACK1 );
m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] -= 12; 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 ); m_pPlayer->pev->punchangle.x = RANDOM_FLOAT( 0, 2 );
break; break;
case HGUN_ZAP_DONE: case HGUN_ZAP_DONE:
ClearBeams(); ClearBeams();
m_flNextPrimaryAttack = gpGlobals->time + .25; m_flNextPrimaryAttack = gpGlobals->time + 0.25f;
m_flTimeWeaponIdle = gpGlobals->time + .1; m_flTimeWeaponIdle = gpGlobals->time + 0.1f;
break; break;
} }
} }
@ -819,7 +819,7 @@ void CHgun::SquidSpit( void )
iSpitSpeed = 80; iSpitSpeed = 80;
} }
m_flNextPrimaryAttack = gpGlobals->time + .25; m_flNextPrimaryAttack = gpGlobals->time + 0.25f;
// spew the spittle temporary ents. // spew the spittle temporary ents.
MESSAGE_BEGIN( MSG_PVS, SVC_TEMPENTITY, vecSrc ); MESSAGE_BEGIN( MSG_PVS, SVC_TEMPENTITY, vecSrc );
@ -847,7 +847,7 @@ void CHgun::SquidSpit( void )
} }
m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] -= 3; 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_iWeaponVolume = NORMAL_GUN_VOLUME;
m_pPlayer->m_iWeaponFlash = DIM_GUN_FLASH; m_pPlayer->m_iWeaponFlash = DIM_GUN_FLASH;
@ -896,7 +896,7 @@ void CHgun::LaunchSnark( void )
iSpitSpeed = 80; iSpitSpeed = 80;
} }
m_flNextPrimaryAttack = gpGlobals->time + .4; m_flNextPrimaryAttack = gpGlobals->time + 0.4f;
// spew the spittle temporary ents. // spew the spittle temporary ents.
MESSAGE_BEGIN( MSG_PVS, SVC_TEMPENTITY, vecSrc ); 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_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_iWeaponVolume = NORMAL_GUN_VOLUME;
m_pPlayer->m_iWeaponFlash = DIM_GUN_FLASH; m_pPlayer->m_iWeaponFlash = DIM_GUN_FLASH;

2
dlls/mp5.cpp

@ -249,7 +249,7 @@ void CMP5::SecondaryAttack( void )
// BMOD Begin - mp5 mod // BMOD Begin - mp5 mod
if( bm_mp5_mod.value ) if( bm_mp5_mod.value )
m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 1.5.0f; m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 1.5f;
else else
m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 1.0f; m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 1.0f;
// BMOD End - mp5 mod // BMOD End - mp5 mod

6
dlls/multiplay_gamerules.cpp

@ -655,7 +655,7 @@ void CHalfLifeMultiplay::PlayerSpawn( CBasePlayer *pPlayer )
} }
// BMOD Edit - spawn kills // BMOD Edit - spawn kills
pPlayer->m_fSpawnTimeStamp = gpGlobals->time + .1; pPlayer->m_fSpawnTimeStamp = gpGlobals->time + 0.1f;
pPlayer->pev->rendermode = kRenderTransAdd; pPlayer->pev->rendermode = kRenderTransAdd;
pPlayer->pev->renderfx = kRenderFxHologram; pPlayer->pev->renderfx = kRenderFxHologram;
pPlayer->pev->renderamt = 255; 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" ), g_engfuncs.pfnInfoKeyValue( g_engfuncs.pfnGetInfoKeyBuffer( ENT( pKiller ) ), "model" ),
(int)bm_bantime.value ); (int)bm_bantime.value );
( (CBasePlayer *)Killer )->m_bBanMe = TRUE; ( (CBasePlayer *)Killer )->m_bBanMe = TRUE;
( (CBasePlayer *)Killer )->m_fMessageTimer = gpGlobals->time + .1; ( (CBasePlayer *)Killer )->m_fMessageTimer = gpGlobals->time + 0.1f;
} }
} }
// BMOD End - Spawn kills // 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" ), g_engfuncs.pfnInfoKeyValue( g_engfuncs.pfnGetInfoKeyBuffer( ENT( pKiller ) ), "model" ),
(int)bm_bantime.value ); (int)bm_bantime.value );
( (CBasePlayer *)Killer )->m_bBanMe = TRUE; ( (CBasePlayer *)Killer )->m_bBanMe = TRUE;
( (CBasePlayer *)Killer )->m_fMessageTimer = gpGlobals->time + .1; ( (CBasePlayer *)Killer )->m_fMessageTimer = gpGlobals->time + 0.1f;
} }
} }
// BMOD End - Type kills // BMOD End - Type kills

17
dlls/shotgun.cpp

@ -265,26 +265,21 @@ void CShotgun::SecondaryAttack( void )
//if( m_iClip != 0 ) //if( m_iClip != 0 )
m_flPumpTime = gpGlobals->time + 0.95f; m_flPumpTime = gpGlobals->time + 0.95f;
<<<<<<< HEAD m_flNextPrimaryAttack = GetNextAttackDelay( 1.5f );
m_flNextPrimaryAttack = GetNextAttackDelay( 1.5 ); m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 1.5f;
m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 1.5;
if( bm_shotty_mod.value ) if( bm_shotty_mod.value )
{ {
m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + .9; m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.9f;
m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + .9; m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 0.9f;
} }
if( m_pPlayer->m_RuneFlags == RUNE_SHOTGUN ) if( m_pPlayer->m_RuneFlags == RUNE_SHOTGUN )
{ {
m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.5; m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.5f;
m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 0.5; m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 0.5f;
} }
=======
m_flNextPrimaryAttack = GetNextAttackDelay( 1.5f );
m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 1.5f;
>>>>>>> master
if( m_iClip != 0 ) if( m_iClip != 0 )
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 6.0f; m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 6.0f;
else else

Loading…
Cancel
Save