Rate limit stuckage RNG for skedar doors

Limits calculation to 15 times per second, close to that to how fast this would execute on original hardware
This commit is contained in:
tmyqlfpir 2023-08-20 21:38:38 +10:00 committed by GitHub
parent 7e26e6eac0
commit 920c0eada5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -20056,7 +20056,12 @@ bool doorCalcIntendedFrac(struct doorobj *door)
if (door->base.flags3 & OBJFLAG3_DOOR_STICKY) {
s32 value = (random() % 64) + 30;
#ifndef PLATFORM_N64 // emulate low fps cal rate for stackage test
if (((g_Vars.lvframenum % value) == 0)
&& ((g_Vars.lvframe60 & 3) == 0)) {
#else
if ((g_Vars.lvframenum % value) == 0) {
#endif
bool dothething = false;
struct doorobj *loopdoor;