Skip to content

Commit

Permalink
Only make grenades explode once (fix by timakro)
Browse files Browse the repository at this point in the history
  • Loading branch information
def- committed Jan 22, 2018
1 parent 3033fbb commit b9a93a1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/game/server/entities/projectile.cpp
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
{
Expand All @@ -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);
Expand Down

0 comments on commit b9a93a1

Please sign in to comment.