port: make autoguns fire only on even frames at 60+ fps

This commit is contained in:
fgsfds committed 2023-11-12 16:09:58 +01:00
1 parent ef511d5889
commit 28b172f5c7
1 file changed
+6
+6
View File
@@ -9002,6 +9002,12 @@ void autogunInitMatrices(struct prop *prop, Mtxf *mtx)
void autogunTickShoot(struct prop *autogunprop)
{
#ifndef PLATFORM_N64
// HACK: fire every other tick at 60+ fps and every tick at <60 fps
if (g_Vars.lvupdate240 <= TICKS(4) && (g_Vars.lvframe60 & 1)) {
return;
}
#endif
if (!lvIsPaused()) {
struct autogunobj *autogun = (struct autogunobj *) autogunprop->obj;
struct defaultobj *obj = autogunprop->obj;