From 8468f712e06f3e8de3ff0dd0aba5a4f1ded3c54e Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Fri, 26 Aug 2022 04:09:54 -0400 Subject: [PATCH] - fix arti teleport and arti teleother not respecting useplayerstartz mapflag --- src/scripting/vmthunks.cpp | 1 + wadsrc/static/zscript/actors/hexen/teleportother.zs | 5 +++-- wadsrc/static/zscript/actors/raven/artitele.zs | 3 ++- wadsrc/static/zscript/doombase.zs | 1 + 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/scripting/vmthunks.cpp b/src/scripting/vmthunks.cpp index 94baffd9fe..ea78ed58e3 100644 --- a/src/scripting/vmthunks.cpp +++ b/src/scripting/vmthunks.cpp @@ -2732,6 +2732,7 @@ DEFINE_FIELD_BIT(FLevelLocals, flags, noinventorybar, LEVEL_NOINVENTORYBAR) DEFINE_FIELD_BIT(FLevelLocals, flags, monsterstelefrag, LEVEL_MONSTERSTELEFRAG) DEFINE_FIELD_BIT(FLevelLocals, flags, actownspecial, LEVEL_ACTOWNSPECIAL) DEFINE_FIELD_BIT(FLevelLocals, flags, sndseqtotalctrl, LEVEL_SNDSEQTOTALCTRL) +DEFINE_FIELD_BIT(FLevelLocals, flags, useplayerstartz, LEVEL_USEPLAYERSTARTZ) DEFINE_FIELD_BIT(FLevelLocals, flags2, allmap, LEVEL2_ALLMAP) DEFINE_FIELD_BIT(FLevelLocals, flags2, missilesactivateimpact, LEVEL2_MISSILESACTIVATEIMPACT) DEFINE_FIELD_BIT(FLevelLocals, flags2, monsterfallingdamage, LEVEL2_MONSTERFALLINGDAMAGE) diff --git a/wadsrc/static/zscript/actors/hexen/teleportother.zs b/wadsrc/static/zscript/actors/hexen/teleportother.zs index 93608470ed..200eece06a 100644 --- a/wadsrc/static/zscript/actors/hexen/teleportother.zs +++ b/wadsrc/static/zscript/actors/hexen/teleportother.zs @@ -163,8 +163,9 @@ class TelOtherFX1 : Actor double destAngle; [dest, destAngle] = level.PickPlayerStart(0, PPS_FORCERANDOM | PPS_NOBLOCKINGCHECK); - dest.Z = ONFLOORZ; - victim.Teleport ((dest.xy, ONFLOORZ), destangle, TELF_SOURCEFOG | TELF_DESTFOG); + if (!level.useplayerstartz) + dest.Z = ONFLOORZ; + victim.Teleport (dest, destangle, TELF_SOURCEFOG | TELF_DESTFOG); } //=========================================================================== diff --git a/wadsrc/static/zscript/actors/raven/artitele.zs b/wadsrc/static/zscript/actors/raven/artitele.zs index 3f61176a1d..042ae67dfc 100644 --- a/wadsrc/static/zscript/actors/raven/artitele.zs +++ b/wadsrc/static/zscript/actors/raven/artitele.zs @@ -36,7 +36,8 @@ class ArtiTeleport : Inventory { [dest, destAngle] = level.PickPlayerStart(Owner.PlayerNumber()); } - dest.Z = ONFLOORZ; + if (!level.useplayerstartz) + dest.Z = ONFLOORZ; Owner.Teleport (dest, destAngle, TELF_SOURCEFOG | TELF_DESTFOG); bool canlaugh = true; Playerinfo p = Owner.player; diff --git a/wadsrc/static/zscript/doombase.zs b/wadsrc/static/zscript/doombase.zs index 34a00cdd47..09a90d3a14 100644 --- a/wadsrc/static/zscript/doombase.zs +++ b/wadsrc/static/zscript/doombase.zs @@ -437,6 +437,7 @@ struct LevelLocals native native readonly bool no_dlg_freeze; native readonly bool keepfullinventory; native readonly bool removeitems; + native readonly bool useplayerstartz; native readonly int fogdensity; native readonly int outsidefogdensity; native readonly int skyfog;