hedgewars/CCHandlers.inc
changeset 2881 70d7976fa829
parent 2874 3c7c2bf1ba38
child 2905 f3c79f7193a9
--- a/hedgewars/CCHandlers.inc	Sun Feb 28 13:57:34 2010 +0000
+++ b/hedgewars/CCHandlers.inc	Sun Feb 28 15:41:42 2010 +0000
@@ -155,9 +155,8 @@
 	val(s, Gear^.Health);
 	TryDo(Gear^.Health > 0, 'Invalid hedgehog health', true);
 	PHedgehog(Gear^.Hedgehog)^.Team:= CurrentTeam;
-// Needs shared clan ammo game flag
-	CurrentHedgehog^.AmmoStore:= Clan^.ClanIndex; // FIXME HACK to get ammostores work
-	//CurrentHedgehog^.AmmoStore:= TeamsCount - 1; // FIXME HACK to get ammostores work
+    if (GameFlags and gfSharedAmmo) <> 0 then CurrentHedgehog^.AmmoStore:= Clan^.ClanIndex
+    else CurrentHedgehog^.AmmoStore:= TeamsCount - 1;
 	CurrentHedgehog^.Gear:= Gear;
 	CurrentHedgehog^.Name:= id;
     CurrHedgehog:= HedgehogsNumber;