This commit is contained in:
s1lent 2019-06-06 03:18:30 +07:00
parent 1745de6aca
commit 2903630e38
No known key found for this signature in database
GPG Key ID: 0FE401DC73916B5C

View File

@ -142,7 +142,11 @@ void CC4::PrimaryAttack()
SendWeaponAnim(C4_ARM, UseDecrement() != FALSE);
// freeze the player in place while planting
#ifdef REGAMEDLL_FIXES
m_pPlayer->ResetMaxSpeed();
#else
SET_CLIENT_MAXSPEED(m_pPlayer->edict(), 1.0);
#endif
m_pPlayer->SetAnimation(PLAYER_ATTACK1);
m_pPlayer->SetProgressBarTime(C4_ARMING_ON_TIME);
@ -155,8 +159,6 @@ void CC4::PrimaryAttack()
CBasePlayer *pTempPlayer = nullptr;
if (m_fArmedTime <= gpGlobals->time)
{
if (m_bStartedArming)
{
m_bStartedArming = false;
m_fArmedTime = 0;
@ -227,7 +229,6 @@ void CC4::PrimaryAttack()
return;
}
}
}
else
{
if (m_fArmedTime - 0.75f <= gpGlobals->time && !m_bBombPlacedAnimation)
@ -366,5 +367,10 @@ void CC4::Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, f
float CC4::GetMaxSpeed()
{
#ifdef REGAMEDLL_FIXES
if (m_bStartedArming)
return 1.0f;
#endif
return C4_MAX_SPEED;
}