diff options
author | Simon Howard | 2008-09-14 18:14:46 +0000 |
---|---|---|
committer | Simon Howard | 2008-09-14 18:14:46 +0000 |
commit | 8980e849e5b03ae4dd6c264c6c152bc461daa9ef (patch) | |
tree | 8bf9c5e3f471560bfa6767327edc22a95272e072 /src/deh_cheat.c | |
parent | 93bbda69b51835fd9177deca0c706001ccb0a2a8 (diff) | |
download | chocolate-doom-8980e849e5b03ae4dd6c264c6c152bc461daa9ef.tar.gz chocolate-doom-8980e849e5b03ae4dd6c264c6c152bc461daa9ef.tar.bz2 chocolate-doom-8980e849e5b03ae4dd6c264c6c152bc461daa9ef.zip |
Add -nocheat command line parameter to disable applying cheats from
dehacked files.
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 1227
Diffstat (limited to 'src/deh_cheat.c')
-rw-r--r-- | src/deh_cheat.c | 10 |
1 files changed, 8 insertions, 2 deletions
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 = |