mirror of
https://github.com/yquake2/rogue.git
synced 2024-11-10 06:42:21 +00:00
Fix minor AI glitches with turrets
This commit is contained in:
parent
16eee95bb8
commit
70c4c50951
1 changed files with 15 additions and 0 deletions
|
@ -887,6 +887,7 @@ turret_wake(edict_t *self)
|
|||
self->monsterinfo.sight = turret_sight;
|
||||
self->monsterinfo.search = turret_search;
|
||||
self->monsterinfo.currentmove = &turret_move_stand;
|
||||
|
||||
self->takedamage = DAMAGE_AIM;
|
||||
self->movetype = MOVETYPE_NONE;
|
||||
self->monsterinfo.aiflags |= AI_DO_NOT_COUNT;
|
||||
|
@ -895,6 +896,11 @@ turret_wake(edict_t *self)
|
|||
|
||||
stationarymonster_start(self);
|
||||
|
||||
if (self->think)
|
||||
{
|
||||
self->think(self);
|
||||
}
|
||||
|
||||
if (self->spawnflags & SPAWN_MACHINEGUN)
|
||||
{
|
||||
self->s.skinnum = 1;
|
||||
|
@ -915,6 +921,11 @@ turret_activate(edict_t *self, edict_t *other, edict_t *activator)
|
|||
vec3_t forward;
|
||||
edict_t *base;
|
||||
|
||||
if (self->movetype == MOVETYPE_PUSH)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
self->movetype = MOVETYPE_PUSH;
|
||||
|
||||
if (!self->speed)
|
||||
|
@ -950,6 +961,10 @@ turret_activate(edict_t *self, edict_t *other, edict_t *activator)
|
|||
{
|
||||
VectorSet(forward, 0, -1, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
VectorClear(forward);
|
||||
}
|
||||
|
||||
/* start up the turret */
|
||||
VectorMA(self->s.origin, 32, forward, endpos);
|
||||
|
|
Loading…
Reference in a new issue