mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-11 07:11:39 +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_NEWGAME", EVENT_NEWGAME },
|
||||||
{ "EVENT_SOUND", EVENT_SOUND },
|
{ "EVENT_SOUND", EVENT_SOUND },
|
||||||
{ "EVENT_CHECKTOUCHDAMAGE", EVENT_CHECKTOUCHDAMAGE },
|
{ "EVENT_CHECKTOUCHDAMAGE", EVENT_CHECKTOUCHDAMAGE },
|
||||||
{ "EVENT_CHECKFLOORDAMAGE", EVENT_CHECKFLOORDAMAGE }
|
{ "EVENT_CHECKFLOORDAMAGE", EVENT_CHECKFLOORDAMAGE },
|
||||||
|
{ "EVENT_LOADGAME", EVENT_LOADGAME },
|
||||||
|
{ "EVENT_SAVEGAME", EVENT_SAVEGAME }
|
||||||
};
|
};
|
||||||
|
|
||||||
const memberlabel_t SectorLabels[]=
|
const memberlabel_t SectorLabels[]=
|
||||||
|
|
|
@ -121,6 +121,8 @@ enum GameEvent_t {
|
||||||
EVENT_SOUND,
|
EVENT_SOUND,
|
||||||
EVENT_CHECKTOUCHDAMAGE,
|
EVENT_CHECKTOUCHDAMAGE,
|
||||||
EVENT_CHECKFLOORDAMAGE,
|
EVENT_CHECKFLOORDAMAGE,
|
||||||
|
EVENT_LOADGAME,
|
||||||
|
EVENT_SAVEGAME,
|
||||||
MAXEVENTS
|
MAXEVENTS
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -364,6 +364,8 @@ enum GameEvent_t {
|
||||||
EVENT_SOUND,
|
EVENT_SOUND,
|
||||||
EVENT_CHECKTOUCHDAMAGE,
|
EVENT_CHECKTOUCHDAMAGE,
|
||||||
EVENT_CHECKFLOORDAMAGE,
|
EVENT_CHECKFLOORDAMAGE,
|
||||||
|
EVENT_LOADGAME,
|
||||||
|
EVENT_SAVEGAME,
|
||||||
MAXEVENTS
|
MAXEVENTS
|
||||||
};
|
};
|
||||||
]]
|
]]
|
||||||
|
|
|
@ -1563,7 +1563,7 @@ void G_NewGame(int32_t vn,int32_t ln,int32_t sk)
|
||||||
|
|
||||||
display_mirror = 0;
|
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)
|
static void resetpspritevars(char g)
|
||||||
|
|
|
@ -299,6 +299,8 @@ int32_t G_LoadPlayer(int32_t spot)
|
||||||
|
|
||||||
sv_postudload(); // ud.m_XXX = ud.XXX
|
sv_postudload(); // ud.m_XXX = ud.XXX
|
||||||
|
|
||||||
|
VM_OnEvent(EVENT_LOADGAME, g_player[myconnectindex].ps->i, myconnectindex, -1, 0);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -342,6 +344,8 @@ int32_t G_SavePlayer(int32_t spot)
|
||||||
polymer_resetlights();
|
polymer_resetlights();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
VM_OnEvent(EVENT_SAVEGAME, g_player[myconnectindex].ps->i, myconnectindex, -1, 0);
|
||||||
|
|
||||||
// SAVE!
|
// SAVE!
|
||||||
sv_saveandmakesnapshot(fil, spot, 0, 0, 0);
|
sv_saveandmakesnapshot(fil, spot, 0, 0, 0);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue