Skip to content

Commit

Permalink
don't remove-unit for zombies
Browse files Browse the repository at this point in the history
  • Loading branch information
kanatohodets committed Feb 17, 2015
1 parent 92452b9 commit 8c64d06
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion LuaRules/Gadgets/game_S44ZS_initialize.lua
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ function gadget:UnitDestroyed(unitID, unitDefID, unitTeam)
local hqID = Spring.GetUnitRulesParam(unitID, 'hqID')
local playerName = GG.teamIDToPlayerName[unitTeam]
-- don't kill morph units (hence attacker ID) (TODO: handle morphs better)
if hqID ~= -1 and playerName then
if hqID ~= -1 and playerName and unitTeam ~= GG.zombieTeamID then
sendToAutohost('remove-unit', {owner = playerName, hq_id = hqID})
end
end
Expand Down

0 comments on commit 8c64d06

Please sign in to comment.