Line bump teleport keeps player Z

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
User avatar
Sir Robin
Posts: 537
Joined: Wed Dec 22, 2021 7:02 pm
Graphics Processor: Intel (Modern GZDoom)
Location: Medellin, Colombia

Line bump teleport keeps player Z

Post by Sir Robin »

reproduce:
Create Sector A, floor 64, player start
Create sector B, floor 0, teleport landing
pick a line in sector A, set it to use and bump, special teleport pointing to landing (tested with 70 and 71)

Use the line, teleport as expected
Bump the line, teleport to landing (x,y) but z=64

Teseted with special 70 and 71
Tested with thing 14 and 9044

I assume it's some issue with the teleport happening in the middle of the movement code
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49219
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Line bump teleport keeps player Z

Post by Graf Zahl »

It indeed is and it is generally not fixable.
User avatar
Sir Robin
Posts: 537
Joined: Wed Dec 22, 2021 7:02 pm
Graphics Processor: Intel (Modern GZDoom)
Location: Medellin, Colombia

Re: Line bump teleport keeps player Z

Post by Sir Robin »

Seems similar to an issue I saw when trying to create an actor that could teleport the player away when bumped, in this thread. The solution was to move the special call out of the collision detection, either flag it to call it later or spawn a thinker to handle it.

I suppose the solution here is to fake the bump, put a walk-over line at just the right place so it feels like a bump.
User avatar
Sir Robin
Posts: 537
Joined: Wed Dec 22, 2021 7:02 pm
Graphics Processor: Intel (Modern GZDoom)
Location: Medellin, Colombia

Re: Line bump teleport keeps player Z

Post by Sir Robin »

My work around for this was to create a dumy actor, when activated it sets a flag to execute it's special on next tick. So I set the bump line to activate the actor, then the actor special to do the teleport.

Then I realized I don't want to bump a wall to trigger a teleport because it kills player momentum, so if I'm trying to simulate moving through the wall, there's a jerk in the motion. Rather than a solid wall, I set it to a non-blocking mid texture and use a walk-over line and silent teleport to keep the momentum fluid

Return to “Closed Bugs [GZDoom]”