mirror of
https://github.com/glest/glest-source.git
synced 2025-02-24 19:52:25 +01:00
fixed loading scenario to read lua number as a float
This commit is contained in:
parent
f344aac3f8
commit
bbe7042b2d
@ -421,7 +421,7 @@ void LuaScript::loadGame(const XmlNode *rootNode) {
|
||||
lua_pushstring( luaState, node->getAttribute("value")->getValue().c_str() );
|
||||
break;
|
||||
case LUA_TNUMBER:
|
||||
lua_pushnumber( luaState, node->getAttribute("value")->getIntValue() );
|
||||
lua_pushnumber( luaState, node->getAttribute("value")->getFloatValue() );
|
||||
break;
|
||||
case LUA_TBOOLEAN:
|
||||
lua_pushboolean( luaState, node->getAttribute("value")->getBoolValue() );
|
||||
@ -439,7 +439,7 @@ void LuaScript::loadGame(const XmlNode *rootNode) {
|
||||
lua_pushstring( luaState, nodeTable->getAttribute("key")->getValue().c_str() );
|
||||
break;
|
||||
case LUA_TNUMBER:
|
||||
lua_pushnumber( luaState, nodeTable->getAttribute("key")->getIntValue() );
|
||||
lua_pushnumber( luaState, nodeTable->getAttribute("key")->getFloatValue() );
|
||||
break;
|
||||
case LUA_TBOOLEAN:
|
||||
lua_pushboolean( luaState, nodeTable->getAttribute("key")->getIntValue() );
|
||||
@ -451,7 +451,7 @@ void LuaScript::loadGame(const XmlNode *rootNode) {
|
||||
lua_pushstring( luaState, nodeTable->getAttribute("value")->getValue().c_str() );
|
||||
break;
|
||||
case LUA_TNUMBER:
|
||||
lua_pushnumber( luaState, nodeTable->getAttribute("value")->getIntValue() );
|
||||
lua_pushnumber( luaState, nodeTable->getAttribute("value")->getFloatValue() );
|
||||
break;
|
||||
case LUA_TBOOLEAN:
|
||||
lua_pushboolean( luaState, nodeTable->getAttribute("value")->getIntValue() );
|
||||
|
Loading…
x
Reference in New Issue
Block a user