Use default argument values of -1 for the sprite and player indexes passed to VM_OnEvent()

git-svn-id: https://svn.eduke32.com/eduke32@7721 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2019-06-25 11:30:17 +00:00 committed by Christoph Oelckers
parent 1e0dd0e534
commit a7d4df8072
4 changed files with 8 additions and 8 deletions

View file

@ -8455,7 +8455,7 @@ void G_MoveWorld(void)
extern double g_moveActorsTime, g_moveWorldTime;
const double worldTime = timerGetHiTicks();
VM_OnEvent(EVENT_PREWORLD, -1, -1);
VM_OnEvent(EVENT_PREWORLD);
G_DoEventGame(EVENT_PREGAME);
@ -8480,7 +8480,7 @@ void G_MoveWorld(void)
G_MoveStandables(); //ST 6
VM_OnEvent(EVENT_WORLD, -1, -1);
VM_OnEvent(EVENT_WORLD);
G_DoEventGame(EVENT_GAME);

View file

@ -4402,7 +4402,7 @@ skip:
}
#ifdef LUNATIC
VM_OnEvent(EVENT_ANIMATEALLSPRITES, -1, -1);
VM_OnEvent(EVENT_ANIMATEALLSPRITES);
#endif
#ifdef DEBUGGINGAIDS
g_spriteStat.numonscreen = spritesortcnt;
@ -5695,7 +5695,7 @@ static void G_CompileScripts(void)
Bmemset(sector, 0, MAXSECTORS*sizeof(sectortype));
Bmemset(wall, 0, MAXWALLS*sizeof(walltype));
VM_OnEvent(EVENT_INIT, -1, -1);
VM_OnEvent(EVENT_INIT);
pathsearchmode = psm;
#endif
}
@ -5871,7 +5871,7 @@ static void G_Startup(void)
#ifdef LUNATIC
// NOTE: This is only effective for CON-defined EVENT_INIT. See EVENT_INIT
// not in _defs_game.lua.
VM_OnEvent(EVENT_INIT, -1, -1);
VM_OnEvent(EVENT_INIT);
#endif
if (g_netServer || ud.multimode > 1) G_CheckGametype();

View file

@ -56,7 +56,7 @@ static FORCE_INLINE int32_t VM_OnEvent(int nEventID, int spriteNum, int playerNu
return VM_HaveEvent(nEventID) ? VM_ExecuteEvent(nEventID, spriteNum, playerNum, nDist) : 0;
}
static FORCE_INLINE int32_t VM_OnEvent(int nEventID, int spriteNum, int playerNum)
static FORCE_INLINE int32_t VM_OnEvent(int nEventID, int spriteNum = -1, int playerNum = -1)
{
return VM_HaveEvent(nEventID) ? VM_ExecuteEvent(nEventID, spriteNum, playerNum) : 0;
}

View file

@ -1282,7 +1282,7 @@ static void prelevel(int g)
P_PrepForNewLevel(0, g);
G_SetupGlobalPsky();
VM_OnEvent(EVENT_PRELEVEL, -1, -1);
VM_OnEvent(EVENT_PRELEVEL);
int missedCloudSectors = 0;
@ -1334,7 +1334,7 @@ static void prelevel(int g)
#if !defined LUNATIC
A_LoadActor(i);
#endif
VM_OnEvent(EVENT_LOADACTOR, i, -1);
VM_OnEvent(EVENT_LOADACTOR, i);
A_MaybeProcessEffector(i);
}