fixed loading scenario to read lua number as a float

This commit is contained in:
Mark Vejvoda 2013-09-19 07:12:48 +00:00
parent f344aac3f8
commit bbe7042b2d
1 changed files with 3 additions and 3 deletions

View File

@ -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() );