mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-13 07:58:04 +00:00
- SW: map cheat partially reimplemented.
This commit is contained in:
parent
12af524dcc
commit
ee191f0681
2 changed files with 13 additions and 7 deletions
|
@ -52,6 +52,7 @@ BEGIN_SW_NS
|
||||||
SWBOOL CheatInputMode = FALSE;
|
SWBOOL CheatInputMode = FALSE;
|
||||||
SWBOOL EveryCheat = FALSE;
|
SWBOOL EveryCheat = FALSE;
|
||||||
SWBOOL ResCheat = FALSE;
|
SWBOOL ResCheat = FALSE;
|
||||||
|
SWBOOL mapcheat = false;
|
||||||
|
|
||||||
const char *CheatKeyType;
|
const char *CheatKeyType;
|
||||||
void KeysCheat(PLAYERp pp, const char *cheat_string);
|
void KeysCheat(PLAYERp pp, const char *cheat_string);
|
||||||
|
@ -96,8 +97,9 @@ void PrevCheat(PLAYERp pp, const char *)
|
||||||
|
|
||||||
void MapCheat(PLAYERp pp, const char *)
|
void MapCheat(PLAYERp pp, const char *)
|
||||||
{
|
{
|
||||||
|
mapcheat = !mapcheat;
|
||||||
// Need to do this differently. The code here was completely broken.
|
// Need to do this differently. The code here was completely broken.
|
||||||
PutStringInfo(pp, GStrings(automapping ? "TXT_AMON" : "TXT_AMOFF"));
|
PutStringInfo(pp, GStrings(mapcheat ? "TXT_AMON" : "TXT_AMOFF"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void LocCheat(PLAYERp pp, const char *)
|
void LocCheat(PLAYERp pp, const char *)
|
||||||
|
|
|
@ -111,6 +111,7 @@ signed char MNU_InputSmallString(char*, short);
|
||||||
signed char MNU_InputString(char*, short);
|
signed char MNU_InputString(char*, short);
|
||||||
SWBOOL IsCommand(const char* str);
|
SWBOOL IsCommand(const char* str);
|
||||||
SWBOOL MNU_StartNetGame(void);
|
SWBOOL MNU_StartNetGame(void);
|
||||||
|
extern SWBOOL mapcheat;
|
||||||
|
|
||||||
extern SWBOOL MultiPlayQuitFlag;
|
extern SWBOOL MultiPlayQuitFlag;
|
||||||
|
|
||||||
|
@ -3558,10 +3559,13 @@ void drawoverheadmap(int cposx, int cposy, int czoom, short cang)
|
||||||
if ((unsigned)k >= MAXWALLS)
|
if ((unsigned)k >= MAXWALLS)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if (!mapcheat)
|
||||||
|
{
|
||||||
if ((show2dwall[j >> 3] & (1 << (j & 7))) == 0)
|
if ((show2dwall[j >> 3] & (1 << (j & 7))) == 0)
|
||||||
continue;
|
continue;
|
||||||
if ((k > j) && ((show2dwall[k >> 3] & (1 << (k & 7))) > 0))
|
if ((k > j) && ((show2dwall[k >> 3] & (1 << (k & 7))) > 0))
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (sector[wal->nextsector].ceilingz == z1)
|
if (sector[wal->nextsector].ceilingz == z1)
|
||||||
if (sector[wal->nextsector].floorz == z2)
|
if (sector[wal->nextsector].floorz == z2)
|
||||||
|
@ -3616,7 +3620,7 @@ void drawoverheadmap(int cposx, int cposy, int czoom, short cang)
|
||||||
goto SHOWSPRITE;
|
goto SHOWSPRITE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ((show2dsprite[j >> 3] & (1 << (j & 7))) > 0)
|
if (mapcheat || (show2dsprite[j >> 3] & (1 << (j & 7))) > 0)
|
||||||
{
|
{
|
||||||
SHOWSPRITE:
|
SHOWSPRITE:
|
||||||
spr = &sprite[j];
|
spr = &sprite[j];
|
||||||
|
@ -3811,7 +3815,7 @@ SHOWSPRITE:
|
||||||
if ((uint16_t)wal->nextwall < MAXWALLS)
|
if ((uint16_t)wal->nextwall < MAXWALLS)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if ((show2dwall[j >> 3] & (1 << (j & 7))) == 0)
|
if (!mapcheat && (show2dwall[j >> 3] & (1 << (j & 7))) == 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (tilesiz[wal->picnum].x == 0)
|
if (tilesiz[wal->picnum].x == 0)
|
||||||
|
|
Loading…
Reference in a new issue