Extend shoppa hack to disable health crates to saucer and portal modes as well
authornemo
Wed, 03 Nov 2010 13:00:17 -0400
changeset 4102 96efb3bbf8e3
parent 4101 c5967f360beb
child 4103 aa932f2e6349
Extend shoppa hack to disable health crates to saucer and portal modes as well
hedgewars/uAmmos.pas
hedgewars/uTeams.pas
--- a/hedgewars/uAmmos.pas	Wed Nov 03 12:28:44 2010 -0400
+++ b/hedgewars/uAmmos.pas	Wed Nov 03 13:00:17 2010 -0400
@@ -98,10 +98,12 @@
 TryDo((byte(ammoLoadout[0]) = byte(ord(High(TAmmoType)))) and (byte(ammoProbability[0]) = byte(ord(High(TAmmoType)))) and (byte(ammoDelay[0]) = byte(ord(High(TAmmoType)))) and (byte(ammoReinforcement[0]) = byte(ord(High(TAmmoType)))), 'Incomplete or missing ammo scheme set (incompatible frontend or demo/save?)', true);
 
 // FIXME - TEMPORARY hardcoded check on shoppa pending creation of crate *type* probability editor
-substr:= Copy(ammoLoadout,1,15);
-if (substr = '000000990000009') or
-   (substr = '000000990000000') then
-    shoppa:= true;
+substr:= Copy(ammoLoadout,1,39);
+if (substr = '000000990000009000000000000000000000000000') or  // ropes + parachute
+   (substr = '000000900000000000000000000000000000009000') or  // saucer
+   (substr = '000000900000000000000000000000000000000009') or  // portal
+   (substr = '000000990000000000000000000000000000000000')     // ropes
+   then shoppa:= true;
 
 inc(StoreCnt);
 TryDo(StoreCnt <= cMaxHHs, 'Ammo stores overflow', true);
--- a/hedgewars/uTeams.pas	Wed Nov 03 12:28:44 2010 -0400
+++ b/hedgewars/uTeams.pas	Wed Nov 03 13:00:17 2010 -0400
@@ -397,8 +397,8 @@
                 inc(th, Hedgehogs[0].Gear^.Health);
                 if th > MaxTeamHealth then MaxTeamHealth:= th
                 end
-            else Hedgehogs[0].Gear^.Health:= h
-            Hedgehogs[0].InitialHealth:= Hedgehogs[0].Gear^.Health;
+            else Hedgehogs[0].Gear^.Health:= h;
+            Hedgehogs[0].InitialHealth:= Hedgehogs[0].Gear^.Health
             end;
         end;