diff options
author | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2015-03-24 04:05:56 +0000 |
---|---|---|
committer | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2015-03-24 18:46:26 +0000 |
commit | 600bae34bd4a2d57a1c8c7b108b873846b26830e (patch) | |
tree | e2ad1859130c6c9a684c7b92dc1fc7d635a03c6f | |
parent | 18a1403fcf3ea8907001178ba413bd8b10da815b (diff) |
Re-sort Area array during integration step
-rw-r--r-- | servers/physics/body_sw.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/servers/physics/body_sw.cpp b/servers/physics/body_sw.cpp index 9638e8a3b3..5682ad8498 100644 --- a/servers/physics/body_sw.cpp +++ b/servers/physics/body_sw.cpp @@ -378,6 +378,7 @@ void BodySW::integrate_forces(real_t p_step) { bool replace = false; gravity=Vector3(0,0,0); if (ac) { + areas.sort(); const AreaCMP *aa = &areas[0]; density = aa[ac-1].area->get_density(); for(int i=ac-1;i>=0;i--) { |