Second batch of cleaned up files.

This commit is contained in:
SAM 2015-05-14 20:06:06 +02:00
parent 9b55dd0b57
commit 0b6f02f45e
157 changed files with 826 additions and 957 deletions

View File

@ -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;

View File

@ -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};

View File

@ -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;

View File

@ -11,9 +11,7 @@
*/
#include "script_component.hpp"
private "_function";
_function = _this select 0;
PARAMS_1(_function);
if (typeName _function == "STRING") exitWith {_function};

View File

@ -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};

View File

@ -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 {

View File

@ -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"]);

View File

@ -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;

View File

@ -13,9 +13,9 @@
#include "script_component.hpp"
private ["_state", "_dlg"];
private ["_dlg"];
_state = _this select 0;
PARAMS_1(_state);
if (_state) then {
disableSerialization;

View File

@ -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;

View File

@ -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];

View File

@ -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};

View File

@ -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

View File

@ -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;
{

View File

@ -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];

View File

@ -13,6 +13,6 @@
*/
#include "script_component.hpp"
EXPLODE_2_PVT(_this,_namespace,_uid);
PARAMS_2(_namespace,_uid);
_namespace setVariable [_uid, nil];

View File

@ -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,{});

View File

@ -12,7 +12,7 @@
*/
#include "script_component.hpp"
EXPLODE_2_PVT(_this,_func,_params);
PARAMS_2(_func,_params);
[
{

View File

@ -1,9 +1,7 @@
// by commy2
#include "script_component.hpp"
private "_target";
_target = _this select 0;
PARAMS_1(_target);
{
if (isNil "_x") then {

View File

@ -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;

View File

@ -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];

View File

@ -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;

View File

@ -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 {

View File

@ -22,7 +22,7 @@
*/
#include "script_component.hpp"
EXPLODE_1_PVT(_this,_unit);
PARAMS_1(_unit);
if (isNull _unit) exitWith {[
"",

View File

@ -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", []];

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -11,9 +11,7 @@
*/
#include "script_component.hpp"
private "_item";
_item = _this select 0;
PARAMS_1(_item);
if (isClass (configFile >> "CfgWeapons" >> _item)) exitWith {"CfgWeapons"};

View File

@ -11,9 +11,7 @@
*/
#include "script_component.hpp"
private "_object";
_object = _this select 0;
PARAMS_1(_object);
if (isClass (configFile >> "CfgVehicles" >> _object)) exitWith {"CfgVehicles"};

View File

@ -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.

View File

@ -7,5 +7,6 @@
* @Return:
* @PublicAPI: false
*/
#include "script_component.hpp"
+(missionNamespace getvariable [QGVAR(OBJECT_VARIABLES_STORAGE_) + (_this select 0),[]])

View File

@ -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];

View File

@ -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]];

View File

@ -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]];

View File

@ -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", []];

View File

@ -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;

View File

@ -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;

View File

@ -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 = [

View File

@ -14,9 +14,7 @@
*/
#include "script_component.hpp"
private "_item";
_item = _this select 0;
PARAMS_1(_item);
_cfgType = [_item] call FUNC(getConfigType);

View File

@ -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;

View File

@ -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";

View File

@ -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;

View File

@ -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;

View File

@ -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);
};

View File

@ -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;

View File

@ -20,7 +20,7 @@
*/
#include "script_component.hpp"
EXPLODE_1_PVT(_this,_name);
PARAMS_1(_name);
private ["_value"];
_value = [];

View File

@ -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)];

View File

@ -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)];

View File

@ -11,9 +11,7 @@
*/
#include "script_component.hpp"
private "_vehicle";
_vehicle = _this select 0;
PARAMS_1(_vehicle);
if (!isLightOn _vehicle) exitWith {[]};

View File

@ -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];

View File

@ -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";

View File

@ -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

View File

@ -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;

View File

@ -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

View File

@ -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 {[]};

View File

@ -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;

View File

@ -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];

View File

@ -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];

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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 = [];

View File

@ -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;

View File

@ -14,7 +14,7 @@
*/
#include "script_component.hpp"
EXPLODE_2_PVT(_this,_unit,_weapon);
PARAMS_2(_unit,_weapon);
if (_weapon == "") exitWith {-1};

View File

@ -11,9 +11,9 @@
*/
#include "script_component.hpp"
private ["_weapon", "_modes"];
private ["_modes"];
_weapon = _this select 0;
PARAMS_1(_weapon);
_modes = [];
{

View File

@ -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");

View File

@ -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);

View File

@ -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;
};

View File

@ -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";

View File

@ -11,9 +11,7 @@
*/
#include "script_component.hpp"
private "_unit";
_unit = _this select 0;
PARAMS_1(_unit);
try {
if (_unit == vehicle _unit) then {

View File

@ -13,8 +13,7 @@
*/
#include "script_component.hpp"
_vector1 = _this select 0;
_vector2 = _this select 1;
PARAMS_2(_vector1,_vector2);
_newVector = [];

View File

@ -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

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -1,7 +1,6 @@
//fnc_hashListCreateList.sqf
#include "script_component.hpp"
private ["_keys"];
PARAMS_1(_keys);
_keys = _this select 0;
[_keys,[]];

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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;

View File

@ -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 };

View File

@ -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;

View File

@ -10,6 +10,7 @@
#include "script_component.hpp"
private ["_unit","_return"];
_unit = _this select 0;
private ["_return"];
PARAMS_1(_unit);
(!(_unit getvariable ["ACE_isUnconscious",false]) && alive _unit && !(_unit getvariable ["ACE_isDead",false]));

View File

@ -20,8 +20,6 @@
*/
#include "script_component.hpp"
private "_unit";
_unit = _this select 0;
PARAMS_1(_unit);
_unit getVariable ["ACE_isEOD", getNumber (configFile >> "CfgVehicles" >> typeOf _unit >> "canDeactivateMines") == 1]

View File

@ -11,8 +11,6 @@
*/
#include "script_component.hpp"
private "_unit";
_unit = _this select 0;
PARAMS_1(_unit);
_unit getVariable ["ACE_IsEngineer", getNumber (configFile >> "CfgVehicles" >> typeOf _unit >> "engineer") == 1]

View File

@ -13,9 +13,9 @@
#define DISTANCE 10
private ["_unit", "_position", "_positionX", "_positionY", "_positionZ", "_intersections"];
private ["_position", "_positionX", "_positionY", "_positionZ", "_intersections"];
_unit = _this select 0;
PARAMS_1(_unit);
_position = eyePos _unit;
_positionX = _position select 0;

View File

@ -11,9 +11,9 @@
*/
#include "script_component.hpp"
private ["_unit", "_vehicle", "_config", "_animation", "_action", "_inAction", "_turretIndex"];
private ["_vehicle", "_config", "_animation", "_action", "_inAction", "_turretIndex"];
_unit = _this select 0;
PARAMS_1(_unit);
_vehicle = vehicle _unit;
_config = configFile >> "CfgVehicles" >> typeOf _vehicle;
_animation = animationState _unit;

View File

@ -12,15 +12,11 @@
*/
#include "script_component.hpp"
private ["_unit", "_lightSource"];
private ["_unitPos","_lightLevel"];
_unit = _this select 0;
_lightSource = _this select 1;
PARAMS_2(_unit,_lightSource);
private "_unitPos";
_unitPos = _unit modelToWorld (_unit selectionPosition "spine3");
private "_lightLevel";
_lightLevel = 0;
if (_lightSource isKindOf "CAManBase") then {

View File

@ -2,14 +2,9 @@
#include "script_component.hpp"
if ((_this select 0) in (missionNamespace getVariable ["ACE_Debug", []])) then {
private ["_type", "_argument", "_function", "_showInGame"];
_this resize 4;
_type = _this select 0;
_argument = _this select 1;
_function = _this select 2;
_showInGame = _this select 3;
PARAMS_4(_type,_argument,_function,_showInGame);
if (isNil "_function") then {
_function = {_this};

View File

@ -11,9 +11,7 @@
*/
#include "script_component.hpp"
_logic = _this select 0;
_units = _this select 1;
_activated = _this select 2;
PARAMS_3(_logic,_units,_activated);
if !(_activated) exitWith {};

View File

@ -11,9 +11,7 @@
*/
#include "script_component.hpp"
_logic = _this select 0;
_units = _this select 1;
_activated = _this select 2;
PARAMS_3(_logic,_units,_activated);
if !(_activated) exitWith {};

View File

@ -12,10 +12,7 @@
*/
#include "script_component.hpp"
private ["_unit", "_reason"];
_unit = _this select 0;
_reason = _this select 1;
PARAMS_2(_unit,_reason);
if (isNull _unit) exitWith {};

View File

@ -1,9 +1,7 @@
// by commy2
#include "script_component.hpp"
private "_unit";
_unit = _this select 0;
PARAMS_1(_unit);
// setSpeaker gets overwritten after init on remote units; if unit is muted, setSpeaker again
if (count (_unit getVariable [QGVAR(muteUnitReasons), []]) > 0) then {

View File

@ -1,9 +1,7 @@
// by commy2
#include "script_component.hpp"
private "_unit";
_unit = _this select 0;
PARAMS_1(_unit);
// setVariable is broken on JIP after respawn
_unit setVariable [QGVAR(muteUnitReasons), _unit getVariable [QGVAR(muteUnitReasons), []], true];

View File

@ -12,10 +12,9 @@
*/
#include "script_component.hpp"
private ["_number", "_minLength", "_length", "_digits"];
private ["_length", "_digits"];
_number = _this select 0;
_minLength = _this select 1;
PARAMS_2(_number,_minLength);
_number = _number min 999999;

View File

@ -12,10 +12,9 @@
*/
#include "script_component.hpp"
private ["_number", "_minLength", "_length"];
private ["_length"];
_number = _this select 0;
_minLength = _this select 1;
PARAMS_2(_number,_minLength);
_number = _number min 999999;

View File

@ -11,9 +11,9 @@
*/
#include "script_component.hpp"
private ["_number", "_decimals"];
private ["_decimals"];
_number = _this select 0;
PARAMS_1(_number);
_decimals = str (abs(_number) mod 1);
_decimals = toArray _decimals;

Some files were not shown because too many files have changed in this diff Show More