mirror of
https://github.com/fabiangreffrath/woof.git
synced 2025-09-24 04:29:34 -04:00
add SKILL cheat to show (or change) game skill level (#1016)
* add SKILL cheat to show (or change) game skill level * rephrase message, fix fast and respawn when changing from/to Nightmare
This commit is contained in:
parent
c3d3ff355d
commit
90c3df526c
@ -59,6 +59,8 @@ static void cheat_clev0();
|
|||||||
static void cheat_mypos();
|
static void cheat_mypos();
|
||||||
static void cheat_comp(char *buf);
|
static void cheat_comp(char *buf);
|
||||||
static void cheat_comp0();
|
static void cheat_comp0();
|
||||||
|
static void cheat_skill(char *buf);
|
||||||
|
static void cheat_skill0();
|
||||||
static void cheat_friction();
|
static void cheat_friction();
|
||||||
static void cheat_pushers();
|
static void cheat_pushers();
|
||||||
static void cheat_tran();
|
static void cheat_tran();
|
||||||
@ -185,6 +187,12 @@ struct cheat_s cheat[] = {
|
|||||||
{"comp", NULL, not_net | not_demo | not_menu,
|
{"comp", NULL, not_net | not_demo | not_menu,
|
||||||
{cheat_comp0} },
|
{cheat_comp0} },
|
||||||
|
|
||||||
|
{"skill", NULL, not_net | not_demo | not_menu,
|
||||||
|
{cheat_skill}, -1 },
|
||||||
|
|
||||||
|
{"skill", NULL, not_net | not_demo | not_menu,
|
||||||
|
{cheat_skill0} },
|
||||||
|
|
||||||
{"killem", NULL, not_net | not_demo,
|
{"killem", NULL, not_net | not_demo,
|
||||||
{cheat_massacre} }, // jff 2/01/98 kill all monsters
|
{cheat_massacre} }, // jff 2/01/98 kill all monsters
|
||||||
|
|
||||||
@ -690,6 +698,26 @@ static void cheat_friction()
|
|||||||
"Variable Friction disabled");
|
"Variable Friction disabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extern const char *default_skill_strings[];
|
||||||
|
|
||||||
|
static void cheat_skill0()
|
||||||
|
{
|
||||||
|
doomprintf(MESSAGES_NONE, "Skill: %s", default_skill_strings[gameskill + 1]);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void cheat_skill(char *buf)
|
||||||
|
{
|
||||||
|
int skill = buf[0] - '0';
|
||||||
|
|
||||||
|
if (skill >= 1 && skill <= 5)
|
||||||
|
{
|
||||||
|
gameskill = skill - 1;
|
||||||
|
doomprintf(MESSAGES_NONE, "Next Level Skill: %s", default_skill_strings[gameskill + 1]);
|
||||||
|
|
||||||
|
G_SetFastParms(fastparm || gameskill == sk_nightmare);
|
||||||
|
respawnmonsters = gameskill == sk_nightmare || respawnparm;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Pusher cheat
|
// Pusher cheat
|
||||||
// phares 3/10/98
|
// phares 3/10/98
|
||||||
|
@ -4125,7 +4125,7 @@ static void M_UpdateMouseLook(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static const char *default_skill_strings[] = {
|
const char *default_skill_strings[] = {
|
||||||
// dummy first option because defaultskill is 1-based
|
// dummy first option because defaultskill is 1-based
|
||||||
"", "ITYTD", "HNTR", "HMP", "UV", "NM", NULL
|
"", "ITYTD", "HNTR", "HMP", "UV", "NM", NULL
|
||||||
};
|
};
|
||||||
|
@ -545,7 +545,7 @@ default_t defaults[] = {
|
|||||||
"default_skill",
|
"default_skill",
|
||||||
(config_t *) &defaultskill, NULL,
|
(config_t *) &defaultskill, NULL,
|
||||||
{4}, {1,5}, number, ss_gen, wad_no,
|
{4}, {1,5}, number, ss_gen, wad_no,
|
||||||
"selects default skill (1 = TYTD, 2 = NTR, 3 = HMP, 4 = UV, 5 = NM)"
|
"selects default skill (1 = ITYTD, 2 = HNTR, 3 = HMP, 4 = UV, 5 = NM)"
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // killough 3/6/98: preserve autorun across games
|
{ // killough 3/6/98: preserve autorun across games
|
||||||
|
Loading…
x
Reference in New Issue
Block a user