View Single Post
Re: Bots are moving in slow motion. Whats up? Please help me!!!
Old
  (#11)
Cheeseh
[rcbot]
 
Cheeseh's Avatar
 
Status: Offline
Posts: 361
Join Date: Dec 2003
Location: China
Default Re: Bots are moving in slow motion. Whats up? Please help me!!! - 14-11-2006

hmm, perhaps the frametime is having problems. You could try measuring it yourself individually for each bot and for each time between each call of runplayermove. This is the method I use, but it might not help / may not work for everyone.

Code:
void CBot :: UpdateMsec(void)
{
	m_iMsecVal = (int) ((gpGlobals->time - m_fLastCallRunPlayerMove) * 1000);    
	
	if (m_iMsecVal > 255)
		m_iMsecVal = 255;
}
Code:
void CBot :: RunPlayerMove ( void )
{
	UpdateMsec();

	m_fLastCallRunPlayerMove = gpGlobals->time;
...

(*g_engfuncs.pfnRunPlayerMove)(m_pEdict,pev->angles,m_fMoveSpeed,m_fStrafeSpeed,m_fUpSpeed,pev->button,pev->impulse,(byte)m_iMsecVal);
}
  
Reply With Quote