From 9dbacdc2ec9b4d496173cdf34d23caa182625cf0 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Thu, 6 Oct 2005 19:36:41 +0000 Subject: Must use the right no clipping cheat for the right game. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 166 --- src/st_stuff.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/src/st_stuff.c b/src/st_stuff.c index 0e3fc4cf..52168af1 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -1,7 +1,7 @@ // Emacs style mode select -*- C++ -*- //----------------------------------------------------------------------------- // -// $Id: st_stuff.c 162 2005-10-04 21:41:42Z fraggle $ +// $Id: st_stuff.c 166 2005-10-06 19:36:41Z fraggle $ // // Copyright(C) 1993-1996 Id Software, Inc. // Copyright(C) 2005 Simon Howard @@ -22,6 +22,9 @@ // 02111-1307, USA. // // $Log$ +// Revision 1.7 2005/10/06 19:36:41 fraggle +// Must use the right no clipping cheat for the right game. +// // Revision 1.6 2005/10/04 21:41:42 fraggle // Rewrite cheats code. Add dehacked cheat replacement. // @@ -49,7 +52,7 @@ //----------------------------------------------------------------------------- static const char -rcsid[] = "$Id: st_stuff.c 162 2005-10-04 21:41:42Z fraggle $"; +rcsid[] = "$Id: st_stuff.c 166 2005-10-06 19:36:41Z fraggle $"; #include @@ -571,11 +574,15 @@ ST_Responder (event_t* ev) S_ChangeMusic(musnum, 1); } } - // Simplified, accepting both "noclip" and "idspispopd". - // no clipping mode cheat - else if ( cht_CheckCheat(&cheat_noclip, ev->data1) - || cht_CheckCheat(&cheat_commercial_noclip,ev->data1) ) + else if ( (gamemission == doom + && cht_CheckCheat(&cheat_noclip, ev->data1)) + || (gamemission != doom + && cht_CheckCheat(&cheat_commercial_noclip,ev->data1))) { + // Noclip cheat. + // For Doom 1, use the idspipsopd cheat; for all others, use + // idclip + plyr->cheats ^= CF_NOCLIP; if (plyr->cheats & CF_NOCLIP) -- cgit v1.2.3