From 7361569a4f2f05ba4c97f276478e70b98c7da39a Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Tue, 1 Dec 2026 06:33:21 +0400 Subject: fix(combat): accept weapon CPT points with distinct metadata words Control.dll caches the node from CPT offset +4 at RVA 0xb210 and uses that node for the point and direction at RVA 0x1b4f0. A native call with the medium cannon's words 3 and 2 selected node 3. Rejecting those different words disabled the authored bb_m_02 cannon. The licensed regression finds the cannon in the stock medium warbot. Both enemy medium warbots fire in the normal-start input replay of Two Fortresses. The 29 stock missions still reach 900 simulated seconds. Rocket racks without resolved CPT lists remain outside the weapon bank. --- docs/tomes/06-behavior.md | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'docs/tomes/06-behavior.md') diff --git a/docs/tomes/06-behavior.md b/docs/tomes/06-behavior.md index e12963e9..60185926 100644 --- a/docs/tomes/06-behavior.md +++ b/docs/tomes/06-behavior.md @@ -2862,6 +2862,12 @@ RVA `0x1b4f0`, и преобразований `Ngi32.dll`. При масшта даёт точку (24, 42, 62) и вектор (−6, 2, 12). Мировую матрицу для вектора ствола FParkan ещё предстоит восстановить. +Запись CPT хранит два соседних слова. При создании записи для выстрела +`Control.dll` по RVA `0xb210` сохраняет узел из слова по `+4`. Вызов +`0x1b4f0` использует этот узел для обеих троек, точки и вектора. У пушки +среднего варбота `bb_m_02` слова равны 3 и 2. Вызов DLL подтверждает +выбор узла 3. FParkan готовит пушку и при таких разных значениях. + Дальность выстрела задаёт устройство оружия. Если слово 22 профиля снаряда положительно, `Control.dll+0x297e0` подставляет его в селектор 8 орудия. Ветка `0x29e23` сравнивает квадрат этой дальности с квадратом -- cgit v1.2.3