Skip to content

Commit

Permalink
mimikry: make sure messages reach player only when civilian
Browse files Browse the repository at this point in the history
  • Loading branch information
Fusselwurm committed Jul 28, 2020
1 parent 1a374be commit 7e8f331
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion addons/main/script_version.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#define MAJOR 5
#define MINOR 0
#define PATCH 0
#define BUILD 1
#define BUILD 2
8 changes: 8 additions & 0 deletions addons/mimikry/functions/fnc_addEventHandlers.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
["ace_interaction_sendAway", {
params ["_civ"];
if (_civ != ACE_player) exitWith {};
if (side player != civilian) exitWith {};

addCamShake [4, 0.5, 5];

Expand All @@ -13,6 +14,7 @@
["ace_interaction_getDown", {
params ["_civ"];
if (_civ != ACE_player) exitWith {};
if (side player != civilian) exitWith {};

addCamShake [4, 0.5, 5];

Expand All @@ -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];
Expand All @@ -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 {
Expand All @@ -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);
Expand All @@ -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);
Expand All @@ -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);
Expand All @@ -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);
Expand Down

0 comments on commit 7e8f331

Please sign in to comment.