View Single Post
Re: Let the revolution begin!!!
Old
  (#26)
stefanhendriks
RealBot Author
 
stefanhendriks's Avatar
 
Status: Offline
Posts: 3,088
Join Date: Nov 2003
Location: Netherlands
Default Re: Let the revolution begin!!! - 01-01-2005

thx botman. I do wonder how you figure this stuff out, as it seems most of the time i am looking into the wrong direction

Will try that soon!

, edit:

found somewhere in baseplayer_shared.cpp (dunno if it could be of any help)
Code:
//-----------------------------------------------------------------------------
// Eye angles
//-----------------------------------------------------------------------------
const QAngle &CBasePlayer::EyeAngles( )
{
 // NOTE: Viewangles are measured *relative* to the parent's coordinate system
 CBaseEntity *pMoveParent = const_cast<CBasePlayer*>(this)->GetMoveParent();
 if ( !pMoveParent )
 {
  return pl.v_angle;
 }
 // FIXME: Cache off the angles?
 matrix3x4_t eyesToParent, eyesToWorld;
 AngleMatrix( pl.v_angle, eyesToParent );
 ConcatTransforms( pMoveParent->EntityToWorldTransform(), eyesToParent, eyesToWorld );
 static QAngle angEyeWorld;
 MatrixAngles( eyesToWorld, angEyeWorld );
 return angEyeWorld;
}
especially the comment above is interesting...?


Author of RealBot, "Arrakis" and "Dune 2 - The Maker" | co-Founder of Bots-United | Fundynamic | Blog | E-Mail me

Last edited by stefanhendriks; 01-01-2005 at 14:27..
  
Reply With Quote