fix: reduce GO fallback hit radius to prevent invisible chair click-lock

Fallback sphere for GameObjects without a loaded renderer instance was 2.5f,
causing invisible/unloaded chairs in Goldshire Inn to be accidentally targeted
during camera right-drag. This sent CMSG_GAMEOBJ_USE which set server stand
state to SIT, trapping the player until a stand-up packet was sent.

Reduce fallback radius to 1.2f and height offset to 1.0f so only deliberate
close-range direct clicks register on unloaded GO geometry.
This commit is contained in:
Kelsi 2026-03-10 19:59:23 -07:00
parent 564a286282
commit 28550dbc99

View file

@ -1683,11 +1683,11 @@ void GameScreen::processTargetInput(game::GameHandler& gameHandler) {
heightOffset = 0.3f;
}
} else if (t == game::ObjectType::GAMEOBJECT) {
// Do not hard-filter by GO type here. Some realms/content
// classify usable objects (including some chests) with types
// that look decorative in cache data.
hitRadius = 2.5f;
heightOffset = 1.2f;
// For GOs with no renderer instance yet, use a tight fallback
// sphere (not 2.5f) so invisible/unloaded GOs (chairs, doodads)
// are not accidentally clicked during camera right-drag.
hitRadius = 1.2f;
heightOffset = 1.0f;
}
hitCenter = core::coords::canonicalToRender(
glm::vec3(entity->getX(), entity->getY(), entity->getZ()));