CON: Add EVENT_PRELOADGAME and EVENT_POSTLOADGAME.

git-svn-id: https://svn.eduke32.com/eduke32@6262 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2017-06-24 09:21:07 +00:00
parent df317aa741
commit 7afc8202d2
3 changed files with 8 additions and 0 deletions

View file

@ -123,6 +123,8 @@ enum GameEvent_t {
EVENT_MOVESECTOR,
EVENT_MOVEEFFECTORS,
EVENT_DISPLAYOVERHEADMAPTEXT,
EVENT_PRELOADGAME,
EVENT_POSTSAVEGAME,
#ifdef LUNATIC
EVENT_ANIMATEALLSPRITES,
#endif

View file

@ -702,6 +702,8 @@ const char *EventNames[MAXEVENTS] =
"EVENT_MOVESECTOR",
"EVENT_MOVEEFFECTORS",
"EVENT_DISPLAYOVERHEADMAPTEXT",
"EVENT_PRELOADGAME",
"EVENT_POSTSAVEGAME",
#ifdef LUNATIC
"EVENT_ANIMATEALLSPRITES",
#endif

View file

@ -262,6 +262,8 @@ int32_t G_LoadPlayer(int32_t spot)
return 1;
}
VM_OnEvent(EVENT_PRELOADGAME, g_player[myconnectindex].ps->i, myconnectindex);
// some setup first
ud.multimode = h.numplayers;
@ -459,6 +461,8 @@ int32_t G_SavePlayer(int32_t spot)
G_RestoreTimers();
ototalclock = totalclock;
VM_OnEvent(EVENT_POSTSAVEGAME, g_player[myconnectindex].ps->i, myconnectindex);
return 0;
}