By request, implement EVENT_ACTIVATECHEAT.

git-svn-id: https://svn.eduke32.com/eduke32@4515 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2014-06-16 23:16:55 +00:00
parent 45deabc782
commit fd78e9f954
5 changed files with 14 additions and 2 deletions

View file

@ -8160,6 +8160,11 @@ GAME_STATIC void G_DoCheats(void)
return;
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)
{
@ -8475,6 +8480,10 @@ FOUNDCHEAT:
g_player[myconnectindex].ps->gm |= MODE_EOL;
KB_FlushKeyboardQueue();
return;
default:
end_cheat();
return;
}
}
}

View file

@ -697,6 +697,7 @@ const char *EventNames[MAXEVENTS] =
"EVENT_PREGAME",
"EVENT_CHANGEMENU",
"EVENT_DAMAGEHPLANE",
"EVENT_ACTIVATECHEAT",
#ifdef LUNATIC
"EVENT_ANIMATEALLSPRITES",
#endif

View file

@ -126,6 +126,7 @@ enum GameEvent_t {
EVENT_PREGAME,
EVENT_CHANGEMENU,
EVENT_DAMAGEHPLANE, // 95
EVENT_ACTIVATECHEAT,
#ifdef LUNATIC
EVENT_ANIMATEALLSPRITES,
#endif

View file

@ -170,7 +170,8 @@ EVENT = {
EVENT_PREGAME = 93,
EVENT_CHANGEMENU = 94,
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.

View file

@ -2112,7 +2112,7 @@ local function our_gameactor(args)
-- Register our EVENT_ANIMATEALLSPRITES only now so that it is not
-- called if there are no 'animate' definitions.
gameevent_internal(96, animate_all_sprites) -- EVENT_ANIMATEALLSPRITES
gameevent_internal(97, animate_all_sprites) -- EVENT_ANIMATEALLSPRITES
end
-- All good, bitwise-OR the tile bits and register the actor!