mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Removed duplicate functions
This commit is contained in:
parent
f25766d4e4
commit
6509491c19
@ -1,21 +0,0 @@
|
||||
/**
|
||||
* fn_broadcastAnim.sqf
|
||||
* @Descr: Broadcast an animation across the network using switchMove
|
||||
* @Author: Glowbal
|
||||
*
|
||||
* @Arguments: [unit OBJECt, animation STRING]
|
||||
* @Return: void
|
||||
* @PublicAPI: true
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_unit","_anim","_persistent"];
|
||||
_unit = [_this, 0, ObjNull,[ObjNull]] call BIS_fnc_Param;
|
||||
_anim = [_this, 1, "",[""]] call BIS_fnc_Param;
|
||||
|
||||
if (count _this >2) then {
|
||||
_persistent = [_this, 2, false, [false]] call BIS_fnc_Param;
|
||||
[[_unit,_anim], QUOTE(FUNC(switchAnim)), true, _persistent] spawn EFUNC(common,execRemoteFnc);
|
||||
} else {
|
||||
[[_unit,_anim], QUOTE(FUNC(switchAnim)), true, false] spawn EFUNC(common,execRemoteFnc);
|
||||
};
|
@ -1,21 +0,0 @@
|
||||
/**
|
||||
* fn_effectBlackOut.sqf
|
||||
* @Descr: Displays the blacked out effect for clients.
|
||||
* @Author: Glowbal
|
||||
*
|
||||
* @Arguments: [displayEffect BOOL]
|
||||
* @Return: void
|
||||
* @PublicAPI: true
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_displayEffect","_effect"];
|
||||
_displayEffect = [_this, 0, false,[false]] call bis_fnc_param;
|
||||
disableSerialization;
|
||||
_effect = uiNamespace getVariable QGVAR(ScreenEffectsBlack);
|
||||
if (_displayEffect) then {
|
||||
(_effect displayCtrl 11112) ctrlSetTextColor [0.0,0.0,0.0,0.9];
|
||||
} else {
|
||||
(_effect displayCtrl 11112) ctrlSetTextColor [0.0,0.0,0.0,0.0];
|
||||
};
|
@ -1,36 +0,0 @@
|
||||
/**
|
||||
* fn_effectBleeding.sqf
|
||||
* @Descr: Displays the ACE Bleeding effect
|
||||
* @Author: Glowbal
|
||||
*
|
||||
* @Arguments: [bloodLoss NUMBER]
|
||||
* @Return: void
|
||||
* @PublicAPI: true
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
if (isnil QGVAR(DisplayingBleedingEffect)) then {
|
||||
GVAR(DisplayingBleedingEffect) = false;
|
||||
};
|
||||
if (GVAR(DisplayingBleedingEffect)) exitwith {};
|
||||
private ["_bloodLoss","_time"];
|
||||
_bloodLoss = _this select 0;
|
||||
if (!(_bloodLoss > 0)) exitwith{};
|
||||
|
||||
_time = 10 - _bloodLoss;
|
||||
if (_time < 1.5) then {
|
||||
_time = 1.5;
|
||||
};
|
||||
GVAR(DisplayingBleedingEffect) = true;
|
||||
47 cutRsc [QGVAR(ScreenEffectsBleeding),"PLAIN"];
|
||||
|
||||
[{
|
||||
if !(isnil QGVAR(DisplayingBleedingEffect_ran)) then {
|
||||
GVAR(DisplayingBleedingEffect_ran) = nil;
|
||||
GVAR(DisplayingBleedingEffect) = false;
|
||||
[(_this select 1)] call cba_fnc_removePerFrameHandler;
|
||||
} else {
|
||||
GVAR(DisplayingBleedingEffect_ran) = true;
|
||||
};
|
||||
}, _time, [] ] call CBA_fnc_addPerFrameHandler;
|
@ -1,32 +0,0 @@
|
||||
/**
|
||||
* fn_effectPain.sqf
|
||||
* @Descr: Displays the ACE Pain effect
|
||||
* @Author: Glowbal
|
||||
*
|
||||
* @Arguments: [painRatio NUMBER]
|
||||
* @Return: void
|
||||
* @PublicAPI: true
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
if (isnil QGVAR(DisplayingPainEffect)) then {
|
||||
GVAR(DisplayingPainEffect) = false;
|
||||
};
|
||||
|
||||
if (GVAR(DisplayingPainEffect)) exitwith {};
|
||||
|
||||
private ["_ratio","_time"];
|
||||
_ratio = _this select 0;
|
||||
if (!(_ratio > 0)) exitwith{};
|
||||
_time = 6 - _ratio;
|
||||
if (_time <1.5) then {
|
||||
_time = 1.5;
|
||||
};
|
||||
GVAR(DisplayingPainEffect) = true;
|
||||
46 cutRsc [QGVAR(ScreenEffectsPain),"PLAIN"];
|
||||
|
||||
[{
|
||||
GVAR(DisplayingPainEffect) = false;
|
||||
[(_this select 1)] call cba_fnc_removePerFrameHandler;
|
||||
}, _time, [] ] call CBA_fnc_addPerFrameHandler;
|
@ -1,29 +0,0 @@
|
||||
/**
|
||||
* fn_endRadioTransmission_f.sqf
|
||||
* @Descr: force end all radio transmissions by TFAR or ACRE
|
||||
* @Author: Glowbal
|
||||
*
|
||||
* @Arguments: []
|
||||
* @Return: nil
|
||||
* @PublicAPI: true
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
if (["acre_api"] call FUNC(isModLoaded_F)) then {
|
||||
[-1] call acre_sys_core_fnc_handleMultiPttKeyPressUp;
|
||||
[0] call acre_sys_core_fnc_handleMultiPttKeyPressUp;
|
||||
[1] call acre_sys_core_fnc_handleMultiPttKeyPressUp;
|
||||
[2] call acre_sys_core_fnc_handleMultiPttKeyPressUp;
|
||||
};
|
||||
|
||||
if (["task_force_radio"] call FUNC(isModLoaded_F)) then {
|
||||
call TFAR_fnc_onSwTangentReleased;
|
||||
call TFAR_fnc_onAdditionalSwTangentReleased;
|
||||
|
||||
call TFAR_fnc_onLRTangentReleased;
|
||||
call TFAR_fnc_onAdditionalLRTangentReleased;
|
||||
|
||||
call TFAR_fnc_onDDTangentReleased;
|
||||
};
|
||||
|
||||
nil;
|
@ -1,13 +0,0 @@
|
||||
/**
|
||||
* fn_hasItem_f.sqf
|
||||
* @Descr: Check if a unit has item
|
||||
* @Author: Glowbal
|
||||
*
|
||||
* @Arguments: [unit OBJECT, item STRING (Classname of item)]
|
||||
* @Return: BOOL True if unit has the item in it's inventory
|
||||
* @PublicAPI: true
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
call FUNC(hasItem)
|
@ -1,26 +0,0 @@
|
||||
/**
|
||||
* fn_localAnim.sqf
|
||||
* @Descr: Play an animation on a local machine using playMoveNow
|
||||
* @Author: Glowbal
|
||||
*
|
||||
* @Arguments: [unit OBJECT, animation STRING]
|
||||
* @Return: void
|
||||
* @PublicAPI: true
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_unit","_anim","_persistent"];
|
||||
_unit = [_this, 0, ObjNull,[ObjNull]] call BIS_fnc_Param;
|
||||
_anim = [_this, 1, "",[""]] call BIS_fnc_Param;
|
||||
|
||||
if (!local _unit) then {
|
||||
if (count _this >2) then {
|
||||
_persistent = [_this, 2, false, [false]] call BIS_fnc_Param;
|
||||
[[_unit,_anim], QUOTE(FUNC(playMoveNow)), _unit, _persistent] call EFUNC(common,execRemoteFnc);
|
||||
} else {
|
||||
[[_unit,_anim], QUOTE(FUNC(playMoveNow)), _unit, false] call EFUNC(common,execRemoteFnc);
|
||||
};
|
||||
} else {
|
||||
[_unit,_anim] call FUNC(playMoveNow);
|
||||
};
|
@ -1,16 +0,0 @@
|
||||
/**
|
||||
* fn_playMoveNow.sqf
|
||||
* @Descr: N/A
|
||||
* @Author: Glowbal
|
||||
*
|
||||
* @Arguments: []
|
||||
* @Return:
|
||||
* @PublicAPI: false
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_unit", "_anim"];
|
||||
_unit = [_this,0,objNull,[objNull]] call BIS_fnc_Param;
|
||||
_anim = [_this,1,"",[""]] call BIS_fnc_Param;
|
||||
_unit playMoveNow _anim;
|
@ -1,25 +0,0 @@
|
||||
/**
|
||||
* fn_releaseMutex.sqf
|
||||
* @Descr: Releases or unlocks a mutex.
|
||||
* @Author: Glowbal
|
||||
*
|
||||
* @Arguments: [mutexName STRING]
|
||||
* @Return: True if succesfully unlocked or mutex was never locked.
|
||||
* @PublicAPI: true
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_mutexName","_initalStatus","_return"];
|
||||
_mutexName = [_this, 0, "", [""]] call BIS_fnc_param;
|
||||
|
||||
_return = false;
|
||||
if (_mutexName != "")then {
|
||||
private["_mutexCombinedName"];
|
||||
_mutexCombinedName = format["ACE_FRAMEWORK_MUTEX_%1",_mutexName];
|
||||
if !(isnil _mutexCombinedName) then {
|
||||
missionNamespace setvariable [_mutexCombinedName, 0];
|
||||
_return = true;
|
||||
};
|
||||
};
|
||||
_return
|
@ -1,17 +0,0 @@
|
||||
/**
|
||||
* fn_switchAnim.sqf
|
||||
* @Descr: N/A
|
||||
* @Author: Glowbal
|
||||
*
|
||||
* @Arguments: []
|
||||
* @Return:
|
||||
* @PublicAPI: false
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_unit", "_anim"];
|
||||
_unit = [_this,0,objNull,[objNull]] call BIS_fnc_Param;
|
||||
_anim = [_this,1,"",[""]] call BIS_fnc_Param;
|
||||
_unit switchMove _anim;
|
||||
_unit playMove _anim;
|
Loading…
Reference in New Issue
Block a user