From cb0209d6e3f4c3a3fcfa284694b1afc2edc241d9 Mon Sep 17 00:00:00 2001 From: Dennis Felsing Date: Mon, 22 Jan 2018 14:15:53 +0100 Subject: [PATCH] Reapply "Only make grenades explode once (fix by timakro)" --- src/game/server/entities/projectile.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/game/server/entities/projectile.cpp b/src/game/server/entities/projectile.cpp index 529be12d4..679094447 100644 --- a/src/game/server/entities/projectile.cpp +++ b/src/game/server/entities/projectile.cpp @@ -146,6 +146,7 @@ void CProjectile::Tick() else if (m_Owner >= 0) { GameServer()->m_World.DestroyEntity(this); + return; } if( ((pTargetChr && (pOwnerChar ? !(pOwnerChar->m_Hit&CCharacter::DISABLE_HIT_GRENADE) : g_Config.m_SvHit || m_Owner == -1 || pTargetChr == pOwnerChar)) || Collide || GameLayerClipped(CurPos)) && !IsWeaponCollide) @@ -177,10 +178,14 @@ void CProjectile::Tick() { GameServer()->CreateDamageInd(CurPos, -atan2(m_Direction.x, m_Direction.y), 10, (m_Owner != -1)? TeamMask : -1LL); GameServer()->m_World.DestroyEntity(this); + return; } else if (!m_Freeze) + { GameServer()->m_World.DestroyEntity(this); + return; + } } if(m_LifeSpan == -1) { @@ -201,6 +206,7 @@ void CProjectile::Tick() (m_Owner != -1)? TeamMask : -1LL); } GameServer()->m_World.DestroyEntity(this); + return; } int x = GameServer()->Collision()->GetIndex(PrevPos, CurPos);