Thread: draw beam
View Single Post
Re: draw beam
Old
  (#13)
stefanhendriks
RealBot Author
 
stefanhendriks's Avatar
 
Status: Offline
Posts: 3,088
Join Date: Nov 2003
Location: Netherlands
Default Re: draw beam - 03-01-2005

You can get the player 'head' vector by using the Ear position, lemme search the correct line of code:

Code:
// position of ears (= eyes)
Vector UTIL_EarPosition( edict_t *pEdict )
{ 
	Vector *v = NULL;
 
	// Get vector
	gameclients->ClientEarPosition( pEdict, v );
 
	return *v;
}
it uses botmans template, so this *should* work.

THe only thing that still fails on me, is the code in the think function to get the first human players vector, as the plugin (and startframe code) runs while starting up the server, it crashes on init or something. As somehow the playerinfo or the other info from a client is not properly inited yet and i want to access it. Perhaps with a timer But i have to do this later, i have no time now


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

Last edited by stefanhendriks; 03-01-2005 at 15:00..
  
Reply With Quote