hedgewars/uWorld.pas
changeset 2856 cc70797a0b75
parent 2855 7e6adeb57427
child 2857 768dfbe276a5
--- a/hedgewars/uWorld.pas	Wed Feb 24 01:55:59 2010 +0000
+++ b/hedgewars/uWorld.pas	Wed Feb 24 03:03:43 2010 +0000
@@ -90,6 +90,8 @@
          ClansArray[t]:= cp;
          ClansArray[t]^.ClanIndex:= t;
          ClansArray[0]^.ClanIndex:= 0;
+         if (LocalClan = t) then LocalClan:= 0
+         else if (LocalClan = 0) then LocalClan:= t
          end;
       end;
    CurrentTeam:= ClansArray[0]^.Teams[0];
@@ -139,7 +141,7 @@
    end;
 if (CurrentTeam <> nil) and (CurrentHedgehog <> nil) and (not CurrentTeam^.ExtDriven) and (CurrentHedgehog^.BotLevel = 0) then
    Ammo:= CurrentHedgehog^.Ammo
-else 
+else if (LocalAmmo <> -1) then
    Ammo:= GetAmmoByNum(LocalAmmo);
 Slot:= 0;
 Pos:= -1;