neglected test on sniper rifle being active
authornemo
Fri, 22 May 2009 02:01:45 +0000
changeset 2087 79472a9be025
parent 2086 5e477053e849
child 2088 09cfff5c63ea
neglected test on sniper rifle being active
hedgewars/GSHandlers.inc
--- a/hedgewars/GSHandlers.inc	Thu May 21 19:42:37 2009 +0000
+++ b/hedgewars/GSHandlers.inc	Fri May 22 02:01:45 2009 +0000
@@ -447,7 +447,7 @@
 	or (hwRound(Gear^.X) and LAND_WIDTH_MASK <> 0)
 	or (hwRound(Gear^.Y) and LAND_HEIGHT_MASK <> 0) then
     begin
-    if (GameFlags and gfLaserSight) = 0 then cLaserSighting:= false;
+    if (Gear^.Kind = gtSniperRifleShot) and ((GameFlags and gfLaserSight) = 0) then cLaserSighting:= false;
     if (Gear^.Ammo^.NumPerTurn <= CurrentHedgehog^.AttacksNum) and
        ((GameFlags and gfArtillery) = 0) then cArtillery:= false;
 	Gear^.doStep:= @doStepShotIdle