TeamREPENTOGON / TeamREPENTOGON/REPENTOGON
Obtaining Neighbors from a Placed Room Crashes Game
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 345
- Forks
- 51
- Avg merge
- 11h 2m
- Merged PRs (30d)
- 4
Description
Very niche issue but, when working with level generation, if you place a room using PlaceRoom (specifically using the LevelGeneratorEntry overload), that room will the run MC_PRE_LEVEL_PLACE_ROOM on the spot. This is great for detecting if the room is that type, as you can store a local variable telling the game that the next room will be your placed room. If you then do that, MC_PRE_LEVEL_PLACE_ROOM returns a corresponding LevelGeneratorRoom, which seems to crash the game immediately when using the method Neighbors(). I have no idea why this would be the case other than the fact the room was placed after LevelGenerator made rooms (which must be the case if you wish to make spawning patterns conditional, as you cannot access Room or RoomDescriptor information with the LevelGenerator methods.), and although this problem can be circumvented, it would be incredibly convenient if PlaceRoom returned neighbors out of the box.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the crash with a room placed through PlaceRoom using the LevelGeneratorEntry overload, then inspect the MC_PRE_LEVEL_PLACE_ROOM callback and the returned LevelGeneratorRoom. Trace the Neighbors() call for rooms created after LevelGenerator setup. Done means obtaining neighbors from the placed room no longer crashes and existing level-generation behavior remains intact.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- api, game-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100