Fallout 2 mod Fallout Sonora 1.15 and Sonora Dayglow 1.15 Vanilla Translation

Negative ticks... is this an issue in Fallout.exe? I wonder if the same stands for Fallout2-CE, as it has SDL under the hood. Any more detail here?
The game tick is a 32bit integer, so after 2485 in-game days (~6.8 years) the tick goes into negative range (> 0x7FFFFFFF) until -1 (0xFFFFFFFF).
That's why there's the 13 years hard limit in the engine, to force-end the game before the tick hits -1 (causing lockup).

For shop restocking issue, UPU/RPU use an additional LVAR in a one-time correction macro and call it in map_enter_p_proc.
But since CE has implemented the "div" unsigned division operator from sfall, you can simply utilize a procedure to do unsigned comparison, just replace
C-like:
if (local_var(LVAR_Barter_Timer) < game_time)
with
C-like:
if (unsigned_int_compare(local_var(LVAR_Barter_Timer), game_time) < 0)
in Sonora's CRITTERS.H.
 
Fallout2-CE is using SDL_getticks, I think it is unsigned, so there can't be negative ticks. I haven't looked into this before, so I am wondering how it would play out currently, in Fallout2CE. This seems like something that would be better to fix in the engine, than through script handling. Still, never looked into this issue at all, so I have to defer to your knowledge.
 
Back
Top