Update of bug #8489 (project wormux):

                  Status:               Confirmed => Fixed                  
             Assigned to:                    None => drayan                 

    _______________________________________________________

Follow-up Comment #5:

Fix in commit 2451. In fact, Tangent in groud.cpp return a NAN value when
cannot retrieve a tangent angle but this value is not tested in
physical_obj.cpp.

Have a look at : http://svn.gna.org/viewcvs/wormux?rev=2451&view=rev

And here's the diff :

Index: object/physical_obj.cpp
===================================================================
--- object/physical_obj.cpp     (révision 2449)
+++ object/physical_obj.cpp     (copie de travail)
@@ -343,8 +343,13 @@

     if (ContactPoint(cx, cy)) {
       ground_angle = world.ground.Tangent(cx, cy);
-      contactPos.x = (double)cx / PIXEL_PER_METER;
-      contactPos.y = (double)cy / PIXEL_PER_METER;
+      if(!isnan(ground_angle)) {
+        contactPos.x = (double)cx / PIXEL_PER_METER;
+        contactPos.y = (double)cy / PIXEL_PER_METER;
+      } else {
+        ground_angle = - GetSpeedAngle();
+        contactPos = pos;
+      }
     } else {
       ground_angle = - GetSpeedAngle();
       contactPos = pos;


    _______________________________________________________

Reply to this item at:

  <http://gna.org/bugs/?8489>

_______________________________________________
  Message posté via/par Gna!
  http://gna.org/


_______________________________________________
Wormux-gna mailing list
[email protected]
https://mail.gna.org/listinfo/wormux-gna

Reply via email to