fix(world): strip blender-suffixed porte variants from la fabrik collision
🔍 Lint / 🪄 Check lint (pull_request) Has been cancelled
🔍 Lint / 🎨 Check format (pull_request) Has been cancelled
🔍 Lint / 🔎 Typecheck (pull_request) Has been cancelled
📊 Quality / 🔒 Security Audit (pull_request) Has been cancelled
📊 Quality / 📋 Dependency Freshness (pull_request) Has been cancelled
📊 Quality / 📦 Bundle Size (pull_request) Has been cancelled
🔍 Lint / 🏗 Build (pull_request) Has been cancelled

This commit is contained in:
Tom Boullay
2026-06-01 22:19:58 +02:00
parent f6db7d74e2
commit 1b57a25e5f
+10 -1
View File
@@ -277,6 +277,15 @@ function CollisionModelInstance({
// by MergedStaticMapModel and is unaffected.
if (node.name !== "lafabrik") return;
// Strip the door slab (and any Blender-suffixed variant like `porte.001`,
// `porte_001`) from the la fabrik collision octree so the player can walk
// through the doorway. The visual model is rendered separately by
// MergedStaticMapModel and is unaffected. We exclude unrelated names like
// `porte stock` (a shelf of stocked doors) by requiring an exact match or
// a numeric suffix only.
const isDoorSlab = (name: string): boolean =>
name === "porte" || /^porte[._]\d+$/i.test(name);
// [diag] temporary — collect all door-like candidate names to debug stripping
const candidates: string[] = [];
const removed: THREE.Object3D[] = [];
@@ -284,7 +293,7 @@ function CollisionModelInstance({
if (/porte/i.test(child.name)) {
candidates.push(child.name);
}
if (child.name === "porte") {
if (isDoorSlab(child.name)) {
removed.push(child);
}
});