> > Why is the angles check testing angles.x twice and angles.z
> not at all?
> > Shouldn't this just check angles.IsValid() instead?  It's
> probably not
> > related to my issue, it's just curious.
>
> Maybe they're just checking to be doubly sure that angles.x
> is valid.  ;)

clearly angles.x is twice as important as angles.y.  angles.z is not
important at all.

>
> Nah, it's a bug in baseentity_shared.cpp in
> CBaseEntity::VPhysicsUpdate().  It should be...
>
> if ( !IsFinite( angles.x ) || !IsFinite( angles.y ) ||
> !IsFinite( angles.z ) )

yes.

> BTW, you definitely have a NaN problem in your angles.y value...
>
> "Invalid origin from vphysics! (4.000000,1.#QNAN0,-170.845169)"
>
> Maybe you have a divide by zero problem somewhere when
> calculating the angles?

It's in the origina though, not the angles.  Usually this happens when
vphysics gets bad input data.  I'd put a similar .IsValid() trap in the
places where you create physics objects e.g. do a search for
"->CreatePolyObject" in src/game_shared and add an assert/trap to each
call there.  I've seen this come from unitialized memory in the past.

Otherwise it could have been caused by some other pathological situation
(applying velocity to a static object, setting a mass or inertia of
zero, creating a constraint between two objects with NaNs in the
constraint coordinate transform), but vphysics should be checking for
these kinds of errors internally already.

Jay

_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to