mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 07:40:14 +00:00
Fix invisible walls from WMO doodad M2 collision and MOPY filtering
WMO interior doodads (gears, decorations) were blocking player movement via M2 collision. Skip collision for all WMO doodad M2 instances since the WMO itself handles wall collision. Also filter WMO wall collision using MOPY per-triangle flags: only rendered+collidable triangles block the player, skipping invisible collision hulls. Revert tram portal extended range (no longer needed with collision fix).
This commit is contained in:
parent
ee4e6a31ce
commit
4cbceced67
7 changed files with 44 additions and 20 deletions
|
|
@ -8809,22 +8809,13 @@ void GameHandler::checkAreaTriggers() {
|
|||
areaTriggerSuppressFirst_ = false;
|
||||
}
|
||||
|
||||
// Deeprun Tram entrance triggers need extended range because WMO
|
||||
// collision walls block the player from reaching the trigger center.
|
||||
static const std::unordered_set<uint32_t> extendedRangeTriggers = {
|
||||
712, 713, // Stormwind/Ironforge → Deeprun Tram (classic IDs)
|
||||
2166, 2171, // Tram interior exit triggers
|
||||
2173, 2175, // Stormwind/Ironforge tram entrance (WotLK IDs)
|
||||
};
|
||||
|
||||
for (const auto& at : areaTriggers_) {
|
||||
if (at.mapId != currentMapId_) continue;
|
||||
|
||||
const bool extended = extendedRangeTriggers.count(at.id) > 0;
|
||||
bool inside = false;
|
||||
if (at.radius > 0.0f) {
|
||||
// Sphere trigger — small minimum so player must be near the portal
|
||||
float effectiveRadius = std::max(at.radius, extended ? 45.0f : 12.0f);
|
||||
float effectiveRadius = std::max(at.radius, 12.0f);
|
||||
float dx = px - at.x;
|
||||
float dy = py - at.y;
|
||||
float dz = pz - at.z;
|
||||
|
|
@ -8832,7 +8823,7 @@ void GameHandler::checkAreaTriggers() {
|
|||
inside = (distSq <= effectiveRadius * effectiveRadius);
|
||||
} else if (at.boxLength > 0.0f || at.boxWidth > 0.0f || at.boxHeight > 0.0f) {
|
||||
// Box trigger — small minimum so player must walk into the portal area
|
||||
float boxMin = extended ? 60.0f : 16.0f;
|
||||
float boxMin = 16.0f;
|
||||
float effLength = std::max(at.boxLength, boxMin);
|
||||
float effWidth = std::max(at.boxWidth, boxMin);
|
||||
float effHeight = std::max(at.boxHeight, boxMin);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue