From ac2f5aa632907f4fade2cc74460ff77056ed5560 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Thu, 9 Apr 2009 02:25:37 +0000 Subject: [PATCH] - Added MF5_MOVEWITHSECTOR flag, so you can have the benefits of MF_NOBLOCKMAP but still have actors that will move up and down with the floor. IceChunk now uses both of these flags. SVN r1536 (trunk) --- docs/rh-log.txt | 3 +++ src/actor.h | 1 + src/p_map.cpp | 5 +++-- src/thingdef/thingdef_data.cpp | 1 + wadsrc/static/actors/shared/action.txt | 2 ++ 5 files changed, 10 insertions(+), 2 deletions(-) diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 68b3393dc6..a1712eabac 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,4 +1,7 @@ April 8, 2009 +- Added MF5_MOVEWITHSECTOR flag, so you can have the benefits of MF_NOBLOCKMAP + but still have actors that will move up and down with the floor. IceChunk + now uses both of these flags. - Performance optimization for FBlockThingsIterator::Next(): Actors that exist in only one block don't need to be added to the CheckArray or scanned for in it. Also changed the array used to keep track of visited diff --git a/src/actor.h b/src/actor.h index fd88d11f3b..82d4290e0a 100644 --- a/src/actor.h +++ b/src/actor.h @@ -307,6 +307,7 @@ enum MF5_CANTSEEK = 0x10000000, // seeker missiles cannot home in on this actor MF5_INCONVERSATION = 0x20000000, // Actor is having a conversation MF5_PAINLESS = 0x40000000, // Actor always inflicts painless damage. + MF5_MOVEWITHSECTOR = 0x80000000, // P_ChangeSector() will still process this actor if it has MF_NOBLOCKMAP // --- mobj.renderflags --- diff --git a/src/p_map.cpp b/src/p_map.cpp index bed8996221..88e514eb44 100644 --- a/src/p_map.cpp +++ b/src/p_map.cpp @@ -4647,7 +4647,7 @@ bool P_ChangeSector (sector_t *sector, int crunch, int amt, int floorOrCeil, boo // [RH] Use different functions for the four different types of sector - // movement. Also update the soundorg's z-coordinate for 3D sound. + // movement. switch (floorOrCeil) { case 0: @@ -4694,7 +4694,8 @@ bool P_ChangeSector (sector_t *sector, int crunch, int amt, int floorOrCeil, boo if (!n->visited) // unprocessed thing found { n->visited = true; // mark thing as processed - if (!(n->m_thing->flags & MF_NOBLOCKMAP)) //jff 4/7/98 don't do these + if (!(n->m_thing->flags & MF_NOBLOCKMAP) || //jff 4/7/98 don't do these + (n->m_thing->flags5 & MF5_MOVEWITHSECTOR)) { iterator (n->m_thing, &cpos); // process it if (iterator2 != NULL) iterator2 (n->m_thing, &cpos); diff --git a/src/thingdef/thingdef_data.cpp b/src/thingdef/thingdef_data.cpp index e9b681cf7d..cd9b8f2732 100644 --- a/src/thingdef/thingdef_data.cpp +++ b/src/thingdef/thingdef_data.cpp @@ -208,6 +208,7 @@ static FFlagDef ActorFlags[]= DEFINE_FLAG(MF5, BRIGHT, AActor, flags5), DEFINE_FLAG(MF5, CANTSEEK, AActor, flags5), DEFINE_FLAG(MF5, PAINLESS, AActor, flags5), + DEFINE_FLAG(MF5, MOVEWITHSECTOR, AActor, flags5), // Effect flags DEFINE_FLAG(FX, VISIBILITYPULSE, AActor, effects), diff --git a/wadsrc/static/actors/shared/action.txt b/wadsrc/static/actors/shared/action.txt index 638404109a..f293e98b32 100644 --- a/wadsrc/static/actors/shared/action.txt +++ b/wadsrc/static/actors/shared/action.txt @@ -16,6 +16,8 @@ ACTOR IceChunk +CANNOTPUSH +FLOORCLIP +NOTELEPORT + +NOBLOCKMAP + +MOVEWITHSECTOR action native A_IceSetTics ();