REPENTOGON icon indicating copy to clipboard operation
REPENTOGON copied to clipboard

MC_PRE_CHANGE_ROOM Crashes Involving Dimension

Open Syntax-Sculptor opened this issue 2 years ago • 1 comments

When returning a table with MC_PRE_CHANGE_ROOM, the game will crash under the following conditions involving with the dimension element:

  • The dimension is equal to Death Certificate (2) unless the player is currently in the Death Certificate dimension. However, the player being in the Death Certificate dimension prevents the returned value in the callback from doing anything.
  • The dimension is equal to the Secondary Dimension (1) and the current floor does not have the Abandoned Mineshaft or Mirror dimension

log.txt offers nothing useful.

Reprex

-- Assume the player is in the starting room in Basement 1.
local TestMod = registerMod("TestMod", 1)

TestMod:AddCallback(
   ModCallbacks.MC_PRE_CHANGE_ROOM,
   function() return {Game():GetLevel():GetStartingRoomIndex(), 1} end
)

Syntax-Sculptor avatar Jan 02 '24 06:01 Syntax-Sculptor

I'd like to add that the secondary dimension seems to crash most of the time, even when there's the abandoned mineshaft. did not test on downpour.

catinsurance avatar Jul 07 '24 07:07 catinsurance

Should be fixed in https://github.com/TeamREPENTOGON/REPENTOGON/commit/b9fff5117bddfbed03e5124bde25ca913a32aa34

epfly6 avatar Aug 03 '25 14:08 epfly6