Actually my code is like this:
Code:
if (pBot->f_duck_time > gpGlobals->time)
pBot->f_move_speed = 0.0;
if (RANDOM_LONG(1, 100) <= 100) //now 100% because I want to test it
{
pBot->f_duck_time = gpGlobals->time + 1.5;
FakeClientCommand(pEdict, "say", "DUCKING", NULL);
pEdict->v.button |= IN_ATTACK; // fire the weapon
return TRUE;
}
Yes, I do want the bot duck for 1.5 sec and keep firing until the enemy die, the problem is the bot only fire
one shoot(only call IN_ATTACK one time), but I am sure this code have called every frame since although the bot only fire one time, but they are keep saying DUCKING DUCKING DUCKING.......
If I remove the pBot->f_move_speed = 0.0; function and now the bot will duck but not duck
and don't move, they will duck
and move forward at the same time, but now they can keep shooting without problem until the enemy die.
Or am I mis-understand how pBot->f_move_speed = 0.0; work? I think it only make the bot don't
move but do you mean it will make the bot totally
pause ? If yes which command can make the bot only stop move but not pause ?