summaryrefslogtreecommitdiff
path: root/src/simulation/Simulation.cpp
diff options
context:
space:
mode:
authorjacob1 <jfu614@gmail.com>2013-02-09 03:24:34 (GMT)
committer jacob1 <jfu614@gmail.com>2013-02-09 03:24:34 (GMT)
commit1359045b14a455c5ee54a7b066e606a3b76368b0 (patch)
treee870d360cd4c70338ee0f217361851f1fe947b74 /src/simulation/Simulation.cpp
parentb8d53b5f7659f6b95f025a900d3b9982400dcc59 (diff)
downloadpowder-1359045b14a455c5ee54a7b066e606a3b76368b0.zip
powder-1359045b14a455c5ee54a7b066e606a3b76368b0.tar.gz
fix tpt.selectedl not updating with sample brush, always put photons[] on top in HUD
Diffstat (limited to 'src/simulation/Simulation.cpp')
-rw-r--r--src/simulation/Simulation.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp
index 1a090f7..ad5ed63 100644
--- a/src/simulation/Simulation.cpp
+++ b/src/simulation/Simulation.cpp
@@ -478,16 +478,16 @@ SimulationSample Simulation::Get(int x, int y)
SimulationSample sample;
sample.PositionX = x;
sample.PositionY = y;
- if(pmap[y][x])
- {
- sample.particle = parts[pmap[y][x]>>8];
- sample.ParticleID = pmap[y][x]>>8;
- }
- else if(photons[y][x])
+ if (photons[y][x])
{
sample.particle = parts[photons[y][x]>>8];
sample.ParticleID = photons[y][x]>>8;
}
+ else if (pmap[y][x])
+ {
+ sample.particle = parts[pmap[y][x]>>8];
+ sample.ParticleID = pmap[y][x]>>8;
+ }
if (bmap[y/CELL][x/CELL])
{
sample.WallType = bmap[y/CELL][x/CELL];