From 1dc9528b43f911552076c234a491d4939a4fad05 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Fri, 23 May 2008 17:50:28 +0000 Subject: [PATCH] - Fixed: The compatibility searches for teleport destinations did not work properly when the teleporter had both a tid and a tag. Now, if a teleporter has a tag these are skipped because they are only present for Hexen compatibility. SVN r994 (trunk) --- docs/rh-log.txt | 4 ++++ src/p_teleport.cpp | 22 +++++++++++++--------- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/docs/rh-log.txt b/docs/rh-log.txt index ab001cb9e1..edaa44539d 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,4 +1,8 @@ May 23, 2008 (Changes by Graf Zahl) +- Fixed: The compatibility searches for teleport destinations did not work + properly when the teleporter had both a tid and a tag. Now, if a teleporter + has a tag these are skipped because they are only present for Hexen + compatibility. - Fixed: The first texture in a TEXTURE1 lump, although invalid when used elsewhere, must be usable as sky (see Requiem.wad's SKY3.) - Fixed: side_t::GetLightLevel relied on the global 'linedef' variable for diff --git a/src/p_teleport.cpp b/src/p_teleport.cpp index f0086c27fe..666fc3f988 100644 --- a/src/p_teleport.cpp +++ b/src/p_teleport.cpp @@ -349,21 +349,25 @@ static AActor *SelectTeleDest (int tid, int tag) // If teleport dests were not found, the sector tag is ignored for the // following compatibility searches. + // Do this only when tag is 0 because this is the only case that was defined in Hexen. if (count == 0) { - // Try to find a matching map spot (fixes Hexen MAP10) - NActorIterator it2 (NAME_MapSpot, tid); - searcher = it2.Next (); - if (searcher == NULL) + if (tag == 0) { - // Try to find a matching non-blocking spot of any type (fixes Caldera MAP13) - FActorIterator it3 (tid); - searcher = it3.Next (); - while (searcher != NULL && (searcher->flags & MF_SOLID)) + // Try to find a matching map spot (fixes Hexen MAP10) + NActorIterator it2 (NAME_MapSpot, tid); + searcher = it2.Next (); + if (searcher == NULL) { + // Try to find a matching non-blocking spot of any type (fixes Caldera MAP13) + FActorIterator it3 (tid); searcher = it3.Next (); + while (searcher != NULL && (searcher->flags & MF_SOLID)) + { + searcher = it3.Next (); + } + return searcher; } - return searcher; } } else