diff --git a/src/dobjtype.cpp b/src/dobjtype.cpp index 2243023d0..63d4a8423 100644 --- a/src/dobjtype.cpp +++ b/src/dobjtype.cpp @@ -37,6 +37,7 @@ #include "actor.h" #include "templates.h" #include "autosegs.h" +#include "v_text.h" TArray PClass::m_RuntimeActors; TArray PClass::m_Types; @@ -185,7 +186,7 @@ void PClass::InsertIntoHash () else if (lexx == 0) { // This type has already been inserted // ... but there is no need whatsoever to make it a fatal error! - Printf ("Tried to register class '%s' more than once.\n", TypeName.GetChars()); + Printf (TEXTCOLOR_RED"Tried to register class '%s' more than once.\n", TypeName.GetChars()); break; } else diff --git a/src/info.cpp b/src/info.cpp index 88a0ff7d2..89628e5b7 100644 --- a/src/info.cpp +++ b/src/info.cpp @@ -39,6 +39,7 @@ #include "m_fixed.h" #include "c_dispatch.h" #include "d_net.h" +#include "v_text.h" #include "gi.h" @@ -142,15 +143,26 @@ void FActorInfo::StaticSetActorNums () void FActorInfo::RegisterIDs () { + const PClass *cls = PClass::FindClass(Class->TypeName); + bool set = false; + if (GameFilter == GAME_Any || (GameFilter & gameinfo.gametype)) { if (SpawnID != 0) { - SpawnableThings[SpawnID] = Class; + SpawnableThings[SpawnID] = cls; + if (cls != Class) + { + Printf(TEXTCOLOR_RED"Spawn ID %d refers to hidden class type '%s'\n", SpawnID, cls->TypeName.GetChars()); + } } if (DoomEdNum != -1) { - DoomEdMap.AddType (DoomEdNum, Class); + DoomEdMap.AddType (DoomEdNum, cls); + if (cls != Class) + { + Printf(TEXTCOLOR_RED"Editor number %d refers to hidden class type '%s'\n", DoomEdNum, cls->TypeName.GetChars()); + } } } // Fill out the list for Chex Quest with Doom's actors @@ -158,6 +170,10 @@ void FActorInfo::RegisterIDs () (GameFilter & GAME_Doom)) { DoomEdMap.AddType (DoomEdNum, Class, true); + if (cls != Class) + { + Printf(TEXTCOLOR_RED"Editor number %d refers to hidden class type '%s'\n", DoomEdNum, cls->TypeName.GetChars()); + } } } diff --git a/src/p_floor.cpp b/src/p_floor.cpp index fd06ff0c1..a03b50583 100644 --- a/src/p_floor.cpp +++ b/src/p_floor.cpp @@ -663,7 +663,9 @@ manual_stair: if ( (ok = (tsec != NULL)) ) { - height += stairstep; + // Doom bug: Height was changed before discarding the sector as part of the stairs. + // Needs to be compatibility optioned because some maps (Eternall MAP25) depend on it. + if (i_compatflags & COMPATF_STAIRINDEX) height += stairstep; // if sector's floor already moving, look for another //jff 2/26/98 special lockout condition for retriggering @@ -673,6 +675,9 @@ manual_stair: sec = tsec; continue; } + + if (!(i_compatflags & COMPATF_STAIRINDEX)) height += stairstep; + } newsecnum = (int)(tsec - sectors); } diff --git a/src/p_mobj.cpp b/src/p_mobj.cpp index b589e061e..13c75eb99 100644 --- a/src/p_mobj.cpp +++ b/src/p_mobj.cpp @@ -2829,9 +2829,11 @@ void AActor::Tick () AActor *onmo; int i; - assert (state != NULL); + //assert (state != NULL); if (state == NULL) { + Printf("Actor of type %s at (%f,%f) left without a state\n", GetClass()->TypeName.GetChars(), + x/65536., y/65536.); Destroy(); return; } diff --git a/src/thingdef/thingdef_parse.cpp b/src/thingdef/thingdef_parse.cpp index 85930b09c..7712fe43b 100644 --- a/src/thingdef/thingdef_parse.cpp +++ b/src/thingdef/thingdef_parse.cpp @@ -1072,6 +1072,12 @@ static FActorInfo *ParseActorHeader(FScanner &sc, Baggage *bag) // Get actor name sc.MustGetString (); replaceName = sc.String; + + if (replaceName == typeName) + { + sc.ScriptMessage ("Cannot replace class %s with itself", typeName.GetChars()); + FScriptPosition::ErrorCounter++; + } } // Now, after the actor names have been parsed, it is time to switch to C-mode diff --git a/wadsrc/static/compatibility.txt b/wadsrc/static/compatibility.txt index a4fd90659..685fda086 100644 --- a/wadsrc/static/compatibility.txt +++ b/wadsrc/static/compatibility.txt @@ -24,6 +24,11 @@ A80E7EE40E0D0C76A6FBD242BE29FE27 // map15 resetplayerspeed } +6DA6FCBA8089161BDEC6A1D3F6C8D60F // Eternal Doom MAP25 +{ + stairs +} + 10E1E2B36302D31AC4AE68C84B5DC457 // Eternal Doom MAP28 { // What's really sad is that I got a separate bug report for this map