diff --git a/specs/usdf_zdoom.txt b/specs/usdf_zdoom.txt index 217354292..839f9753a 100644 --- a/specs/usdf_zdoom.txt +++ b/specs/usdf_zdoom.txt @@ -63,6 +63,10 @@ either refuse loading dialogues with the 'ZDoom' namespace or if it does not outright abort on incompatible namespaces fail with a type mismatch error on one of the specified propeties. +In addition ZDoom defines one new field in the top level of a conversation block: + +id = ; Assigns a conversation ID for use in Thing_SetConversation or in UDMF's 'conversation' actor property. + ZDoom-format dialogues need to start with the line: namespace = "ZDoom"; diff --git a/src/thingdef/thingdef_codeptr.cpp b/src/thingdef/thingdef_codeptr.cpp index 9bca87c1d..ce929b9ce 100644 --- a/src/thingdef/thingdef_codeptr.cpp +++ b/src/thingdef/thingdef_codeptr.cpp @@ -4578,6 +4578,7 @@ enum T_Flags TF_NODESTFOG = 0x00000080, // Don't spawn any fog at the arrival position. TF_USEACTORFOG = 0x00000100, // Use the actor's TeleFogSourceType and TeleFogDestType fogs. TF_NOJUMP = 0x00000200, // Don't jump after teleporting. + TF_OVERRIDE = 0x00000400, // Ignore NOTELEPORT. }; DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Teleport) @@ -4593,14 +4594,17 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Teleport) AActor *ref = COPY_AAPTR(self, ptr); + ACTION_SET_RESULT(false); if (!ref) { ACTION_SET_RESULT(false); - return 0; + return numret; } - if (ref->flags2 & MF2_NOTELEPORT) - return 0; + if ((ref->flags2 & MF2_NOTELEPORT) && !(Flags & TF_OVERRIDE)) + { + return numret; + } // Randomly choose not to teleport like A_Srcr2Decide. if (flags & TF_RANDOMDECIDE) diff --git a/wadsrc/static/actors/constants.txt b/wadsrc/static/actors/constants.txt index f0b2233dd..88dce63bc 100644 --- a/wadsrc/static/actors/constants.txt +++ b/wadsrc/static/actors/constants.txt @@ -199,6 +199,7 @@ enum TF_NODESTFOG = 0x00000080, // Don't spawn any fog at the arrival position. TF_USEACTORFOG = 0x00000100, // Use the actor's TeleFogSourceType and TeleFogDestType fogs. TF_NOJUMP = 0x00000200, // Don't jump after teleporting. + TF_OVERRIDE = 0x00000400, // Ignore NOTELEPORT. TF_KEEPORIENTATION = TF_KEEPVELOCITY|TF_KEEPANGLE, TF_NOFOG = TF_NOSRCFOG|TF_NODESTFOG,