Fix creeper nests being unable to be destroyed by flesh creepers. #218

This commit is contained in:
William Moodhe 2019-11-30 21:58:52 -05:00
parent e3f3285ede
commit fb610b7093
2 changed files with 5 additions and 3 deletions

View file

@ -2594,11 +2594,9 @@ function GM:PropBroken(ent, attacker)
if IsValid(ent) and IsValid(attacker) and not ent._PROPBROKEN and attacker:IsPlayer() and attacker:Team() == TEAM_HUMAN then if IsValid(ent) and IsValid(attacker) and not ent._PROPBROKEN and attacker:IsPlayer() and attacker:Team() == TEAM_HUMAN then
ent._PROPBROKEN = true ent._PROPBROKEN = true
if attacker.LogID then --failsafe for local dev
PrintMessage(HUD_PRINTCONSOLE, attacker:LogID().." broke "..ent:GetModel()) PrintMessage(HUD_PRINTCONSOLE, attacker:LogID().." broke "..ent:GetModel())
end end
end end
end
function GM:NestDestroyed(ent, attacker) function GM:NestDestroyed(ent, attacker)
if IsValid(ent) and IsValid(attacker) and attacker:IsPlayer() and attacker:Team() == TEAM_UNDEAD then if IsValid(ent) and IsValid(attacker) and attacker:IsPlayer() and attacker:Team() == TEAM_UNDEAD then

View file

@ -31,6 +31,10 @@ local E_IsValid = M_Entity.IsValid
local E_GetDTBool = M_Entity.GetDTBool local E_GetDTBool = M_Entity.GetDTBool
local E_GetTable = M_Entity.GetTable local E_GetTable = M_Entity.GetTable
function meta:LogID()
return "<"..self:SteamID().."> "..self:Name()
end
function meta:GetMaxHealthEx() function meta:GetMaxHealthEx()
if P_Team(self) == TEAM_UNDEAD then if P_Team(self) == TEAM_UNDEAD then
return self:GetMaxZombieHealth() return self:GetMaxZombieHealth()