Add multi-tier unstuck system with void fall detection

Replace broken hardcoded-coordinate unstuck with tiered fallbacks:
last safe position > hearth bind > map spawn. Track safe positions
only on real geometry, let player fall after 500ms with no ground,
and auto-trigger unstuck after 5s of continuous falling.
This commit is contained in:
Kelsi 2026-02-08 15:32:04 -08:00
parent 8fee55f99f
commit ef54f62df0
4 changed files with 102 additions and 33 deletions

View file

@ -4494,14 +4494,14 @@ void GameHandler::useItemById(uint32_t itemId) {
void GameHandler::unstuck() {
if (unstuckCallback_) {
unstuckCallback_();
addSystemChatMessage("Unstuck: moved 5 units forward.");
addSystemChatMessage("Unstuck: snapped upward. Use /unstuckgy for full teleport.");
}
}
void GameHandler::unstuckGy() {
if (unstuckGyCallback_) {
unstuckGyCallback_();
addSystemChatMessage("Unstuck: moved to nearest graveyard.");
addSystemChatMessage("Unstuck: teleported to safe location.");
}
}