![]() |
JoeBot/RACC aiming
I have found a problem when trying to use the JoeBot/RACC aiming code here...
Code:
Vector v_deviation = vecDirection - pev->v_angle; |
Re: JoeBot/RACC aiming
well here's my version of it that also fixes the horrible aiming at very low fps..
Code:
Vector vecDeviation = Vector (pEdict->v.idealpitch, pEdict->v.ideal_yaw, 0) - pBot->vecPrevv_angle; |
Re: JoeBot/RACC aiming
This should rather be
Code:
+// If the fps is very low (e.g. when I'm running RealBot WIP and The drawback of this clamping is that it doesn't allow the bot's crosshair movement to get past the target point and then come back smoothly. I had it in in the first place, then I removed it, but I think I'm gonna put it back again because as you say it fixes the problem with the aim being messy at low FPS. Thanks for the reminder. |
Re: JoeBot/RACC aiming
another correction:
Code:
// if bot is aiming at something, aim fast, else take our time... |
Re: JoeBot/RACC aiming
Code:
+ if (fabs(v_deviation.x - pev->pitch_speed) > 0) Thanks to pointing this out anyway, now I have changed it to this one: Code:
+ if (fabs(pev->pitch_speed) > fabs(v_deviation.x) && pev->pitch_speed * v_deviation.x > 0) |
Re: JoeBot/RACC aiming
Yup, my bad 9_9
I forgot rule #1 of coding: Untested code does not work. |
All times are GMT +2. The time now is 18:16. |
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.