hedgewars/uGearsHedgehog.pas
branchwebgl
changeset 8018 091293bc974f
parent 8003 7d8bce524daf
child 8026 4a4f21070479
child 8030 165aeaaaf445
equal deleted inserted replaced
8008:2ed42786aca7 8018:091293bc974f
   969             isCursorVisible:= false
   969             isCursorVisible:= false
   970     end;
   970     end;
   971 if (not isZero(Gear^.dY)) and (Gear^.FlightTime > 0) and ((GameFlags and gfLowGravity) = 0) then
   971 if (not isZero(Gear^.dY)) and (Gear^.FlightTime > 0) and ((GameFlags and gfLowGravity) = 0) then
   972     begin
   972     begin
   973     inc(Gear^.FlightTime);
   973     inc(Gear^.FlightTime);
   974     if (Gear^.FlightTime > 1500) and ((hwRound(Gear^.X) < leftX-250) or (hwRound(Gear^.X) > rightX+250))  then
   974     if (Gear^.FlightTime > 1500) and ((hwRound(Gear^.X) < LongInt(leftX)-250) or (hwRound(Gear^.X) > LongInt(rightX)+250))  then
   975         begin
   975         begin
   976         Gear^.FlightTime:= 0;
   976         Gear^.FlightTime:= 0;
   977         AddCaption(GetEventString(eidHomerun), cWhiteColor, capgrpMessage);
   977         AddCaption(GetEventString(eidHomerun), cWhiteColor, capgrpMessage);
   978         PlaySound(sndHomerun)
   978         PlaySound(sndHomerun)
   979         end;
   979         end;
  1058             Attack(HHGear);
  1058             Attack(HHGear);
  1059             HHGear^.Message:= HHGear^.Message and (not gmLJump)
  1059             HHGear^.Message:= HHGear^.Message and (not gmLJump)
  1060             end;
  1060             end;
  1061 
  1061 
  1062 if (CurAmmoGear = nil)
  1062 if (CurAmmoGear = nil)
  1063 or ((Ammoz[CurAmmoGear^.AmmoType].Ammo.Propz and ammoprop_AltAttack) <> 0) 
  1063 or ((Ammoz[CurAmmoGear^.AmmoType].Ammo.Propz and ammoprop_AltAttack) <> 0)  then
  1064 or ((Ammoz[CurAmmoGear^.AmmoType].Ammo.Propz and ammoprop_NoRoundEnd) <> 0) then
       
  1065     begin
  1064     begin
  1066     if ((HHGear^.Message and gmSlot) <> 0) then
  1065     if ((HHGear^.Message and gmSlot) <> 0) then
  1067         if ChangeAmmo(HHGear) then ApplyAmmoChanges(Hedgehog^);
  1066         if ChangeAmmo(HHGear) then ApplyAmmoChanges(Hedgehog^);
  1068 
  1067 
  1069     if ((HHGear^.Message and gmWeapon) <> 0) then
  1068     if ((HHGear^.Message and gmWeapon) <> 0) then