mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-12-02 17:02:25 +00:00
- Fixed: UDMFParser::AddUserKey() checked against the wrong token types when determining
the values type. Also, GetUDMFInt() performed a float-to-fixed conversion on the value it returned. SVN r3381 (trunk)
This commit is contained in:
parent
472ac1b07c
commit
d6e898be38
1 changed files with 7 additions and 7 deletions
|
@ -346,7 +346,7 @@ int GetUDMFInt(int type, int index, const char *key)
|
||||||
FUDMFKey *pKey = pKeys->Find(key);
|
FUDMFKey *pKey = pKeys->Find(key);
|
||||||
if (pKey != NULL)
|
if (pKey != NULL)
|
||||||
{
|
{
|
||||||
return FLOAT2FIXED(pKey->IntVal);
|
return pKey->IntVal;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -414,14 +414,14 @@ public:
|
||||||
{
|
{
|
||||||
switch (sc.TokenType)
|
switch (sc.TokenType)
|
||||||
{
|
{
|
||||||
case TK_Int:
|
case TK_IntConst:
|
||||||
keyarray[i] = sc.Number;
|
keyarray[i] = sc.Number;
|
||||||
break;
|
break;
|
||||||
case TK_Float:
|
case TK_FloatConst:
|
||||||
keyarray[i] = sc.Float;
|
keyarray[i] = sc.Float;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
case TK_String:
|
case TK_StringConst:
|
||||||
keyarray[i] = parsedString;
|
keyarray[i] = parsedString;
|
||||||
break;
|
break;
|
||||||
case TK_True:
|
case TK_True:
|
||||||
|
@ -438,14 +438,14 @@ public:
|
||||||
ukey.Key = key;
|
ukey.Key = key;
|
||||||
switch (sc.TokenType)
|
switch (sc.TokenType)
|
||||||
{
|
{
|
||||||
case TK_Int:
|
case TK_IntConst:
|
||||||
ukey = sc.Number;
|
ukey = sc.Number;
|
||||||
break;
|
break;
|
||||||
case TK_Float:
|
case TK_FloatConst:
|
||||||
ukey = sc.Float;
|
ukey = sc.Float;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
case TK_String:
|
case TK_StringConst:
|
||||||
ukey = parsedString;
|
ukey = parsedString;
|
||||||
break;
|
break;
|
||||||
case TK_True:
|
case TK_True:
|
||||||
|
|
Loading…
Reference in a new issue