From d6e898be38e951a170cec75aa182ce80bc78b2c3 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Tue, 21 Feb 2012 22:11:52 +0000 Subject: [PATCH] - 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) --- src/p_udmf.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/p_udmf.cpp b/src/p_udmf.cpp index cdf2562f1..ab0a3e8af 100644 --- a/src/p_udmf.cpp +++ b/src/p_udmf.cpp @@ -346,7 +346,7 @@ int GetUDMFInt(int type, int index, const char *key) FUDMFKey *pKey = pKeys->Find(key); if (pKey != NULL) { - return FLOAT2FIXED(pKey->IntVal); + return pKey->IntVal; } } } @@ -414,14 +414,14 @@ public: { switch (sc.TokenType) { - case TK_Int: + case TK_IntConst: keyarray[i] = sc.Number; break; - case TK_Float: + case TK_FloatConst: keyarray[i] = sc.Float; break; default: - case TK_String: + case TK_StringConst: keyarray[i] = parsedString; break; case TK_True: @@ -438,14 +438,14 @@ public: ukey.Key = key; switch (sc.TokenType) { - case TK_Int: + case TK_IntConst: ukey = sc.Number; break; - case TK_Float: + case TK_FloatConst: ukey = sc.Float; break; default: - case TK_String: + case TK_StringConst: ukey = parsedString; break; case TK_True: