Added additional debug output in case a nan occurs.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11698 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
b04194303a
commit
1c5dc7568e
@ -141,6 +141,15 @@ void Flyable::createPhysics(float forw_offset, const Vec3 &velocity,
|
||||
|
||||
if(m_mass!=0.0f) // Don't set velocity for kinematic or static objects
|
||||
{
|
||||
#ifdef DEBUG
|
||||
// Just to get some additional information if the assert is triggered
|
||||
if(isnan(v.getX()) || isnan(v.getY()) || isnan(v.getZ()))
|
||||
{
|
||||
printf("vel %f %f %f v %f %f %f\n",
|
||||
velocity.getX(),velocity.getY(),velocity.getZ(),
|
||||
v.getX(),v.getY(),v.getZ());
|
||||
}
|
||||
#endif
|
||||
assert(!isnan(v.getX()));
|
||||
assert(!isnan(v.getY()));
|
||||
assert(!isnan(v.getZ()));
|
||||
|
Loading…
Reference in New Issue
Block a user