hedgewars/uGearsHandlersMess.pas
changeset 12306 cdd884397760
parent 12300 6486a012987e
child 12377 efa13b925cd8
equal deleted inserted replaced
12305:d3a52e51efd4 12306:cdd884397760
  1314 
  1314 
  1315     if (Gear^.Health <= 0)
  1315     if (Gear^.Health <= 0)
  1316         or (hwRound(Gear^.X) and LAND_WIDTH_MASK <> 0)
  1316         or (hwRound(Gear^.X) and LAND_WIDTH_MASK <> 0)
  1317         or (hwRound(Gear^.Y) and LAND_HEIGHT_MASK <> 0) then
  1317         or (hwRound(Gear^.Y) and LAND_HEIGHT_MASK <> 0) then
  1318             begin
  1318             begin
  1319             if (Gear^.Kind = gtSniperRifleShot) and ((GameFlags and gfLaserSight) = 0) then
  1319             if (Gear^.Kind = gtSniperRifleShot) then
  1320                 cLaserSighting := false;
  1320                 cLaserSightingSniper := false;
  1321             if (Ammoz[Gear^.AmmoType].Ammo.NumPerTurn <= CurrentHedgehog^.MultiShootAttacks) and ((GameFlags and gfArtillery) = 0) then
  1321             if (Ammoz[Gear^.AmmoType].Ammo.NumPerTurn <= CurrentHedgehog^.MultiShootAttacks) and ((GameFlags and gfArtillery) = 0) then
  1322                 cArtillery := false;
  1322                 cArtillery := false;
  1323 
  1323 
  1324         // Bullet Hit
  1324         // Bullet Hit
  1325             if ((Gear^.State and gstDrowning) = 0) and (hwRound(Gear^.X) and LAND_WIDTH_MASK = 0) and (hwRound(Gear^.Y) and LAND_HEIGHT_MASK = 0) then
  1325             if ((Gear^.State and gstDrowning) = 0) and (hwRound(Gear^.X) and LAND_WIDTH_MASK = 0) and (hwRound(Gear^.Y) and LAND_HEIGHT_MASK = 0) then
  1368     // remember who fired this
  1368     // remember who fired this
  1369     Gear^.Data:= Pointer(Gear^.Hedgehog^.Gear);
  1369     Gear^.Data:= Pointer(Gear^.Hedgehog^.Gear);
  1370 
  1370 
  1371     HHGear^.State := HHGear^.State or gstNotKickable;
  1371     HHGear^.State := HHGear^.State or gstNotKickable;
  1372     HedgehogChAngle(HHGear);
  1372     HedgehogChAngle(HHGear);
  1373     if not cLaserSighting then
  1373     if cLaserSightingSniper = false then
  1374         // game does not have default laser sight. turn it on and give them a chance to aim
  1374         // Turn sniper's laser sight on and give it a chance to aim
  1375         begin
  1375         begin
  1376         cLaserSighting := true;
  1376         cLaserSightingSniper := true;
  1377         HHGear^.Message := 0;
  1377         HHGear^.Message := 0;
  1378         if (HHGear^.Angle >= 32) then
  1378         if (HHGear^.Angle >= 32) then
  1379             dec(HHGear^.Angle,32)
  1379             dec(HHGear^.Angle,32)
  1380         end;
  1380         end;
  1381 
  1381