From aaaf9aa108d1d74e247d59bdad78f8a2be29a6be Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 27 Feb 2018 12:44:00 +0100 Subject: [PATCH] Added 'TeleportSpecial' as an alias for 'Teleport' in ZScript to deconflict from the Actor.Teleport function. --- src/namedef.h | 2 ++ src/scripting/backend/codegen.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/namedef.h b/src/namedef.h index ace456a69..9e6d3811a 100644 --- a/src/namedef.h +++ b/src/namedef.h @@ -377,6 +377,8 @@ xx(MomZ) xx(Threshold) xx(DefThreshold) xx(Abs) +xx(TeleportSpecial) +xx(Teleport) xx(ACS_NamedExecuteWithResult) xx(CallACS) xx(Sqrt) diff --git a/src/scripting/backend/codegen.cpp b/src/scripting/backend/codegen.cpp index 96393ad4c..24e541a36 100644 --- a/src/scripting/backend/codegen.cpp +++ b/src/scripting/backend/codegen.cpp @@ -7758,6 +7758,8 @@ FxExpression *FxFunctionCall::Resolve(FCompileContext& ctx) } else { + // This alias is needed because Actor has a Teleport function. + if (MethodName == NAME_TeleportSpecial) MethodName = NAME_Teleport; special = P_FindLineSpecial(MethodName.GetChars(), &min, &max); } if (special != 0 && min >= 0)