It's called from attack threads (global/bots2/states/popup.scr (strafe around corner behaviour) and strafe.scr (circle strafe behaviour)) and all it does is make the bot point to its enemy with a certain inaccuracy. As a result, when the bot fires the enemy is or is nearly hitThe code you mentioned is from the aimat thread. What does this thread do and which thread actually calls it?
local.yawoffset is the difference in the bots current yaw and the yaw he should have to hit its enemy. For example, if the bot has to turn 5 degrees to the right his yawoffset would be 5, if he needs to turn 30 degrees left it would be -30.What is the local.yawoffset and local.pitch parameter and what are sensible values for them?
local.pitch is the pitch the bot needs to hit its enemy, for example -30 for 30 degrees up or 10 for 10 degrees down.
Well initially they depend only on the bots orientation and the direction to the enemy, but later they are changed a bit depending on the self.inaccuracyfact.They seem to depend on the self.inaccuracyfact
YesSo, if i want to decrease their accuracy while they're moving, i should change the local.selfvel and if i want to decrease accuracy depending on how fast their enemy moves, i should change the local.envel.
Have i got it right so far?
It is a variable that's decreased every frame (multiplied by 0.9) and increased whenever a bot shoots (see 'fire' thread in global/bots2/bsm.scr). As a result, bot shooting gets lets accurate for sustained bursts.What is the self.viewkick parameter?
Bots always aim for the head and right now they use the same accuracy for every weapon (still gotta change that
