From 67e5e3139496333ded9e719687f8d553df8218dd Mon Sep 17 00:00:00 2001 From: SilentSpike Date: Wed, 29 Jul 2015 12:25:04 +0100 Subject: [PATCH] Change zeus modules to run globally Zeus modules were only running on the *server* rather than the local machine. This resulted in the variable used to cache the object zeus has its cursor over not existing and therefore the modules didn't work at all. --- addons/zeus/CfgVehicles.hpp | 4 ++++ addons/zeus/functions/fnc_moduleCaptive.sqf | 2 +- addons/zeus/functions/fnc_moduleSurrender.sqf | 2 +- addons/zeus/functions/fnc_moduleUnconscious.sqf | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/addons/zeus/CfgVehicles.hpp b/addons/zeus/CfgVehicles.hpp index 79d4ff6f1f..77273c60b7 100644 --- a/addons/zeus/CfgVehicles.hpp +++ b/addons/zeus/CfgVehicles.hpp @@ -79,6 +79,10 @@ class CfgVehicles { class GVAR(moduleBase): Module_F { author = "SilentSpike"; category = "ACE"; + functionPriority = 1; + isGlobal = 1; + isTriggerActivated = 0; + scope = 1; scopeCurator = 2; }; class GVAR(moduleCaptive): GVAR(moduleBase) { diff --git a/addons/zeus/functions/fnc_moduleCaptive.sqf b/addons/zeus/functions/fnc_moduleCaptive.sqf index 41d515c2fc..43879a2a59 100644 --- a/addons/zeus/functions/fnc_moduleCaptive.sqf +++ b/addons/zeus/functions/fnc_moduleCaptive.sqf @@ -18,7 +18,7 @@ PARAMS_3(_logic,_units,_activated); private ["_mouseOver","_unit","_captive"]; -if (!_activated) exitWith {}; +if !(_activated && local _logic) exitWith {}; if (isNil QEFUNC(captives,setHandcuffed)) then { [LSTRING(RequiresAddon)] call EFUNC(common,displayTextStructured); diff --git a/addons/zeus/functions/fnc_moduleSurrender.sqf b/addons/zeus/functions/fnc_moduleSurrender.sqf index 8518e2f9ad..30ec8d8d35 100644 --- a/addons/zeus/functions/fnc_moduleSurrender.sqf +++ b/addons/zeus/functions/fnc_moduleSurrender.sqf @@ -18,7 +18,7 @@ PARAMS_3(_logic,_units,_activated); private ["_mouseOver","_unit","_surrendering"]; -if (!_activated) exitWith {}; +if !(_activated && local _logic) exitWith {}; if (isNil QEFUNC(captives,setSurrendered)) then { [LSTRING(RequiresAddon)] call EFUNC(common,displayTextStructured); diff --git a/addons/zeus/functions/fnc_moduleUnconscious.sqf b/addons/zeus/functions/fnc_moduleUnconscious.sqf index 529c8389ee..439496d2d7 100644 --- a/addons/zeus/functions/fnc_moduleUnconscious.sqf +++ b/addons/zeus/functions/fnc_moduleUnconscious.sqf @@ -18,7 +18,7 @@ PARAMS_3(_logic,_units,_activated); private ["_mouseOver","_unit","_conscious"]; -if (!_activated) exitWith {}; +if !(_activated && local _logic) exitWith {}; if (isNil QEFUNC(medical,setUnconscious)) then { [LSTRING(RequiresAddon)] call EFUNC(common,displayTextStructured);