mirror of
https://github.com/YGGverse/hlsdk-portable.git
synced 2025-03-12 05:22:55 +00:00
Double promotion fixes.
This commit is contained in:
parent
340054225a
commit
02ee5fe4f6
@ -1537,7 +1537,7 @@ Vector CBaseEntity::FireBulletsPlayer( ULONG cShots, Vector vecSrc, Vector vecDi
|
||||
pEntity->TraceAttack( pevAttacker, gSkillData.plrDmg357, vecDir, &tr, DMG_BULLET );
|
||||
break;
|
||||
case BULLET_PLAYER_SNIPER:
|
||||
pEntity->TraceAttack( pevAttacker, gSkillData.plrDmg357 * 1.5, vecDir, &tr, DMG_BULLET );
|
||||
pEntity->TraceAttack( pevAttacker, gSkillData.plrDmg357 * 1.5f, vecDir, &tr, DMG_BULLET );
|
||||
break;
|
||||
case BULLET_NONE: // FIX
|
||||
pEntity->TraceAttack( pevAttacker, 50, vecDir, &tr, DMG_CLUB );
|
||||
|
@ -126,7 +126,7 @@ void CRecharge::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE use
|
||||
//
|
||||
if( m_flSoundTime <= gpGlobals->time )
|
||||
{
|
||||
m_flSoundTime = gpGlobals->time + 0.62;
|
||||
m_flSoundTime = gpGlobals->time + 0.62f;
|
||||
EMIT_SOUND( ENT( pev ), CHAN_ITEM, "items/suitchargeno1.wav", 0.85, ATTN_NORM );
|
||||
}
|
||||
return;
|
||||
|
@ -512,7 +512,7 @@ int CBasePlayer::TakeDamage( entvars_t *pevInflictor, entvars_t *pevAttacker, fl
|
||||
|
||||
UTIL_TraceLine( pev->origin, pev->origin + Vector( 0, 0, 100 ), dont_ignore_monsters, edict(), &tr );
|
||||
|
||||
if( tr.flFraction == 1.0 )
|
||||
if( tr.flFraction == 1.0f )
|
||||
pDeathCam->pev->origin.z += 100;
|
||||
else
|
||||
pDeathCam->pev->origin.z += fabs( pev->origin.z - tr.vecEndPos.z );
|
||||
|
@ -109,7 +109,7 @@ BOOL CPipe::Deploy()
|
||||
|
||||
void CPipe::Holster(int skiplocal /* = 0 */)
|
||||
{
|
||||
m_pPlayer->m_flNextAttack = UTIL_WeaponTimeBase() + 0.5;
|
||||
m_pPlayer->m_flNextAttack = UTIL_WeaponTimeBase() + 0.5f;
|
||||
SendWeaponAnim(PIPE_HOLSTER);
|
||||
}
|
||||
|
||||
@ -147,10 +147,10 @@ int CPipe::Swing(int fFirst)
|
||||
UTIL_TraceLine(vecSrc, vecEnd, dont_ignore_monsters, ENT(m_pPlayer->pev), &tr);
|
||||
|
||||
#ifndef CLIENT_DLL
|
||||
if (tr.flFraction >= 1.0)
|
||||
if (tr.flFraction >= 1.0f)
|
||||
{
|
||||
UTIL_TraceHull(vecSrc, vecEnd, dont_ignore_monsters, head_hull, ENT(m_pPlayer->pev), &tr);
|
||||
if (tr.flFraction < 1.0)
|
||||
if (tr.flFraction < 1.0f)
|
||||
{
|
||||
// Calculate the point of intersection of the line (or hull) and the object we hit
|
||||
// This is and approximation of the "best" intersection
|
||||
@ -167,7 +167,7 @@ int CPipe::Swing(int fFirst)
|
||||
0.0, 0, 0.0);
|
||||
|
||||
|
||||
if (tr.flFraction >= 1.0)
|
||||
if (tr.flFraction >= 1.0f)
|
||||
{
|
||||
if (fFirst)
|
||||
{
|
||||
@ -284,7 +284,7 @@ int CPipe::Swing(int fFirst)
|
||||
m_pPlayer->m_iWeaponVolume = flVol * PIPE_WALLHIT_VOLUME;
|
||||
|
||||
SetThink(&CPipe::Smack);
|
||||
pev->nextthink = UTIL_WeaponTimeBase() + 0.48;
|
||||
pev->nextthink = UTIL_WeaponTimeBase() + 0.48f;
|
||||
#endif
|
||||
m_flNextPrimaryAttack = GetNextAttackDelay(0.5f); // 0.25f
|
||||
}
|
||||
@ -301,22 +301,22 @@ void CPipe::WeaponIdle()
|
||||
{
|
||||
int iAnim;
|
||||
float flRand = UTIL_SharedRandomFloat( m_pPlayer->random_seed, 0, 1 );
|
||||
if( flRand > 0.9 )
|
||||
if( flRand > 0.9f )
|
||||
{
|
||||
iAnim = PIPE_IDLE2;
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 160.0 / 30.0;
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 160.0f / 30.0f;
|
||||
}
|
||||
else
|
||||
{
|
||||
if( flRand > 0.5 )
|
||||
if( flRand > 0.5f )
|
||||
{
|
||||
iAnim = PIPE_IDLE1;
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 70.0 / 30.0;
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 70.0f / 30.0f;
|
||||
}
|
||||
else
|
||||
{
|
||||
iAnim = PIPE_IDLE3;
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 160.0 / 30.0;
|
||||
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 160.0f / 30.0f;
|
||||
}
|
||||
}
|
||||
SendWeaponAnim( iAnim );
|
||||
|
@ -107,7 +107,7 @@ void CSniper::Holster(int skiplocal /* = 0 */)
|
||||
SecondaryAttack();
|
||||
}
|
||||
|
||||
m_pPlayer->m_flNextAttack = UTIL_WeaponTimeBase() + 0.5;
|
||||
m_pPlayer->m_flNextAttack = UTIL_WeaponTimeBase() + 0.5f;
|
||||
m_flTimeWeaponIdle = UTIL_SharedRandomFloat(m_pPlayer->random_seed, 10, 15);
|
||||
}
|
||||
|
||||
@ -124,7 +124,7 @@ void CSniper::SecondaryAttack(void)
|
||||
m_pPlayer->pev->fov = m_pPlayer->m_iFOV = 40;
|
||||
}
|
||||
|
||||
m_flNextSecondaryAttack = 0.75;
|
||||
m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 0.75f;
|
||||
EMIT_SOUND_DYN( ENT( m_pPlayer->pev ), CHAN_STATIC, "weapons/zoom.wav", 1, ATTN_NORM, 0, RANDOM_LONG( 100, 150 ) );
|
||||
}
|
||||
|
||||
@ -137,14 +137,14 @@ void CSniper::PrimaryAttack()
|
||||
if (m_pPlayer->pev->waterlevel == 3)
|
||||
{
|
||||
PlayEmptySound();
|
||||
m_flNextPrimaryAttack = m_flNextSecondaryAttack = 0.15;
|
||||
m_flNextPrimaryAttack = m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 0.15f;
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_iClip <= 0)
|
||||
{
|
||||
PlayEmptySound();
|
||||
m_flNextPrimaryAttack = m_flNextSecondaryAttack = 0.2;
|
||||
m_flNextPrimaryAttack = m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 0.2f;
|
||||
return;
|
||||
}
|
||||
|
||||
@ -177,17 +177,17 @@ void CSniper::PrimaryAttack()
|
||||
PLAYBACK_EVENT_FULL(flags, m_pPlayer->edict(), m_usFireSniper, 0.0, (float *)&g_vecZero, (float *)&g_vecZero, vecDir.x, vecDir.y, 0, 0, 0, 0);
|
||||
|
||||
if( m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] > 0 || m_iClip > 0 )
|
||||
m_flNextPrimaryAttack = 1.5;
|
||||
m_flNextPrimaryAttack = 1.5f;
|
||||
else
|
||||
{
|
||||
m_flNextPrimaryAttack = 2.75;
|
||||
m_flNextSecondaryAttack = 0.75;
|
||||
m_flNextPrimaryAttack = 2.75f;
|
||||
m_flNextSecondaryAttack = 0.75f;
|
||||
}
|
||||
|
||||
if( m_iClip > 0 )
|
||||
m_flTimeWeaponIdle = 2.5;
|
||||
m_flTimeWeaponIdle = 2.5f;
|
||||
else
|
||||
m_flTimeWeaponIdle = 1.75;
|
||||
m_flTimeWeaponIdle = 1.75f;
|
||||
}
|
||||
|
||||
|
||||
|
@ -651,7 +651,7 @@ void CBasePlayerWeapon::ItemPostFrame( void )
|
||||
}
|
||||
else
|
||||
{
|
||||
m_flNextPrimaryAttack = ( UseDecrement() ? 0.0 : gpGlobals->time ) + 0.2f;
|
||||
m_flNextPrimaryAttack = ( UseDecrement() ? 0.0f : gpGlobals->time ) + 0.2f;
|
||||
}
|
||||
}
|
||||
else if( ( m_pPlayer->pev->button & IN_ATTACK ) && CanAttack( m_flNextPrimaryAttack, gpGlobals->time, UseDecrement() ) )
|
||||
|
Loading…
x
Reference in New Issue
Block a user