Added 'TeleportSpecial' as an alias for 'Teleport' in ZScript to deconflict from the Actor.Teleport function.

This commit is contained in:
Christoph Oelckers 2018-02-27 12:44:00 +01:00
parent d873ae75ab
commit aaaf9aa108
2 changed files with 4 additions and 0 deletions

View file

@ -377,6 +377,8 @@ xx(MomZ)
xx(Threshold) xx(Threshold)
xx(DefThreshold) xx(DefThreshold)
xx(Abs) xx(Abs)
xx(TeleportSpecial)
xx(Teleport)
xx(ACS_NamedExecuteWithResult) xx(ACS_NamedExecuteWithResult)
xx(CallACS) xx(CallACS)
xx(Sqrt) xx(Sqrt)

View file

@ -7758,6 +7758,8 @@ FxExpression *FxFunctionCall::Resolve(FCompileContext& ctx)
} }
else 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); special = P_FindLineSpecial(MethodName.GetChars(), &min, &max);
} }
if (special != 0 && min >= 0) if (special != 0 && min >= 0)