1938: Explode grenades twice at the end if they have lifespans. Fix #1559 r=heinrich5991 a=Learath2

Just by looking at the code I think this is what was intended but only testing can make sure.

Co-authored-by: Learath <learath2@gmail.com>
This commit is contained in:
bors[bot] 2019-10-14 20:02:55 +00:00 committed by GitHub
commit 8db2694c5e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 3 deletions

View file

@ -28,7 +28,6 @@ CProjectile::CProjectile
m_Type = Type;
m_Pos = Pos;
m_Direction = Dir;
m_InitialLifeSpan = Span;
m_LifeSpan = Span;
m_Owner = Owner;
m_Force = Force;
@ -154,7 +153,7 @@ void CProjectile::Tick()
if(m_Explosive/*??*/ && (!pTargetChr || (pTargetChr && (!m_Freeze || (m_Type == WEAPON_SHOTGUN && Collide)))))
{
int Number = 1;
if(GameServer()->EmulateBug(BUG_GRENADE_DOUBLEEXPLOSION) && m_LifeSpan == -1 && m_InitialLifeSpan == 0)
if(GameServer()->EmulateBug(BUG_GRENADE_DOUBLEEXPLOSION) && m_LifeSpan == -1)
{
Number = 2;
}

View file

@ -32,7 +32,6 @@ public:
private:
vec2 m_Direction;
int m_InitialLifeSpan;
int m_LifeSpan;
int m_Owner;
int m_Type;