From c1778a5452a2ee2dcdf866ced85b38efb9dd83f1 Mon Sep 17 00:00:00 2001 From: oy Date: Thu, 27 Feb 2014 21:44:00 +0100 Subject: [PATCH] fixed problem with ninja movement while the powerup ends. #1152 --- src/game/server/entities/character.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/game/server/entities/character.cpp b/src/game/server/entities/character.cpp index 1d67718a0..91194d893 100644 --- a/src/game/server/entities/character.cpp +++ b/src/game/server/entities/character.cpp @@ -124,6 +124,10 @@ void CCharacter::HandleNinja() // time's up, return m_aWeapons[WEAPON_NINJA].m_Got = false; m_ActiveWeapon = m_LastWeapon; + + // reset velocity + if(m_Ninja.m_CurrentMoveTime > 0) + m_Core.m_Vel = m_Ninja.m_ActivationDir*m_Ninja.m_OldVelAmount; SetWeapon(m_ActiveWeapon); return; @@ -490,6 +494,7 @@ bool CCharacter::GiveWeapon(int Weapon, int Ammo) void CCharacter::GiveNinja() { m_Ninja.m_ActivationTick = Server()->Tick(); + m_Ninja.m_CurrentMoveTime = -1; m_aWeapons[WEAPON_NINJA].m_Got = true; m_aWeapons[WEAPON_NINJA].m_Ammo = -1; if (m_ActiveWeapon != WEAPON_NINJA)