2018-09-17 19:19:29 +00:00
|
|
|
#include "script_component.hpp"
|
2015-01-12 09:07:03 +00:00
|
|
|
/*
|
2015-09-26 14:26:41 +00:00
|
|
|
* Author: commy2
|
|
|
|
* Initializes the friendly fire module.
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: Logic <OBJECT>
|
|
|
|
* 1: Synced units <ARRAY>
|
|
|
|
* 2: Activated <BOOL>
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Example:
|
|
|
|
* [logic, [ACE_Player], true] call ace_respawn_fnc_moduleFriendlyFire
|
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
2015-01-12 09:07:03 +00:00
|
|
|
|
2015-09-26 14:26:41 +00:00
|
|
|
params ["_logic", "_units", "_activated"];
|
2015-01-12 09:07:03 +00:00
|
|
|
|
2015-09-26 14:26:41 +00:00
|
|
|
if !(_activated) exitWith {};
|
2015-01-12 09:07:03 +00:00
|
|
|
|
2015-09-26 14:26:41 +00:00
|
|
|
// this is done for JIP compatibility
|
|
|
|
if (isServer) then {
|
|
|
|
[{
|
2015-04-17 23:13:09 +00:00
|
|
|
missionNamespace setVariable [QGVAR(showFriendlyFireMessage), true];
|
|
|
|
publicVariable QGVAR(showFriendlyFireMessage);
|
2015-09-26 14:26:41 +00:00
|
|
|
},
|
2016-05-22 13:27:24 +00:00
|
|
|
[], 0.1] call CBA_fnc_waitAndExecute;
|
2015-01-12 09:07:03 +00:00
|
|
|
};
|
2015-09-26 14:26:41 +00:00
|
|
|
|
2016-10-02 10:55:31 +00:00
|
|
|
INFO("Friendly Fire Messages Module Initialized.");
|