Helion-Engine / Helion

A modern fast paced Doom FPS engine
GNU General Public License v3.0
86 stars 9 forks source link

Badly bugged teleporter destinations #575

Closed lemming104 closed 3 months ago

lemming104 commented 3 months ago

I'm not 100% sure, but I think this is some state that isn't getting cleared when the user changes difficulty. Here are the most repeatable repro steps I have been able to come up with.

I am on my own private build, based on GIT SHA 3dc7e42663d4cfdd797b50d0c66540ef1bee6e8c. I have no local changes.

  1. Launch Helion, using the Doom2 1.9 WAD (CRC32: EC8725DB)
  2. Start a new game on the lowest difficulty setting
  3. Pull down the console, type map map23
  4. Escape the big hallway you start out in, open the door at the end, and go through the teleporter.

Expected/Actual: You are teleported to the coordinates shown in the screenshot below, and can continue playing. helion_20240518_10 21 32 6336

  1. WITHOUT QUITTING HELION, open up the menu and start a new game on Ultra-Violence difficulty
  2. Go into the console, type map map23
  3. Again, escape the big hallway and step onto the teleporter.

Expected: You should be teleported to the same coordinates as in the first game. Actual: You are teleported directly on top of a barrel and have a very, very bad day:

helion_20240518_10 23 00 9927

nstlaurent commented 3 months ago

Good catch. This dev build of Helion currently reuses a lot of these objects in an effort to reduce map load times for the same map when the player dies or is loading a save. The teleport spots are stored separately and weren't being cleared. Should be fixed with this commit

lemming104 commented 3 months ago

Always nice when the fix is just a one-liner!