View Single Post
Re: Bot running speed
Old
  (#5)
Neoptolemus
Member
 
Status: Offline
Posts: 93
Join Date: Apr 2012
Default Re: Bot running speed - 02-08-2015

Quote:
Originally Posted by The Storm View Post
I checked out the HPB_bot msec value calculation and it seems wrong. Use the following value as the last argument of the RunPlayerMove() function:
Code:
gpGlobals->frametime / 1000.0f
Not quite, frametime is in seconds and RunPlayerMove expects milliseconds as the last parameter, so it's gpGlobals->frametime * 1000.0f

To be honest I have no idea what the HPB_Bot code is even doing if it's really as simple as just the delta in milliseconds between the last frame and the current frame. It looks like it's trying to calculate the frametime in milliseconds independently, averaged over half-second intervals? Seems like an odd approach when you have gpGlobals->frametime just there begging to be used.

Even that or your second suggestion doesn't seem to help however, they're still slower than me. Consider this a conundrum masquerading as a mystery. Seems like it has to be the max speed value that's not set correctly, I'll do some more digging.
  
Reply With Quote