CBA_A3 icon indicating copy to clipboard operation
CBA_A3 copied to clipboard

Common - Fix `CBA_missionTime` in long missions (above 7 days)

Open commy2 opened this issue 4 years ago • 5 comments

When merged this pull request will:

  • alt #1320

I have no tested this yet, so there may be typos. It should all be as simple as this though, unless I am missing something.

commy2 avatar Apr 07 '20 13:04 commy2

Definitely this PR simplify the CBA_missionTime update and resolve CBA_missionTime being stuck due to tiny add of value to a big number.

But, I feel it missing the opportunity to give support to do addition/subtraction/comparison of two big number without lost of precision or unintended results. I prefer the vector representation of the time for precision (math operation give us the necessary to deal with) and the classic number representation for backward compatibility. Also this representation give the possibility for mod to choose the time representation they need.

Vdauphin avatar Apr 07 '20 16:04 Vdauphin

@Vdauphin

        _elapsedTime = my_oldTimeString call CBA_fnc_missionTimeDelta;

        _deltaTime = [my_oldTimeString, my_newTimeString] call CBA_fnc_missionTimeDelta;

        _missionTime = [] call CBA_fnc_missionTimeDelta;

commy2 avatar May 31 '20 07:05 commy2

Nice! Do you plan to migrate CBA_fnc_waitAndExecute and PFH to this?

Vdauphin avatar May 31 '20 07:05 Vdauphin

WAE and WUAE sure, but PFH uses tickTime, not missionTime (does not suspend or accelerate in SP, starts from game start, not mission start, is not synchronized).

commy2 avatar May 31 '20 07:05 commy2

Status?

jonpas avatar Jul 23 '21 13:07 jonpas