hedgewars/GSHandlers.inc
branchicegun
changeset 8589 3bb505fc707e
parent 8588 47084c6fcb4e
parent 8564 dadfda4ba248
child 8592 bb724ef609db
child 8599 6bd1950de78b
--- a/hedgewars/GSHandlers.inc	Tue Feb 26 20:26:49 2013 -0500
+++ b/hedgewars/GSHandlers.inc	Tue Feb 26 20:37:58 2013 -0500
@@ -2878,6 +2878,7 @@
 var 
     t: PGearArray;
     ox, oy: hwFloat;
+    tempColl: Word; 
 begin
     AllInactive := false;
 
@@ -2896,11 +2897,12 @@
             exit
         end
     end;
-
-    if GameTicks > Gear^.FlightTime then
+    tempColl:= Gear^.CollisionMask;
+    Gear^.CollisionMask:= $007F;
+    if (TestCollisionYWithGear(Gear, hwSign(Gear^.dY)) <> 0) or TestCollisionXWithGear(Gear, hwSign(Gear^.dX)) or (GameTicks > Gear^.FlightTime) then
         t := CheckGearsCollision(Gear)
-        
     else t := nil;
+    Gear^.CollisionMask:= tempColl;
     //fixes drill not exploding when touching HH bug
     
     if (Gear^.Timer = 0) or ((t <> nil) and (t^.Count <> 0))