From 8980e849e5b03ae4dd6c264c6c152bc461daa9ef Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sun, 14 Sep 2008 18:14:46 +0000 Subject: Add -nocheat command line parameter to disable applying cheats from dehacked files. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 1227 --- src/deh_cheat.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/deh_cheat.c') diff --git a/src/deh_cheat.c b/src/deh_cheat.c index f501adbf..89e5d219 100644 --- a/src/deh_cheat.c +++ b/src/deh_cheat.c @@ -120,7 +120,10 @@ static void DEH_CheatParseLine(deh_context_t *context, char *line, void *tag) break; } - cheat->seq->sequence[i] = unsvalue[i]; + if (deh_apply_cheats) + { + cheat->seq->sequence[i] = unsvalue[i]; + } ++i; // Absolute limit - don't exceed @@ -132,7 +135,10 @@ static void DEH_CheatParseLine(deh_context_t *context, char *line, void *tag) } } - cheat->seq->sequence[i] = '\0'; + if (deh_apply_cheats) + { + cheat->seq->sequence[i] = '\0'; + } } deh_section_t deh_section_cheat = -- cgit v1.2.3