From 7e8f33149f5ec9d1541f669c9d832a34c3e69c07 Mon Sep 17 00:00:00 2001 From: Moritz Schmidt Date: Tue, 28 Jul 2020 15:34:17 +0200 Subject: [PATCH] mimikry: make sure messages reach player only when civilian --- addons/main/script_version.hpp | 2 +- addons/mimikry/functions/fnc_addEventHandlers.sqf | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/addons/main/script_version.hpp b/addons/main/script_version.hpp index b1e6987a..d61c07ce 100644 --- a/addons/main/script_version.hpp +++ b/addons/main/script_version.hpp @@ -1,4 +1,4 @@ #define MAJOR 5 #define MINOR 0 #define PATCH 0 -#define BUILD 1 +#define BUILD 2 diff --git a/addons/mimikry/functions/fnc_addEventHandlers.sqf b/addons/mimikry/functions/fnc_addEventHandlers.sqf index 44e951d9..70272eaf 100644 --- a/addons/mimikry/functions/fnc_addEventHandlers.sqf +++ b/addons/mimikry/functions/fnc_addEventHandlers.sqf @@ -3,6 +3,7 @@ ["ace_interaction_sendAway", { params ["_civ"]; if (_civ != ACE_player) exitWith {}; + if (side player != civilian) exitWith {}; addCamShake [4, 0.5, 5]; @@ -13,6 +14,7 @@ ["ace_interaction_getDown", { params ["_civ"]; if (_civ != ACE_player) exitWith {}; + if (side player != civilian) exitWith {}; addCamShake [4, 0.5, 5]; @@ -24,6 +26,7 @@ [QEGVAR(interact,pointed_at_inc), { params ["_civ"]; if (_civ != ACE_player) exitWith {}; + if (side player != civilian) exitWith {}; private _newCount = (_civ getVariable [QGVAR(pointedAtCount), 0]) + 1; _civ setVariable [QGVAR(pointedAtCount), _newCount]; @@ -35,6 +38,7 @@ [QEGVAR(interact,pointed_at_dec), { params ["_civ"]; if (_civ != ACE_player) exitWith {}; + if (side player != civilian) exitWith {}; private _newCount = (_civ getVariable [QGVAR(pointedAtCount), 0]) - 1; if (_newCount < 0) then { @@ -53,6 +57,7 @@ [QEGVAR(interact,honked_at), { params ["_civ"]; if (_civ != ACE_player) exitWith {}; + if (side player != civilian) exitWith {}; private _message = "a car honks at you"; [_message] call FUNC(showCivHint); @@ -61,6 +66,7 @@ [QEGVAR(legacy,doStop), { params ["_civ"]; if (_civ != ACE_player) exitWith {}; + if (side player != civilian) exitWith {}; private _message = "someone gestures at you to stop"; [_message] call FUNC(showCivHint); @@ -69,6 +75,7 @@ [QEGVAR(legacy,doReverse), { params ["_civ"]; if (_civ != ACE_player) exitWith {}; + if (side player != civilian) exitWith {}; private _message = "someone tells you to reverse"; [_message] call FUNC(showCivHint); @@ -77,6 +84,7 @@ [QEGVAR(legacy,doCarryOn), { params ["_civ"]; if (_civ != ACE_player) exitWith {}; + if (side player != civilian) exitWith {}; private _message = "someone tells you to carry on"; [_message] call FUNC(showCivHint);