In three missed places, use AC_MOVFLAGS instead of sp->hitag.

git-svn-id: https://svn.eduke32.com/eduke32@4377 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2014-03-16 14:37:50 +00:00
parent 6e891eabd1
commit 40fd4968bb
2 changed files with 7 additions and 7 deletions

View file

@ -473,9 +473,9 @@ GAMEEXEC_STATIC void VM_AlterAng(int32_t movflags)
moveptr = script + AC_MOVE_ID(vm.g_t);
vm.g_sp->xvel += (*moveptr - vm.g_sp->xvel)/5;
vm.g_sp->xvel += (moveptr[0] - vm.g_sp->xvel)/5;
if (vm.g_sp->zvel < 648)
vm.g_sp->zvel += ((*(moveptr+1)<<4) - vm.g_sp->zvel)/5;
vm.g_sp->zvel += ((moveptr[1]<<4) - vm.g_sp->zvel)/5;
#else
vm.g_sp->xvel += (actor[vm.g_i].mv.hvel - vm.g_sp->xvel)/5;
if (vm.g_sp->zvel < 648)
@ -656,8 +656,8 @@ dead:
moveptr = script + AC_MOVE_ID(vm.g_t);
if (movflags&geth) vm.g_sp->xvel += ((*moveptr)-vm.g_sp->xvel)>>1;
if (movflags&getv) vm.g_sp->zvel += ((*(moveptr+1)<<4)-vm.g_sp->zvel)>>1;
if (movflags&geth) vm.g_sp->xvel += ((moveptr[0])-vm.g_sp->xvel)>>1;
if (movflags&getv) vm.g_sp->zvel += ((moveptr[1]<<4)-vm.g_sp->zvel)>>1;
#else
if (movflags&geth) vm.g_sp->xvel += (actor[vm.g_i].mv.hvel - vm.g_sp->xvel)>>1;
if (movflags&getv) vm.g_sp->zvel += (16*actor[vm.g_i].mv.vvel - vm.g_sp->zvel)>>1;
@ -958,7 +958,7 @@ static void VM_Fall(int32_t g_i, spritetype *g_sp)
int32_t moveScriptOfs = AC_MOVE_ID(vm.g_t);
#endif
// fix for flying/jumping monsters getting stuck in water
if ((g_sp->hitag & jumptoplayer) ||
if ((AC_MOVFLAGS(g_sp, &actor[vm.g_i]) & jumptoplayer) ||
(G_HaveActor(g_sp->picnum) &&
#if !defined LUNATIC
(unsigned)moveScriptOfs < (unsigned)g_scriptSize-1 && script[moveScriptOfs + 1]

View file

@ -958,7 +958,7 @@ static int32_t A_ShootCustom(const int32_t i, const int32_t atwith, int16_t sa,
l = safeldist(g_player[j].ps->i, s);
zvel = ((g_player[j].ps->opos.z - srcvect->z)*vel) / l;
if (A_CheckEnemySprite(s) && (s->hitag&face_player_smart))
if (A_CheckEnemySprite(s) && (AC_MOVFLAGS(s, &actor[i]) & face_player_smart))
sa = s->ang + (krand() & 31) - 16;
}
}
@ -1436,7 +1436,7 @@ int32_t A_ShootWithZvel(int32_t i, int32_t atwith, int32_t override_zvel)
l = safeldist(g_player[j].ps->i, s);
zvel = ((g_player[j].ps->opos.z - srcvect.z)*vel) / l;
if (A_CheckEnemySprite(s) && (s->hitag&face_player_smart))
if (A_CheckEnemySprite(s) && (AC_MOVFLAGS(s, &actor[i]) & face_player_smart))
sa = s->ang+(krand()&31)-16;
}