mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 11:10:47 +00:00
Fix the "fix for flying/jumping monsters getting stuck in water".
In C and Lunatic, split 'jumptoplayer' of enum amoveflags_t / action.MOVFLAGS into 'jumptoplayer_bits' and 'jumptoplayer_only' (see updated Lunatic doc). git-svn-id: https://svn.eduke32.com/eduke32@4378 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
40fd4968bb
commit
10a0e82736
4 changed files with 12 additions and 6 deletions
|
@ -61,7 +61,8 @@ enum amoveflags_t {
|
||||||
spin = 32,
|
spin = 32,
|
||||||
face_player_smart = 64,
|
face_player_smart = 64,
|
||||||
fleeenemy = 128,
|
fleeenemy = 128,
|
||||||
jumptoplayer = 257,
|
jumptoplayer_only = 256,
|
||||||
|
jumptoplayer_bits = 257, // NOTE: two bits set!
|
||||||
seekplayer = 512,
|
seekplayer = 512,
|
||||||
furthestdir = 1024,
|
furthestdir = 1024,
|
||||||
dodgebullet = 4096
|
dodgebullet = 4096
|
||||||
|
|
|
@ -629,7 +629,7 @@ GAMEEXEC_STATIC void VM_Move(void)
|
||||||
if (movflags&face_player_slow)
|
if (movflags&face_player_slow)
|
||||||
VM_FacePlayer(4);
|
VM_FacePlayer(4);
|
||||||
|
|
||||||
if ((movflags&jumptoplayer) == jumptoplayer)
|
if ((movflags&jumptoplayer_bits) == jumptoplayer_bits)
|
||||||
{
|
{
|
||||||
if (AC_COUNT(vm.g_t) < 16)
|
if (AC_COUNT(vm.g_t) < 16)
|
||||||
vm.g_sp->zvel -= (sintable[(512+(AC_COUNT(vm.g_t)<<4))&2047]>>5);
|
vm.g_sp->zvel -= (sintable[(512+(AC_COUNT(vm.g_t)<<4))&2047]>>5);
|
||||||
|
@ -958,7 +958,7 @@ static void VM_Fall(int32_t g_i, spritetype *g_sp)
|
||||||
int32_t moveScriptOfs = AC_MOVE_ID(vm.g_t);
|
int32_t moveScriptOfs = AC_MOVE_ID(vm.g_t);
|
||||||
#endif
|
#endif
|
||||||
// fix for flying/jumping monsters getting stuck in water
|
// fix for flying/jumping monsters getting stuck in water
|
||||||
if ((AC_MOVFLAGS(g_sp, &actor[vm.g_i]) & jumptoplayer) ||
|
if ((AC_MOVFLAGS(g_sp, &actor[vm.g_i]) & jumptoplayer_bits) == jumptoplayer_only ||
|
||||||
(G_HaveActor(g_sp->picnum) &&
|
(G_HaveActor(g_sp->picnum) &&
|
||||||
#if !defined LUNATIC
|
#if !defined LUNATIC
|
||||||
(unsigned)moveScriptOfs < (unsigned)g_scriptSize-1 && script[moveScriptOfs + 1]
|
(unsigned)moveScriptOfs < (unsigned)g_scriptSize-1 && script[moveScriptOfs + 1]
|
||||||
|
|
|
@ -904,6 +904,8 @@ do
|
||||||
spin = 32,
|
spin = 32,
|
||||||
faceplayersmart = 64,
|
faceplayersmart = 64,
|
||||||
fleeenemy = 128,
|
fleeenemy = 128,
|
||||||
|
jumptoplayer_only = 256,
|
||||||
|
jumptoplayer_bits = 257, -- NOTE: two bits set!
|
||||||
jumptoplayer = 257,
|
jumptoplayer = 257,
|
||||||
seekplayer = 512,
|
seekplayer = 512,
|
||||||
furthestdir = 1024,
|
furthestdir = 1024,
|
||||||
|
|
|
@ -1122,9 +1122,12 @@ Contains symbolic names of values applicable to <<gameactor,`gameactor`>>'s
|
||||||
[[actor_MOVFLAGS]] `actor.MOVFLAGS`::
|
[[actor_MOVFLAGS]] `actor.MOVFLAGS`::
|
||||||
Contains symbolic names of values applicable <<gameactor,`gameactor`>>'s
|
Contains symbolic names of values applicable <<gameactor,`gameactor`>>'s
|
||||||
`movflags` input argument, `actor[]:set_move()`, and the like. +
|
`movflags` input argument, `actor[]:set_move()`, and the like. +
|
||||||
`faceplayer`, `geth`, `getv`, `randomangle`, `faceplayerslow`, `spin`,
|
* `faceplayer`, `geth`, `getv`, `randomangle`, `faceplayerslow`, `spin`,
|
||||||
`faceplayersmart`, `fleeenemy`, `jumptoplayer`, `seekplayer`, `furthestdir`,
|
`faceplayersmart`, `fleeenemy`, `seekplayer`, `furthestdir`,
|
||||||
`dodgebullet`.
|
`dodgebullet`, all naming single bits
|
||||||
|
* `jumptoplayer_bits`: the bitwise-OR of *two* bits, one of which is `faceplayer`
|
||||||
|
* `jumptoplayer_only`: the same as `jumptoplayer_bits`, but without the `faceplayer` bit set
|
||||||
|
* `jumptoplayer`: [red]*deprecated*
|
||||||
|
|
||||||
'''
|
'''
|
||||||
[[player]]
|
[[player]]
|
||||||
|
|
Loading…
Reference in a new issue