mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-02-02 20:01:23 +00:00
By request, implement EVENT_ACTIVATECHEAT.
git-svn-id: https://svn.eduke32.com/eduke32@4515 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
45deabc782
commit
fd78e9f954
5 changed files with 14 additions and 2 deletions
|
@ -8160,6 +8160,11 @@ GAME_STATIC void G_DoCheats(void)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
FOUNDCHEAT:
|
FOUNDCHEAT:
|
||||||
|
|
||||||
|
i = VM_OnEvent(EVENT_ACTIVATECHEAT, g_player[myconnectindex].ps->i, myconnectindex, -1, k);
|
||||||
|
if (k != CHEAT_COMEGETSOME) // Users are not allowed to interfere with TX's debugging cheat.
|
||||||
|
k = i;
|
||||||
|
|
||||||
{
|
{
|
||||||
switch (k)
|
switch (k)
|
||||||
{
|
{
|
||||||
|
@ -8475,6 +8480,10 @@ FOUNDCHEAT:
|
||||||
g_player[myconnectindex].ps->gm |= MODE_EOL;
|
g_player[myconnectindex].ps->gm |= MODE_EOL;
|
||||||
KB_FlushKeyboardQueue();
|
KB_FlushKeyboardQueue();
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
default:
|
||||||
|
end_cheat();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -697,6 +697,7 @@ const char *EventNames[MAXEVENTS] =
|
||||||
"EVENT_PREGAME",
|
"EVENT_PREGAME",
|
||||||
"EVENT_CHANGEMENU",
|
"EVENT_CHANGEMENU",
|
||||||
"EVENT_DAMAGEHPLANE",
|
"EVENT_DAMAGEHPLANE",
|
||||||
|
"EVENT_ACTIVATECHEAT",
|
||||||
#ifdef LUNATIC
|
#ifdef LUNATIC
|
||||||
"EVENT_ANIMATEALLSPRITES",
|
"EVENT_ANIMATEALLSPRITES",
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -126,6 +126,7 @@ enum GameEvent_t {
|
||||||
EVENT_PREGAME,
|
EVENT_PREGAME,
|
||||||
EVENT_CHANGEMENU,
|
EVENT_CHANGEMENU,
|
||||||
EVENT_DAMAGEHPLANE, // 95
|
EVENT_DAMAGEHPLANE, // 95
|
||||||
|
EVENT_ACTIVATECHEAT,
|
||||||
#ifdef LUNATIC
|
#ifdef LUNATIC
|
||||||
EVENT_ANIMATEALLSPRITES,
|
EVENT_ANIMATEALLSPRITES,
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -170,7 +170,8 @@ EVENT = {
|
||||||
EVENT_PREGAME = 93,
|
EVENT_PREGAME = 93,
|
||||||
EVENT_CHANGEMENU = 94,
|
EVENT_CHANGEMENU = 94,
|
||||||
EVENT_DAMAGEHPLANE = 95,
|
EVENT_DAMAGEHPLANE = 95,
|
||||||
-- EVENT_ANIMATEALLSPRITES = 96, -- internal
|
EVENT_ACTIVATECHEAT = 96,
|
||||||
|
-- EVENT_ANIMATEALLSPRITES = 97, -- internal
|
||||||
}
|
}
|
||||||
|
|
||||||
-- NOTE: negated values are not exported to the ffi.C namespace or CON.
|
-- NOTE: negated values are not exported to the ffi.C namespace or CON.
|
||||||
|
|
|
@ -2112,7 +2112,7 @@ local function our_gameactor(args)
|
||||||
|
|
||||||
-- Register our EVENT_ANIMATEALLSPRITES only now so that it is not
|
-- Register our EVENT_ANIMATEALLSPRITES only now so that it is not
|
||||||
-- called if there are no 'animate' definitions.
|
-- called if there are no 'animate' definitions.
|
||||||
gameevent_internal(96, animate_all_sprites) -- EVENT_ANIMATEALLSPRITES
|
gameevent_internal(97, animate_all_sprites) -- EVENT_ANIMATEALLSPRITES
|
||||||
end
|
end
|
||||||
|
|
||||||
-- All good, bitwise-OR the tile bits and register the actor!
|
-- All good, bitwise-OR the tile bits and register the actor!
|
||||||
|
|
Loading…
Reference in a new issue