diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2012-07-28 11:30:41 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2012-07-28 11:30:41 (GMT) |
| commit | 4b1c3889951037caf7957518a06fd835c0ae99c7 (patch) | |
| tree | 797120eb7ae5e55d43225df9e80ec76aef1a109a /src/simulation/Simulation.cpp | |
| parent | aa774771a048200976211ac6ce8da5e7e29a7ce7 (diff) | |
| download | powder-4b1c3889951037caf7957518a06fd835c0ae99c7.zip powder-4b1c3889951037caf7957518a06fd835c0ae99c7.tar.gz | |
Update ambient heat when enabled, fixes issue #28
Diffstat (limited to 'src/simulation/Simulation.cpp')
| -rw-r--r-- | src/simulation/Simulation.cpp | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index dc413f3..f899ff3 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -4303,13 +4303,20 @@ void Simulation::update_particles()//doesn't update the particles themselves, bu if(!sys_pause||framerender) { air->update_air(); - grav->gravity_update_async(); - //Get updated buffer pointers for gravity - gravx = grav->gravx; - gravy = grav->gravy; - gravp = grav->gravp; - gravmap = grav->gravmap; + if(aheat_enable) + air->update_airh(); + + if(grav->ngrav_enable) + { + grav->gravity_update_async(); + + //Get updated buffer pointers for gravity + gravx = grav->gravx; + gravy = grav->gravy; + gravp = grav->gravp; + gravmap = grav->gravmap; + } } memset(pmap, 0, sizeof(pmap)); |
