mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-28 20:40:47 +00:00
- fixed skill selection in Duke.
Screw these old shadowing menu variables. Well, the one for skill is gone now. Fixes #344
This commit is contained in:
parent
9af093b818
commit
fa50cde93f
5 changed files with 15 additions and 31 deletions
|
@ -363,17 +363,7 @@ CVAR(Bool, am_nameontop, false, CVAR_ARCHIVE)
|
||||||
|
|
||||||
|
|
||||||
CVAR(Int, m_coop, 0, CVAR_NOSET)
|
CVAR(Int, m_coop, 0, CVAR_NOSET)
|
||||||
|
//CVAR(Int, skill, 2, CVAR_ARCHIVE)
|
||||||
#if 0
|
|
||||||
|
|
||||||
/*
|
|
||||||
|
|
||||||
|
|
||||||
// Currently unavailable due to dependency on an obsolete OpenGL feature
|
// Currently unavailable due to dependency on an obsolete OpenGL feature
|
||||||
{ "deliriumblur", "enable/disable delirium blur effect(polymost)", (void *)&gDeliriumBlur, CVAR_BOOL, 0, 1 },
|
//{ "deliriumblur", "enable/disable delirium blur effect(polymost)", (void *)&gDeliriumBlur, CVAR_BOOL, 0, 1 },
|
||||||
|
|
||||||
// This requires a different approach, because it got used like a CCMD, not a CVAR.
|
|
||||||
{ "skill","changes the game skill setting", (void *)&ud.m_player_skill, CVAR_INT|CVAR_FUNCPTR|CVAR_NOSAVE/*|CVAR_NOMULTI*/, 0, 5 },
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -55,13 +55,7 @@ int registerosdcommands(void);
|
||||||
|
|
||||||
static void checkcommandline()
|
static void checkcommandline()
|
||||||
{
|
{
|
||||||
auto val = Args->CheckValue("-skill");
|
#if 0
|
||||||
if (!val) val = Args->CheckValue("-s");
|
|
||||||
if (val)
|
|
||||||
{
|
|
||||||
ud.m_player_skill = ud.player_skill = clamp((int)strtol(val, nullptr, 0), 0, 5);
|
|
||||||
if (ud.m_player_skill == 4) ud.m_respawn_monsters = ud.respawn_monsters = 1;
|
|
||||||
}
|
|
||||||
val = Args->CheckValue("-respawn");
|
val = Args->CheckValue("-respawn");
|
||||||
if (!val) val = Args->CheckValue("-t");
|
if (!val) val = Args->CheckValue("-t");
|
||||||
if (val)
|
if (val)
|
||||||
|
@ -77,6 +71,7 @@ static void checkcommandline()
|
||||||
}
|
}
|
||||||
Printf("Respawn on.\n");
|
Printf("Respawn on.\n");
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
@ -281,7 +276,7 @@ void GameInterface::app_init()
|
||||||
ud.m_respawn_monsters = 0;
|
ud.m_respawn_monsters = 0;
|
||||||
ud.m_respawn_inventory = 0;
|
ud.m_respawn_inventory = 0;
|
||||||
ud.cashman = 0;
|
ud.cashman = 0;
|
||||||
ud.m_player_skill = ud.player_skill = 2;
|
ud.player_skill = 2;
|
||||||
ud.wchoice[0][0] = 3;
|
ud.wchoice[0][0] = 3;
|
||||||
ud.wchoice[0][1] = 4;
|
ud.wchoice[0][1] = 4;
|
||||||
ud.wchoice[0][2] = 5;
|
ud.wchoice[0][2] = 5;
|
||||||
|
@ -343,7 +338,7 @@ void GameInterface::app_init()
|
||||||
if (ud.multimode > 1)
|
if (ud.multimode > 1)
|
||||||
{
|
{
|
||||||
ud.m_monsters_off = 1;
|
ud.m_monsters_off = 1;
|
||||||
ud.m_player_skill = 0;
|
//ud.player_skill = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
ud.last_level = -1;
|
ud.last_level = -1;
|
||||||
|
|
|
@ -121,7 +121,7 @@ void GameInterface::Startup()
|
||||||
userConfig.CommandMap = "";
|
userConfig.CommandMap = "";
|
||||||
if (maprecord)
|
if (maprecord)
|
||||||
{
|
{
|
||||||
ud.m_respawn_monsters = ud.m_player_skill == 4;
|
ud.m_respawn_monsters = ud.player_skill == 4;
|
||||||
|
|
||||||
for (int i = 0; i != -1; i = connectpoint2[i])
|
for (int i = 0; i != -1; i = connectpoint2[i])
|
||||||
{
|
{
|
||||||
|
@ -164,7 +164,7 @@ void GameInterface::Render()
|
||||||
|
|
||||||
void GameInterface::NextLevel(MapRecord* map, int skill)
|
void GameInterface::NextLevel(MapRecord* map, int skill)
|
||||||
{
|
{
|
||||||
if (skill != -1) ud.m_player_skill = skill + 1;
|
if (skill != -1) ud.player_skill = skill + 1;
|
||||||
int res = enterlevel(map, 0);
|
int res = enterlevel(map, 0);
|
||||||
if (res) gameaction = ga_startup;
|
if (res) gameaction = ga_startup;
|
||||||
}
|
}
|
||||||
|
|
|
@ -243,9 +243,9 @@ void resetplayerstats(int snum)
|
||||||
|
|
||||||
if (numplayers < 2)
|
if (numplayers < 2)
|
||||||
{
|
{
|
||||||
ufospawn = isRRRA()? 3 : std::min(ud.m_player_skill*4+1, 32);
|
ufospawn = isRRRA()? 3 : std::min(ud.player_skill*4+1, 32);
|
||||||
ufocnt = 0;
|
ufocnt = 0;
|
||||||
hulkspawn = ud.m_player_skill + 1;
|
hulkspawn = ud.player_skill + 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -363,9 +363,9 @@ void resetinventory(int snum)
|
||||||
|
|
||||||
if (numplayers < 2)
|
if (numplayers < 2)
|
||||||
{
|
{
|
||||||
ufospawn = std::min(ud.m_player_skill*4+1, 32);
|
ufospawn = std::min(ud.player_skill*4+1, 32);
|
||||||
ufocnt = 0;
|
ufocnt = 0;
|
||||||
hulkspawn = ud.m_player_skill + 1;
|
hulkspawn = ud.player_skill + 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -483,9 +483,9 @@ void resetprestat(int snum,int g)
|
||||||
|
|
||||||
if (numplayers < 2)
|
if (numplayers < 2)
|
||||||
{
|
{
|
||||||
ufospawn = std::min(ud.m_player_skill*4+1, 32);
|
ufospawn = std::min(ud.player_skill*4+1, 32);
|
||||||
ufocnt = 0;
|
ufocnt = 0;
|
||||||
hulkspawn = ud.m_player_skill + 1;
|
hulkspawn = ud.player_skill + 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1006,7 +1006,7 @@ int enterlevel(MapRecord *mi, int gamemode)
|
||||||
|
|
||||||
void startnewgame(MapRecord* map, int skill)
|
void startnewgame(MapRecord* map, int skill)
|
||||||
{
|
{
|
||||||
ud.m_player_skill = skill;
|
ud.player_skill = skill;
|
||||||
ud.m_respawn_monsters = (skill == 4);
|
ud.m_respawn_monsters = (skill == 4);
|
||||||
ud.m_monsters_off = ud.monsters_off = 0;
|
ud.m_monsters_off = ud.monsters_off = 0;
|
||||||
ud.m_respawn_items = 0;
|
ud.m_respawn_items = 0;
|
||||||
|
|
|
@ -488,7 +488,6 @@ void GameInterface::SerializeGameState(FSerializer& arc)
|
||||||
screenpeek = myconnectindex;
|
screenpeek = myconnectindex;
|
||||||
ud.recstat = 0;
|
ud.recstat = 0;
|
||||||
|
|
||||||
ud.m_player_skill = ud.player_skill;
|
|
||||||
ud.m_respawn_monsters = ud.respawn_monsters;
|
ud.m_respawn_monsters = ud.respawn_monsters;
|
||||||
ud.m_respawn_items = ud.respawn_items;
|
ud.m_respawn_items = ud.respawn_items;
|
||||||
ud.m_respawn_inventory = ud.respawn_inventory;
|
ud.m_respawn_inventory = ud.respawn_inventory;
|
||||||
|
|
Loading…
Reference in a new issue