From 91d8953420d6299f1802e318021da5f8652c4358 Mon Sep 17 00:00:00 2001 From: terminx Date: Sat, 6 Apr 2019 06:38:31 +0000 Subject: [PATCH] Patch from Fox adding SFLAG_NOWATERSECTOR, to prevent certain sprites from moving into water git-svn-id: https://svn.eduke32.com/eduke32@7489 1a8010ca-5511-0410-912e-c29ae57300e0 --- source/duke3d/src/actors.cpp | 2 +- source/duke3d/src/actors.h | 1 + source/duke3d/src/gamedef.cpp | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/source/duke3d/src/actors.cpp b/source/duke3d/src/actors.cpp index 4856e49da..bdef1ac3e 100644 --- a/source/duke3d/src/actors.cpp +++ b/source/duke3d/src/actors.cpp @@ -517,7 +517,7 @@ int32_t A_MoveSpriteClipdist(int32_t spriteNum, vec3_t const * const change, uin if (newSectnum < 0 || ((actor[spriteNum].stayput >= 0 && actor[spriteNum].stayput != newSectnum) #ifndef EDUKE32_STANDALONE || (pSprite->picnum == BOSS2 && pSprite->pal == 0 && sector[newSectnum].lotag != ST_3) - || ((pSprite->picnum == BOSS1 || pSprite->picnum == BOSS2) && sector[newSectnum].lotag == ST_1_ABOVE_WATER) + || ((pSprite->picnum == BOSS1 || pSprite->picnum == BOSS2 || g_tile[pSprite->picnum].flags & SFLAG_NOWATERSECTOR) && sector[newSectnum].lotag == ST_1_ABOVE_WATER) || (sector[oldSectnum].lotag != ST_1_ABOVE_WATER && sector[newSectnum].lotag == ST_1_ABOVE_WATER && (pSprite->picnum == LIZMAN || (pSprite->picnum == LIZTROOP && pSprite->zvel == 0))) #endif diff --git a/source/duke3d/src/actors.h b/source/duke3d/src/actors.h index f72d2fc13..b6f2645cb 100644 --- a/source/duke3d/src/actors.h +++ b/source/duke3d/src/actors.h @@ -393,6 +393,7 @@ enum sflags_t SFLAG_REALCLIPDIST = 0x01000000, SFLAG_WAKEUPBADGUYS = 0x02000000, SFLAG_DAMAGEEVENT = 0x04000000, + SFLAG_NOWATERSECTOR = 0x08000000, }; // Custom projectiles "workslike" flags. diff --git a/source/duke3d/src/gamedef.cpp b/source/duke3d/src/gamedef.cpp index 98defd718..cfe7bc356 100644 --- a/source/duke3d/src/gamedef.cpp +++ b/source/duke3d/src/gamedef.cpp @@ -6018,6 +6018,7 @@ static void C_AddDefaultDefinitions(void) { "SFLAG_SMOOTHMOVE", SFLAG_SMOOTHMOVE }, { "SFLAG_USEACTIVATOR", SFLAG_USEACTIVATOR }, { "SFLAG_WAKEUPBADGUYS", SFLAG_WAKEUPBADGUYS }, + { "SFLAG_NOWATERSECTOR", SFLAG_NOWATERSECTOR }, { "STAT_ACTIVATOR", STAT_ACTIVATOR }, { "STAT_ACTOR", STAT_ACTOR },