Page 1 of 1

MAPINFO - checkswitchrange no longer accounts for 3D floors

Posted: Tue Dec 25, 2018 8:45 am
by GooberMan
Worked at the time of Prime Directive's release in June 2015.

Fairly early recognisable break with this behavior:
  • Console - map ge5map02
  • Press J to skip the cutscene
  • Run forward to the landing pad. Notice door on left of brick wall ahead of you. Run to it.
  • Attempt to use the door
The door is a 3D floor controlled by a script, which when used makes it look just like a real door. Notice that you can run on top of the brick wall where the door would be. checkswitchrange was enabled in MAPINFO to stop people pressing use and activating the door when they're obviously not next to it in a three-dimensional sense.

Bump behavior works just fine, but this is a Doom map not a Quake map. The bump constantly retriggers if you keep walking in to it though, so you get spammed use sounds and console message about the door needing a yellow key.

Re: MAPINFO - checkswitchrange no longer accounts for 3D flo

Posted: Sun Dec 30, 2018 9:25 am
by _mental_
It was introduced with this pull request because of the change in this line. It seems to be a fix for similar issue which broke your map as a side effect :?

Re: MAPINFO - checkswitchrange no longer accounts for 3D flo

Posted: Sun Dec 30, 2018 9:54 am
by Graf Zahl
To summarize, this appeared to have worked solely by happenstance, not by design - to be precise, it "worked" because the function was bugged. If you look at the code, it never performs any checks whatsoever on 3D floors.

The only possible solution here looks like adding some compatibility handler

Re: MAPINFO - checkswitchrange no longer accounts for 3D flo

Posted: Sun Dec 30, 2018 12:30 pm
by GooberMan
Compatibility + new MAPINFO flag would be preferred. I was testing PD because a colleague wants to play it, I'm inclined to do some more bugfixes while I'm there and upload a new version. If I recall, the compat system worked off file name and/or file hash? I'd rather preserve the behavior in any update I make.

EDIT: Checked the code, yeah, I see how that managed to just work since the player's Z equaled the sector Z. So tl;dr is that the MAPINFO flag would want to be the correct version that checks 3D floors in the back sector.

Re: MAPINFO - checkswitchrange no longer accounts for 3D flo

Posted: Mon Feb 11, 2019 1:54 pm
by _mental_
Fixed in eaf0ac1.