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).
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user