equal
deleted
inserted
replaced
320 procedure ApplyAngleBounds(var Hedgehog: THedgehog; AmmoType: TAmmoType); |
320 procedure ApplyAngleBounds(var Hedgehog: THedgehog; AmmoType: TAmmoType); |
321 begin |
321 begin |
322 if Hedgehog.Gear <> nil then |
322 if Hedgehog.Gear <> nil then |
323 with Hedgehog do |
323 with Hedgehog do |
324 begin |
324 begin |
325 CurMinAngle:= Ammoz[AmmoType].minAngle; |
325 if (AmmoType <> amNothing) then |
326 if Ammoz[AmmoType].maxAngle <> 0 then |
326 begin |
327 CurMaxAngle:= Ammoz[AmmoType].maxAngle |
327 CurMinAngle:= Ammoz[AmmoType].minAngle; |
328 else |
328 if Ammoz[AmmoType].maxAngle <> 0 then |
329 CurMaxAngle:= cMaxAngle; |
329 CurMaxAngle:= Ammoz[AmmoType].maxAngle |
330 |
330 else |
331 with Hedgehog.Gear^ do |
331 CurMaxAngle:= cMaxAngle; |
332 begin |
332 |
333 if Angle < CurMinAngle then |
333 with Hedgehog.Gear^ do |
334 Angle:= CurMinAngle; |
334 begin |
335 if Angle > CurMaxAngle then |
335 if Angle < CurMinAngle then |
336 Angle:= CurMaxAngle; |
336 Angle:= CurMinAngle; |
|
337 if Angle > CurMaxAngle then |
|
338 Angle:= CurMaxAngle; |
|
339 end |
337 end |
340 end |
338 end |
341 end |
339 end; |
342 end; |
340 |
343 |
341 procedure SwitchToFirstLegalAmmo(var Hedgehog: THedgehog); |
344 procedure SwitchToFirstLegalAmmo(var Hedgehog: THedgehog); |
507 RegisterVariable('ammdelay', @SetAmmoDelay, false); |
510 RegisterVariable('ammdelay', @SetAmmoDelay, false); |
508 RegisterVariable('ammprob', @SetAmmoProbability, false); |
511 RegisterVariable('ammprob', @SetAmmoProbability, false); |
509 RegisterVariable('ammreinf', @SetAmmoReinforcement, false); |
512 RegisterVariable('ammreinf', @SetAmmoReinforcement, false); |
510 RegisterVariable('ammstore', @chAddAmmoStore , false); |
513 RegisterVariable('ammstore', @chAddAmmoStore , false); |
511 |
514 |
|
515 CurMinAngle:= 0; |
|
516 CurMaxAngle:= cMaxAngle; |
512 StoreCnt:= 0; |
517 StoreCnt:= 0; |
513 ammoLoadout:= ''; |
518 ammoLoadout:= ''; |
514 ammoProbability:= ''; |
519 ammoProbability:= ''; |
515 ammoDelay:= ''; |
520 ammoDelay:= ''; |
516 ammoReinforcement:= ''; |
521 ammoReinforcement:= ''; |