Skip to content

Fix a very specific case of a Construction rotation bug

Player Name requested to merge PlayerName/2009scape:joro-rotation into master

What have you done in this MR?

  • Replace black magic in the chunk rotation code with a supposedly equivalent switch statement.

This fixes a bug where rooms built off of a south-facing door with a southern orientation were not getting rotated after being built (while having the correct orientation in the save file, as well as for at least parts of pathfinding, collision, and hotspots).

A concrete example: build a chapel with a west and a south door. From the south door, build a portal room. In the current live game, the ghost room will look alright, but when you build it it will get flipped to the default orientation. In this state, the hotspot for the top portal will be broken and pathfinding and collision will be funky. The cause is that this chunk is meant to be facing south, but the chunk rotator somehow didn't get the memo. This MR addresses that.

This code has been Ceikry-reviewed®™.

Are there any tricky things testers should keep an eye out for?

  • No
  • Yes, as follows:
  • I have tested these changes thoroughly.
  • This requires extra testing due to changes to architecture or other similarly risky changes.
  • I used the Thanos Tool for any JSON edits where possible, and have attached screenshots of any changes.
  • I acknowledge that this contribution will be released under the AGPL license.

*** NOTE: If Gitlab complains about pipelines stating that you need to "Validate your Gitlab account" there is no need to worry. You do not have to do this and it is only occurring because OUR pipeline tried to run on your fork. While it's preferred that you do validate your account, you can safely ignore/dismiss this message from Gitlab. ***

Merge request reports