From fb610b70936c56caf29c4efe70e9a79842ee5021 Mon Sep 17 00:00:00 2001 From: William Moodhe Date: Sat, 30 Nov 2019 21:58:52 -0500 Subject: [PATCH] Fix creeper nests being unable to be destroyed by flesh creepers. #218 --- gamemodes/zombiesurvival/gamemode/init.lua | 4 +--- gamemodes/zombiesurvival/gamemode/obj_player_extend.lua | 4 ++++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/gamemodes/zombiesurvival/gamemode/init.lua b/gamemodes/zombiesurvival/gamemode/init.lua index e3ee919..751e434 100644 --- a/gamemodes/zombiesurvival/gamemode/init.lua +++ b/gamemodes/zombiesurvival/gamemode/init.lua @@ -2594,9 +2594,7 @@ function GM:PropBroken(ent, attacker) if IsValid(ent) and IsValid(attacker) and not ent._PROPBROKEN and attacker:IsPlayer() and attacker:Team() == TEAM_HUMAN then ent._PROPBROKEN = true - if attacker.LogID then --failsafe for local dev - PrintMessage(HUD_PRINTCONSOLE, attacker:LogID().." broke "..ent:GetModel()) - end + PrintMessage(HUD_PRINTCONSOLE, attacker:LogID().." broke "..ent:GetModel()) end end diff --git a/gamemodes/zombiesurvival/gamemode/obj_player_extend.lua b/gamemodes/zombiesurvival/gamemode/obj_player_extend.lua index 2dc80de..eec6fe9 100644 --- a/gamemodes/zombiesurvival/gamemode/obj_player_extend.lua +++ b/gamemodes/zombiesurvival/gamemode/obj_player_extend.lua @@ -31,6 +31,10 @@ local E_IsValid = M_Entity.IsValid local E_GetDTBool = M_Entity.GetDTBool local E_GetTable = M_Entity.GetTable +function meta:LogID() + return "<"..self:SteamID().."> "..self:Name() +end + function meta:GetMaxHealthEx() if P_Team(self) == TEAM_UNDEAD then return self:GetMaxZombieHealth()