diff options
Diffstat (limited to 'src/game/server/entities/character.cpp')
| -rw-r--r-- | src/game/server/entities/character.cpp | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/game/server/entities/character.cpp b/src/game/server/entities/character.cpp index aab489bf..f64a16e3 100644 --- a/src/game/server/entities/character.cpp +++ b/src/game/server/entities/character.cpp @@ -538,7 +538,7 @@ void CCharacter::OnPredictedInput(CNetObj_PlayerInput *pNewInput) mem_copy(&m_Input, pNewInput, sizeof(m_Input)); m_NumInputs++; - // or are not allowed to aim in the center + // it is not allowed to aim in the center if(m_Input.m_TargetX == 0 && m_Input.m_TargetY == 0) m_Input.m_TargetY = -1; } @@ -551,6 +551,10 @@ void CCharacter::OnDirectInput(CNetObj_PlayerInput *pNewInput) mem_copy(&m_LatestPrevInput, &m_LatestInput, sizeof(m_LatestInput)); mem_copy(&m_LatestInput, pNewInput, sizeof(m_LatestInput)); + // it is not allowed to aim in the center + if(m_LatestInput.m_TargetX == 0 && m_LatestInput.m_TargetY == 0) + m_LatestInput.m_TargetY = -1; + if(m_NumInputs > 2 && m_pPlayer->GetTeam() != TEAM_SPECTATORS) { HandleWeaponSwitch(); @@ -705,6 +709,20 @@ void CCharacter::TickDefered() } } +void CCharacter::TickPaused() +{ + ++m_AttackTick; + ++m_DamageTakenTick; + ++m_Ninja.m_ActivationTick; + ++m_ReckoningTick; + if(m_LastAction != -1) + ++m_LastAction; + if(m_aWeapons[m_ActiveWeapon].m_AmmoRegenStart > -1) + ++m_aWeapons[m_ActiveWeapon].m_AmmoRegenStart; + if(m_EmoteStop > -1) + ++m_EmoteStop; +} + bool CCharacter::IncreaseHealth(int Amount) { if(m_Health >= 10) |