From fd0c4eb23337953895ec3b7ac23178b495128930 Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Thu, 26 Nov 2026 03:10:34 +0400 Subject: fix(behavior): exclude depleted objects from clan resources Apply the original Behavior resource distributor's 0xfffe state guard before resource callbacks in both passes. Keep the object, distributor row, shares and previous scratch words intact. Move the two-pass driver out of lib.rs into resource_distribution.rs without changing its allocation arithmetic. The GOG Behavior.dll RVA 0x19e80 oracle preserves seeded scratch fields and performs only lookup/state callbacks for a depleted object. The licensed stock mission-19 raid reduces clan power output from 10.07 to 10 per second after bunker depletion while retaining its live world object and distributor entry. The small 0.07 contribution is below the window title's display precision. Verified the stock raid in the game window with the hero at the starting position: bunker root reaches zero at 329760 ms, Attack finishes and queued retreat begins. Destruction visuals and other Control lifecycle paths remain incomplete; this does not establish whole-mission parity. Validation: cargo fmt --all -- --check; cargo check --workspace; cargo test --workspace; release build; focused Rust and licensed-stock tests; native DLL oracle; all 29 stock missions at --sim-report 900 (existing motion_factory_5 stub allowed). No new unsupported commands or damage errors, and world summaries match the preceding commit. --- docs/appendices/knowledge-boundaries.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs/appendices') diff --git a/docs/appendices/knowledge-boundaries.md b/docs/appendices/knowledge-boundaries.md index 54220b82..61c5ab47 100644 --- a/docs/appendices/knowledge-boundaries.md +++ b/docs/appendices/knowledge-boundaries.md @@ -1132,8 +1132,8 @@ RVA `0xbcf0` для остальных. Статические вызовы не и обновляет представленные поля `CurrentOre`, строк распределителя и Control selector `1`. Тот же расчёт вызывают `step_headless` и `frame` с явным clock очереди; подготовка ресурсов и мировой шаг завершаются атомарно. -Оконное приложение пока использует static preview. Этот путь не обновляет -Control amount, профили или special object-state gate. Если обязательный +Оконное приложение вызывает тот же расчёт. Маркер истощения Control `0xfffe` +исключает объект из обоих проходов, сохраняя его запись. Если обязательный запрос позднего объекта не поддержан, транзакция возвращает ошибку без применения подготовленных изменений. AutoDemo-тест подтверждает связь настоящих профилей с этим шагом и проверяет откат при ошибке ресурсов или мировой очереди, -- cgit v1.2.3