mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge branch 'master' into nametagsToggle
Conflicts: addons/nametags/config.cpp
This commit is contained in:
commit
6ba4289511
@ -2,10 +2,9 @@
|
||||
// internal handler for net events
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_eventType", "_event", "_eventName", "_eventArgs", "_eventNames", "_eventIndex", "_eventTargets", "_sentEvents", "_owner", "_serverFlagged"];
|
||||
private ["_eventName", "_eventArgs", "_eventNames", "_eventIndex", "_eventTargets", "_sentEvents", "_owner", "_serverFlagged"];
|
||||
|
||||
_eventType = _this select 0;
|
||||
_event = _this select 1;
|
||||
PARAMS_2(_eventType,_event);
|
||||
|
||||
if (_eventType == "ACEg") then {
|
||||
_eventName = _event select 0;
|
||||
|
@ -18,16 +18,9 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_unit", "_displayName", "_action", "_condition", "_statement", "_condition2", "_statement2", "_priority", "_name", "_actionsVar", "_id", "_actionIDs", "_actions", "_nameVar", "_addAction", "_actionID"];
|
||||
private ["_name", "_actionsVar", "_id", "_actionIDs", "_actions", "_nameVar", "_addAction", "_actionID"];
|
||||
|
||||
_unit = _this select 0;
|
||||
_displayName = _this select 1;
|
||||
_action = _this select 2;
|
||||
_condition = _this select 3;
|
||||
_statement = _this select 4;
|
||||
_condition2 = _this select 5;
|
||||
_statement2 = _this select 6;
|
||||
_priority = _this select 7;
|
||||
PARAMS_8(_unit,_displayName,_action,_condition,_statement,_condition2,_statement2,_priority);
|
||||
|
||||
if (isNil "_priority") then {_priority = 0};
|
||||
|
||||
|
@ -11,9 +11,10 @@
|
||||
* Event handler ID number (for use with fnc_removeEventHandler)
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
private ["_eventName", "_eventCode", "_eventNames", "_eventFunctions", "_eventNameCount", "_eventIndex", "_eventFunctionCount"];
|
||||
_eventName = _this select 0;
|
||||
_eventCode = _this select 1;
|
||||
|
||||
private ["_eventNames", "_eventFunctions", "_eventNameCount", "_eventIndex", "_eventFunctionCount"];
|
||||
|
||||
PARAMS_2(_eventName,_eventCode);
|
||||
|
||||
_eventNames = GVAR(events) select 0;
|
||||
_eventFunctions = [];
|
||||
|
@ -11,9 +11,9 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_statement", "_actionsVar", "_id", "_actionIDs", "_actions"];
|
||||
private ["_actionsVar", "_id", "_actionIDs", "_actions"];
|
||||
|
||||
_statement = _this select 0;
|
||||
PARAMS_1(_statement);
|
||||
|
||||
if (typeName _statement == "STRING") then {
|
||||
_statement = compile _statement;
|
||||
|
@ -11,9 +11,9 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_statement", "_actionsVar", "_id", "_actionIDs", "_actions"];
|
||||
private ["_actionsVar", "_id", "_actionIDs", "_actions"];
|
||||
|
||||
_statement = _this select 0;
|
||||
PARAMS_1(_statement);
|
||||
|
||||
if (typeName _statement == "STRING") then {
|
||||
_statement = compile _statement;
|
||||
|
@ -20,7 +20,7 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
EXPLODE_8_PVT(_this,_name,_typeName,_isClientSetable,_localizedName,_localizedDescription,_possibleValues,_isForced,_value);
|
||||
PARAMS_8(_name,_typeName,_isClientSetable,_localizedName,_localizedDescription,_possibleValues,_isForced,_value);
|
||||
|
||||
_settingData = [_name] call FUNC(getSettingData);
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
//#define DEBUG_MODE_FULL
|
||||
#include "script_component.hpp"
|
||||
|
||||
EXPLODE_2_PVT(_this,_unit,_classname);
|
||||
PARAMS_2(_unit,_classname);
|
||||
DEFAULT_PARAM(2,_container,"");
|
||||
DEFAULT_PARAM(3,_ammoCount,-1);
|
||||
|
||||
|
@ -17,9 +17,9 @@ Example:
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_unit", "_forceWalkNumber"];
|
||||
private ["_forceWalkNumber"];
|
||||
|
||||
_unit = _this select 0;
|
||||
PARAMS_1(_unit);
|
||||
_forceWalkNumber = _unit getVariable ["ACE_forceWalkStatusNumber", 0];
|
||||
|
||||
_unit forceWalk (_forceWalkNumber > 0);
|
||||
|
@ -10,11 +10,11 @@
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_id", "_show"];
|
||||
_id = _this select 0;
|
||||
private ["_show"];
|
||||
PARAMS_1(_id);
|
||||
_show = if (count _this > 1) then {_this select 1} else {false};
|
||||
|
||||
if (isnil QGVAR(SHOW_BLUR_SCREEN_COLLECTION)) then {
|
||||
if (isNil QGVAR(SHOW_BLUR_SCREEN_COLLECTION)) then {
|
||||
GVAR(SHOW_BLUR_SCREEN_COLLECTION) = [];
|
||||
};
|
||||
if (typeName _show == typeName 0) then {
|
||||
|
@ -17,7 +17,7 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
EXPLODE_5_PVT(_this,_params,_function,_namespace,_uid,_duration);
|
||||
PARAMS_5(_params,_function,_namespace,_uid,_duration);
|
||||
|
||||
if (((_namespace getVariable [_uid, [-99999]]) select 0) < diag_tickTime) then {
|
||||
_namespace setVariable [_uid, [diag_tickTime + _duration, _params call _function]];
|
||||
|
@ -19,12 +19,11 @@
|
||||
#define CANGETINDRIVER (isNull (driver _vehicle) || {!alive driver _vehicle}) && {!lockedDriver _vehicle} && {getNumber (_config >> "isUav") != 1}
|
||||
#define CANGETINTURRETINDEX (isNull (_vehicle turretUnit _turret) || {!alive (_vehicle turretUnit _turret)}) && {!(_vehicle lockedTurret _turret)} && {getNumber (_config >> "isUav") != 1}
|
||||
|
||||
private ["_unit", "_vehicle", "_position", "_checkDistance", "_index"];
|
||||
private ["_position", "_checkDistance", "_index"];
|
||||
|
||||
_this resize 5;
|
||||
|
||||
_unit = _this select 0;
|
||||
_vehicle = _this select 1;
|
||||
PARAMS_2(_unit,_vehicle);
|
||||
_position = toLower (_this select 2);
|
||||
_checkDistance = _this select 3;
|
||||
_index = _this select 4; // optional, please don't use
|
||||
@ -181,7 +180,6 @@ switch (_position) do {
|
||||
|
||||
_return = true
|
||||
} else {
|
||||
|
||||
_index = _positions select 0;
|
||||
if (!isNil "_index") then {
|
||||
_radius = getNumber (_config >> "getInRadius");
|
||||
@ -255,7 +253,7 @@ _fnc_isInRange = {
|
||||
if (_position == "cargo") exitWith {
|
||||
if (_return && {!_checkDistance || {_vehicle == vehicle _unit} || _fnc_isInRange}) then {true} else {
|
||||
[_unit, _vehicle, "ffv", _checkDistance] call FUNC(canGetInPosition);
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
_return && {!_checkDistance || {_vehicle == vehicle _unit} || _fnc_isInRange}
|
||||
|
@ -8,6 +8,9 @@
|
||||
* @PublicAPI: true
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
private ["_unit","_return"];
|
||||
_unit = _this select 0;
|
||||
|
||||
private ["_return"];
|
||||
|
||||
PARAMS_1(_unit);
|
||||
|
||||
(((_unit getvariable [QGVAR(canInteract),0]) < 1) && ([_unit] call FUNC(isAwake)) && !([_unit] call FUNC(isArrested)))
|
@ -14,10 +14,10 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_unit", "_target", "_exceptions"];
|
||||
private ["_exceptions"];
|
||||
|
||||
PARAMS_2(_unit,_target);
|
||||
|
||||
_unit = _this select 0;
|
||||
_target = _this select 1;
|
||||
_exceptions = if (count _this > 2) then {
|
||||
_this select 2;
|
||||
} else {
|
||||
|
@ -3,9 +3,9 @@
|
||||
|
||||
// returns true if the unit is on foot or in a ffv position
|
||||
|
||||
private ["_unit", "_config"];
|
||||
private ["_config"];
|
||||
|
||||
_unit = _this select 0;
|
||||
PARAMS_1(_unit);
|
||||
|
||||
if (_unit == vehicle _unit) exitWith {true};
|
||||
|
||||
|
@ -14,11 +14,9 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_projectile", "_adjustDir", "_adjustUp", "_adjustSpeed", "_vdir", "_dir", "_up", "_l", "_r", "_vup", "_vel"];
|
||||
private ["_adjustSpeed", "_vdir", "_dir", "_up", "_l", "_r", "_vup", "_vel"];
|
||||
|
||||
_projectile = _this select 0;
|
||||
_adjustDir = _this select 1;
|
||||
_adjustUp = _this select 2;
|
||||
PARAMS_3(_projectile,_adjustDir,_adjustUp);
|
||||
|
||||
_adjustSpeed = if (count _this > 3) then {
|
||||
_this select 3
|
||||
|
@ -16,13 +16,11 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_mode", "_checkAll", "_whitelist", "_logic"];
|
||||
private ["_logic"];
|
||||
|
||||
_this resize 3;
|
||||
|
||||
_mode = _this select 0;
|
||||
_checkAll = _this select 1;
|
||||
_whitelist = _this select 2;
|
||||
PARAMS_3(_mode,_checkAll,_whitelist);
|
||||
|
||||
if (isNil "_checkAll") then {
|
||||
_checkAll = false;
|
||||
|
@ -14,11 +14,7 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_unit", "_target", "_lockTarget"];
|
||||
|
||||
_unit = _this select 0;
|
||||
_target = _this select 1;
|
||||
_lockTarget = _this select 2;
|
||||
PARAMS_3(_unit,_target,_lockTarget);
|
||||
|
||||
if (isNil "_lockTarget") then {_lockTarget = false};
|
||||
|
||||
|
@ -13,8 +13,7 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
_this spawn {
|
||||
_target = _this select 0;
|
||||
_ignoreDead = _this select 1;
|
||||
PARAMS_2(_target,_ignoreDead);
|
||||
if (isNil "_ignoreDead") then {_ignoreDead = false};
|
||||
|
||||
_vehicleTarget = vehicle _target;
|
||||
|
@ -11,9 +11,7 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private "_function";
|
||||
|
||||
_function = _this select 0;
|
||||
PARAMS_1(_function);
|
||||
|
||||
if (typeName _function == "STRING") exitWith {_function};
|
||||
|
||||
|
@ -16,9 +16,7 @@
|
||||
|
||||
#define KEY_MODIFIERS [42, 54, 29, 157, 56, 184]
|
||||
|
||||
private "_key";
|
||||
|
||||
_key = _this select 0;
|
||||
PARAMS_1(_key);
|
||||
|
||||
if (_key in KEY_MODIFIERS) exitWith {_key};
|
||||
|
||||
|
@ -12,8 +12,8 @@
|
||||
#define DEFAULT_LOGGING_LEVEL -1
|
||||
#define DEFAULT_TEXT_DISPLAY -1
|
||||
|
||||
private ["_msg", "_level", "_prefix", "_defaultLoglevel","_defaultLogDisplayLevel", "_message", "_from"];
|
||||
_msg = _this select 0;
|
||||
private ["_level", "_prefix", "_defaultLoglevel","_defaultLogDisplayLevel", "_message", "_from"];
|
||||
PARAMS_1(_msg);
|
||||
_level = if (count _this > 1) then {_this select 1} else { 2 };
|
||||
|
||||
if (typeName _level != "NUMBER") then {
|
||||
|
@ -7,9 +7,10 @@
|
||||
* @Return:
|
||||
* @PublicAPI: false
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
private ["_entity"];
|
||||
_entity = _this select 0;
|
||||
|
||||
PARAMS_1(_entity);
|
||||
|
||||
GVAR(LOGDISPLAY_LEVEL) = call compile (_entity getvariable ["logDisplayLevel","4"]);
|
||||
GVAR(LOGLEVEL) = call compile (_entity getvariable ["logLevel","4"]);
|
||||
|
@ -9,11 +9,10 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_name","_value","_defaultGlobal","_catagory","_code","_persistent"];
|
||||
_name = _this select 0;
|
||||
_value = _this select 1;
|
||||
_defaultGlobal = _this select 2;
|
||||
_catagory = _this select 3;
|
||||
private ["_code","_persistent"];
|
||||
|
||||
PARAMS_4(_name,_value,_defaultGlobal,_catagory);
|
||||
|
||||
_code = 0;
|
||||
_persistent = false;
|
||||
|
||||
|
@ -13,9 +13,9 @@
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_state", "_dlg"];
|
||||
private ["_dlg"];
|
||||
|
||||
_state = _this select 0;
|
||||
PARAMS_1(_state);
|
||||
|
||||
if (_state) then {
|
||||
disableSerialization;
|
||||
|
@ -42,11 +42,10 @@
|
||||
// other constants
|
||||
#define DEFAULT_TIME 6
|
||||
|
||||
private ["_iconId", "_show", "_icon", "_allControls", "_refresh", "_timeAlive", "_list", "_color"];
|
||||
_iconId = _this select 0;
|
||||
_show = _this select 1;
|
||||
_icon = _this select 2;
|
||||
_color = _this select 3;
|
||||
private ["_allControls", "_refresh", "_timeAlive", "_list"];
|
||||
|
||||
PARAMS_4(_iconId,_show,_icon,_color);
|
||||
|
||||
_timeAlive = if (count _this > 4) then {_this select 4} else {DEFAULT_TIME};
|
||||
|
||||
disableSerialization;
|
||||
@ -93,7 +92,7 @@ if (_show) then {
|
||||
if (_x select 0 == _iconId) exitwith {
|
||||
_list set [_foreachIndex, [_iconId, _icon, _color, time]];
|
||||
};
|
||||
}foreach _list;
|
||||
} forEach _list;
|
||||
};
|
||||
missionNamespace setvariable [QGVAR(displayIconList), _list];
|
||||
call _refresh;
|
||||
@ -112,7 +111,7 @@ if (_show) then {
|
||||
if (_x select 0 != _iconId) then {
|
||||
_newList pushback _x;
|
||||
};
|
||||
}foreach _list;
|
||||
} forEach _list;
|
||||
|
||||
missionNamespace setvariable [QGVAR(displayIconList), _newList];
|
||||
call _refresh;
|
||||
|
@ -20,11 +20,9 @@
|
||||
|
||||
_this resize 4;
|
||||
|
||||
private ["_text", "_sound", "_delay", "_priority", "_lastHintTime", "_lastHintPriority", "_time"];
|
||||
_text = _this select 0;
|
||||
_sound = _this select 1;
|
||||
_delay = _this select 2;
|
||||
_priority = _this select 3;
|
||||
private ["_lastHintTime", "_lastHintPriority", "_time"];
|
||||
|
||||
PARAMS_4(_text,_sound,_delay,_priority);
|
||||
|
||||
if (isNil QGVAR(lastHint)) then {
|
||||
GVAR(lastHint) = [0, 0];
|
||||
|
@ -15,9 +15,8 @@
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_text", "_image", "_imageColor", "_target"];
|
||||
_text = _this select 0;
|
||||
_image = _this select 1;
|
||||
private ["_imageColor", "_target"];
|
||||
PARAMS_2(_text,_image);
|
||||
_imageColor = if (count _this > 2) then {_this select 2} else {[1,1,1]};
|
||||
_imageColor resize 3;
|
||||
_target = if (count _this > 3) then {_this select 3} else {ACE_player};
|
||||
|
@ -16,11 +16,9 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_unit", "_animation", "_priority", "_force"];
|
||||
private ["_force"];
|
||||
|
||||
_unit = _this select 0;
|
||||
_animation = _this select 1;
|
||||
_priority = _this select 2;
|
||||
PARAMS_3(_unit,_animation,_priority);
|
||||
_force = False;
|
||||
|
||||
// no animation given
|
||||
|
@ -12,17 +12,13 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private "_unit";
|
||||
PARAMS_1(_unit);
|
||||
|
||||
_unit = _this select 0;
|
||||
private ["_backpackObject","_holder"];
|
||||
|
||||
private "_backpackObject";
|
||||
_backpackObject = backpackContainer _unit;
|
||||
|
||||
_unit addBackpack "Bag_Base";
|
||||
removeBackpack _unit;
|
||||
|
||||
private "_holder";
|
||||
_holder = objNull;
|
||||
|
||||
{
|
||||
|
@ -1,15 +1,18 @@
|
||||
//fnc_dumpArray.sqf
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_var", "_depth", "_pad", "_i", "_x"];
|
||||
private ["_pad", "_i", "_x"];
|
||||
|
||||
PARAMS_2(_var,_depth);
|
||||
|
||||
_var = _this select 0;
|
||||
_depth = _this select 1;
|
||||
_pad = "";
|
||||
|
||||
for "_i" from 0 to _depth do {
|
||||
_pad = _pad + toString [9];
|
||||
};
|
||||
|
||||
_depth = _depth + 1;
|
||||
|
||||
if (IS_ARRAY(_var)) then {
|
||||
if ((count _var) > 0) then {
|
||||
diag_log text format["%1[", _pad];
|
||||
|
@ -13,6 +13,6 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
EXPLODE_2_PVT(_this,_namespace,_uid);
|
||||
PARAMS_2(_namespace,_uid);
|
||||
|
||||
_namespace setVariable [_uid, nil];
|
||||
|
@ -15,7 +15,6 @@
|
||||
disableSerialization;
|
||||
endLoadingScreen;
|
||||
|
||||
|
||||
// no message without player possible
|
||||
if (!hasInterface) exitWith {};
|
||||
|
||||
@ -30,10 +29,9 @@ if (isNull (call BIS_fnc_displayMission)) exitWith {
|
||||
}, 1, _this] call CBA_fnc_addPerFrameHandler;
|
||||
};
|
||||
|
||||
private ["_textHeader", "_textMessage", "_onOK", "_onCancel"];
|
||||
private ["_onOK", "_onCancel"];
|
||||
|
||||
_textHeader = _this select 0;
|
||||
_textMessage = _this select 1;
|
||||
PARAMS_2(_textHeader,_textMessage);
|
||||
_onOK = ARR_SELECT(_this,2,{});
|
||||
_onCancel = ARR_SELECT(_this,3,{});
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
EXPLODE_2_PVT(_this,_func,_params);
|
||||
PARAMS_2(_func,_params);
|
||||
|
||||
[
|
||||
{
|
||||
|
@ -1,9 +1,7 @@
|
||||
// by commy2
|
||||
#include "script_component.hpp"
|
||||
|
||||
private "_target";
|
||||
|
||||
_target = _this select 0;
|
||||
PARAMS_1(_target);
|
||||
|
||||
{
|
||||
if (isNil "_x") then {
|
||||
|
@ -9,10 +9,9 @@
|
||||
private "_fnc_logEntries";
|
||||
|
||||
_fnc_logEntries = {
|
||||
private ["_c", "_d", "_p", "_t", "_e"];
|
||||
private ["_p", "_t", "_e"];
|
||||
|
||||
_c = _this select 0;
|
||||
_d = _this select 1;
|
||||
PARAMS_2(_c,_d);
|
||||
|
||||
_p = inheritsFrom _c;
|
||||
|
||||
@ -63,7 +62,6 @@ _fnc_logEntries = {
|
||||
};
|
||||
diag_log text _t;
|
||||
diag_log text "";
|
||||
|
||||
};
|
||||
|
||||
[_this, 0] call _fnc_logEntries;
|
||||
|
@ -15,10 +15,9 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_array", "_code", "_newArray", "_index"];
|
||||
private ["_newArray", "_index"];
|
||||
|
||||
_array = _this select 0;
|
||||
_code = _this select 1;
|
||||
PARAMS_2(_array,_code);
|
||||
|
||||
if (isNil "_array") exitWith {
|
||||
diag_log text format ["[ACE] ERROR: No array for function filter in %1", _fnc_scriptNameParent];
|
||||
|
@ -1,9 +1,9 @@
|
||||
// by commy2
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_crate", "_weapons", "_items"];
|
||||
private ["_weapons", "_items"];
|
||||
|
||||
_crate = _this select 0;
|
||||
PARAMS_1(_crate);
|
||||
|
||||
// get all weapons inside the crate
|
||||
_weapons = weaponCargo _crate;
|
||||
|
@ -10,8 +10,8 @@
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_object", "_return", "_val", "_category"];
|
||||
_object = _this select 0;
|
||||
private ["_return", "_val", "_category"];
|
||||
PARAMS_1(_object);
|
||||
_category = if (count _this > 1) then { _this select 1 } else { "" };
|
||||
|
||||
if (isnil QGVAR(OBJECT_VARIABLES_STORAGE)) exitwith {
|
||||
|
@ -22,7 +22,7 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
EXPLODE_1_PVT(_this,_unit);
|
||||
PARAMS_1(_unit);
|
||||
|
||||
if (isNull _unit) exitWith {[
|
||||
"",
|
||||
|
@ -11,9 +11,9 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_unit", "_captivityReasons", "_unitCaptivityStatus", "_unitCaptivityReasons"];
|
||||
private ["_captivityReasons", "_unitCaptivityStatus", "_unitCaptivityReasons"];
|
||||
|
||||
_unit = _this select 0;
|
||||
PARAMS_1(_unit);
|
||||
|
||||
_captivityReasons = missionNamespace getVariable ["ACE_captivityReasons", []];
|
||||
|
||||
|
@ -1,10 +1,9 @@
|
||||
// by commy2
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_name", "_cfgClass", "_classes"];
|
||||
private ["_classes"];
|
||||
|
||||
_name = _this select 0;
|
||||
_cfgClass = _this select 1;
|
||||
PARAMS_2(_name,_cfgClass);
|
||||
|
||||
_classes = format ["configName inheritsFrom _x == '%1'", _name] configClasses (configFile >> _cfgClass);
|
||||
_classes = [_classes, {configName _this}] call FUNC(map);
|
||||
|
@ -11,9 +11,9 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_vehicle", "_config", "_turret"];
|
||||
private ["_config", "_turret"];
|
||||
|
||||
_vehicle = _this select 0;
|
||||
PARAMS_1(_vehicle);
|
||||
|
||||
_config = configFile >> "CfgVehicles" >> typeOf _vehicle;
|
||||
_turret = [_vehicle] call FUNC(getTurretCommander);
|
||||
|
@ -11,9 +11,9 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_vehicle", "_config", "_turret"];
|
||||
private ["_config", "_turret"];
|
||||
|
||||
_vehicle = _this select 0;
|
||||
PARAMS_1(_vehicle);
|
||||
|
||||
_config = configFile >> "CfgVehicles" >> typeOf _vehicle;
|
||||
_turret = [_vehicle] call FUNC(getTurretGunner);
|
||||
|
@ -11,9 +11,7 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private "_item";
|
||||
|
||||
_item = _this select 0;
|
||||
PARAMS_1(_item);
|
||||
|
||||
if (isClass (configFile >> "CfgWeapons" >> _item)) exitWith {"CfgWeapons"};
|
||||
|
||||
|
@ -11,9 +11,7 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private "_object";
|
||||
|
||||
_object = _this select 0;
|
||||
PARAMS_1(_object);
|
||||
|
||||
if (isClass (configFile >> "CfgVehicles" >> _object)) exitWith {"CfgVehicles"};
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
// by commy2
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_unit", "_anim", "_stance"];
|
||||
private ["_anim", "_stance"];
|
||||
|
||||
_unit = _this select 0;
|
||||
PARAMS_1(_unit);
|
||||
_anim = toLower (animationState _unit);
|
||||
|
||||
// stance is broken for some animations.
|
||||
|
@ -7,5 +7,6 @@
|
||||
* @Return:
|
||||
* @PublicAPI: false
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
+(missionNamespace getvariable [QGVAR(OBJECT_VARIABLES_STORAGE_) + (_this select 0),[]])
|
||||
|
@ -11,9 +11,9 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_vehicle", "_turrets", "_doorTurrets", "_config"];
|
||||
private ["_turrets", "_doorTurrets", "_config"];
|
||||
|
||||
_vehicle = _this select 0;
|
||||
PARAMS_1(_vehicle);
|
||||
|
||||
_turrets = allTurrets [_vehicle, true];
|
||||
|
||||
|
@ -9,10 +9,9 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_source", "_destination", "_accuracy", "_distance", "_lower", "_upper", "_mid", "_intersections", "_result"];
|
||||
_source = _this select 0;
|
||||
_destination = _this select 1;
|
||||
_accuracy = _this select 2;
|
||||
private ["_distance", "_lower", "_upper", "_mid", "_intersections", "_result"];
|
||||
|
||||
PARAMS_3(_source,_destination,_accuracy);
|
||||
|
||||
_result = [false, [0, 0, 0]];
|
||||
|
||||
|
@ -9,10 +9,9 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_source", "_destination", "_accuracy", "_distance", "_lower", "_upper", "_mid", "_intersection", "_result"];
|
||||
_source = _this select 0;
|
||||
_destination = _this select 1;
|
||||
_accuracy = _this select 2;
|
||||
private ["_distance", "_lower", "_upper", "_mid", "_intersection", "_result"];
|
||||
|
||||
PARAMS_3(_source,_destination,_accuracy);
|
||||
|
||||
_result = [false, [0, 0, 0]];
|
||||
|
||||
|
@ -17,9 +17,9 @@ Example:
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_unit", "_forceWalkReasons", "_unitForceWalkNumber", "_unitForceWalkStatus", "_unitForceWalkReasons"];
|
||||
private ["_forceWalkReasons", "_unitForceWalkNumber", "_unitForceWalkStatus", "_unitForceWalkReasons"];
|
||||
|
||||
_unit = _this select 0;
|
||||
PARAMS_1(_unit);
|
||||
|
||||
_forceWalkReasons = missionNamespace getVariable ["ACE_forceWalkReasons", []];
|
||||
|
||||
|
@ -11,9 +11,9 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_vehicle", "_config", "_hitpoints"];
|
||||
private ["_config", "_hitpoints"];
|
||||
|
||||
_vehicle = _this select 0;
|
||||
PARAMS_1(_vehicle);
|
||||
|
||||
_config = configFile >> "CfgVehicles" >> typeOf _vehicle;
|
||||
|
||||
|
@ -11,9 +11,9 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_vehicle", "_config", "_hitpoints", "_selections"];
|
||||
private ["_config", "_hitpoints", "_selections"];
|
||||
|
||||
_vehicle = _this select 0;
|
||||
PARAMS_1(_vehicle);
|
||||
|
||||
_config = configFile >> "CfgVehicles" >> typeOf _vehicle;
|
||||
|
||||
|
@ -18,10 +18,10 @@
|
||||
#define CANGETINDRIVER (isNull (driver _vehicle) || {!alive driver _vehicle}) && {!lockedDriver _vehicle} && {getNumber (_config >> "isUav") != 1}
|
||||
#define CANGETINTURRETINDEX (isNull (_vehicle turretUnit _turret) || {!alive (_vehicle turretUnit _turret)}) && {!(_vehicle lockedTurret _turret)} && {getNumber (_config >> "isUav") != 1}
|
||||
|
||||
private ["_unit", "_vehicle", "_position", "_index"];
|
||||
private ["_position", "_index"];
|
||||
|
||||
PARAMS_2(_unit,_vehicle);
|
||||
|
||||
_unit = _this select 0;
|
||||
_vehicle = _this select 1;
|
||||
_position = toLower (_this select 2);
|
||||
_index = _this select 3; // optional, please don't use
|
||||
|
||||
@ -110,7 +110,6 @@ switch (_position) do {
|
||||
|
||||
_position = "gunner";
|
||||
} else {
|
||||
|
||||
for "_index" from 0 to (count _turrets - 1) do {
|
||||
_turret = _turrets select _index;
|
||||
if (CANGETINTURRETINDEX) exitWith {
|
||||
@ -137,7 +136,6 @@ switch (_position) do {
|
||||
|
||||
_position = "gunner"; // I think. It's a turret after all and turrets supposedly return "gunner"
|
||||
} else {
|
||||
|
||||
for "_index" from 0 to (count _turrets - 1) do {
|
||||
_turret = _turrets select _index;
|
||||
if (CANGETINTURRETINDEX) exitWith {
|
||||
@ -168,7 +166,6 @@ switch (_position) do {
|
||||
|
||||
_position = "cargo";
|
||||
} else {
|
||||
|
||||
_index = _positions select 0;
|
||||
if (!isNil "_index") then {
|
||||
_script = [
|
||||
@ -197,7 +194,6 @@ switch (_position) do {
|
||||
|
||||
_position = "cargo";
|
||||
} else {
|
||||
|
||||
_index = _positions select 0;
|
||||
if (!isNil "_index") then {
|
||||
_script = [
|
||||
|
@ -14,9 +14,7 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private "_item";
|
||||
|
||||
_item = _this select 0;
|
||||
PARAMS_1(_item);
|
||||
|
||||
_cfgType = [_item] call FUNC(getConfigType);
|
||||
|
||||
|
@ -12,10 +12,7 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_vehicle", "_light"];
|
||||
|
||||
_vehicle = _this select 0;
|
||||
_light = _this select 1;
|
||||
PARAMS_2(_vehicle,_light);
|
||||
|
||||
private "_config";
|
||||
_config = configFile >> "CfgVehicles" >> typeOf _vehicle >> "Reflectors" >> _light;
|
||||
|
@ -11,9 +11,7 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private "_weapon";
|
||||
|
||||
_weapon = _this select 0;
|
||||
PARAMS_1(_weapon);
|
||||
|
||||
private "_config";
|
||||
_config = configFile >> "CfgWeapons" >> _weapon >> "ItemInfo" >> "FlashLight";
|
||||
|
@ -11,7 +11,10 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
_group = _this select 0;
|
||||
private ["_leader","_vehicle","_side"];
|
||||
|
||||
PARAMS_1(_group);
|
||||
|
||||
_leader = leader _group;
|
||||
_vehicle = vehicle _leader;
|
||||
_side = side _leader;
|
||||
|
@ -12,10 +12,9 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_unit", "_showEffective", "_name"];
|
||||
private ["_name"];
|
||||
|
||||
_unit = _this select 0;
|
||||
_showEffective = _this select 1;
|
||||
PARAMS_2(_unit,_showEffective);
|
||||
|
||||
if (isNil "_showEffective") then {
|
||||
_showEffective = false;
|
||||
|
@ -10,9 +10,7 @@
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_unit","_magazine"];
|
||||
_unit = _this select 0;
|
||||
_magazine = _this select 1;
|
||||
PARAMS_2(_unit,_magazine);
|
||||
|
||||
_return = 0;
|
||||
if (_unit isKindOf "CAManBase") then {
|
||||
@ -20,7 +18,7 @@ if (_unit isKindOf "CAManBase") then {
|
||||
} else {
|
||||
{
|
||||
_return = _return + {_x == _magazine} count magazines _x;
|
||||
}foreach (crew _unit);
|
||||
} forEach (crew _unit);
|
||||
|
||||
_return = _return + ({_x == _magazine} count getMagazineCargo _unit);
|
||||
};
|
||||
|
@ -13,9 +13,9 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_vehicle", "_config", "_hitpoints", "_selections"];
|
||||
private ["_config", "_hitpoints", "_selections"];
|
||||
|
||||
_vehicle = _this select 0;
|
||||
PARAMS_1(_vehicle);
|
||||
|
||||
_config = configFile >> "CfgVehicles" >> typeOf _vehicle;
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
EXPLODE_1_PVT(_this,_name);
|
||||
PARAMS_1(_name);
|
||||
|
||||
private ["_value"];
|
||||
_value = [];
|
||||
|
@ -13,11 +13,9 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_interval", "_maxDistance", "_minDistance", "_position", "_laser", "_line", "_distance", "_iteration"];
|
||||
private ["_position", "_laser", "_line", "_distance", "_iteration"];
|
||||
|
||||
_interval = _this select 0;
|
||||
_maxDistance = _this select 1;
|
||||
_minDistance = _this select 2;
|
||||
PARAMS_3(_interval,_maxDistance,_minDistance);
|
||||
|
||||
_position = ATLToASL positionCameraToWorld [0, 0, 0];
|
||||
_position set [2, (_position select 2) - (getTerrainHeightASL _position min 0)];
|
||||
|
@ -11,9 +11,9 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_maxDistance", "_position", "_laser", "_intersects"];
|
||||
private ["_position", "_laser", "_intersects"];
|
||||
|
||||
_maxDistance = _this select 0;
|
||||
PARAMS_1(_maxDistance);
|
||||
|
||||
_position = ATLToASL positionCameraToWorld [0, 0, 0];
|
||||
_position set [2, (_position select 2) - (getTerrainHeightASL _position min 0)];
|
||||
|
@ -11,9 +11,7 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private "_vehicle";
|
||||
|
||||
_vehicle = _this select 0;
|
||||
PARAMS_1(_vehicle);
|
||||
|
||||
if (!isLightOn _vehicle) exitWith {[]};
|
||||
|
||||
|
@ -11,9 +11,9 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_vehicle", "_turrets", "_turret", "_config"];
|
||||
private ["_turrets", "_turret", "_config"];
|
||||
|
||||
_vehicle = _this select 0;
|
||||
PARAMS_1(_vehicle);
|
||||
|
||||
_turrets = allTurrets [_vehicle, true];
|
||||
|
||||
|
@ -12,10 +12,9 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_config", "_turretIndex", "_index", "_offset", "_config2", "_foundClasses"];
|
||||
private ["_index", "_offset", "_config2", "_foundClasses"];
|
||||
|
||||
_config = _this select 0;
|
||||
_turretIndex = _this select 1;
|
||||
PARAMS_2(_config,_turretIndex);
|
||||
|
||||
for "_index" from 0 to (count _turretIndex - 1) do {
|
||||
_config = _config >> "Turrets";
|
||||
|
@ -11,9 +11,9 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_vehicle", "_turrets", "_turret", "_config"];
|
||||
private ["_turrets", "_turret", "_config"];
|
||||
|
||||
_vehicle = _this select 0;
|
||||
PARAMS_1(_vehicle);
|
||||
|
||||
_turrets = allTurrets [_vehicle, true];
|
||||
|
||||
@ -27,4 +27,5 @@ _turret = [];
|
||||
_turret = _x;
|
||||
};
|
||||
} forEach _turrets;
|
||||
|
||||
_turret
|
||||
|
@ -12,7 +12,7 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
EXPLODE_2_PVT(_this,_vehicle,_position);
|
||||
PARAMS_2(_vehicle,_position);
|
||||
private ["_turrets", "_turret", "_config", "_turret", "_povPos", "_povDir", "_gunBeginPos", "_gunEndPos", "_pov"];
|
||||
|
||||
_turret = [_vehicle, _position] call CBA_fnc_getTurret;
|
||||
|
@ -11,9 +11,9 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_vehicle", "_turrets", "_turret", "_config"];
|
||||
private ["_turrets", "_turret", "_config"];
|
||||
|
||||
_vehicle = _this select 0;
|
||||
PARAMS_1(_vehicle);
|
||||
|
||||
_turrets = allTurrets [_vehicle, true];
|
||||
|
||||
@ -27,4 +27,5 @@ _turret = [];
|
||||
_turret = _x;
|
||||
};
|
||||
} forEach _turrets;
|
||||
|
||||
_turret
|
||||
|
@ -11,9 +11,9 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_unit", "_vehicle", "_turrets", "_units", "_index"];
|
||||
private ["_vehicle", "_turrets", "_units", "_index"];
|
||||
|
||||
_unit = _this select 0;
|
||||
PARAMS_1(_unit);
|
||||
_vehicle = vehicle _unit;
|
||||
|
||||
if (_unit == _vehicle) exitWith {[]};
|
||||
|
@ -11,9 +11,9 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_type", "_config", "_turrets", "_fnc_addTurret"];
|
||||
private ["_config", "_turrets", "_fnc_addTurret"];
|
||||
|
||||
_type = _this select 0;
|
||||
PARAMS_1(_type);
|
||||
|
||||
_varName = format ["ACE_CachedTurrets_%1", _type];
|
||||
_turrets = + (uiNamespace getVariable _varName);
|
||||
@ -24,10 +24,9 @@ _config = configFile >> "CfgVehicles" >> _type;
|
||||
|
||||
_turrets = [];
|
||||
_fnc_addTurret = {
|
||||
private ["_config", "_path", "_count", "_offset", "_index", "_path2", "_config2"];
|
||||
private ["_count", "_offset", "_index", "_path2", "_config2"];
|
||||
|
||||
_config = _this select 0;
|
||||
_path = _this select 1;
|
||||
PARAMS_2(_config,_path);
|
||||
|
||||
_config = _config >> "Turrets";
|
||||
_count = count _config;
|
||||
|
@ -11,9 +11,9 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_vehicle", "_turrets", "_turret", "_config"];
|
||||
private ["_turrets", "_turret", "_config"];
|
||||
|
||||
_vehicle = _this select 0;
|
||||
PARAMS_1(_vehicle);
|
||||
|
||||
_turrets = allTurrets [_vehicle, true];
|
||||
|
||||
|
@ -11,9 +11,9 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_vehicle", "_turrets", "_turret", "_config"];
|
||||
private ["_turrets", "_turret", "_config"];
|
||||
|
||||
_vehicle = _this select 0;
|
||||
PARAMS_1(_vehicle);
|
||||
|
||||
_turrets = allTurrets [_vehicle, true];
|
||||
|
||||
|
@ -20,9 +20,9 @@ Example:
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_unit", "_uav", "_positionArray", "_playerIndex"];
|
||||
private ["_uav", "_positionArray", "_playerIndex"];
|
||||
|
||||
_unit = _this select 0;
|
||||
PARAMS_1(_unit);
|
||||
_uav = getConnectedUAV _unit;
|
||||
if (isNull _uav) exitWith {""};
|
||||
_positionArray = UAVControl _uav;
|
||||
|
@ -11,9 +11,9 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_vehicle", "_config", "_cargo", "_codrivers"];
|
||||
private ["_config", "_cargo", "_codrivers"];
|
||||
|
||||
_vehicle = _this select 0;
|
||||
PARAMS_1(_vehicle);
|
||||
|
||||
_config = configFile >> "CfgVehicles" >> _vehicle;
|
||||
|
||||
|
@ -11,9 +11,9 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_vehicle", "_config", "_cargo", "_codrivers"];
|
||||
private ["_config", "_cargo", "_codrivers"];
|
||||
|
||||
_vehicle = _this select 0;
|
||||
PARAMS_1(_vehicle);
|
||||
|
||||
_config = configFile >> "CfgVehicles" >> _vehicle;
|
||||
|
||||
|
@ -12,10 +12,9 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_vehicle", "_types", "_crew"];
|
||||
private ["_crew"];
|
||||
|
||||
_vehicle = _this select 0;
|
||||
_types = _this select 1;
|
||||
PARAMS_2(_vehicle,_types);
|
||||
|
||||
_crew = [];
|
||||
|
||||
|
@ -12,9 +12,9 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_weapon", "_direction", "_azimuth", "_inclination"];
|
||||
private ["_direction", "_azimuth", "_inclination"];
|
||||
|
||||
_weapon = _this select 0;
|
||||
PARAMS_1(_weapon);
|
||||
|
||||
_direction = ACE_player weaponDirection _weapon;
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
EXPLODE_2_PVT(_this,_unit,_weapon);
|
||||
PARAMS_2(_unit,_weapon);
|
||||
|
||||
if (_weapon == "") exitWith {-1};
|
||||
|
||||
|
@ -11,9 +11,9 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_weapon", "_modes"];
|
||||
private ["_modes"];
|
||||
|
||||
_weapon = _this select 0;
|
||||
PARAMS_1(_weapon);
|
||||
|
||||
_modes = [];
|
||||
{
|
||||
|
@ -11,9 +11,9 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_weapon", "_muzzles"];
|
||||
private ["_muzzles"];
|
||||
|
||||
_weapon = _this select 0;
|
||||
PARAMS_1(_weapon);
|
||||
|
||||
_muzzles = getArray (configFile >> "CfgWeapons" >> _weapon >> "muzzles");
|
||||
|
||||
|
@ -12,10 +12,7 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_unit", "_weapon"];
|
||||
|
||||
_unit = _this select 0;
|
||||
_weapon = _this select 1;
|
||||
PARAMS_2(_unit,_weapon);
|
||||
|
||||
private "_muzzles";
|
||||
_muzzles = [_weapon] call FUNC(getWeaponMuzzles);
|
||||
|
@ -11,13 +11,14 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_weapon", "_type", "_index"];
|
||||
private ["_type", "_index"];
|
||||
|
||||
_weapon = _this select 0;
|
||||
PARAMS_1(_weapon);
|
||||
|
||||
_type = [getNumber (configFile >> "CfgWeapons" >> _weapon >> "type")] call FUNC(binarizeNumber);
|
||||
|
||||
_index = 0;
|
||||
|
||||
while {!(_type select _index) && {_index < 16}} do {
|
||||
_index = _index + 1;
|
||||
};
|
||||
|
@ -11,11 +11,8 @@
|
||||
* Nothing
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
private ["_eventName", "_eventArgs"];
|
||||
|
||||
_eventName = _this select 0;
|
||||
_eventArgs = _this select 1;
|
||||
|
||||
PARAMS_2(_eventName,_eventArgs);
|
||||
|
||||
ACEg = [_eventName, _eventArgs];
|
||||
publicVariable "ACEg";
|
||||
|
@ -11,9 +11,7 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private "_unit";
|
||||
|
||||
_unit = _this select 0;
|
||||
PARAMS_1(_unit);
|
||||
|
||||
try {
|
||||
if (_unit == vehicle _unit) then {
|
||||
|
@ -13,8 +13,7 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
_vector1 = _this select 0;
|
||||
_vector2 = _this select 1;
|
||||
PARAMS_2(_vector1,_vector2);
|
||||
|
||||
_newVector = [];
|
||||
|
||||
|
@ -10,13 +10,13 @@
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_unit","_magazine","_return"];
|
||||
_unit = _this select 0;
|
||||
_magazine = _this select 1;
|
||||
private ["_return"];
|
||||
PARAMS_2(_unit,_magazine);
|
||||
|
||||
if (_magazine != "") then {
|
||||
_return = (_magazine in magazines _unit);
|
||||
} else {
|
||||
_return = false;
|
||||
};
|
||||
|
||||
_return
|
@ -1,11 +1,11 @@
|
||||
//fnc_hashGet.sqf
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_hash", "_key", "_val", "_index"];
|
||||
private ["_val", "_index"];
|
||||
// diag_log text format["%1 HASH GET: %2", diag_tickTime, _this];
|
||||
|
||||
_hash = _this select 0;
|
||||
_key = _this select 1;
|
||||
PARAMS_2(_hash,_key);
|
||||
|
||||
ERRORDATA(2);
|
||||
_val = nil;
|
||||
try {
|
||||
|
@ -1,11 +1,11 @@
|
||||
//fnc_hashHasKey.sqf
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_hash", "_key", "_val", "_index"];
|
||||
private ["_val", "_index"];
|
||||
// diag_log text format["%1 HASH HAS KEY: %2", diag_tickTime, _this];
|
||||
|
||||
_hash = _this select 0;
|
||||
_key = _this select 1;
|
||||
PARAMS_2(_hash,_key);
|
||||
|
||||
ERRORDATA(2);
|
||||
_val = false;
|
||||
try {
|
||||
|
@ -1,9 +1,10 @@
|
||||
//fnc_hashListCreateHash.sqf
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_hashList", "_hashKeys"];
|
||||
private ["_hashKeys"];
|
||||
|
||||
PARAMS_1(_hashList);
|
||||
|
||||
_hashList = _this select 0;
|
||||
ERRORDATA(1);
|
||||
_hashKeys = [];
|
||||
try {
|
||||
|
@ -1,7 +1,6 @@
|
||||
//fnc_hashListCreateList.sqf
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_keys"];
|
||||
PARAMS_1(_keys);
|
||||
|
||||
_keys = _this select 0;
|
||||
[_keys,[]];
|
||||
|
@ -1,10 +1,8 @@
|
||||
//fnc_hashListPush.sqf
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_hashList", "_value"];
|
||||
PARAMS_2(_hashList,_value);
|
||||
|
||||
_hashList = _this select 0;
|
||||
_value = _this select 1;
|
||||
ERRORDATA(2);
|
||||
try {
|
||||
if(VALIDHASH(_hashList)) then {
|
||||
|
@ -1,10 +1,9 @@
|
||||
//fnc_hashListSelect.sqf
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_hashList", "_index", "_hash", "_keys", "_hashes", "_values"];
|
||||
private ["_hash", "_keys", "_hashes", "_values"];
|
||||
|
||||
_hashList = _this select 0;
|
||||
_index = _this select 1;
|
||||
PARAMS_2(_hashList,_index);
|
||||
ERRORDATA(2);
|
||||
_hash = nil;
|
||||
try {
|
||||
|
@ -1,11 +1,9 @@
|
||||
//fnc_hashListSet.sqf
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_hashList", "_index", "_value", "_vals"];
|
||||
private ["_vals"];
|
||||
|
||||
_hashList = _this select 0;
|
||||
_index = _this select 1;
|
||||
_value = _this select 2;
|
||||
PARAMS_3(_hashList,_index,_value);
|
||||
ERRORDATA(3);
|
||||
try {
|
||||
if(VALIDHASH(_hashList)) then {
|
||||
|
@ -1,10 +1,9 @@
|
||||
//fnc_hashRem.sqf
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_hash", "_key", "_val", "_index"];
|
||||
private ["_val", "_index"];
|
||||
|
||||
_hash = _this select 0;
|
||||
_key = _this select 1;
|
||||
PARAMS_2(_hash,_key);
|
||||
ERRORDATA(2);
|
||||
_val = nil;
|
||||
try {
|
||||
|
@ -1,12 +1,11 @@
|
||||
//fnc_hashSet.sqf
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_hash", "_key", "_val", "_index"];
|
||||
private ["_index"];
|
||||
// diag_log text format["%1 HASH SET: %2", diag_tickTime, _this];
|
||||
|
||||
_hash = _this select 0;
|
||||
_key = _this select 1;
|
||||
_val = _this select 2;
|
||||
PARAMS_3(_hash,_key,_val);
|
||||
|
||||
ERRORDATA(3);
|
||||
try {
|
||||
if(VALIDHASH(_hash)) then {
|
||||
|
@ -10,13 +10,16 @@
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_unit","_return","_aslPos"];
|
||||
_unit = _this select 0;
|
||||
private ["_return","_aslPos"];
|
||||
|
||||
PARAMS_1(_unit);
|
||||
_return = false;
|
||||
|
||||
if ((surfaceIsWater getPos _unit)) then {
|
||||
_aslPos = _unit modelToWorldVisual (_unit selectionPosition "head");
|
||||
if ((_aslPos select 2) <= 0) then {
|
||||
_return = true;
|
||||
};
|
||||
};
|
||||
|
||||
_return;
|
@ -10,9 +10,8 @@
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_configEntry","_configMatch", "_match"];
|
||||
_configEntry = _this select 0;
|
||||
_configMatch = _this select 1;
|
||||
private ["_match"];
|
||||
PARAMS_2(_configEntry,_configMatch);
|
||||
|
||||
if (configName _configEntry == _configMatch) exitWith { true };
|
||||
if (configName _configEntry == ",") exitWith { false };
|
||||
|
@ -1,10 +1,9 @@
|
||||
// by commy2
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_array", "_value", "_min", "_max"];
|
||||
private ["_min", "_max"];
|
||||
|
||||
_array = _this select 0;
|
||||
_value = _this select 1;
|
||||
PARAMS_2(_array,_value);
|
||||
|
||||
_min = _array select floor _value;
|
||||
_max = _array select ceil _value;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user