fix very ancient typo in CheckCollision() that would cause check for collision at bottom and right instead of movement direction
authorsheepluva
Sat, 01 Jan 2011 14:23:39 +0100
changeset 4802 4c1041eef577
parent 4801 c0d3c2f5e952
child 4803 eddea6bca770
fix very ancient typo in CheckCollision() that would cause check for collision at bottom and right instead of movement direction
hedgewars/GSHandlers.inc
--- a/hedgewars/GSHandlers.inc	Sat Jan 01 14:18:33 2011 +0100
+++ b/hedgewars/GSHandlers.inc	Sat Jan 01 14:23:39 2011 +0100
@@ -176,7 +176,7 @@
 
 procedure CheckCollision(Gear: PGear); inline;
 begin
-    if TestCollisionXwithGear(Gear, hwSign(Gear^.X)) or TestCollisionYwithGear(Gear, hwSign(Gear^.Y)
+    if TestCollisionXwithGear(Gear, hwSign(Gear^.dX)) or TestCollisionYwithGear(Gear, hwSign(Gear^.dY)
        )
         then Gear^.State := Gear^.State or      gstCollision
     else Gear^.State := Gear^.State and not gstCollision
@@ -184,7 +184,7 @@
 
 procedure CheckCollisionWithLand(Gear: PGear); inline;
 begin
-    if TestCollisionX(Gear, hwSign(Gear^.X)) or TestCollisionY(Gear, hwSign(Gear^.Y)
+    if TestCollisionX(Gear, hwSign(Gear^.dX)) or TestCollisionY(Gear, hwSign(Gear^.dY)
        )
         then Gear^.State := Gear^.State or      gstCollision
     else Gear^.State := Gear^.State and not gstCollision