232 if (CurAmmoGear <> nil) |
232 if (CurAmmoGear <> nil) |
233 and ((Ammoz[CurAmmoGear^.AmmoType].Ammo.Propz and ammoprop_AltAttack) <> 0) |
233 and ((Ammoz[CurAmmoGear^.AmmoType].Ammo.Propz and ammoprop_AltAttack) <> 0) |
234 and ((Gear^.Message and gmLJump) <> 0) |
234 and ((Gear^.Message and gmLJump) <> 0) |
235 and ((Ammoz[CurAmmoType].Ammo.Propz and ammoprop_AltUse) <> 0) then |
235 and ((Ammoz[CurAmmoType].Ammo.Propz and ammoprop_AltUse) <> 0) then |
236 begin |
236 begin |
237 newDx:= dX / CurAmmoGear^.stepFreq; |
237 newDx:= dX; |
238 newDy:= dY / CurAmmoGear^.stepFreq; |
238 newDy:= dY; |
239 altUse:= true |
239 altUse:= true |
240 end |
240 end |
241 else |
241 else |
242 begin |
242 begin |
243 newDx:= xx*Power/cPowerDivisor; |
243 newDx:= xx*Power/cPowerDivisor; |
355 end; |
355 end; |
356 amStructure: newGear:= AddGear(hwRound(lx) + hwSign(dX) * 7, hwRound(ly), gtStructure, gstWait, SignAs(_0_02, dX), _0, 3000); |
356 amStructure: newGear:= AddGear(hwRound(lx) + hwSign(dX) * 7, hwRound(ly), gtStructure, gstWait, SignAs(_0_02, dX), _0, 3000); |
357 amTardis: newGear:= AddGear(hwRound(X), hwRound(Y), gtTardis, 0, _0, _0, 5000); |
357 amTardis: newGear:= AddGear(hwRound(X), hwRound(Y), gtTardis, 0, _0, _0, 5000); |
358 amIceGun: newGear:= AddGear(hwRound(X), hwRound(Y), gtIceGun, 0, _0, _0, 0); |
358 amIceGun: newGear:= AddGear(hwRound(X), hwRound(Y), gtIceGun, 0, _0, _0, 0); |
359 end; |
359 end; |
360 if altUse then |
360 if altUse and (newGear <> nil) then |
361 begin |
361 begin |
362 newGear^.dX:= newDx / newGear^.Density; |
362 newGear^.dX:= newDx / newGear^.Density; |
363 newGear^.dY:= newDY / newGear^.Density |
363 newGear^.dY:= newDY / newGear^.Density |
364 end; |
364 end; |
365 |
365 |
1012 // hide target cursor if current hog is drowning |
1011 // hide target cursor if current hog is drowning |
1013 if (Gear^.State and gstDrowning) <> 0 then |
1012 if (Gear^.State and gstDrowning) <> 0 then |
1014 if (CurrentHedgehog^.Gear = Gear) then |
1013 if (CurrentHedgehog^.Gear = Gear) then |
1015 isCursorVisible:= false |
1014 isCursorVisible:= false |
1016 end; |
1015 end; |
1017 |
1016 // IMO this should trigger homerun based on leftX/rightX + someval instead - that is 'knocking it out of the park' |
1018 if (hwAbs(Gear^.dY) > _0) and (Gear^.FlightTime > 0) and ((GameFlags and gfLowGravity) = 0) then |
1017 if (not isZero(Gear^.dY)) and (Gear^.FlightTime > 0) and ((GameFlags and gfLowGravity) = 0) then |
1019 begin |
1018 begin |
1020 inc(Gear^.FlightTime); |
1019 inc(Gear^.FlightTime); |
1021 if Gear^.FlightTime = 3000 then |
1020 if Gear^.FlightTime = 3000 then |
1022 begin |
1021 begin |
1023 AddCaption(GetEventString(eidHomerun), cWhiteColor, capgrpMessage); |
1022 AddCaption(GetEventString(eidHomerun), cWhiteColor, capgrpMessage); |