From 600bae34bd4a2d57a1c8c7b108b873846b26830e Mon Sep 17 00:00:00 2001 From: Fabio Alessandrelli Date: Tue, 24 Mar 2015 04:05:56 +0000 Subject: [PATCH] Re-sort Area array during integration step --- servers/physics/body_sw.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/servers/physics/body_sw.cpp b/servers/physics/body_sw.cpp index 9638e8a3b39..5682ad84989 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--) {