summaryrefslogtreecommitdiff
path: root/src/strife
diff options
context:
space:
mode:
authorJames Haley2010-09-16 02:08:28 +0000
committerJames Haley2010-09-16 02:08:28 +0000
commit6a147d5ff759a9c2260719d2dcebe269e64b2e2d (patch)
tree8143e76addd00fff667d588af6770c2a4cc49fdc /src/strife
parente93890502ea653c49f358dfb79008e47310c464c (diff)
downloadchocolate-doom-6a147d5ff759a9c2260719d2dcebe269e64b2e2d.tar.gz
chocolate-doom-6a147d5ff759a9c2260719d2dcebe269e64b2e2d.tar.bz2
chocolate-doom-6a147d5ff759a9c2260719d2dcebe269e64b2e2d.zip
Work on cheats and on teleportation effects.
Subversion-branch: /branches/strife-branch Subversion-revision: 2091
Diffstat (limited to 'src/strife')
-rw-r--r--src/strife/d_englsh.h28
-rw-r--r--src/strife/g_game.c7
-rw-r--r--src/strife/g_game.h5
-rw-r--r--src/strife/p_map.c73
-rw-r--r--src/strife/st_stuff.c475
5 files changed, 324 insertions, 264 deletions
diff --git a/src/strife/d_englsh.h b/src/strife/d_englsh.h
index 743dfdea..422051b9 100644
--- a/src/strife/d_englsh.h
+++ b/src/strife/d_englsh.h
@@ -228,29 +228,29 @@
#define AMSTR_GRIDON "Grid ON"
#define AMSTR_GRIDOFF "Grid OFF"
-#define AMSTR_MARKEDSPOT "Marked Spot"
-#define AMSTR_MARKSCLEARED "All Marks Cleared"
+#define AMSTR_MARKEDSPOT "Marked Spot"
+#define AMSTR_MARKSCLEARED "All Marks Cleared"
//
// ST_stuff.C
//
-#define STSTR_MUS "Music Change"
-#define STSTR_NOMUS "IMPOSSIBLE SELECTION"
-#define STSTR_DQDON "Degreelessness Mode On"
-#define STSTR_DQDOFF "Degreelessness Mode Off"
+#define STSTR_MUS "Music Change"
+#define STSTR_NOMUS "IMPOSSIBLE SELECTION"
+#define STSTR_DQDON "You're invincible!" // [STRIFE]
+#define STSTR_DQDOFF "You're a looney!" // [STRIFE]
-#define STSTR_KFAADDED "Very Happy Ammo Added"
-#define STSTR_FAADDED "Ammo (no keys) Added"
+#define STSTR_KFAADDED "Very Happy Ammo Added"
+#define STSTR_FAADDED "Ammo (no keys) Added"
-#define STSTR_NCON "No Clipping Mode ON"
-#define STSTR_NCOFF "No Clipping Mode OFF"
+#define STSTR_NCON "No Clipping Mode ON"
+#define STSTR_NCOFF "No Clipping Mode OFF"
-#define STSTR_BEHOLD "inVuln, Str, Inviso, Rad, Allmap, or Lite-amp"
-#define STSTR_BEHOLDX "Power-up Toggled"
+#define STSTR_BEHOLD "inVuln, Str, Inviso, Rad, Allmap, or Lite-amp"
+#define STSTR_BEHOLDX "Power-up Toggled"
-#define STSTR_CHOPPERS "... doesn't suck - GM"
-#define STSTR_CLEV "Changing Level..."
+#define STSTR_CHOPPERS "... doesn't suck - GM"
+#define STSTR_CLEV "Changing Level..."
//
// F_Finale.C
diff --git a/src/strife/g_game.c b/src/strife/g_game.c
index dd206210..a1a54f1c 100644
--- a/src/strife/g_game.c
+++ b/src/strife/g_game.c
@@ -1409,8 +1409,8 @@ extern char* pagename;
void G_RiftExitLevel(int map, int spot, angle_t angle)
{
gameaction = ga_completed;
- // STRIFE-TODO: special handling for post-Sigil map changes
- /*
+
+ // special handling for post-Sigil map changes
if(players[0].weaponowned[wp_sigil])
{
if(map == 3) // Front Base -> Abandoned Front Base
@@ -1418,10 +1418,11 @@ void G_RiftExitLevel(int map, int spot, angle_t angle)
if(map == 7) // Castle -> New Front Base
map = 10;
}
- */
+
// no rifting in deathmatch games
if(deathmatch)
spot = 0;
+
riftangle = angle;
riftdest = spot;
destmap = map;
diff --git a/src/strife/g_game.h b/src/strife/g_game.h
index 2f811dec..c596d1e9 100644
--- a/src/strife/g_game.h
+++ b/src/strife/g_game.h
@@ -31,7 +31,7 @@
#include "doomdef.h"
#include "d_event.h"
#include "d_ticcmd.h"
-
+#include "tables.h"
//
// GAME
@@ -65,11 +65,14 @@ void G_PlayDemo (char* name);
void G_TimeDemo (char* name);
boolean G_CheckDemoStatus (void);
+void G_RiftExitLevel(int map, int spot, angle_t angle); // [STRIFE]
void G_ExitLevel (int dest);
//void G_SecretExitLevel (void);
//void G_WorldDone (void);
+boolean G_RiftCheat(int riftSpotNum); // [STRIFE]
+
// Read current data from inputs and build a player movement command.
void G_BuildTiccmd (ticcmd_t *cmd);
diff --git a/src/strife/p_map.c b/src/strife/p_map.c
index 0aeeb996..d423c5fc 100644
--- a/src/strife/p_map.c
+++ b/src/strife/p_map.c
@@ -113,32 +113,37 @@ int numspechit;
//
// PIT_StompThing
//
+// [STRIFE] haleyjd 09/15/10: Modified so monsters can telestomp.
+//
boolean PIT_StompThing (mobj_t* thing)
{
fixed_t blockdist;
-
+
if (!(thing->flags & MF_SHOOTABLE) )
- return true;
-
+ return true;
+
blockdist = thing->radius + tmthing->radius;
-
+
if ( abs(thing->x - tmx) >= blockdist
- || abs(thing->y - tmy) >= blockdist )
+ || abs(thing->y - tmy) >= blockdist )
{
- // didn't hit it
- return true;
+ // didn't hit it
+ return true;
}
-
+
// don't clip against self
if (thing == tmthing)
- return true;
-
- // monsters don't stomp things except on boss level
- if ( !tmthing->player && gamemap != 30)
- return false;
-
+ return true;
+
+ // [STRIFE] monsters DO stomp things, on all levels
+ // Basically, one thing involved must be a player.
+ // Monsters can telefrag players, and players can telefrag monsters, but
+ // monsters cannot telefrag other monsters.
+ if (!(tmthing->player || thing->player))
+ return false;
+
P_DamageMobj (thing, tmthing, tmthing, 10000);
-
+
return true;
}
@@ -146,28 +151,27 @@ boolean PIT_StompThing (mobj_t* thing)
//
// P_TeleportMove
//
-boolean
-P_TeleportMove
-( mobj_t* thing,
- fixed_t x,
- fixed_t y )
+// [STRIFE]
+// haleyjd 09/15/10: Modified to set thing z position.
+//
+boolean P_TeleportMove(mobj_t* thing, fixed_t x, fixed_t y)
{
- int xl;
- int xh;
- int yl;
- int yh;
- int bx;
- int by;
+ int xl;
+ int xh;
+ int yl;
+ int yh;
+ int bx;
+ int by;
- subsector_t* newsubsec;
+ subsector_t* newsubsec;
// kill anything occupying the position
tmthing = thing;
tmflags = thing->flags;
-
+
tmx = x;
tmy = y;
-
+
tmbbox[BOXTOP] = y + tmthing->radius;
tmbbox[BOXBOTTOM] = y - tmthing->radius;
tmbbox[BOXRIGHT] = x + tmthing->radius;
@@ -182,7 +186,7 @@ P_TeleportMove
// will adjust them.
tmfloorz = tmdropoffz = newsubsec->sector->floorheight;
tmceilingz = newsubsec->sector->ceilingheight;
-
+
validcount++;
numspechit = 0;
@@ -193,9 +197,9 @@ P_TeleportMove
yh = (tmbbox[BOXTOP] - bmaporgy + MAXRADIUS)>>MAPBLOCKSHIFT;
for (bx=xl ; bx<=xh ; bx++)
- for (by=yl ; by<=yh ; by++)
- if (!P_BlockThingsIterator(bx,by,PIT_StompThing))
- return false;
+ for (by=yl ; by<=yh ; by++)
+ if (!P_BlockThingsIterator(bx,by,PIT_StompThing))
+ return false;
// the move is ok,
// so link the thing into its new position
@@ -205,9 +209,10 @@ P_TeleportMove
thing->ceilingz = tmceilingz;
thing->x = x;
thing->y = y;
+ thing->z = tmfloorz; // haleyjd 09/15/10: [STRIFE] Rogue added a z-set here
P_SetThingPosition (thing);
-
+
return true;
}
diff --git a/src/strife/st_stuff.c b/src/strife/st_stuff.c
index c8aac617..d5fcf0ff 100644
--- a/src/strife/st_stuff.c
+++ b/src/strife/st_stuff.c
@@ -267,14 +267,16 @@ static st_number_t w_maxammo[NUMAMMO]; // haleyjd [STRIFE]: Still used.
static int st_fragscount;
-cheatseq_t cheat_mus = CHEAT("idmus", 2);
-cheatseq_t cheat_god = CHEAT("iddqd", 0);
-cheatseq_t cheat_ammo = CHEAT("idkfa", 0);
-cheatseq_t cheat_ammonokey = CHEAT("idfa", 0);
-cheatseq_t cheat_noclip = CHEAT("idspispopd", 0);
-cheatseq_t cheat_commercial_noclip = CHEAT("idclip", 0);
-
-cheatseq_t cheat_powerup[7] =
+cheatseq_t cheat_mus = CHEAT("spin", 2); // [STRIFE]: idmus -> spin
+cheatseq_t cheat_god = CHEAT("omnipotent", 0); // [STRIFE]: iddqd -> omnipotent
+cheatseq_t cheat_ammo = CHEAT("idkfa", 0); // STRIFE-TODO
+cheatseq_t cheat_ammonokey = CHEAT("idfa", 0); // STRIFE-TODO
+cheatseq_t cheat_noclip = CHEAT("elvis", 0); // [STRIFE]: idclip -> elvis
+cheatseq_t cheat_clev = CHEAT("rift", 2); // [STRIFE]: idclev -> rift
+cheatseq_t cheat_mypos = CHEAT("gps", 0); // [STRIFE]: idmypos -> gps
+cheatseq_t cheat_scoot = CHEAT("scoot", 1); // [STRIFE]: new cheat scoot
+
+cheatseq_t cheat_powerup[7] = // STRIFE-TODO
{
CHEAT("idbeholdv", 0),
CHEAT("idbeholds", 0),
@@ -285,9 +287,7 @@ cheatseq_t cheat_powerup[7] =
CHEAT("idbehold", 0),
};
-cheatseq_t cheat_choppers = CHEAT("idchoppers", 0);
-cheatseq_t cheat_clev = CHEAT("idclev", 2);
-cheatseq_t cheat_mypos = CHEAT("idmypos", 0);
+//cheatseq_t cheat_choppers = CHEAT("idchoppers", 0); [STRIFE] no such thing
//
@@ -320,215 +320,266 @@ void ST_refreshBackground(void)
boolean
ST_Responder (event_t* ev)
{
- int i;
+ int i;
+
+ // Filter automap on/off.
+ if (ev->type == ev_keyup
+ && ((ev->data1 & 0xffff0000) == AM_MSGHEADER))
+ {
+ switch(ev->data1)
+ {
+ case AM_MSGENTERED:
+ st_gamestate = AutomapState;
+ st_firsttime = true;
+ break;
+
+ case AM_MSGEXITED:
+ // fprintf(stderr, "AM exited\n");
+ st_gamestate = FirstPersonState;
+ break;
+ }
+ }
+
+ // STRIFE-TODO: this is branched on for handling key ups/key downs
+ // with regard to raising/lowering popups
+
+ // if a user keypress...
+ if(ev->type != ev_keydown)
+ return false;
+
+ //
+ // [STRIFE] Cheats which are allowed in netgames/demos:
+ //
+
+ // 'spin' cheat for changing music
+ if (cht_CheckCheat(&cheat_mus, ev->data2))
+ {
+ char buf[3];
+ int musnum;
+
+ plyr->message = DEH_String(STSTR_MUS);
+ cht_GetParam(&cheat_mus, buf);
+
+ musnum = (buf[0] - '0') * 10 + buf[1] - '0';
+
+ if (((buf[0]-'0')*10 + buf[1]-'0') > 35)
+ plyr->message = DEH_String(STSTR_NOMUS);
+ else
+ S_ChangeMusic(musnum, 1);
+ }
+ /*
+ // STRIFE-TODO: "dev" cheat - is this the "DOTS" cheat?
+ else if (cht_CheckCheat(&cheat_dev, ev->data2))
+ {
+ debugmode = !debugmode;
+ if (debugmode)
+ plyr->message = DEH_String("devparm ON");
+ else
+ plyr->message = DEH_String("devparm OFF");
+ }
+ */
+
+ // [STRIFE] Cheats below are not allowed in netgames or demos
+ if(netgame || !usergame)
+ return false;
+
+ if (cht_CheckCheat(&cheat_god, ev->data2))
+ {
+ // 'omnipotent' cheat for toggleable god mode
+ plyr->cheats ^= CF_GODMODE;
+ if (plyr->cheats & CF_GODMODE)
+ {
+ if (plyr->mo)
+ plyr->mo->health = 100;
+
+ plyr->health = deh_god_mode_health;
+ plyr->st_update = true; // [STRIFE]
+ plyr->message = DEH_String(STSTR_DQDON);
+ }
+ else
+ plyr->message = DEH_String(STSTR_DQDOFF);
+ }
+ //
+ // STRIFE-TODO: IDFA, IDKFA equivs are unfinished
+ //
+ else if (cht_CheckCheat(&cheat_ammonokey, ev->data2))
+ {
+ // 'fa' cheat for killer fucking arsenal
+ plyr->armorpoints = deh_idfa_armor;
+ plyr->armortype = deh_idfa_armor_class;
+
+ for (i=0;i<NUMWEAPONS;i++)
+ plyr->weaponowned[i] = true;
+
+ for (i=0;i<NUMAMMO;i++)
+ plyr->ammo[i] = plyr->maxammo[i];
+
+ plyr->message = DEH_String(STSTR_FAADDED);
+ }
+ else if (cht_CheckCheat(&cheat_ammo, ev->data2))
+ {
+ // 'kfa' cheat for key full ammo
+ plyr->armorpoints = deh_idkfa_armor;
+ plyr->armortype = deh_idkfa_armor_class;
+
+ for (i=0;i<NUMWEAPONS;i++)
+ plyr->weaponowned[i] = true;
+
+ for (i=0;i<NUMAMMO;i++)
+ plyr->ammo[i] = plyr->maxammo[i];
+
+ for (i=0;i<NUMCARDS;i++)
+ plyr->cards[i] = true;
+
+ plyr->message = DEH_String(STSTR_KFAADDED);
+ }
+ else if (cht_CheckCheat(&cheat_noclip, ev->data2))
+ {
+ // [STRIFE] Verified unmodified, except no idspispopd shit:
+ // Noclip cheat - "ELVIS" (hah-hah :P )
+
+ plyr->cheats ^= CF_NOCLIP;
+
+ if (plyr->cheats & CF_NOCLIP)
+ plyr->message = DEH_String(STSTR_NCON);
+ else
+ plyr->message = DEH_String(STSTR_NCOFF);
+ }
+ //
+ // STRIFE-TODO: Stealth Cheat
+ //
+ /*
+ else if (cht_CheckCheat(&cheat_stealth, ev->data2))
+ {
+ plyr->cheats ^= 4;
+ if(plyr->cheats & 4)
+ plyr->message = DEH_String("STEALTH BOOTS ON");
+ else
+ plyr->message = DEH_String("STEALTH BOOTS OFF");
+ }
+ */
+
+ //
+ // STRIFE-TODO: Fix idbehold equivalent
+ //
+ for (i=0;i<6;i++)
+ {
+ // 'behold?' power-up cheats
+ if (cht_CheckCheat(&cheat_powerup[i], ev->data2))
+ {
+ if (!plyr->powers[i])
+ P_GivePower( plyr, i);
+ else if (i!=pw_strength)
+ plyr->powers[i] = 1;
+ else
+ plyr->powers[i] = 0;
+
+ plyr->message = DEH_String(STSTR_BEHOLDX);
+ }
+ }
+ // STRIFE-TODO:
+ if (cht_CheckCheat(&cheat_powerup[6], ev->data2))
+ {
+ // 'behold' power-up menu
+ plyr->message = DEH_String(STSTR_BEHOLD);
+ }
- // Filter automap on/off.
- if (ev->type == ev_keyup
- && ((ev->data1 & 0xffff0000) == AM_MSGHEADER))
- {
- switch(ev->data1)
+ //
+ // STRIFE-TODO:
+ // * Give medical items cheat (what code???)
+ // * Ammo cheat
+ // * Stats cheat
+ // * Unknown power-giving cheat
+ /*
+ if(cht_CheckCheat(&cheat_meditems, ev->data2))
+ {
+ P_GiveItemToPlayer(plyr, SPR_STMP, MT_INV_MED1);
+ P_GiveItemToPlayer(plyr, SPR_MDKT, MT_INV_MED2);
+ P_GiveItemToPlayer(plyr, SPR_FULL, MT_INV_MED3);
+ plyr->message = DEH_String("you got the stuff!");
+ }
+ if (cht_CheckCheat(&off_885E4, ev->data2))
+ {
+ if(!plyr->backpack)
+ {
+ for(i = 0; i < NUMAMMO; i++)
+ plyr->maxammo[i] = 2 * plyr->maxammo[i];
+ plyr->backpack = true;
+ }
+ for(i = 0; i < NUMAMMO; i++)
+ P_GiveAmmo(plyr, i, 1);
+ plyr->message = DEH_String("you got the stuff!");
+ }
+ if(cht_CheckCheat(&cheat_stats, ev->data2))
{
- case AM_MSGENTERED:
- st_gamestate = AutomapState;
- st_firsttime = true;
- break;
-
- case AM_MSGEXITED:
- // fprintf(stderr, "AM exited\n");
- st_gamestate = FirstPersonState;
- break;
+ P_GiveItemToPlayer(plyr, SPR_TOKN, MT_TOKEN_STAMINA);
+ P_GiveItemToPlayer(plyr, SPR_TOKN, MT_TOKEN_NEW_ACCURACY);
+ plyr->message = DEH_String("you got the stuff!");
}
- }
+ //
+ // UNKNOWN POWER GIVING CHEAT HERE...
+ //
+ */
+
+ // STRIFE-TODO: weird isdemoversion check
- // if a user keypress...
- else if (ev->type == ev_keydown)
- {
- if (!netgame && gameskill != sk_nightmare)
+ if (cht_CheckCheat(&cheat_mypos, ev->data2))
{
- // 'dqd' cheat for toggleable god mode
- if (cht_CheckCheat(&cheat_god, ev->data2))
- {
- plyr->cheats ^= CF_GODMODE;
- if (plyr->cheats & CF_GODMODE)
- {
- if (plyr->mo)
- plyr->mo->health = 100;
-
- plyr->health = deh_god_mode_health;
- plyr->message = DEH_String(STSTR_DQDON);
- }
- else
- plyr->message = DEH_String(STSTR_DQDOFF);
- }
- // 'fa' cheat for killer fucking arsenal
- else if (cht_CheckCheat(&cheat_ammonokey, ev->data2))
- {
- plyr->armorpoints = deh_idfa_armor;
- plyr->armortype = deh_idfa_armor_class;
-
- for (i=0;i<NUMWEAPONS;i++)
- plyr->weaponowned[i] = true;
-
- for (i=0;i<NUMAMMO;i++)
- plyr->ammo[i] = plyr->maxammo[i];
-
- plyr->message = DEH_String(STSTR_FAADDED);
- }
- // 'kfa' cheat for key full ammo
- else if (cht_CheckCheat(&cheat_ammo, ev->data2))
- {
- plyr->armorpoints = deh_idkfa_armor;
- plyr->armortype = deh_idkfa_armor_class;
-
- for (i=0;i<NUMWEAPONS;i++)
- plyr->weaponowned[i] = true;
-
- for (i=0;i<NUMAMMO;i++)
- plyr->ammo[i] = plyr->maxammo[i];
-
- for (i=0;i<NUMCARDS;i++)
- plyr->cards[i] = true;
-
- plyr->message = DEH_String(STSTR_KFAADDED);
- }
- // 'mus' cheat for changing music
- else if (cht_CheckCheat(&cheat_mus, ev->data2))
- {
-
- char buf[3];
- int musnum;
-
- plyr->message = DEH_String(STSTR_MUS);
- cht_GetParam(&cheat_mus, buf);
-
- if (gamemode == commercial)
- {
- musnum = mus_logo + (buf[0]-'0')*10 + buf[1]-'0' - 1; // villsa [STRIFE] TODO - fix music
-
- if (((buf[0]-'0')*10 + buf[1]-'0') > 35)
- plyr->message = DEH_String(STSTR_NOMUS);
- else
- S_ChangeMusic(musnum, 1);
- }
- else
- {
- musnum = mus_logo + (buf[0]-'1')*9 + (buf[1]-'1'); // villsa [STRIFE] TODO - fix music
-
- if (((buf[0]-'1')*9 + buf[1]-'1') > 31)
- plyr->message = DEH_String(STSTR_NOMUS);
- else
- S_ChangeMusic(musnum, 1);
- }
- }
- else if ( (gamemission == doom
- && cht_CheckCheat(&cheat_noclip, ev->data2))
- || (gamemission != doom
- && cht_CheckCheat(&cheat_commercial_noclip,ev->data2)))
- {
- // Noclip cheat.
- // For Doom 1, use the idspipsopd cheat; for all others, use
- // idclip
-
- plyr->cheats ^= CF_NOCLIP;
-
- if (plyr->cheats & CF_NOCLIP)
- plyr->message = DEH_String(STSTR_NCON);
- else
- plyr->message = DEH_String(STSTR_NCOFF);
- }
- // 'behold?' power-up cheats
- for (i=0;i<6;i++)
- {
- if (cht_CheckCheat(&cheat_powerup[i], ev->data2))
- {
- if (!plyr->powers[i])
- P_GivePower( plyr, i);
- else if (i!=pw_strength)
- plyr->powers[i] = 1;
- else
- plyr->powers[i] = 0;
-
- plyr->message = DEH_String(STSTR_BEHOLDX);
- }
- }
-
- // 'behold' power-up menu
- if (cht_CheckCheat(&cheat_powerup[6], ev->data2))
- {
- plyr->message = DEH_String(STSTR_BEHOLD);
- }
- // 'choppers' invulnerability & chainsaw
- else if (cht_CheckCheat(&cheat_choppers, ev->data2))
- {
- // villsa [STRIFE] unused
- //plyr->weaponowned[wp_chainsaw] = true;
- //plyr->powers[pw_invulnerability] = true;
- plyr->message = DEH_String(STSTR_CHOPPERS);
- }
- // 'mypos' for player position
- else if (cht_CheckCheat(&cheat_mypos, ev->data2))
- {
- static char buf[ST_MSGWIDTH];
- sprintf(buf, "ang=0x%x;x,y=(0x%x,0x%x)",
- players[consoleplayer].mo->angle,
- players[consoleplayer].mo->x,
- players[consoleplayer].mo->y);
- plyr->message = buf;
- }
+ // [STRIFE] 'GPS' for player position
+ static char buf[ST_MSGWIDTH];
+ sprintf(buf, "ang=0x%x;x,y=(0x%x,0x%x)",
+ players[consoleplayer].mo->angle,
+ players[consoleplayer].mo->x,
+ players[consoleplayer].mo->y);
+ plyr->message = buf;
}
- // 'clev' change-level cheat
- if (!netgame && cht_CheckCheat(&cheat_clev, ev->data2))
+
+ // 'rift' change-level cheat
+ if (cht_CheckCheat(&cheat_clev, ev->data2))
{
- char buf[3];
- int epsd;
- int map;
-
- cht_GetParam(&cheat_clev, buf);
-
- if (gamemode == commercial)
- {
- epsd = 1;
- map = (buf[0] - '0')*10 + buf[1] - '0';
- }
- else
- {
- epsd = buf[0] - '0';
- map = buf[1] - '0';
- }
-
- // haleyjd 09/01/10: Removed Chex Quest stuff.
-
- // Catch invalid maps.
- if (epsd < 1)
- return false;
-
- if (map < 1)
- return false;
-
- // Ohmygod - this is not going to work.
- if ((gamemode == retail)
- && ((epsd > 4) || (map > 9)))
- return false;
-
- if ((gamemode == registered)
- && ((epsd > 3) || (map > 9)))
- return false;
-
- if ((gamemode == shareware)
- && ((epsd > 1) || (map > 9)))
- return false;
-
- if ((gamemode == commercial)
- && (( epsd > 1) || (map > 34)))
- return false;
-
- // So be it.
- plyr->message = DEH_String(STSTR_CLEV);
- G_DeferedInitNew(gameskill, epsd, map);
- }
- }
- return false;
+ char buf[3];
+ int map;
+
+ cht_GetParam(&cheat_clev, buf);
+
+ map = (buf[0] - '0') * 10 + buf[1] - '0';
+
+ // haleyjd 09/01/10: Removed Chex Quest stuff.
+ // haleyjd 09/15/10: Removed retail/registered/shareware stuff
+
+ // Ohmygod - this is not going to work.
+ if (map <= 0 || map > 40)
+ return false;
+
+ // So be it.
+ plyr->message = DEH_String(STSTR_CLEV);
+ G_RiftExitLevel(map, 0, plyr->mo->angle);
+ }
+ else if(cht_CheckCheat(&cheat_scoot, ev->data2))
+ {
+ char buf[3];
+ int spot;
+
+ cht_GetParam(&cheat_scoot, buf);
+
+ spot = buf[0] - '0';
+
+ // BUG: should be <= 9. Shouldn't do anything bad though...
+ if(spot <= 10)
+ {
+ plyr->message = DEH_String("Spawning to spot");
+ G_RiftCheat(spot);
+ }
+ }
+
+ //
+ // STRIFE-TODO:
+ // * stonecold cheat
+ // * LEGO cheat
+ //
+
+ return false;
}