mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Indicate when ninja ends
This commit is contained in:
parent
7237fe2a31
commit
bfc6558a32
|
@ -136,6 +136,15 @@ void CCharacter::HandleNinja()
|
|||
return;
|
||||
}
|
||||
|
||||
int NinjaTime = m_Ninja.m_ActivationTick + (g_pData->m_Weapons.m_Ninja.m_Duration * Server()->TickSpeed() / 1000) - Server()->Tick();
|
||||
|
||||
if (NinjaTime % Server()->TickSpeed() == 0 && NinjaTime / Server()->TickSpeed() <= 5)
|
||||
{
|
||||
GameServer()->CreateDamageInd(m_Pos, 0, NinjaTime / Server()->TickSpeed(), Teams()->TeamMask(Team(), -1, m_pPlayer->GetCID()));
|
||||
}
|
||||
|
||||
m_Armor = 10 - (NinjaTime / 15);
|
||||
|
||||
// force ninja Weapon
|
||||
SetWeapon(WEAPON_NINJA);
|
||||
|
||||
|
|
Loading…
Reference in a new issue