mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-11 18:50:46 +00:00
Eliminate unnecessary goto
git-svn-id: https://svn.eduke32.com/eduke32@8731 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
2e17467a8f
commit
21ec33ac51
1 changed files with 21 additions and 22 deletions
|
@ -671,31 +671,30 @@ GAMEEXEC_STATIC void VM_Move(void)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (deadflag)
|
if (!deadflag)
|
||||||
goto dead;
|
|
||||||
|
|
||||||
if (movflags&face_player)
|
|
||||||
VM_FacePlayer(2);
|
|
||||||
|
|
||||||
if (movflags&spin)
|
|
||||||
vm.pSprite->ang += sintable[((AC_COUNT(vm.pData)<<3)&2047)]>>6;
|
|
||||||
|
|
||||||
if (movflags&face_player_slow)
|
|
||||||
VM_FacePlayer(4);
|
|
||||||
|
|
||||||
if ((movflags&jumptoplayer_bits) == jumptoplayer_bits)
|
|
||||||
{
|
{
|
||||||
if (AC_COUNT(vm.pData) < 16)
|
if (movflags & face_player)
|
||||||
vm.pSprite->zvel -= (sintable[(512+(AC_COUNT(vm.pData)<<4))&2047]>>5);
|
VM_FacePlayer(2);
|
||||||
|
|
||||||
|
if (movflags & spin)
|
||||||
|
vm.pSprite->ang += sintable[((AC_COUNT(vm.pData) << 3) & 2047)] >> 6;
|
||||||
|
|
||||||
|
if (movflags & face_player_slow)
|
||||||
|
VM_FacePlayer(4);
|
||||||
|
|
||||||
|
if ((movflags & jumptoplayer_bits) == jumptoplayer_bits)
|
||||||
|
{
|
||||||
|
if (AC_COUNT(vm.pData) < 16)
|
||||||
|
vm.pSprite->zvel -= (sintable[(512 + (AC_COUNT(vm.pData) << 4)) & 2047] >> 5);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (movflags & face_player_smart)
|
||||||
|
{
|
||||||
|
vec2_t const vect = { vm.pPlayer->pos.x + (vm.pPlayer->vel.x / 768), vm.pPlayer->pos.y + (vm.pPlayer->vel.y / 768) };
|
||||||
|
VM_AddAngle(2, getangle(vect.x - vm.pSprite->x, vect.y - vm.pSprite->y));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (movflags&face_player_smart)
|
|
||||||
{
|
|
||||||
vec2_t const vect = { vm.pPlayer->pos.x + (vm.pPlayer->vel.x / 768), vm.pPlayer->pos.y + (vm.pPlayer->vel.y / 768) };
|
|
||||||
VM_AddAngle(2, getangle(vect.x - vm.pSprite->x, vect.y - vm.pSprite->y));
|
|
||||||
}
|
|
||||||
|
|
||||||
dead:
|
|
||||||
#if !defined LUNATIC
|
#if !defined LUNATIC
|
||||||
if (EDUKE32_PREDICT_FALSE((unsigned)AC_MOVE_ID(vm.pData) >= (unsigned)g_scriptSize-1))
|
if (EDUKE32_PREDICT_FALSE((unsigned)AC_MOVE_ID(vm.pData) >= (unsigned)g_scriptSize-1))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue