Ace3: ACE Refueling continues while the game is paused

Created on 16 Jul 2016  路  6Comments  路  Source: acemod/ACE3

Arma 3 Version: 1.62 (stable)
CBA Version: 3.0.0 (stable)
ACE3 Version: 3.6.2 (stable)

Mods:

  • @CBA_A3
  • @ace

Description:

  • Refueling does not take game time into account. Refueling continues while the game is paused, and does not speed up if time acceleration is changed.

Steps to reproduce:

  • Place down an empty Littlebird in the editor with no fuel
  • Place down a refuel HEMTT next to it
  • Connect the HEMTT fuel hose to the Littlebird

Where did the issue occur?

  • Editor (Singleplayer)

Placed Modules:

  • 'None'
kinbug

Most helpful comment

In my opinion we should just make CBA_fnc_addPerFrameHandler respect CBA_missionTime.

Sounds like a bad idea to me. The PFH interval is just a performance optimization; PFH are not guaranteed to tick at the required interval either due to e.g. frame rate drops.

Refueling uses the PFH interval to determine rate instead of doing CBA_missionTime - oldCBA_missionTime, which is how it should be coded IMO.

All 6 comments

Note:
Something I had to be careful about in the cookoff / incendiary grenade branches:
CBA_fnc_waitAndExecute is based on the CBA_missionTime, which does not advance while the game is paused, and is accelerated when the game is sped up.
CBA_fnc_addPerFrameHandler is based on the diag_tickTime alone (although it is reset when a mission is reloaded).

Is that something we can fix @commy2 ? I don't think it's a big issue and we'd have to rework progressBar to actually fix it, or rather make it compatible with time acceleration and pause.

In my opinion we should just make CBA_fnc_addPerFrameHandler respect CBA_missionTime.

@jonpas The progress bars currently work fine with time acceleration and pausing.

But I do not believe this bug to be related to progress bars anyway because when you start refueling, it's done passively without any player interaction. The bug should be solely within this function.

In my opinion we should just make CBA_fnc_addPerFrameHandler respect CBA_missionTime.

Sounds like a bad idea to me. The PFH interval is just a performance optimization; PFH are not guaranteed to tick at the required interval either due to e.g. frame rate drops.

Refueling uses the PFH interval to determine rate instead of doing CBA_missionTime - oldCBA_missionTime, which is how it should be coded IMO.

^ that's what I ended up doing and what we do everywhere else.

Was this page helpful?
0 / 5 - 0 ratings