hedgewars/GSHandlers.inc
changeset 2033 860b9aea5e86
parent 2031 b6f3e56fb100
child 2042 905c554d62e6
equal deleted inserted replaced
2032:29ee410071b9 2033:860b9aea5e86
   484 if (Gear^.Health <= 0)
   484 if (Gear^.Health <= 0)
   485 	or (hwRound(Gear^.X) and LAND_WIDTH_MASK <> 0)
   485 	or (hwRound(Gear^.X) and LAND_WIDTH_MASK <> 0)
   486 	or (hwRound(Gear^.Y) and LAND_HEIGHT_MASK <> 0) then
   486 	or (hwRound(Gear^.Y) and LAND_HEIGHT_MASK <> 0) then
   487     begin
   487     begin
   488     if (GameFlags and gfLaserSight) = 0 then cLaserSighting:= false;
   488     if (GameFlags and gfLaserSight) = 0 then cLaserSighting:= false;
   489     if (Gear^.Ammo^.NumPerTurn < CurrentHedgehog^.AttacksNum) and
   489     if (Gear^.Ammo^.NumPerTurn <= CurrentHedgehog^.AttacksNum) and
   490        ((GameFlags and gfArtillery) = 0) then cArtillery:= false;
   490        ((GameFlags and gfArtillery) = 0) then cArtillery:= false;
   491 	Gear^.doStep:= @doStepShotIdle
   491 	Gear^.doStep:= @doStepShotIdle
   492     end;
   492     end;
   493 end;
   493 end;
   494 
   494 
   502 var HHGear: PGear;
   502 var HHGear: PGear;
   503 begin
   503 begin
   504 cArtillery:= true;
   504 cArtillery:= true;
   505 HHGear:=PHedgehog(Gear^.Hedgehog)^.Gear;
   505 HHGear:=PHedgehog(Gear^.Hedgehog)^.Gear;
   506 HHGear^.State:= HHGear^.State or gstNotKickable;
   506 HHGear^.State:= HHGear^.State or gstNotKickable;
       
   507 HedgehogChAngle(HHGear);
   507 if not cLaserSighting then // game doesn't have default laser sight. turn it on and give them a chance to aim
   508 if not cLaserSighting then // game doesn't have default laser sight. turn it on and give them a chance to aim
   508     begin
   509     begin
   509     cLaserSighting:= true;
   510     cLaserSighting:= true;
   510     HHGear^.Message:= 0;
   511     HHGear^.Message:= 0;
   511     dec(HHGear^.Angle,32)
   512     dec(HHGear^.Angle,32)