hedgewars/uGears.pas
changeset 3730 aecea9aa53dc
parent 3720 b2b108a6fae8
child 3734 304a83637eb4
--- a/hedgewars/uGears.pas	Fri Aug 06 11:53:28 2010 +0200
+++ b/hedgewars/uGears.pas	Sat Aug 07 01:45:31 2010 +0200
@@ -81,6 +81,7 @@
 procedure initModule;
 procedure freeModule;
 function  AddGear(X, Y: LongInt; Kind: TGearType; State: Longword; dX, dY: hwFloat; Timer: LongWord): PGear;
+procedure SpawnHealthCrate(x, y: LongInt);
 procedure ProcessGears;
 procedure EndTurnCleanup;
 procedure ApplyDamage(Gear: PGear; Damage: Longword; Source: TDamageSource);
@@ -1538,6 +1539,14 @@
 CountGears:= count;
 end;
 
+procedure SpawnHealthCrate(x, y: LongInt);
+begin
+    FollowGear:= AddGear(x, y, gtCase, 0, _0, _0, 0);
+    FollowGear^.Health:= 25;
+    FollowGear^.Pos:= posCaseHealth;
+    AddCaption(GetEventString(eidNewHealthPack), cWhiteColor, capgrpAmmoInfo);
+end;
+
 procedure SpawnBoxOfSmth;
 var t, aTot, uTot, a, h: LongInt;
     i: TAmmoType;