acemod / ACE3

Open-source realism mod for Arma 3
https://ace3.acemod.org
Other
995 stars 735 forks source link

ACE Refueling continues while the game is paused #4128

Closed Tenga closed 8 years ago

Tenga commented 8 years ago

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

Mods:

Description:

Steps to reproduce:

Where did the issue occur?

Placed Modules:

commy2 commented 8 years ago

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).

jonpas commented 8 years ago

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.

commy2 commented 8 years ago

In my opinion we should just make CBA_fnc_addPerFrameHandler respect CBA_missionTime.

Tenga commented 8 years ago

@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.

nicolasbadano commented 8 years ago

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.

commy2 commented 8 years ago

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