mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-16 09:31:14 +00:00
- fixed key number assignment during parsing of locks
https://forum.zdoom.org/viewtopic.php?t=63171
This commit is contained in:
parent
56be11bbe3
commit
039b91859a
1 changed files with 4 additions and 4 deletions
|
@ -233,7 +233,7 @@ static void PrintMessage (const char *str)
|
|||
//
|
||||
//===========================================================================
|
||||
|
||||
static void ParseLock(FScanner &sc)
|
||||
static void ParseLock(FScanner &sc, int ¤tnumber)
|
||||
{
|
||||
int i,r,g,b;
|
||||
int keynum;
|
||||
|
@ -250,7 +250,6 @@ static void ParseLock(FScanner &sc)
|
|||
sc.MustGetStringName("{");
|
||||
}
|
||||
|
||||
int currentnumber = 0;
|
||||
if (keynum == 0 || keynum < -1)
|
||||
{
|
||||
sc.ScriptError("Lock index %d out of range", keynum);
|
||||
|
@ -422,7 +421,7 @@ static void CreateSortedKeyList()
|
|||
|
||||
void P_InitKeyMessages()
|
||||
{
|
||||
int lastlump, lump;
|
||||
int lastlump, lump, currentnumber = 0;
|
||||
|
||||
lastlump = 0;
|
||||
|
||||
|
@ -434,12 +433,13 @@ void P_InitKeyMessages()
|
|||
{
|
||||
if (sc.Compare("LOCK"))
|
||||
{
|
||||
ParseLock(sc);
|
||||
ParseLock(sc, currentnumber);
|
||||
}
|
||||
else if (sc.Compare("CLEARLOCKS"))
|
||||
{
|
||||
// clear all existing lock definitions and key numbers
|
||||
ClearLocks();
|
||||
currentnumber = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue