summaryrefslogtreecommitdiff
path: root/src/simulation
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-04-17 17:07:22 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-04-17 17:07:22 (GMT)
commit2417ad3b41589f07eecb6e32c913c8858589c13c (patch)
tree77e5afe0749d87eb16e5a281ff670b1f4b981475 /src/simulation
parent89788d43c3c45bf0535b200a7703b91e0297208b (diff)
downloadpowder-2417ad3b41589f07eecb6e32c913c8858589c13c.zip
powder-2417ad3b41589f07eecb6e32c913c8858589c13c.tar.gz
TPT: Prevent gaps in beams of photons from powered clone 3702438482
Diffstat (limited to 'src/simulation')
-rw-r--r--src/simulation/Elements.h1
-rw-r--r--src/simulation/Simulation.cpp6
2 files changed, 7 insertions, 0 deletions
diff --git a/src/simulation/Elements.h b/src/simulation/Elements.h
index 9e7e654..8acafde 100644
--- a/src/simulation/Elements.h
+++ b/src/simulation/Elements.h
@@ -46,6 +46,7 @@
#define PROP_SPARKSETTLE 0x20000 //2^17 Allow Sparks/Embers to settle
#define FLAG_STAGNANT 1
+#define FLAG_SKIPMOVE 0x2 // skip movement for one frame, only implemented for PHOT
#define ST_NONE 0
#define ST_SOLID 1
diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp
index 9b23ae2..8396b93 100644
--- a/src/simulation/Simulation.cpp
+++ b/src/simulation/Simulation.cpp
@@ -2922,6 +2922,12 @@ killed:
if ((t==PT_PHOT||t==PT_NEUT||t==PT_ELEC)) {
if (t == PT_PHOT) {
+ if (parts[i].flags&FLAG_SKIPMOVE)
+ {
+ parts[i].flags &= ~FLAG_SKIPMOVE;
+ continue;
+ }
+
rt = pmap[fin_y][fin_x] & 0xFF;
lt = pmap[y][x] & 0xFF;