mirror of
https://github.com/yquake2/rogue.git
synced 2024-11-10 06:42:21 +00:00
Fixed gunner grenade duck code running twice
This commit is contained in:
parent
c78a7358d3
commit
452ad99821
1 changed files with 16 additions and 9 deletions
|
@ -509,14 +509,6 @@ gunner_duck_down(edict_t *self)
|
|||
|
||||
self->monsterinfo.aiflags |= AI_DUCKED;
|
||||
|
||||
if (skill->value >= SKILL_HARD)
|
||||
{
|
||||
if (random() > 0.5)
|
||||
{
|
||||
GunnerGrenade(self);
|
||||
}
|
||||
}
|
||||
|
||||
self->maxs[2] = self->monsterinfo.base_height - 32;
|
||||
self->takedamage = DAMAGE_YES;
|
||||
|
||||
|
@ -528,8 +520,23 @@ gunner_duck_down(edict_t *self)
|
|||
gi.linkentity(self);
|
||||
}
|
||||
|
||||
static void
|
||||
gunner_duck_down_think(edict_t *self)
|
||||
{
|
||||
gunner_duck_down(self);
|
||||
|
||||
/* rogue code calls duck_down twice, so move this here */
|
||||
if (skill->value >= SKILL_HARD)
|
||||
{
|
||||
if (random() > 0.5)
|
||||
{
|
||||
GunnerGrenade(self);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mframe_t gunner_frames_duck[] = {
|
||||
{ai_move, 1, gunner_duck_down},
|
||||
{ai_move, 1, gunner_duck_down_think},
|
||||
{ai_move, 1, NULL},
|
||||
{ai_move, 1, monster_duck_hold},
|
||||
{ai_move, 0, NULL},
|
||||
|
|
Loading…
Reference in a new issue