Page MenuHomePhabricator

moveInTurret command makes unit stuck in wrong animation if called after moveOut
New, NormalPublic

Description

The problem exists only in some vehicles with FFV turrets with configured enabledByAnimationSource parameter, e.g. I_Heli_Transport_02_F and O_T_VTOL_02_infantry_dynamicLoadout_F and only when ramp is closed (FFV is disabled then). Also there must be a delay between moveInTurret and moveOut at least for 1 frame.

The problem doesn't happen when:

  • the ramp is opened (FFV is enabled);
  • moveInTurret is called in the same frame as moveOut;
  • moveInTurret is called in some time after moveOut (maybe some frames): with 60fps (VSync) it's 0.2-0.3s.

Details

Severity
Minor
Resolution
Open
Reproducibility
Always
Operating System
Windows 7 x64
Category
Scripting
Steps To Reproduce
  • place player and empty I_Heli_Transport_02_F;
  • get in cargo position;
  • run this code in debug console:
[] spawn {
    sleep 1;
    private _vehicle = vehicle player;
    moveOut player;
    sleep 0.1;
    player moveInTurret [_vehicle, [2]];
}

Watch player is stuck in "jumpy" stance.

If remove sleep 0.1; command or open ramp or increase delay to 0.3 player is correctly moved out and then moved in turret in correct animation.

Repro mission

Additional Information

Event Timeline

Dystopian created this task.Tue, Nov 6, 7:30 PM