summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjacob1 <jfu614@gmail.com>2013-06-27 16:10:55 (GMT)
committer jacob1 <jfu614@gmail.com>2013-06-27 16:10:55 (GMT)
commitc1320d200735ab3a0e25d169a4bb329de2bb40ba (patch)
tree16c44f1ac29b19ba7e4020b5e8fde413768e71e8 /src
parent776b2f6607acf43ec64f0479001d049a4cc0d854 (diff)
downloadpowder-c1320d200735ab3a0e25d169a4bb329de2bb40ba.zip
powder-c1320d200735ab3a0e25d169a4bb329de2bb40ba.tar.gz
fix sim.loadStamp return value, remove VINE_MODE
Diffstat (limited to 'src')
-rw-r--r--src/cat/LuaScriptInterface.cpp3
-rw-r--r--src/client/Client.cpp2
-rw-r--r--src/simulation/Simulation.cpp3
-rw-r--r--src/simulation/Simulation.h1
-rw-r--r--src/simulation/elements/PLNT.cpp2
5 files changed, 5 insertions, 6 deletions
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;