Quote:
Originally Posted by Pierre-Marie Baty
No, this is not needed because the bot's body angles are set already at the end of each BotThink, before the RunPlayerMove call. Doing it again here is redundant.
|
Code:
// make the body face the same way the bot is looking
pEdict->v.angles.y = pEdict->v.v_angle.y;
// save the previous speed (for checking if stuck)
pBot->prev_speed = pBot->f_move_speed;
BotFixIdealPitch (pEdict);
BotFixIdealYaw (pEdict);
BotFixBodyAngles (pEdict);
BotFixViewAngles (pEdict);
g_engfuncs.pfnRunPlayerMove (pEdict, pEdict->v.v_angle, pBot->f_move_speed,
0, 0, pEdict->v.button, 0, g_fMsecVal);
return;
}
Pardon ?