Merge pull request #57 from BjossiAlfreds/jump

Rogue jump code fixes
This commit is contained in:
Yamagi 2019-12-16 16:21:28 +01:00 committed by GitHub
commit ccd16599ef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 11 additions and 11 deletions

View file

@ -268,7 +268,7 @@ blocked_checkjump(edict_t *self, float dist, float maxDown, float maxUp)
}
VectorCopy(pt1, pt2);
pt2[2] = self->mins[2] - maxDown - 1;
pt2[2] = self->absmin[2] - maxDown - 1;
trace = gi.trace(pt1, vec3_origin, vec3_origin, pt2, self,
MASK_MONSTERSOLID | MASK_WATER);
@ -276,7 +276,7 @@ blocked_checkjump(edict_t *self, float dist, float maxDown, float maxUp)
if ((trace.fraction < 1) && !trace.allsolid && !trace.startsolid)
{
if (((self->absmin[2] - trace.endpos[2]) >=
24) && trace.contents & MASK_SOLID)
24) && (trace.contents & MASK_SOLID))
{
if ((self->enemy->absmin[2] - trace.endpos[2]) > 32)
{

View file

@ -585,7 +585,7 @@ mframe_t berserk_frames_jump2[] = {
{ai_move, -8, NULL},
{ai_move, -4, NULL},
{ai_move, -4, NULL},
{ai_move, 0, berserk_jump_now},
{ai_move, 0, berserk_jump2_now},
{ai_move, 0, NULL},
{ai_move, 0, NULL},
{ai_move, 0, berserk_jump_wait_land},
@ -610,7 +610,7 @@ berserk_jump(edict_t *self)
monster_done_dodge(self);
if (self->enemy->s.origin[2] > self->s.origin[2])
if (self->enemy->absmin[2] > self->absmin[2])
{
self->monsterinfo.currentmove = &berserk_move_jump2;
}

View file

@ -1052,7 +1052,7 @@ mframe_t gunner_frames_jump2[] = {
{ai_move, -8, NULL},
{ai_move, -4, NULL},
{ai_move, -4, NULL},
{ai_move, 0, gunner_jump_now},
{ai_move, 0, gunner_jump2_now},
{ai_move, 0, NULL},
{ai_move, 0, NULL},
{ai_move, 0, gunner_jump_wait_land},
@ -1083,7 +1083,7 @@ gunner_jump(edict_t *self)
monster_done_dodge(self);
if (self->enemy->s.origin[2] > self->s.origin[2])
if (self->enemy->absmin[2] > self->absmin[2])
{
self->monsterinfo.currentmove = &gunner_move_jump2;
}

View file

@ -772,7 +772,7 @@ mframe_t infantry_frames_jump2[] = {
{ai_move, -8, NULL},
{ai_move, -4, NULL},
{ai_move, -4, NULL},
{ai_move, 0, infantry_jump_now},
{ai_move, 0, infantry_jump2_now},
{ai_move, 0, NULL},
{ai_move, 0, NULL},
{ai_move, 0, NULL},
@ -803,7 +803,7 @@ infantry_jump(edict_t *self)
monster_done_dodge(self);
if (self->enemy->s.origin[2] > self->s.origin[2])
if (self->enemy->absmin[2] > self->absmin[2])
{
self->monsterinfo.currentmove = &infantry_move_jump2;
}

View file

@ -885,7 +885,7 @@ mutant_jump_updown(edict_t *self)
return;
}
if (self->enemy->s.origin[2] > self->s.origin[2])
if (self->enemy->absmin[2] > self->absmin[2])
{
self->monsterinfo.currentmove = &mutant_move_jump_up;
}

View file

@ -735,7 +735,7 @@ parasite_jump(edict_t *self)
return;
}
if (self->enemy->s.origin[2] > self->s.origin[2])
if (self->enemy->absmin[2] > self->absmin[2])
{
self->monsterinfo.currentmove = &parasite_move_jump_up;
}

View file

@ -1269,7 +1269,7 @@ stalker_jump(edict_t *self)
return;
}
if (self->enemy->s.origin[2] >= self->s.origin[2])
if (self->enemy->absmin[2] >= self->absmin[2])
{
self->monsterinfo.currentmove = &stalker_move_jump_up;
}