mirror of
https://github.com/yquake2/ctf.git
synced 2024-11-12 23:44:30 +00:00
Fix a potential crash in ai_run_melee() and ai_run_missile().
This was found and fixed by Maraakate.
This commit is contained in:
parent
6f1b2f101f
commit
5447354a76
1 changed files with 10 additions and 4 deletions
|
@ -809,11 +809,14 @@ ai_run_melee(edict_t *self)
|
|||
M_ChangeYaw(self);
|
||||
|
||||
if (FacingIdeal(self))
|
||||
{
|
||||
if (self->monsterinfo.melee)
|
||||
{
|
||||
self->monsterinfo.melee(self);
|
||||
self->monsterinfo.attack_state = AS_STRAIGHT;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Turn in place until within an
|
||||
|
@ -826,11 +829,14 @@ ai_run_missile(edict_t *self)
|
|||
M_ChangeYaw(self);
|
||||
|
||||
if (FacingIdeal(self))
|
||||
{
|
||||
if (self->monsterinfo.attack)
|
||||
{
|
||||
self->monsterinfo.attack(self);
|
||||
self->monsterinfo.attack_state = AS_STRAIGHT;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Strafe sideways, but stay at
|
||||
|
|
Loading…
Reference in a new issue