From 5e996497865b7bf5c6d891ccd1cb1a59250e308d Mon Sep 17 00:00:00 2001 From: Karrz1 <127596890+Karrz1@users.noreply.github.com> Date: Mon, 16 Nov 2026 20:37:15 +0000 Subject: [PATCH] Units: SIN's collision height fix as he wrote it SIN's fix for creature models whose client data stores a negative 'unset' collision height (-20000000, model 34 and others): such a model now gets the default collision height (2.03128), and a mount height that is not set is ignored. Some raptors' melee swings failed the line of sight check because of it. This replaces our fix for the same bug, which took the top of the model's bounding box instead (CreatureModelDataEntry::GetCollisionHeight, removed). For those 68 models the height is now the default, not the model's own. Code by SIN (1amcoff1n), Invalid creature collision heights for 0.1.35. Applied as written; only the hunk position differs in our Unit.cpp. To build, the bot module's collisionprobe command now prints the raw model height (it called the removed helper). --- src/modules/PlayerbotV2/Commands/cs_playerbot_v2.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/PlayerbotV2/Commands/cs_playerbot_v2.cpp b/src/modules/PlayerbotV2/Commands/cs_playerbot_v2.cpp index 7ee7913955..32f352977b 100644 --- a/src/modules/PlayerbotV2/Commands/cs_playerbot_v2.cpp +++ b/src/modules/PlayerbotV2/Commands/cs_playerbot_v2.cpp @@ -5865,9 +5865,9 @@ public: handler->PSendSysMessage("collisionprobe: %u display %u: no display or model data", entry, model.CreatureDisplayID); continue; } - handler->PSendSysMessage("collisionprobe: %u display %u model %u: raw CollisionHeight %.2f, used %.2f, bounds top %.2f, unit height %.2f", - entry, model.CreatureDisplayID, display->ModelID, modelData->CollisionHeight, modelData->GetCollisionHeight(), modelData->GeoBox[5], - modelData->GetCollisionHeight() * modelData->ModelScale * display->CreatureModelScale); + handler->PSendSysMessage("collisionprobe: %u display %u model %u: raw CollisionHeight %.2f, bounds top %.2f, model height %.2f", + entry, model.CreatureDisplayID, display->ModelID, modelData->CollisionHeight, modelData->GeoBox[5], + modelData->CollisionHeight * modelData->ModelScale * display->CreatureModelScale); } if (!name)