summaryrefslogtreecommitdiff
path: root/src/simulation/Simulation.cpp
diff options
context:
space:
mode:
authorjacob1 <jfu614@gmail.com>2012-12-18 21:26:24 (GMT)
committer jacob1 <jfu614@gmail.com>2012-12-18 21:26:24 (GMT)
commite1440f48f6dd86819d1a519582360bed75469721 (patch)
tree8a3045ca07701f58460ffdb577a25d35fabd1d32 /src/simulation/Simulation.cpp
parentdc0e47ac00459664a33d92a316f4e6a504b85919 (diff)
downloadpowder-e1440f48f6dd86819d1a519582360bed75469721.zip
powder-e1440f48f6dd86819d1a519582360bed75469721.tar.gz
use kill_part when creating a new particle over an index, fixes STKM not respawning after CONV and probably other stuff too
Diffstat (limited to 'src/simulation/Simulation.cpp')
-rw-r--r--src/simulation/Simulation.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp
index 39f496c..69f12c7 100644
--- a/src/simulation/Simulation.cpp
+++ b/src/simulation/Simulation.cpp
@@ -2846,12 +2846,7 @@ int Simulation::create_part(int p, int x, int y, int tv)
}
else
{
- int oldX = (int)(parts[p].x+0.5f);
- int oldY = (int)(parts[p].y+0.5f);
- if ((pmap[oldY][oldX]>>8)==p)
- pmap[oldY][oldX] = 0;
- if ((photons[oldY][oldX]>>8)==p)
- photons[oldY][oldX] = 0;
+ kill_part(p);
i = p;
}