OldUnreal / UnrealTournamentPatches

Other
1.03k stars 29 forks source link

[469b] SniperRifle continue increase zoom after release alt fire #248

Closed SeriousBuggie closed 3 years ago

SeriousBuggie commented 3 years ago

Reproduce:

  1. Start any map in the practice mode.
  2. Type in console loaded, slomo .1
  3. Switch to the sniper rifle.
  4. Press and hold alt fire.
  5. Press and release primary fire.
  6. Release alt fire.

Expected result: Zoom stop after release alt fire. Actual result: Zoom continue increase until to end.

SeriousBuggie commented 3 years ago

For fix replace at https://github.com/Slipyx/UT99/blob/f2ebd703845075a2d667e8e3f2f71a5e7f187610/Botpack/SniperRifle.uc#L171

state NormalFire
{

to

state NormalFire
{
    simulated function Tick(float DeltaTime)
    {
        Global.Tick(DeltaTime);
        if ( Pawn(Owner).bAltFire == 0 )
        {
            if ( (PlayerPawn(Owner) != None) && PlayerPawn(Owner).Player.IsA('ViewPort') )
                PlayerPawn(Owner).StopZoom();
        }
    }