mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-11 18:50:46 +00:00
Add EVENT_LOADGAME and EVENT_SAVEGAME, self-explanatory. Also make EVENT_NEWGAME use myconnectindex for player ID instead of screenpeek.
git-svn-id: https://svn.eduke32.com/eduke32@2688 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
af511ed275
commit
7f920c5541
5 changed files with 12 additions and 2 deletions
|
@ -663,7 +663,9 @@ const tokenlist EventNames[MAXEVENTS] =
|
|||
{ "EVENT_NEWGAME", EVENT_NEWGAME },
|
||||
{ "EVENT_SOUND", EVENT_SOUND },
|
||||
{ "EVENT_CHECKTOUCHDAMAGE", EVENT_CHECKTOUCHDAMAGE },
|
||||
{ "EVENT_CHECKFLOORDAMAGE", EVENT_CHECKFLOORDAMAGE }
|
||||
{ "EVENT_CHECKFLOORDAMAGE", EVENT_CHECKFLOORDAMAGE },
|
||||
{ "EVENT_LOADGAME", EVENT_LOADGAME },
|
||||
{ "EVENT_SAVEGAME", EVENT_SAVEGAME }
|
||||
};
|
||||
|
||||
const memberlabel_t SectorLabels[]=
|
||||
|
|
|
@ -121,6 +121,8 @@ enum GameEvent_t {
|
|||
EVENT_SOUND,
|
||||
EVENT_CHECKTOUCHDAMAGE,
|
||||
EVENT_CHECKFLOORDAMAGE,
|
||||
EVENT_LOADGAME,
|
||||
EVENT_SAVEGAME,
|
||||
MAXEVENTS
|
||||
};
|
||||
|
||||
|
|
|
@ -364,6 +364,8 @@ enum GameEvent_t {
|
|||
EVENT_SOUND,
|
||||
EVENT_CHECKTOUCHDAMAGE,
|
||||
EVENT_CHECKFLOORDAMAGE,
|
||||
EVENT_LOADGAME,
|
||||
EVENT_SAVEGAME,
|
||||
MAXEVENTS
|
||||
};
|
||||
]]
|
||||
|
|
|
@ -1563,7 +1563,7 @@ void G_NewGame(int32_t vn,int32_t ln,int32_t sk)
|
|||
|
||||
display_mirror = 0;
|
||||
|
||||
VM_OnEvent(EVENT_NEWGAME, g_player[screenpeek].ps->i, screenpeek, -1, 0);
|
||||
VM_OnEvent(EVENT_NEWGAME, g_player[myconnectindex].ps->i, myconnectindex, -1, 0);
|
||||
}
|
||||
|
||||
static void resetpspritevars(char g)
|
||||
|
|
|
@ -299,6 +299,8 @@ int32_t G_LoadPlayer(int32_t spot)
|
|||
|
||||
sv_postudload(); // ud.m_XXX = ud.XXX
|
||||
|
||||
VM_OnEvent(EVENT_LOADGAME, g_player[myconnectindex].ps->i, myconnectindex, -1, 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -342,6 +344,8 @@ int32_t G_SavePlayer(int32_t spot)
|
|||
polymer_resetlights();
|
||||
#endif
|
||||
|
||||
VM_OnEvent(EVENT_SAVEGAME, g_player[myconnectindex].ps->i, myconnectindex, -1, 0);
|
||||
|
||||
// SAVE!
|
||||
sv_saveandmakesnapshot(fil, spot, 0, 0, 0);
|
||||
|
||||
|
|
Loading…
Reference in a new issue