fix(player): порт — self.delete снимает interact-подсказку
Some checks failed
CI / Lint (pull_request) Failing after 35s
CI / Build (pull_request) Failing after 29s
CI / Secret scan (pull_request) Failing after 32s
CI / PR size check (pull_request) Failing after 33s
CI / Deploy to S1 + S2 (pull_request) Has been skipped

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
min 2026-06-07 14:59:26 +03:00
parent 5f789764a6
commit 37d1acbba1

View File

@ -3884,6 +3884,11 @@ export class GameRuntime {
const id = t.id ?? t.ref; const id = t.id ?? t.ref;
this.scene3d?.primitiveManager?.removeInstance(id); this.scene3d?.primitiveManager?.removeInstance(id);
} }
// Снять interact-подсказку удалённого объекта (иначе «E» висит на пустоте).
if (t.kind && (t.ref ?? t.id) != null && Array.isArray(this._interactables)) {
const ref = t.kind + ':' + (t.ref ?? t.id);
this._interactables = this._interactables.filter(it => it.ref !== ref);
}
this.scheduleSceneSnapshot(); this.scheduleSceneSnapshot();
} catch (e) { } catch (e) {
// eslint-disable-next-line no-console // eslint-disable-next-line no-console