Fix some problems with water rising
authorunc0rr
Sun, 26 Oct 2008 14:37:50 +0000
changeset 1417 210cb6b1b275
parent 1416 60b86d6fe9ae
child 1418 69df8f2a7cba
Fix some problems with water rising
hedgewars/GSHandlers.inc
--- a/hedgewars/GSHandlers.inc	Sun Oct 26 14:28:49 2008 +0000
+++ b/hedgewars/GSHandlers.inc	Sun Oct 26 14:37:50 2008 +0000
@@ -496,7 +496,7 @@
 	begin
 	Gear^.dY:= Gear^.dY + cGravity;
 	Gear^.Y:= Gear^.Y + Gear^.dY;
-	if Gear^.Y > _1024 then Gear^.Timer:= 1
+	if hwRound(Gear^.Y) > cWaterLine then Gear^.Timer:= 1
 	end;
 
 Gear^.X:= Gear^.X + HHGear^.dX;
@@ -1092,7 +1092,7 @@
 	Gear^.X:= Gear^.X + Gear^.dX;
 	Gear^.Y:= Gear^.Y + Gear^.dY;
 	
-	if not (Gear^.Y < _1024) then
+	if not (hwRound(Gear^.Y) < cWaterLine) then
 		begin
 		DeleteGear(Gear);
 		exit