mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-26 03:30:46 +00:00
Remove special limitations on CON customization access to the DNCGS cheat.
git-svn-id: https://svn.eduke32.com/eduke32@6349 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
f164fde06b
commit
c980410ecc
2 changed files with 7 additions and 8 deletions
|
@ -314,9 +314,7 @@ void G_DoCheats(void)
|
||||||
|
|
||||||
FOUNDCHEAT:;
|
FOUNDCHEAT:;
|
||||||
|
|
||||||
int i = VM_OnEventWithReturn(EVENT_ACTIVATECHEAT, pPlayer->i, myconnectindex, cheatNum);
|
cheatNum = VM_OnEventWithReturn(EVENT_ACTIVATECHEAT, pPlayer->i, myconnectindex, cheatNum);
|
||||||
if (cheatNum != CHEAT_COMEGETSOME) // Users are not allowed to interfere with TX's debugging cheat.
|
|
||||||
cheatNum = i;
|
|
||||||
|
|
||||||
{
|
{
|
||||||
switch (cheatNum)
|
switch (cheatNum)
|
||||||
|
@ -468,7 +466,7 @@ void G_DoCheats(void)
|
||||||
case CHEAT_SKILL:
|
case CHEAT_SKILL:
|
||||||
if (cheatNum == CHEAT_SCOTTY)
|
if (cheatNum == CHEAT_SCOTTY)
|
||||||
{
|
{
|
||||||
i = Bstrlen(CheatStrings[cheatNum])-3+VOLUMEONE;
|
size_t const i = Bstrlen(CheatStrings[cheatNum])-3+VOLUMEONE;
|
||||||
if (!consoleCheat)
|
if (!consoleCheat)
|
||||||
{
|
{
|
||||||
// JBF 20030914
|
// JBF 20030914
|
||||||
|
@ -508,7 +506,7 @@ void G_DoCheats(void)
|
||||||
{
|
{
|
||||||
if (!consoleCheat)
|
if (!consoleCheat)
|
||||||
{
|
{
|
||||||
i = Bstrlen(CheatStrings[cheatNum])-1;
|
size_t const i = Bstrlen(CheatStrings[cheatNum])-1;
|
||||||
ud.m_player_skill = ud.player_skill = cheatbuf[i] - '1';
|
ud.m_player_skill = ud.player_skill = cheatbuf[i] - '1';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -548,7 +546,7 @@ void G_DoCheats(void)
|
||||||
case CHEAT_UNLOCK:
|
case CHEAT_UNLOCK:
|
||||||
if (VOLUMEONE) return;
|
if (VOLUMEONE) return;
|
||||||
|
|
||||||
for (i=numsectors-1; i>=0; i--) //Unlock
|
for (bssize_t i=numsectors-1; i>=0; i--) //Unlock
|
||||||
{
|
{
|
||||||
int const lotag = sector[i].lotag;
|
int const lotag = sector[i].lotag;
|
||||||
if (lotag == -1 || lotag == 32767) continue;
|
if (lotag == -1 || lotag == 32767) continue;
|
||||||
|
@ -581,7 +579,7 @@ void G_DoCheats(void)
|
||||||
case CHEAT_SHOWMAP: // SHOW ALL OF THE MAP TOGGLE;
|
case CHEAT_SHOWMAP: // SHOW ALL OF THE MAP TOGGLE;
|
||||||
ud.showallmap = !ud.showallmap;
|
ud.showallmap = !ud.showallmap;
|
||||||
|
|
||||||
for (i=0; i<(MAXSECTORS>>3); i++)
|
for (bssize_t i=0; i<(MAXSECTORS>>3); i++)
|
||||||
show2dsector[i] = ud.showallmap*255;
|
show2dsector[i] = ud.showallmap*255;
|
||||||
|
|
||||||
P_DoQuote(ud.showallmap ? QUOTE_SHOW_MAP_ON : QUOTE_SHOW_MAP_OFF,
|
P_DoQuote(ud.showallmap ? QUOTE_SHOW_MAP_ON : QUOTE_SHOW_MAP_OFF,
|
||||||
|
|
|
@ -27,6 +27,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
#include "savegame.h"
|
#include "savegame.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "common_game.h"
|
#include "common_game.h"
|
||||||
|
#include "cheats.h"
|
||||||
|
|
||||||
#include "osd.h"
|
#include "osd.h"
|
||||||
|
|
||||||
|
@ -5798,7 +5799,7 @@ repeatcase:
|
||||||
C_GetNextValue(LABEL_DEFINE);
|
C_GetNextValue(LABEL_DEFINE);
|
||||||
k = *(g_scriptPtr-1);
|
k = *(g_scriptPtr-1);
|
||||||
|
|
||||||
if (EDUKE32_PREDICT_FALSE(k > 25))
|
if (EDUKE32_PREDICT_FALSE((unsigned)k >= NUMCHEATS))
|
||||||
{
|
{
|
||||||
initprintf("%s:%d: error: cheat redefinition attempts to redefine nonexistent cheat.\n",g_scriptFileName,g_lineNumber);
|
initprintf("%s:%d: error: cheat redefinition attempts to redefine nonexistent cheat.\n",g_scriptFileName,g_lineNumber);
|
||||||
g_errorCnt++;
|
g_errorCnt++;
|
||||||
|
|
Loading…
Reference in a new issue