From 6d7242f6b8d6b524284954546553b85cadcd61d4 Mon Sep 17 00:00:00 2001 From: smthspec Date: Fri, 19 Jun 2026 09:53:17 +0300 Subject: [PATCH] Resolve proxy world position via ModelToWorld Proxy sub-objects report model-space coords; convert with house.ModelToWorld so the synced ws is true world space - globally unique per proxy instance (needed for per-object cooldown/state keying) and usable as a spawn position. Both the map1 and map2 resolution paths now return world coords consistently. Co-Authored-By: Claude Opus 4.8 --- scripts/4_World/YAProxy/YAProxyActionBase.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/4_World/YAProxy/YAProxyActionBase.c b/scripts/4_World/YAProxy/YAProxyActionBase.c index 77dafa8..618d8de 100644 --- a/scripts/4_World/YAProxy/YAProxyActionBase.c +++ b/scripts/4_World/YAProxy/YAProxyActionBase.c @@ -98,7 +98,10 @@ class YAProxyActionBase : ActionContinuousBase string name1; if (house.YA_GetProxyMap1().Find(wKey, name1) && YA_KeywordMatch(name1, kw)) { - ws = target.GetObject().GetWorldPosition(); + // Proxy sub-objects report model-space coords; convert to true world + // so the value is globally unique (state keying) and usable as a spawn + // position. (Same conversion ZPF uses.) + ws = house.ModelToWorld(target.GetObject().GetWorldPosition()); return name1; } @@ -121,7 +124,7 @@ class YAProxyActionBase : ActionContinuousBase } if (bestName != "") { - ws = house.GetPosition() + bestLS; + ws = house.ModelToWorld(bestLS); return bestName; }