summaryrefslogtreecommitdiff
path: root/src/simulation
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2013-05-11 10:52:35 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2013-05-11 10:52:35 (GMT)
commitc2cdec9e621a2af25a256a484fdf68adc46ea96f (patch)
tree69aee231e52e8ef85842b6b695c10f6f04aa4b25 /src/simulation
parentd1c8978a34906c1adb6bdc3fbae7f12c06aa8324 (diff)
downloadpowder-c2cdec9e621a2af25a256a484fdf68adc46ea96f.zip
powder-c2cdec9e621a2af25a256a484fdf68adc46ea96f.tar.gz
Togglable lua scripting
Diffstat (limited to 'src/simulation')
-rw-r--r--src/simulation/Simulation.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp
index c1f56f7..50239b1 100644
--- a/src/simulation/Simulation.cpp
+++ b/src/simulation/Simulation.cpp
@@ -24,8 +24,10 @@
#include "Snapshot.h"
//#include "StorageClasses.h"
+#ifdef LUACONSOLE
#include "cat/LuaScriptInterface.h"
#include "cat/LuaScriptHelper.h"
+#endif
int Simulation::Load(GameSave * save)
{
@@ -4196,7 +4198,11 @@ void Simulation::update_particles_i(int start, int inc)
}
//call the particle update function, if there is one
+#if !defined(RENDERER) && defined(LUACONSOLE)
if (elements[t].Update && lua_el_mode[t] != 2)
+#else
+ if (elements[t].Update)
+#endif
{
if ((*(elements[t].Update))(this, i, x, y, surround_space, nt, parts, pmap))
continue;
@@ -4207,6 +4213,7 @@ void Simulation::update_particles_i(int start, int inc)
y = (int)(parts[i].y+0.5f);
}
}
+#if !defined(RENDERER) && defined(LUACONSOLE)
if(lua_el_mode[t])
{
if(luacon_elementReplacement(this, i, x, y, surround_space, nt, parts, pmap))
@@ -4215,6 +4222,7 @@ void Simulation::update_particles_i(int start, int inc)
x = (int)(parts[i].x+0.5f);
y = (int)(parts[i].y+0.5f);
}
+#endif
if(legacy_enable)//if heat sim is off
Element::legacyUpdate(this, i,x,y,surround_space,nt, parts, pmap);