mirror of
https://github.com/yquake2/rogue.git
synced 2025-02-17 01:21:06 +00:00
Apply fix from 2009 for ai_run() and ai_checkattack(), but w/o old bug
To fix some bug, in baseq2 and xatrix if(coop->value) { if(FindTargeget(self)) { return; } } was moved from ai_run() to ai_checkattack(). Do the same here, but without the bug from yquake2/#151
This commit is contained in:
parent
b7b8bec0fd
commit
08404e0949
1 changed files with 8 additions and 8 deletions
16
src/g_ai.c
16
src/g_ai.c
|
@ -1291,6 +1291,14 @@ ai_checkattack(edict_t *self, float dist)
|
|||
VectorCopy(self->enemy->s.origin, self->monsterinfo.blind_fire_target);
|
||||
self->monsterinfo.blind_fire_delay = 0;
|
||||
}
|
||||
|
||||
if (coop && coop->value && (self->monsterinfo.search_time < level.time))
|
||||
{
|
||||
if (FindTarget(self))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
enemy_infront = infront(self, self->enemy);
|
||||
enemy_range = range(self, self->enemy);
|
||||
|
@ -1581,14 +1589,6 @@ ai_run(edict_t *self, float dist)
|
|||
}
|
||||
}
|
||||
|
||||
if (coop->value)
|
||||
{
|
||||
if (FindTarget(self))
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if ((self->monsterinfo.search_time) &&
|
||||
(level.time > (self->monsterinfo.search_time + 20)))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue