Give AIF_TARGET_FOCUS fighters a low chance of targetting something else.
This commit is contained in:
parent
259a02699a
commit
344b2d27b8
|
@ -352,9 +352,10 @@ static int canAttack(Entity *e)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* low chance of attacking something else */
|
||||||
if ((self->aiFlags & AIF_TARGET_FOCUS) && (!(e->flags & EF_AI_TARGET)))
|
if ((self->aiFlags & AIF_TARGET_FOCUS) && (!(e->flags & EF_AI_TARGET)))
|
||||||
{
|
{
|
||||||
return 0;
|
return !(rand() % 100);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
|
|
Loading…
Reference in New Issue