Skip to content

Commit

Permalink
Reset cheatTics for non-ID cheat codes
Browse files Browse the repository at this point in the history
As they can be typed with ID prefix.
  • Loading branch information
JNechaevsky committed Jan 3, 2024
1 parent 10a3b6f commit e666f17
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/doom/st_bar.c
Original file line number Diff line number Diff line change
Expand Up @@ -554,27 +554,31 @@ boolean ST_Responder (event_t *ev)
else if (cht_CheckCheatSP(&cheat_freeze, ev->data2))
{
crl_freeze ^= 1;
plyr->cheatTics = 1;
CRL_SetMessage(plyr, crl_freeze ?
CRL_FREEZE_ON : CRL_FREEZE_OFF, false, NULL);
}
// [JN] Implement Woof's "notarget" cheat.
else if (cht_CheckCheatSP(&cheat_notarget, ev->data2))
{
plyr->cheats ^= CF_NOTARGET;
plyr->cheatTics = 1;
CRL_SetMessage(plyr, plyr->cheats & CF_NOTARGET ?
CRL_NOTARGET_ON : CRL_NOTARGET_OFF, false, NULL);
}
// [JN] Implement Woof's "Buddha" cheat.
else if (cht_CheckCheatSP(&cheat_buddha, ev->data2))
{
plyr->cheats ^= CF_BUDDHA;
plyr->cheatTics = 1;
CRL_SetMessage(plyr, plyr->cheats & CF_BUDDHA ?
CRL_BUDDHA_ON : CRL_BUDDHA_OFF, false, NULL);
}
// [JN] Implement "MDK" cheat.
else if (cht_CheckCheatSP(&cheat_mdk, ev->data2))
{
ST_cheat_MDK();
plyr->cheatTics = 1;
}
}

Expand Down

0 comments on commit e666f17

Please sign in to comment.