From c1320d200735ab3a0e25d169a4bb329de2bb40ba Mon Sep 17 00:00:00 2001 From: jacob1 Date: Thu, 27 Jun 2013 12:10:55 -0400 Subject: fix sim.loadStamp return value, remove VINE_MODE diff --git a/src/cat/LuaScriptInterface.cpp b/src/cat/LuaScriptInterface.cpp index 237763e..1653e28 100644 --- a/src/cat/LuaScriptInterface.cpp +++ b/src/cat/LuaScriptInterface.cpp @@ -1366,13 +1366,14 @@ int LuaScriptInterface::simulation_loadStamp(lua_State * l) } if (tempfile) { - if (luacon_sim->Load(x, y, tempfile->GetGameSave())) + if (!luacon_sim->Load(x, y, tempfile->GetGameSave())) { //luacon_sim->sys_pause = (tempfile->GetGameSave()->paused | luacon_model->GetPaused())?1:0; lua_pushinteger(l, 1); } else lua_pushnil(l); + delete tempfile; } else lua_pushnil(l); diff --git a/src/client/Client.cpp b/src/client/Client.cpp index b508d9f..2a091aa 100644 --- a/src/client/Client.cpp +++ b/src/client/Client.cpp @@ -1338,7 +1338,7 @@ LoginStatus Client::Login(std::string username, std::string password, User & use } catch (json::Exception &e) { - lastError = "Server responded with crap"; + lastError = "Could not read response"; return LoginError; } } diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index a45ef10..e45f5a8 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -38,7 +38,7 @@ int Simulation::Load(int fullX, int fullY, GameSave * save) { int blockX, blockY, x, y, r; - if(!save) return 0; + if(!save) return 1; save->Expand(); //Align to blockMap @@ -4758,7 +4758,6 @@ Simulation::Simulation(): lighting_recreate(0), force_stacking_check(0), ISWIRE(0), - VINE_MODE(0), gravWallChanged(false), replaceModeSelected(0), replaceModeFlags(0) diff --git a/src/simulation/Simulation.h b/src/simulation/Simulation.h index 9062f13..31bb5e4 100644 --- a/src/simulation/Simulation.h +++ b/src/simulation/Simulation.h @@ -108,7 +108,6 @@ public: int gravityMode; int legacy_enable; int aheat_enable; - int VINE_MODE; int water_equal_test; int sys_pause; int framerender; diff --git a/src/simulation/elements/PLNT.cpp b/src/simulation/elements/PLNT.cpp index 61218d5..99890e6 100644 --- a/src/simulation/elements/PLNT.cpp +++ b/src/simulation/elements/PLNT.cpp @@ -81,7 +81,7 @@ int Element_PLNT::update(UPDATE_FUNC_ARGS) } break; case PT_WOOD: - if (surround_space && !(rand()%4) && (abs(rx+ry)<=2) && (sim->VINE_MODE || parts[i].tmp==1)) + if (surround_space && !(rand()%4) && (abs(rx+ry)<=2) && parts[i].tmp==1) { int nnx = rand()%3 -1; int nny = rand()%3 -1; -- cgit v0.9.2-21-gd62e