check for teamgone before activating switcher
authornemo
Wed, 31 Oct 2018 15:32:47 -0400
changeset 14069 084db65b3657
parent 14068 321bc980fcaa
child 14070 0a75f54692cb
check for teamgone before activating switcher
hedgewars/uTeams.pas
--- a/hedgewars/uTeams.pas	Wed Oct 31 18:41:02 2018 +0100
+++ b/hedgewars/uTeams.pas	Wed Oct 31 15:32:47 2018 -0400
@@ -435,7 +435,7 @@
         NextClan:= false;
         end;
 
-    if (GameFlags and gfSwitchHog) <> 0 then
+    if ((GameFlags and gfSwitchHog) <> 0) and not(CurrentTeam^.hasGone) then
         begin
         g:= AddGear(hwRound(CurrentHedgehog^.Gear^.X), hwRound(CurrentHedgehog^.Gear^.Y), gtSwitcher, 0, _0, _0, 0);
         CurAmmoGear:= g;