Remove gstHHDriven flag when hedgehog get into the water. Fixes some odd cases.
authorunc0rr
Thu, 10 Sep 2009 07:48:30 +0000
changeset 2367 86c9aadea817
parent 2366 b38efe489615
child 2368 e0750b23c9e6
Remove gstHHDriven flag when hedgehog get into the water. Fixes some odd cases.
hedgewars/GSHandlers.inc
--- a/hedgewars/GSHandlers.inc	Thu Sep 10 04:36:58 2009 +0000
+++ b/hedgewars/GSHandlers.inc	Thu Sep 10 07:48:30 2009 +0000
@@ -41,7 +41,11 @@
         CheckGearDrowning:= true;
         Gear^.State:= gstDrowning;
         Gear^.doStep:= @doStepDrowningGear;
-		if Gear^.Kind = gtHedgehog then AddCaption(Format(GetEventString(eidDrowned), PHedgehog(Gear^.Hedgehog)^.Name), $FFFFFF, capgrpMessage);
+		if Gear^.Kind = gtHedgehog then
+			begin
+			Gear^.State:= Gear^.State and (not gstHHDriven);
+			AddCaption(Format(GetEventString(eidDrowned), PHedgehog(Gear^.Hedgehog)^.Name), $FFFFFF, capgrpMessage);
+			end
         end;
     PlaySound(sndSplash, false, nil)
     end