diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2012-08-09 20:28:43 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2012-08-09 20:28:43 (GMT) |
| commit | b01b0e422a7486a4d1063b54a3c9713e2c1456c4 (patch) | |
| tree | 25b30ca04673b1b7e54190c918388bce6d5e149b /src/simulation/Simulation.cpp | |
| parent | 9971ea63b7aca6f23dfdee9ceb5d7cb3dcd1fa58 (diff) | |
| download | powder-b01b0e422a7486a4d1063b54a3c9713e2c1456c4.zip powder-b01b0e422a7486a4d1063b54a3c9713e2c1456c4.tar.gz | |
HUD verbose sample info with 'd', fixes #71
Diffstat (limited to 'src/simulation/Simulation.cpp')
| -rw-r--r-- | src/simulation/Simulation.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index 880d2b1..717eb80 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -351,10 +351,18 @@ int Simulation::flood_prop(int x, int y, size_t propoffset, void * propvalue, St 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]; - if(photons[y][x]) + sample.ParticleID = pmap[y][x]>>8; + } + else if(photons[y][x]) + { sample.particle = parts[photons[y][x]>>8]; + sample.ParticleID = photons[y][x]>>8; + } sample.AirPressure = pv[y/CELL][x/CELL]; sample.AirTemperature = hv[y/CELL][x/CELL]; sample.AirVelocityX = vx[y/CELL][x/CELL]; |
