hedgewars/GSHandlers.inc
changeset 3419 b66a1b597f88
parent 3417 27ff4a6375dd
child 3422 41ae3c48faa0
--- a/hedgewars/GSHandlers.inc	Tue May 04 15:43:31 2010 +0000
+++ b/hedgewars/GSHandlers.inc	Tue May 04 16:30:41 2010 +0000
@@ -3219,7 +3219,18 @@
     Gear^.dY:= Gear^.dY + cGravity * 3;
     Gear^.Y:= Gear^.Y + Gear^.dY;
     CheckGearDrowning(Gear);
-    ResumeMusic;
+    if (Gear^.State and gstDrowning) <> 0 then
+        begin
+        if CurrentHedgehog^.Gear <> nil then
+            begin
+            // Drown the hedgehog.  Could also just delete it, but hey, this gets a caption
+            CurrentHedgehog^.Gear^.Active:= true;
+            CurrentHedgehog^.Gear^.X:= Gear^.X;
+            CurrentHedgehog^.Gear^.Y:=int2hwFloat(cWaterLine+cVisibleWater)+_128;
+            CurrentHedgehog^.Unplaced:= false
+            end;
+        ResumeMusic
+        end;
     exit
     end;