Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjusting heights of polygons next to some platforms with Lua marks their shared lines as solid & non-transparent #492

Open
aaronfreed opened this issue May 20, 2024 · 2 comments

Comments

@aaronfreed
Copy link

aaronfreed commented May 20, 2024

If you adjust the floor or ceiling heights of a polygon with at least one line bordering a platform that is entirely closed (and maybe some other platforms; I haven’t fully tested all possible cases yet), all such lines will be marked solid and non-transparent after having done so, regardless of whether they were originally. This seems like undesirable behavior, since the script did nothing to specify that said lines should be converted to solid and non-transparent; scripters would have no reason to expect it to happen, and if I were to use this for a hypothetical “‘adjust heights’ mode” in a hypothetical Aleph One texturing utility, mapmakers would also have no reason to expect it to happen. Is there any way to fix it? Thanks in advance.

@treellama
Copy link
Member

I think this is the expected and necessary behavior in game, since things like the renderer and the monster AI rely on endpoints and lines being updated correctly.

Perhaps the real issue is when the map is written out with save level: build_export_wad doesn't do a full set of redundant recalculations after adjusting the platform heights back to where they were at the start of the level in preparation for save, so maybe it's leaving lines marked solid that shouldn't be.

Hopper262 added a commit that referenced this issue Aug 30, 2024
@treellama treellama reopened this Aug 30, 2024
@Hopper262
Copy link
Member

I agree that we can't skimp on recalculations - issue #515 proves that. The specific functions changed in fe20606 might be making assumptions that are only valid during map load, though. Bungie seemed to think so at some point:

  • Before recalculate_redundant_map which calls them: "must be done before platforms/doors/etc.."
  • In change_height: "the highest_adjacent_floor, lowest_adjacent_ceiling and supporting_polygon_index fields of all of this polygon’s endpoints and lines are potentially invalid now. ... only these three fields of are invalid, nothing else is effected by the height change."

This issue also impacts the current game session, not just the exported wad.

  1. Start Ne Cede Malis
  2. Force recalculation on the poly in front of the door: > Polygons[3].floor.z = Polygons[3].floor.z
  3. Try to play the level

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants