Gigacrash / box2d

Automatically exported from code.google.com/p/box2d
0 stars 0 forks source link

"m_sleepTime = 0.0f;" in the nested if-block should be put outside of the nexted if-block. #297

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
otherwise, for some cases, a movable shape/body will enter sleeping status at 
once all contactions with it end.

Original issue reported on code.google.com by Tapir....@gmail.com on 1 Nov 2012 at 4:53

GoogleCodeExporter commented 9 years ago
Since I'm creating my own copy of Box2D (https://github.com/eXpl0it3r/Box2D) 
with a slightly more C++ touch, I'm working down the open issues.
Unfortunately I don't understand where exactly things should get changed.

"m_sleepTime = 0.0f;" can be found in three different files:
- b2Body.h (L: 640 & 646)
- b2Body.cpp (L: 84)
- b2Island.cpp (L: 363)

So where should one change things. Also could you elaborate on the problem 
itself?

Original comment by l.duerre...@gmail.com on 5 Nov 2012 at 11:51

GoogleCodeExporter commented 9 years ago
sorru, I fotgot to mention which function.
It is inline void b2Body::SetAwake(bool flag) in b2Body.h.

Original comment by Tapir....@gmail.com on 6 Nov 2012 at 2:07

GoogleCodeExporter commented 9 years ago
The proposed change would prevent islands from ever sleeping.

Original comment by erinca...@gmail.com on 27 Oct 2013 at 6:09