ref: 6347e5fad98d28e1c8ca89273568da4c7f652a7f
parent: 9dff025cb98eacc9196bcdab9b2f607f16437060
author: Samuel Villareal <[email protected]>
date: Sat Sep 25 04:09:59 EDT 2010
+ stonecold, jimmy, gripper, donnytrump, and lego cheats added Subversion-branch: /branches/strife-branch Subversion-revision: 2138
--- a/src/strife/g_game.c
+++ b/src/strife/g_game.c
@@ -1485,6 +1485,7 @@
// STRIFE-TODO: save automap powerup state (possibly inlined from G_PlayerFinishLevel);
// set stonecold to 0
+ stonecold = false; // villsa [STRIFE]
if (automapactive)
AM_Stop ();
@@ -1760,6 +1761,7 @@
playeringame[1] = playeringame[2] = playeringame[3] = 0;
respawnparm = false;
fastparm = false;
+ stonecold = false; // villsa [STRIFE]
nomonsters = false;
consoleplayer = 0;
G_InitNew (d_skill, d_episode, d_map);
--- a/src/strife/p_mobj.c
+++ b/src/strife/p_mobj.c
@@ -545,6 +545,13 @@
if (mobj->tics != -1)
{
mobj->tics--;
+
+ // villsa [STRIFE] stonecold cheat
+ if(stonecold)
+ {
+ if(mobj->flags & MF_COUNTKILL)
+ P_DamageMobj(mobj, mobj, mobj, 10);
+ }
// you can cycle through multiple states in a tic
if (!mobj->tics)
@@ -808,11 +815,13 @@
// accuracy to 50 and give all quest flags
if(deathmatch)
{
+ int i;
+
p->accuracy = 50;
p->questflags = QF_ALLQUESTS; // 0x7fffffff
- /*for(i = 0; i < NUMCARDS; i++)
- p->cards[i] = true;*/
+ for(i = 0; i < NUMCARDS; i++)
+ p->cards[i] = true;
}
// villsa [STRIFE] set godmode?
--- a/src/strife/p_spec.c
+++ b/src/strife/p_spec.c
@@ -1358,7 +1358,11 @@
break;
case 184:
- // STRIFE-TODO: New plat type?
+ // villsa [STRIFE] plat up wait down stay
+ EV_DoPlat(line, upWaitDownStay, 0);
+
+ // hmm.. looks like Rogue screwed up here..
+ P_ChangeSwitchTexture(line, 1);
break;
case 185:
--- a/src/strife/st_stuff.c
+++ b/src/strife/st_stuff.c
@@ -49,6 +49,7 @@
#include "p_local.h"
#include "p_inter.h"
+#include "p_dialog.h" // villsa [STRIFE]
#include "am_map.h"
#include "m_cheat.h"
@@ -293,14 +294,19 @@
static int st_fragscount;
-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_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_nuke = CHEAT("stonecold", 0); // [STRIFE]: new cheat stonecold
+cheatseq_t cheat_keys = CHEAT("jimmy", 0); // [STRIFE]: new cheat jimmy (all keys)
+cheatseq_t cheat_stealth = CHEAT("gripper", 0); // [STRIFE]: new cheat gripper
+cheatseq_t cheat_midas = CHEAT("donnytrump", 0); // [STRIFE]: new cheat
+cheatseq_t cheat_lego = CHEAT("lego", 0); // [STRIFE]: new cheat
cheatseq_t cheat_powerup[7] = // STRIFE-TODO
{
@@ -491,6 +497,37 @@
plyr->message = DEH_String(STSTR_KFAADDED);
}
+
+ // villsa [STRIFE]
+ else if(cht_CheckCheat(&cheat_keys, ev->data2))
+ {
+ #define FIRSTKEYSETAMOUNT 16
+
+ if(plyr->cards[FIRSTKEYSETAMOUNT - 1])
+ {
+ if(plyr->cards[NUMCARDS - 1] || isdemoversion)
+ {
+ for(i = 0; i < NUMCARDS; i++)
+ plyr->cards[i] = false;
+
+ plyr->message = DEH_String("Keys removed");
+ }
+ else
+ {
+ for(i = 0; i < NUMCARDS; i++)
+ plyr->cards[i] = true;
+
+ plyr->message = DEH_String("Cheater Keys Added");
+ }
+ }
+ else
+ {
+ for(i = 0; i < FIRSTKEYSETAMOUNT; i++)
+ plyr->cards[i] = true;
+
+ plyr->message = DEH_String("Cheater Keys Added");
+ }
+ }
else if (cht_CheckCheat(&cheat_noclip, ev->data2))
{
// [STRIFE] Verified unmodified, except no idspispopd shit:
@@ -503,19 +540,17 @@
else
plyr->message = DEH_String(STSTR_NCOFF);
}
- //
- // STRIFE-TODO: Stealth Cheat
- //
- /*
- else if (cht_CheckCheat(&cheat_stealth, ev->data2))
+
+ // villsa [STRIFE]
+ else if(cht_CheckCheat(&cheat_stealth, ev->data2))
{
- plyr->cheats ^= 4;
- if(plyr->cheats & 4)
+ plyr->cheats ^= CF_NOMOMENTUM;
+ if(plyr->cheats & CF_NOMOMENTUM)
plyr->message = DEH_String("STEALTH BOOTS ON");
else
plyr->message = DEH_String("STEALTH BOOTS OFF");
}
- */
+
//
// STRIFE-TODO: Fix idbehold equivalent
@@ -631,11 +666,41 @@
}
}
- //
- // STRIFE-TODO:
- // * stonecold cheat
- // * LEGO cheat
- //
+ // villsa [STRIFE]
+ if(cht_CheckCheat(&cheat_nuke, ev->data2))
+ {
+ stonecold ^= 1;
+ plyr->message = DEH_String("Kill 'em. Kill 'em All");
+ }
+
+ // villsa [STRIFE]
+ if(cht_CheckCheat(&cheat_midas, ev->data2))
+ {
+ plyr->message = DEH_String("YOU GOT THE MIDAS TOUCH, BABY");
+ P_GiveItemToPlayer(plyr, SPR_HELT, MT_TOKEN_TOUGHNESS);
+ }
+
+ // villsa [STRIFE]
+ if(cht_CheckCheat(&cheat_lego, ev->data2))
+ {
+ plyr->st_update = true;
+ if(plyr->weaponowned[wp_sigil])
+ {
+ plyr->weaponowned[wp_sigil] = true;
+ if(++plyr->sigiltype > 4)
+ {
+ plyr->sigiltype = -1;
+ plyr->pendingweapon = wp_sigil;
+ plyr->weaponowned[wp_sigil] = true;
+ }
+ }
+ else
+ {
+ plyr->weaponowned[wp_sigil] = true;
+ plyr->sigiltype = -1;
+ }
+ plyr->pendingweapon = wp_sigil;
+ }
return false;
}