Page 1 of 1

Detach scopes bug in 1.4 RC1

Posted: 06 Jul 2016, 00:50
by v1ld
If you detach a scope from a weapon that is not in your right hand (left hand or inventory), the weapon the scope is being detached from is replaced by the weapon in the right hand slot in both STCoP and AO. The scopes script is computing the new weapon incorrectly.

The following patch fixes it for STCoP 0.9 and by inspection on the repo, AO needs a very similar fix (move weapon calc before parent_section is calculated):

Code: Select all

--- "m_scopes - orig.script"   2016-07-06 00:23:27.198862000 -0400
+++ m_scopes.script   2016-07-06 00:24:19.814871500 -0400
@@ -89,6 +89,10 @@
       return
    end
    
+   -- Support for context menus in Call of Chernobyl 1.4.
+   -- We can pass a specific weapon via parameters when not using the multi-tool.
+   weapon = _weapon or weapon
+   
    -- Used to identify the original, unmodified weapon.
    local parent_section = alun_utils.read_from_ini(system_ini(), weapon:section(), "parent_section")
    
@@ -103,10 +107,6 @@
       return
    end
    
-   -- Support for context menus in Call of Chernobyl 1.4.
-   -- We can pass a specific weapon via parameters when not using the multi-tool.
-   weapon = _weapon or weapon
-   
    -- You cannot remove a scope from an unmodified weapon!
    if ((weapon:section() == parent_section) or (not parent_section)) then
       return


1.4 RC1 is very cool, thanks.

Re: Detach scopes bug in 1.4 RC1

Posted: 12 Jul 2016, 06:52
by corradobernardi
yes i did found that bug too. running COC 1.4 RC 4.1 + AO 3.4.4 (with correct 1.4 RC addon files).
i'll try to mess with the AO version as soon as i can.

Re: Detach scopes bug in 1.4 RC1

Posted: 11 Sep 2016, 14:53
by Nuxes
corradobernardi wrote:yes i did found that bug too. running COC 1.4 RC 4.1 + AO 3.4.4 (with correct 1.4 RC addon files).
i'll try to mess with the AO version as soon as i can.


Where did you find the AO 1.4 compatibility files?

Re: Detach scopes bug in 1.4 RC1

Posted: 12 Sep 2016, 06:32
by v1ld
Nuxes wrote:Where did you find the AO 1.4 compatibility files?

Compatibility for OWR/AO/STCoP is included with the 1.4RC patch.

Re: Detach scopes bug in 1.4 RC1

Posted: 12 Sep 2016, 18:20
by Nuxes
Where would I find that? I've been playing 1.4 with the db from Mega and the CoC Assets from Dropbox.