🐛 Exiting Lower Jeuno mog house can rarely put you out of bounds
I affirm:
- [x] I understand that if I do not agree to the following points by completing the checkboxes my issue will be ignored.
- [x] I have read and understood the Contributing Guide and the Code of Conduct.
- [x] I have searched existing issues to see if the issue has already been opened, and I have checked the commit log to see if the issue has been resolved since my server was last updated.
OS / platform the server is running (if known)
Branch affected by issue
base
Steps to reproduce
Exit the mog house into Lower Jeuno a bunch until it puts you on top of the railing (there's some randomization to where exactly your character is placed). After some quick testing, only the X position has randomization.
Expected behavior
To not be placed up here. Not that the player is stuck if they fall off on the wrong side - you can still enter your mog house. Extremely minor bug.
If someone feels like tweaking the numbers and suggesting a fix.
https://github.com/LandSandBoat/server/blob/87b5895b9c20e106ca3a527c19b5d3c37c27d0e4/scripts/globals/moghouse.lua#L73-L96
might be worth adding a flag to setPos to utilize findClosestValidPoint?
It should be up to the caller to make sure they're passing in valid positions. setPos doesn't need to be overloaded (optionally or otherwise) with more logic. Especially when it's comparitively expensive navmesh logic. Double-especially when all of this is easily verifiable on retail.
Should no longer be an issue with PR #8471 as that PR changes the way we handle exiting moghouses, and now if the moghouse is at an angle, the new logic is to place the player in a position perpendicular to the rotation of the players direction they are facing when set, This in turn allows that perpendicular position line to be tightened up more and as such, no longer goes out of bounds.
Probably needs someone else to test to verify before being statisfied enough to close this issue but I have tested it myself and have so far been unable to reproduce this issue with the new code as i verified the positions min value and max values.