From e1440f48f6dd86819d1a519582360bed75469721 Mon Sep 17 00:00:00 2001 From: jacob1 Date: Tue, 18 Dec 2012 16:26:24 -0500 Subject: use kill_part when creating a new particle over an index, fixes STKM not respawning after CONV and probably other stuff too 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; } -- cgit v0.9.2-21-gd62e