mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-10 15:21:44 +00:00
Merge pull request #468 from BjossiAlfreds/dodge
Fix monsters being disoriented after ducking
This commit is contained in:
commit
a0d2604030
6 changed files with 11 additions and 0 deletions
|
@ -383,6 +383,7 @@ brain_dodge(edict_t *self, edict_t *attacker, float eta)
|
|||
if (!self->enemy)
|
||||
{
|
||||
self->enemy = attacker;
|
||||
FoundTarget(self);
|
||||
}
|
||||
|
||||
self->monsterinfo.pausetime = level.time + eta + 0.5;
|
||||
|
|
|
@ -618,6 +618,7 @@ chick_dodge(edict_t *self, edict_t *attacker, float eta /* unused */)
|
|||
if (!self->enemy)
|
||||
{
|
||||
self->enemy = attacker;
|
||||
FoundTarget(self);
|
||||
}
|
||||
|
||||
self->monsterinfo.currentmove = &chick_move_duck;
|
||||
|
|
|
@ -609,6 +609,7 @@ gunner_dodge(edict_t *self, edict_t *attacker, float eta /* unused */)
|
|||
if (!self->enemy)
|
||||
{
|
||||
self->enemy = attacker;
|
||||
FoundTarget(self);
|
||||
}
|
||||
|
||||
self->monsterinfo.currentmove = &gunner_move_duck;
|
||||
|
|
|
@ -637,6 +637,7 @@ infantry_dodge(edict_t *self, edict_t *attacker, float eta /* unused */)
|
|||
if (!self->enemy)
|
||||
{
|
||||
self->enemy = attacker;
|
||||
FoundTarget(self);
|
||||
}
|
||||
|
||||
self->monsterinfo.currentmove = &infantry_move_duck;
|
||||
|
|
|
@ -681,6 +681,11 @@ mmove_t medic_move_duck =
|
|||
void
|
||||
medic_dodge(edict_t *self, edict_t *attacker, float eta)
|
||||
{
|
||||
if (!self || !attacker)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (random() > 0.25)
|
||||
{
|
||||
return;
|
||||
|
@ -689,6 +694,7 @@ medic_dodge(edict_t *self, edict_t *attacker, float eta)
|
|||
if (!self->enemy)
|
||||
{
|
||||
self->enemy = attacker;
|
||||
FoundTarget(self);
|
||||
}
|
||||
|
||||
self->monsterinfo.currentmove = &medic_move_duck;
|
||||
|
|
|
@ -1092,6 +1092,7 @@ soldier_dodge(edict_t *self, edict_t *attacker, float eta)
|
|||
if (!self->enemy)
|
||||
{
|
||||
self->enemy = attacker;
|
||||
FoundTarget(self);
|
||||
}
|
||||
|
||||
if (skill->value == 0)
|
||||
|
|
Loading…
Reference in a new issue