Merge branch 'master' into mobile_hacks

This commit is contained in:
Andrey Akhmichin 2021-02-10 23:44:27 +05:00
commit 952f95fac1
4 changed files with 16 additions and 12 deletions

View File

@ -948,13 +948,13 @@ void EV_FireGauss( event_args_t *args )
0.1f, 0.1f,
m_fPrimaryFire ? 1.0f : 2.5f, m_fPrimaryFire ? 1.0f : 2.5f,
0.0f, 0.0f,
m_fPrimaryFire ? 128.0f : flDamage, (m_fPrimaryFire ? 128.0f : flDamage) / 255.0f,
0, 0,
0, 0,
0, 0,
m_fPrimaryFire ? 255 : 255, (m_fPrimaryFire ? 255 : 255) / 255.0f,
m_fPrimaryFire ? 128 : 255, (m_fPrimaryFire ? 128 : 255) / 255.0f,
m_fPrimaryFire ? 0 : 255 (m_fPrimaryFire ? 0 : 255) / 255.0f
); );
} }
else else
@ -965,13 +965,13 @@ void EV_FireGauss( event_args_t *args )
0.1f, 0.1f,
m_fPrimaryFire ? 1.0f : 2.5f, m_fPrimaryFire ? 1.0f : 2.5f,
0.0f, 0.0f,
m_fPrimaryFire ? 128.0f : flDamage, (m_fPrimaryFire ? 128.0f : flDamage) / 255.0f,
0, 0,
0, 0,
0, 0,
m_fPrimaryFire ? 255 : 255, (m_fPrimaryFire ? 255 : 255) / 255.0f,
m_fPrimaryFire ? 128 : 255, (m_fPrimaryFire ? 128 : 255) / 255.0f,
m_fPrimaryFire ? 0 : 255 (m_fPrimaryFire ? 0 : 255) / 255.0f
); );
} }

View File

@ -325,9 +325,13 @@ void CBasePlayerWeapon::ItemPostFrame( void )
{ {
if( ( m_fInReload ) && ( m_pPlayer->m_flNextAttack <= 0.0f ) ) if( ( m_fInReload ) && ( m_pPlayer->m_flNextAttack <= 0.0f ) )
{ {
#if 0 // FIXME, need ammo on client to make this work right #if 1
// complete the reload. // complete the reload.
int j = min( iMaxClip() - m_iClip, m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] ); ItemInfo itemInfo;
memset( &itemInfo, 0, sizeof( itemInfo ) );
GetItemInfo( &itemInfo );
int j = Q_min( itemInfo.iMaxClip - m_iClip, m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] );
// Add them to the clip // Add them to the clip
m_iClip += j; m_iClip += j;

View File

@ -66,7 +66,7 @@ void CBaseMonster::RunAI( void )
// IDLE sound permitted in ALERT state is because monsters were silent in ALERT state. Only play IDLE sound in IDLE state // IDLE sound permitted in ALERT state is because monsters were silent in ALERT state. Only play IDLE sound in IDLE state
// once we have sounds for that state. // once we have sounds for that state.
if( ( m_MonsterState == MONSTERSTATE_IDLE || m_MonsterState == MONSTERSTATE_ALERT ) && RANDOM_LONG( 0, 99 ) == 0 && !( pev->flags & SF_MONSTER_GAG ) ) if( ( m_MonsterState == MONSTERSTATE_IDLE || m_MonsterState == MONSTERSTATE_ALERT ) && RANDOM_LONG( 0, 99 ) == 0 && !( pev->spawnflags & SF_MONSTER_GAG ) )
{ {
IdleSound(); IdleSound();
} }

View File

@ -607,7 +607,7 @@ BOOL CanAttack( float attack_time, float curtime, BOOL isPredicted )
} }
else else
{ {
return ( attack_time <= 0.0f ) ? TRUE : FALSE; return ( (static_cast<int>(::floor(attack_time * 1000.0f)) * 1000.0f) <= 0.0f) ? TRUE : FALSE;
} }
} }