mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
commit
060dc22ad5
@ -13,6 +13,8 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
private ["_interval", "_player", "_newVel", "_accel", "_currentGForce", "_average", "_sum", "_classCoef", "_suitCoef", "_gBlackOut", "_gRedOut", "_g", "_gBO", "_coef", "_strength"];
|
||||||
|
|
||||||
EXPLODE_2_PVT(_this,_params,_pfhId);
|
EXPLODE_2_PVT(_this,_params,_pfhId);
|
||||||
|
|
||||||
_interval = time - GVAR(lastUpdateTime);
|
_interval = time - GVAR(lastUpdateTime);
|
||||||
|
@ -56,6 +56,7 @@ FUNC(CheckGlasses) = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
player addEventHandler ["Explosion", {
|
player addEventHandler ["Explosion", {
|
||||||
|
private "_effects";
|
||||||
if (alive ace_player) then {
|
if (alive ace_player) then {
|
||||||
call FUNC(ApplyDirtEffect);
|
call FUNC(ApplyDirtEffect);
|
||||||
if (GETBROKEN) exitWith {};
|
if (GETBROKEN) exitWith {};
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
if (cameraOn != ace_player || {call FUNC(externalCamera)}) exitWith{false};
|
if (cameraOn != ace_player || {call FUNC(externalCamera)}) exitWith{false};
|
||||||
private "_dirtImage";
|
private ["_dirtImage", "_applied", "_effects"];
|
||||||
_effects = GETGLASSES(ace_player);
|
_effects = GETGLASSES(ace_player);
|
||||||
_effects set [DIRT, true];
|
_effects set [DIRT, true];
|
||||||
SETGLASSES(ace_player,_effects);
|
SETGLASSES(ace_player,_effects);
|
||||||
|
@ -16,7 +16,8 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private "_broken";
|
private ["_broken", "_effects"];
|
||||||
|
|
||||||
_broken = GETBROKEN;
|
_broken = GETBROKEN;
|
||||||
_effects = GLASSESDEFAULT;
|
_effects = GLASSESDEFAULT;
|
||||||
_effects set [BROKEN, _broken];
|
_effects set [BROKEN, _broken];
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
* The rating [0-3] <NUMBER>
|
* The rating [0-3] <NUMBER>
|
||||||
*
|
*
|
||||||
* Example:
|
* Example:
|
||||||
* _rating = 0.05 call ace_goggles_fnc_getExplosionIndex;
|
* 0.05 call ace_goggles_fnc_getExplosionIndex;
|
||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
|
@ -14,8 +14,10 @@
|
|||||||
* Public: Yes
|
* Public: Yes
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
private ["_currentGlasses", "_result", "_unit"];
|
|
||||||
_unit = _this select 0;
|
PARAMS_1(_unit);
|
||||||
|
|
||||||
|
private ["_currentGlasses", "_result", "_position", "_visible"];
|
||||||
|
|
||||||
_currentGlasses = goggles _unit;
|
_currentGlasses = goggles _unit;
|
||||||
_result = false;
|
_result = false;
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_affected", "_strength", "_posGrenade", "_posUnit", "_angleGrenade", "_angleView", "_angleDiff", "_light", "_losCount"];
|
private ["_affected", "_strength", "_posGrenade", "_posUnit", "_angleGrenade", "_angleView", "_angleDiff", "_light", "_losCount", "_dirToUnitVector", "_eyeDir", "_eyePos"];
|
||||||
|
|
||||||
PARAMS_1(_grenade);
|
PARAMS_1(_grenade);
|
||||||
|
|
||||||
|
@ -20,6 +20,7 @@ PARAMS_1(_projectile);
|
|||||||
if (alive _projectile) then {
|
if (alive _projectile) then {
|
||||||
playSound3D ["A3\Sounds_F\weapons\Explosion\explosion_mine_1.wss", _projectile, false, getPosASL _projectile, 5, 1.2, 400];
|
playSound3D ["A3\Sounds_F\weapons\Explosion\explosion_mine_1.wss", _projectile, false, getPosASL _projectile, 5, 1.2, 400];
|
||||||
|
|
||||||
|
private "_affected";
|
||||||
_affected = _projectile nearEntities ["CAManBase", 50];
|
_affected = _projectile nearEntities ["CAManBase", 50];
|
||||||
["flashbangExplosion", _affected, [_projectile]] call EFUNC(common,targetEvent);
|
["flashbangExplosion", _affected, [_projectile]] call EFUNC(common,targetEvent);
|
||||||
};
|
};
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_unit", "_firer", "_distance", "_weapon", "_muzzle", "_mode", "_ammo", "_silencer", "_audibleFireCoef", "_loudness", "_strength"];
|
private ["_unit", "_firer", "_distance", "_weapon", "_muzzle", "_mode", "_ammo", "_silencer", "_audibleFireCoef", "_loudness", "_strength", "_audibleFire", "_audibleFireTime", "_audibleFireTimeCoef"];
|
||||||
|
|
||||||
_unit = _this select 0;
|
_unit = _this select 0;
|
||||||
_firer = _this select 1;
|
_firer = _this select 1;
|
||||||
|
@ -10,8 +10,7 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
_logic = _this select 0;
|
PARAMS_3(_logic,_units,_activated);
|
||||||
_activated = _this select 2;
|
|
||||||
|
|
||||||
if !(_activated) exitWith {};
|
if !(_activated) exitWith {};
|
||||||
|
|
||||||
|
@ -18,6 +18,8 @@
|
|||||||
#define STRENGHTODEAFNESS 3
|
#define STRENGHTODEAFNESS 3
|
||||||
#define MAXDEAFNESS 1.1
|
#define MAXDEAFNESS 1.1
|
||||||
|
|
||||||
|
private ["_recoverRate", "_volume"];
|
||||||
|
|
||||||
// Exit if combat deafness is disabled
|
// Exit if combat deafness is disabled
|
||||||
if !(GVAR(enableCombatDeafness)) exitWith {};
|
if !(GVAR(enableCombatDeafness)) exitWith {};
|
||||||
|
|
||||||
|
@ -18,6 +18,8 @@
|
|||||||
|
|
||||||
PARAMS_2(_caller,_target);
|
PARAMS_2(_caller,_target);
|
||||||
|
|
||||||
|
private ["_onFinish", "_onFailure"];
|
||||||
|
|
||||||
if (!(_this call FUNC(canRefuelUAV))) exitWith {};
|
if (!(_this call FUNC(canRefuelUAV))) exitWith {};
|
||||||
|
|
||||||
_onFinish = {
|
_onFinish = {
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
#define SOUND_CLIP_TIME_SPACEING 1.5
|
#define SOUND_CLIP_TIME_SPACEING 1.5
|
||||||
private ["_timeToCut"];
|
private ["_timeToCut", "_progressCheck"];
|
||||||
|
|
||||||
PARAMS_2(_unit,_fenceObject);
|
PARAMS_2(_unit,_fenceObject);
|
||||||
if (_unit != ACE_player) exitWith {};
|
if (_unit != ACE_player) exitWith {};
|
||||||
|
@ -25,7 +25,7 @@ if (_interactionType != 0) exitWith {};
|
|||||||
if (!("ACE_wirecutter" in (items ace_player))) exitWith {};
|
if (!("ACE_wirecutter" in (items ace_player))) exitWith {};
|
||||||
|
|
||||||
[{
|
[{
|
||||||
private ["_fncStatement", "_attachedFence", "_fncCondition", "_helper"];
|
private ["_fncStatement", "_attachedFence", "_fncCondition", "_helper", "_action"];
|
||||||
PARAMS_2(_args,_pfID);
|
PARAMS_2(_args,_pfID);
|
||||||
EXPLODE_3_PVT(_args,_setPosition,_addedHelpers,_fencesHelped);
|
EXPLODE_3_PVT(_args,_setPosition,_addedHelpers,_fencesHelped);
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ _unitMagCounts = [];
|
|||||||
_xFullMagazineCount = getNumber (configfile >> "CfgMagazines" >> _xClassname >> "count");
|
_xFullMagazineCount = getNumber (configfile >> "CfgMagazines" >> _xClassname >> "count");
|
||||||
|
|
||||||
//for every partial magazine, that is either in inventory or can be moved there
|
//for every partial magazine, that is either in inventory or can be moved there
|
||||||
if ((_xCount < _xFullMagazineCount) && {_xCount > 0} && {(!_xLoaded) || {_player canAdd _magazineClassname}}) then {
|
if ((_xCount < _xFullMagazineCount) && {_xCount > 0} && {(!_xLoaded) || {_player canAdd _xClassname}}) then {
|
||||||
_index = _unitMagazines find _xClassname;
|
_index = _unitMagazines find _xClassname;
|
||||||
if (_index == -1) then {
|
if (_index == -1) then {
|
||||||
_unitMagazines pushBack _xClassname;
|
_unitMagazines pushBack _xClassname;
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_newMagFnc", "_time", "_events", "_swapAmmoFnc", "_ammoSwaped", "_lowIndex", "_highIndex", "_ammoToTransfer", "_ammoAvailable", "_ammoNeeded"];
|
private ["_newMagFnc", "_time", "_events", "_swapAmmoFnc", "_ammoSwaped", "_lowIndex", "_highIndex", "_ammoToTransfer", "_ammoAvailable", "_ammoNeeded", "_swapProgress"];
|
||||||
|
|
||||||
PARAMS_3(_fullMagazineCount,_arrayOfAmmoCounts,_isBelt);
|
PARAMS_3(_fullMagazineCount,_arrayOfAmmoCounts,_isBelt);
|
||||||
|
|
||||||
|
@ -14,9 +14,7 @@
|
|||||||
|
|
||||||
if !(hasInterface) exitWith {};
|
if !(hasInterface) exitWith {};
|
||||||
|
|
||||||
_logic = _this select 0;
|
PARAMS_3(_logic,_units,_activated);
|
||||||
_units = _this select 1;
|
|
||||||
_activated = _this select 2;
|
|
||||||
|
|
||||||
if !(_activated) exitWith {};
|
if !(_activated) exitWith {};
|
||||||
|
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
private ["_groupsToDrawMarkers", "_playerSide", "_anyPlayers", "_markerType", "_colour", "_marker"];
|
||||||
|
|
||||||
// Delete last set of markers (always)
|
// Delete last set of markers (always)
|
||||||
{
|
{
|
||||||
deleteMarkerLocal _x;
|
deleteMarkerLocal _x;
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
EXPLODE_1_PVT(_this,_unit);
|
EXPLODE_1_PVT(_this,_unit);
|
||||||
|
|
||||||
private ["_isEnclosed","_nearObjects","_light","_ll","_flashlight"];
|
private ["_isEnclosed","_nearObjects","_light","_ll","_flashlight", "_flareTint", "_lightTint", "_l"];
|
||||||
|
|
||||||
// Blend two colors
|
// Blend two colors
|
||||||
_fnc_blendColor = {
|
_fnc_blendColor = {
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_grids", "_fourSize", "_sixSize", "_continue", "_size"];
|
private ["_grids", "_fourSize", "_sixSize", "_continue", "_size", "_i"];
|
||||||
_grids = configFile >> "CfgWorlds" >> worldName >> "Grid";
|
_grids = configFile >> "CfgWorlds" >> worldName >> "Grid";
|
||||||
_fourSize = -1;
|
_fourSize = -1;
|
||||||
_sixSize = -1;
|
_sixSize = -1;
|
||||||
|
@ -10,8 +10,7 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
_logic = _this select 0;
|
PARAMS_3(_logic,_units,_activated);
|
||||||
_activated = _this select 2;
|
|
||||||
|
|
||||||
if !(_activated) exitWith {};
|
if !(_activated) exitWith {};
|
||||||
|
|
||||||
|
@ -24,6 +24,7 @@ GVAR(drawing_controls) = [36732, 36733, 36734, 36735, 36736, 36737];
|
|||||||
// The thread dies as soon as the mission start, so it's not really compiting for scheduler space.
|
// The thread dies as soon as the mission start, so it's not really compiting for scheduler space.
|
||||||
[] spawn {
|
[] spawn {
|
||||||
_fnc_installMapEvents = {
|
_fnc_installMapEvents = {
|
||||||
|
private "_d";
|
||||||
_d = _this;
|
_d = _this;
|
||||||
((finddisplay _d) displayctrl 51) ctrlAddEventHandler ["MouseMoving", {_this call FUNC(handleMouseMove);}];
|
((finddisplay _d) displayctrl 51) ctrlAddEventHandler ["MouseMoving", {_this call FUNC(handleMouseMove);}];
|
||||||
((finddisplay _d) displayctrl 51) ctrlAddEventHandler ["MouseButtonDown", {[1, _this] call FUNC(handleMouseButton);}];
|
((finddisplay _d) displayctrl 51) ctrlAddEventHandler ["MouseButtonDown", {[1, _this] call FUNC(handleMouseButton);}];
|
||||||
|
@ -15,10 +15,11 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
_name = _this select 0;
|
PARAMS_4(_name,_startPos,_endPos,_color);
|
||||||
_startPos = _this select 1;
|
|
||||||
_difPos = (_this select 2) vectorDiff _startPos ;
|
private ["_marker", "_difPos", "_mag"];
|
||||||
_color = _this select 3;
|
|
||||||
|
_difPos = _endPos vectorDiff _startPos;
|
||||||
|
|
||||||
_marker = createMarkerLocal [_name, _startPos];
|
_marker = createMarkerLocal [_name, _startPos];
|
||||||
_name setMarkerShapeLocal "RECTANGLE";
|
_name setMarkerShapeLocal "RECTANGLE";
|
||||||
|
@ -12,6 +12,8 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
private ["_screenOffset", "_pos"];
|
||||||
|
|
||||||
_pos = ((finddisplay 12) displayctrl 51) ctrlMapScreenToWorld [0.5, 0.5];
|
_pos = ((finddisplay 12) displayctrl 51) ctrlMapScreenToWorld [0.5, 0.5];
|
||||||
_screenOffset = ((finddisplay 12) displayctrl 51) posWorldToScreen [(_pos select 0) + 100, (_pos select 1)];
|
_screenOffset = ((finddisplay 12) displayctrl 51) posWorldToScreen [(_pos select 0) + 100, (_pos select 1)];
|
||||||
|
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
PARAMS_1(_lineMarkers);
|
PARAMS_1(_lineMarkers);
|
||||||
|
|
||||||
{
|
{
|
||||||
|
private "_marker";
|
||||||
_marker = _x;
|
_marker = _x;
|
||||||
//Add marker if we don't already have it
|
//Add marker if we don't already have it
|
||||||
if (({(_x select 0) == (_marker select 0)} count GVAR(drawing_lineMarkers)) == 0) then {
|
if (({(_x select 0) == (_marker select 0)} count GVAR(drawing_lineMarkers)) == 0) then {
|
||||||
|
@ -15,13 +15,10 @@
|
|||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_dir", "_params", "_control", "_button", "_screenPos", "_shiftKey", "_ctrlKey", "_handled", "_pos"];
|
PARAMS_5(_display,_code,_shiftKey,_ctrlKey,_altKey);
|
||||||
|
|
||||||
|
private ["_handled", "_relPos", "_diffVector", "_magDiffVector", "_lambdaLong", "_lambdaTrasAbs"];
|
||||||
|
|
||||||
_display = _this select 0;
|
|
||||||
_code = _this select 1;
|
|
||||||
_shiftKey = _this select 2;
|
|
||||||
_ctrlKey = _this select 3;
|
|
||||||
_altKey = _this select 4;
|
|
||||||
_handled = false;
|
_handled = false;
|
||||||
|
|
||||||
#define DIK_ESCAPE 0x01
|
#define DIK_ESCAPE 0x01
|
||||||
|
@ -13,10 +13,9 @@
|
|||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_dir", "_params", "_control", "_button", "_screenPos", "_shiftKey", "_ctrlKey", "_handled", "_pos"];
|
private ["_control", "_button", "_screenPos", "_shiftKey", "_ctrlKey", "_handled", "_pos", "_altKey", "_gui", "_marker"];
|
||||||
|
|
||||||
_dir = _this select 0;
|
PARAMS_2(_dir,_params);
|
||||||
_params = _this select 1;
|
|
||||||
_control = _params select 0;
|
_control = _params select 0;
|
||||||
_button = _params select 1;
|
_button = _params select 1;
|
||||||
_screenPos = [_params select 2, _params select 3];
|
_screenPos = [_params select 2, _params select 3];
|
||||||
|
@ -51,6 +51,7 @@ if (GVAR(mapTool_isDragging)) exitWith {
|
|||||||
|
|
||||||
// Rotation
|
// Rotation
|
||||||
if (GVAR(mapTool_isRotating)) exitWith {
|
if (GVAR(mapTool_isRotating)) exitWith {
|
||||||
|
private "_angle";
|
||||||
// Get new angle
|
// Get new angle
|
||||||
_angle = (180 + ((GVAR(mousePosition) select 0) - (GVAR(mapTool_startPos) select 0)) atan2 ((GVAR(mousePosition) select 1) - (GVAR(mapTool_startPos) select 1)) mod 360);
|
_angle = (180 + ((GVAR(mousePosition) select 0) - (GVAR(mapTool_startPos) select 0)) atan2 ((GVAR(mousePosition) select 1) - (GVAR(mapTool_startPos) select 1)) mod 360);
|
||||||
GVAR(mapTool_angle) = GVAR(mapTool_startAngle) + _angle - GVAR(mapTool_startDragAngle);
|
GVAR(mapTool_angle) = GVAR(mapTool_startAngle) + _angle - GVAR(mapTool_startDragAngle);
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
#define DIST_TOP_TO_CENTER_PERC 0.65
|
#define DIST_TOP_TO_CENTER_PERC 0.65
|
||||||
#define DIST_LEFT_TO_CENTER_PERC 0.30
|
#define DIST_LEFT_TO_CENTER_PERC 0.30
|
||||||
|
|
||||||
|
private ["_textureWidth", "_relPos", "_dirVector", "_lambdaLong", "_lambdaTrasAbs", "_pos"];
|
||||||
|
|
||||||
if (GVAR(mapTool_Shown) == 0) exitWith {false};
|
if (GVAR(mapTool_Shown) == 0) exitWith {false};
|
||||||
_textureWidth = [TEXTURE_WIDTH_IN_M, TEXTURE_WIDTH_IN_M / 2] select (GVAR(mapTool_Shown) - 1);
|
_textureWidth = [TEXTURE_WIDTH_IN_M, TEXTURE_WIDTH_IN_M / 2] select (GVAR(mapTool_Shown) - 1);
|
||||||
|
@ -12,7 +12,10 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
_shouldOpenGps = _this select 0;
|
PARAMS_1(_shouldOpenGps);
|
||||||
|
|
||||||
|
private ["_isOpen"];
|
||||||
|
|
||||||
_isOpen = !(isNull (uiNamespace getVariable [QGVAR(ui_mapGpsDisplay), displayNull]));
|
_isOpen = !(isNull (uiNamespace getVariable [QGVAR(ui_mapGpsDisplay), displayNull]));
|
||||||
|
|
||||||
if (_shouldOpenGps && {"ItemGPS" in assignedItems ACE_player} && {!_isOpen}) then {
|
if (_shouldOpenGps && {"ItemGPS" in assignedItems ACE_player} && {!_isOpen}) then {
|
||||||
|
@ -3,6 +3,8 @@
|
|||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
private ["_mapGpsDisplay", "_ctrl"];
|
||||||
|
|
||||||
if ((!("ItemGPS" in assigneditems ACE_player)) || {isNull (uiNamespace getVariable [QGVAR(ui_mapGpsDisplay), displayNull])}) exitWith {
|
if ((!("ItemGPS" in assigneditems ACE_player)) || {isNull (uiNamespace getVariable [QGVAR(ui_mapGpsDisplay), displayNull])}) exitWith {
|
||||||
("RscACE_MapGps" call BIS_fnc_rscLayer) cutText ["","PLAIN"]; //close GPS RSC
|
("RscACE_MapGps" call BIS_fnc_rscLayer) cutText ["","PLAIN"]; //close GPS RSC
|
||||||
[(_this select 1)] call CBA_fnc_removePerFrameHandler; //remove frameHandler
|
[(_this select 1)] call CBA_fnc_removePerFrameHandler; //remove frameHandler
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
_name = _this select 0;
|
PARAMS_1(_name);
|
||||||
|
|
||||||
deleteMarkerLocal _name;
|
deleteMarkerLocal _name;
|
||||||
{
|
{
|
||||||
|
@ -13,10 +13,11 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
_name = _this select 0;
|
PARAMS_4(_name,_startPos,_endPos,_color);
|
||||||
_startPos = _this select 1;
|
|
||||||
_difPos = (_this select 2) vectorDiff _startPos ;
|
private ["_difPos", "_mag"];
|
||||||
_color = _this select 3;
|
|
||||||
|
_difPos = _endPos vectorDiff _startPos;
|
||||||
|
|
||||||
_name setMarkerShapeLocal "RECTANGLE";
|
_name setMarkerShapeLocal "RECTANGLE";
|
||||||
_name setMarkerAlphaLocal 1;
|
_name setMarkerAlphaLocal 1;
|
||||||
|
@ -18,6 +18,8 @@
|
|||||||
|
|
||||||
PARAMS_1(_theMap);
|
PARAMS_1(_theMap);
|
||||||
|
|
||||||
|
private ["_rotatingTexture", "_textureWidth", "_scale", "_xPos", "_yPos"];
|
||||||
|
|
||||||
if (!("ACE_MapTools" in items ACE_player)|| {GVAR(mapTool_Shown) == 0}) exitWith {};
|
if (!("ACE_MapTools" in items ACE_player)|| {GVAR(mapTool_Shown) == 0}) exitWith {};
|
||||||
|
|
||||||
_rotatingTexture = "";
|
_rotatingTexture = "";
|
||||||
|
@ -12,6 +12,8 @@ PREP(sendMarkersJIP);
|
|||||||
PREP(setMarkerJIP);
|
PREP(setMarkerJIP);
|
||||||
PREP(setMarkerNetwork);
|
PREP(setMarkerNetwork);
|
||||||
|
|
||||||
|
private ["_config", "_marker", "_a", "_scope", "_icon", "_rgba", "_name"];
|
||||||
|
|
||||||
// init marker types
|
// init marker types
|
||||||
if (isNil QGVAR(MarkersCache)) then {
|
if (isNil QGVAR(MarkersCache)) then {
|
||||||
_config = configfile >> "CfgMarkers";
|
_config = configfile >> "CfgMarkers";
|
||||||
|
@ -19,6 +19,8 @@
|
|||||||
#define BORDER 0.005
|
#define BORDER 0.005
|
||||||
|
|
||||||
[{
|
[{
|
||||||
|
private ["_display", "_text", "_picture", "_channel", "_buttonOK", "_buttonCancel", "_description", "_title", "_descriptionChannel", "_sizeX", "_sizeY", "_aceShapeLB", "_aceColorLB", "_aceAngleSlider", "_aceAngleSliderText", "_mapIDD", "_pos", "_posX", "_posY", "_posW", "_posH", "_offsetButtons", "_buttonOk", "_curSelShape", "_curSelColor", "_curSelAngle"];
|
||||||
|
|
||||||
disableserialization;
|
disableserialization;
|
||||||
PARAMS_1(_display);
|
PARAMS_1(_display);
|
||||||
|
|
||||||
|
@ -54,6 +54,8 @@ GVAR(rangeFinderPositionASL) = [];
|
|||||||
|
|
||||||
GVAR(mapAltitude) = getNumber (configFile >> "CfgWorlds" >> worldName >> "elevationOffset");
|
GVAR(mapAltitude) = getNumber (configFile >> "CfgWorlds" >> worldName >> "elevationOffset");
|
||||||
|
|
||||||
|
private ["_worldMapLong", "_worldMapLat", "_zone", "_band", "_squareID"];
|
||||||
|
|
||||||
//Calculate the map's MGRS:
|
//Calculate the map's MGRS:
|
||||||
_worldMapLong = getNumber (configFile >> "CfgWorlds" >> worldName >> "longitude");
|
_worldMapLong = getNumber (configFile >> "CfgWorlds" >> worldName >> "longitude");
|
||||||
_worldMapLat = getNumber (configFile >> "CfgWorlds" >> worldName >> "latitude");
|
_worldMapLat = getNumber (configFile >> "CfgWorlds" >> worldName >> "latitude");
|
||||||
|
@ -19,6 +19,8 @@
|
|||||||
|
|
||||||
PARAMS_2(_waypointName,_waypointPosASL);
|
PARAMS_2(_waypointName,_waypointPosASL);
|
||||||
|
|
||||||
|
private "_waypoints";
|
||||||
|
|
||||||
_waypoints = ace_player getVariable [QGVAR(waypoints), []];
|
_waypoints = ace_player getVariable [QGVAR(waypoints), []];
|
||||||
_waypoints pushBack [_waypointName, _waypointPosASL];
|
_waypoints pushBack [_waypointName, _waypointPosASL];
|
||||||
ace_player setVariable [QGVAR(waypoints), _waypoints];
|
ace_player setVariable [QGVAR(waypoints), _waypoints];
|
||||||
|
@ -18,6 +18,8 @@
|
|||||||
|
|
||||||
PARAMS_1(_wpIndex);
|
PARAMS_1(_wpIndex);
|
||||||
|
|
||||||
|
private "_waypoints";
|
||||||
|
|
||||||
_waypoints = ace_player getVariable [QGVAR(waypoints), []];
|
_waypoints = ace_player getVariable [QGVAR(waypoints), []];
|
||||||
|
|
||||||
if ((_wpIndex < 0) || (_wpIndex > ((count _waypoints) - 1))) exitWith {ERROR("out of bounds wp");};
|
if ((_wpIndex < 0) || (_wpIndex > ((count _waypoints) - 1))) exitWith {ERROR("out of bounds wp");};
|
||||||
|
@ -20,6 +20,8 @@
|
|||||||
|
|
||||||
PARAMS_4(_theMap,_mouseButton,_xPos,_yPos);
|
PARAMS_4(_theMap,_mouseButton,_xPos,_yPos);
|
||||||
|
|
||||||
|
private ["_worldPos"];
|
||||||
|
|
||||||
//Only handle LMB
|
//Only handle LMB
|
||||||
if (_mouseButton != 0) exitWith {};
|
if (_mouseButton != 0) exitWith {};
|
||||||
|
|
||||||
|
@ -17,7 +17,8 @@
|
|||||||
|
|
||||||
PARAMS_1(_theMap);
|
PARAMS_1(_theMap);
|
||||||
|
|
||||||
_theMap = _this select 0;
|
private ["_mapSize", "_waypoints", "_size", "_targetPos", "_relBearing", "_wpName", "_wpPos", "_alpha"];
|
||||||
|
|
||||||
_mapSize = (ctrlPosition _theMap) select 3;
|
_mapSize = (ctrlPosition _theMap) select 3;
|
||||||
|
|
||||||
_waypoints = [] call FUNC(deviceGetWaypoints);
|
_waypoints = [] call FUNC(deviceGetWaypoints);
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_display", "_theMap", "_mapSize", "_centerPos"];
|
private ["_display", "_theMap", "_mapSize", "_centerPos", "_mapCtrlPos"];
|
||||||
|
|
||||||
PARAMS_1(_newMode);
|
PARAMS_1(_newMode);
|
||||||
|
|
||||||
@ -39,13 +39,13 @@ if (GVAR(currentApplicationPage) == 2) then {
|
|||||||
|
|
||||||
//Hit button again, toggle map modes:
|
//Hit button again, toggle map modes:
|
||||||
if (_newMode == 2) then {
|
if (_newMode == 2) then {
|
||||||
if (GVAR(mapShowTexture)) then {
|
if (GVAR(mapShowTexture)) then {
|
||||||
GVAR(mapShowTexture) = false;
|
GVAR(mapShowTexture) = false;
|
||||||
} else {
|
} else {
|
||||||
if (GVAR(MapDataAvailable) == MAP_DETAIL_SAT) then {
|
if (GVAR(MapDataAvailable) == MAP_DETAIL_SAT) then {
|
||||||
GVAR(mapShowTexture) = true;
|
GVAR(mapShowTexture) = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -9,15 +9,15 @@
|
|||||||
* The return value <BOOL>
|
* The return value <BOOL>
|
||||||
*
|
*
|
||||||
* Example:
|
* Example:
|
||||||
* _bool = [player] call ace_movement_fnc_canClimb
|
* [player] call ace_movement_fnc_canClimb
|
||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_unit", "_pos", "_dir"];
|
private ["_pos", "_dir"];
|
||||||
|
|
||||||
_unit = _this select 0;
|
PARAMS_1(_unit);
|
||||||
|
|
||||||
_pos = getPosASL _unit;
|
_pos = getPosASL _unit;
|
||||||
_dir = getDir _unit;
|
_dir = getDir _unit;
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
* The return value <NUMBER>
|
* The return value <NUMBER>
|
||||||
*
|
*
|
||||||
* Example:
|
* Example:
|
||||||
* _bool = [player] call ace_movement_fnc_getWeight
|
* [player] call ace_movement_fnc_getWeight
|
||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
"\A3\Ui_f\data\GUI\Cfg\Ranks\colonel_gs.paa" \
|
"\A3\Ui_f\data\GUI\Cfg\Ranks\colonel_gs.paa" \
|
||||||
]
|
]
|
||||||
|
|
||||||
private ["_height", "_position", "_color", "_name", "_rank", "_size"];
|
private ["_height", "_position", "_color", "_name", "_rank", "_size", "_icon"];
|
||||||
|
|
||||||
PARAMS_5(_player,_target,_alpha,_heightOffset,_iconType);
|
PARAMS_5(_player,_target,_alpha,_heightOffset,_iconType);
|
||||||
|
|
||||||
|
@ -55,6 +55,7 @@ if (isClass (configFile >> "cfgPatches" >> "acre_api")) then {
|
|||||||
//Note: class RscDisplayVoiceChat {idd = 55} - only present when talking
|
//Note: class RscDisplayVoiceChat {idd = 55} - only present when talking
|
||||||
|
|
||||||
[{
|
[{
|
||||||
|
private ["_oldSetting", "_newSetting"];
|
||||||
_oldSetting = ACE_player getVariable [QGVAR(isSpeakingInGame), false];
|
_oldSetting = ACE_player getVariable [QGVAR(isSpeakingInGame), false];
|
||||||
_newSetting = (!(isNull findDisplay 55));
|
_newSetting = (!(isNull findDisplay 55));
|
||||||
if (!(_oldSetting isEqualTo _newSetting)) then {
|
if (!(_oldSetting isEqualTo _newSetting)) then {
|
||||||
|
@ -14,9 +14,7 @@
|
|||||||
|
|
||||||
if !(isServer) exitWith {};
|
if !(isServer) exitWith {};
|
||||||
|
|
||||||
_logic = _this select 0;
|
PARAMS_3(_logic,_units,_activated);
|
||||||
_units = _this select 1;
|
|
||||||
_activated = _this select 2;
|
|
||||||
|
|
||||||
if !(_activated) exitWith {};
|
if !(_activated) exitWith {};
|
||||||
|
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
_player = ACE_player;
|
private ["_onKeyPressAlphaMax", "_defaultIcon", "_distance", "_alpha", "_icon", "_targets", "_pos2", "_vecy", "_relPos", "_projDist", "_pos", "_target"];
|
||||||
|
|
||||||
//don't show nametags in spectator
|
//don't show nametags in spectator
|
||||||
if (!alive _player) exitWith {};
|
if (!alive ACE_player) exitWith {};
|
||||||
|
|
||||||
_onKeyPressAlphaMax = if ((GVAR(showPlayerNames) in [3,4])) then {
|
_onKeyPressAlphaMax = if ((GVAR(showPlayerNames) in [3,4])) then {
|
||||||
2 + (GVAR(ShowNamesTime) - time); //after release 1 second of full opacity, 1 second of fading to 0
|
2 + (GVAR(ShowNamesTime) - time); //after release 1 second of full opacity, 1 second of fading to 0
|
||||||
@ -24,14 +24,14 @@ if (GVAR(showCursorTagForVehicles) && {_onKeyPressAlphaMax > 0}) then {
|
|||||||
if ((!(_target isKindOf "CAManBase")) && {!(_target in allUnitsUAV)}) then {
|
if ((!(_target isKindOf "CAManBase")) && {!(_target in allUnitsUAV)}) then {
|
||||||
_target = effectiveCommander _target;
|
_target = effectiveCommander _target;
|
||||||
if ((!isNull _target) &&
|
if ((!isNull _target) &&
|
||||||
{(side (group _target)) == (side (group _player))} &&
|
{(side (group _target)) == (side (group ACE_player))} &&
|
||||||
{_target != _player} &&
|
{_target != ACE_player} &&
|
||||||
{GVAR(ShowNamesForAI) || {[_target] call EFUNC(common,isPlayer)}} &&
|
{GVAR(ShowNamesForAI) || {[_target] call EFUNC(common,isPlayer)}} &&
|
||||||
{!(_target getVariable ["ACE_hideName", false])}) then {
|
{!(_target getVariable ["ACE_hideName", false])}) then {
|
||||||
_distance = _player distance _target;
|
_distance = ACE_player distance _target;
|
||||||
_alpha = ((1 - 0.2 * (_distance - GVAR(PlayerNamesViewDistance))) min 1) * GVAR(PlayerNamesMaxAlpha);
|
_alpha = ((1 - 0.2 * (_distance - GVAR(PlayerNamesViewDistance))) min 1) * GVAR(PlayerNamesMaxAlpha);
|
||||||
_alpha = _alpha min _onKeyPressAlphaMax;
|
_alpha = _alpha min _onKeyPressAlphaMax;
|
||||||
[_player, _target, _alpha, _distance * 0.026, _defaultIcon] call FUNC(drawNameTagIcon);
|
[ACE_player, _target, _alpha, _distance * 0.026, _defaultIcon] call FUNC(drawNameTagIcon);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -41,11 +41,11 @@ if ((GVAR(showPlayerNames) in [2,4]) && {_onKeyPressAlphaMax > 0}) then {
|
|||||||
_target = cursorTarget;
|
_target = cursorTarget;
|
||||||
if ((!isNull _target) &&
|
if ((!isNull _target) &&
|
||||||
{_target isKindOf "CAManBase"} &&
|
{_target isKindOf "CAManBase"} &&
|
||||||
{(side (group _target)) == (side (group _player))} &&
|
{(side (group _target)) == (side (group ACE_player))} &&
|
||||||
{_target != _player} &&
|
{_target != ACE_player} &&
|
||||||
{GVAR(ShowNamesForAI) || {[_target] call EFUNC(common,isPlayer)}} &&
|
{GVAR(ShowNamesForAI) || {[_target] call EFUNC(common,isPlayer)}} &&
|
||||||
{!(_target getVariable ["ACE_hideName", false])}) then {
|
{!(_target getVariable ["ACE_hideName", false])}) then {
|
||||||
_distance = _player distance _target;
|
_distance = ACE_player distance _target;
|
||||||
_alpha = ((1 - 0.2 * (_distance - GVAR(PlayerNamesViewDistance))) min 1) * GVAR(PlayerNamesMaxAlpha);
|
_alpha = ((1 - 0.2 * (_distance - GVAR(PlayerNamesViewDistance))) min 1) * GVAR(PlayerNamesMaxAlpha);
|
||||||
_alpha = _alpha min _onKeyPressAlphaMax;
|
_alpha = _alpha min _onKeyPressAlphaMax;
|
||||||
_icon = ICON_NONE;
|
_icon = ICON_NONE;
|
||||||
@ -55,7 +55,7 @@ if ((GVAR(showPlayerNames) in [2,4]) && {_onKeyPressAlphaMax > 0}) then {
|
|||||||
_icon = if (([_target] call FUNC(isSpeaking)) && {(vehicle _target) == _target} && {GVAR(showSoundWaves) > 0}) then {ICON_NAME_SPEAK} else {_defaultIcon};
|
_icon = if (([_target] call FUNC(isSpeaking)) && {(vehicle _target) == _target} && {GVAR(showSoundWaves) > 0}) then {ICON_NAME_SPEAK} else {_defaultIcon};
|
||||||
};
|
};
|
||||||
|
|
||||||
[_player, _target, _alpha, _distance * 0.026, _icon] call FUNC(drawNameTagIcon);
|
[ACE_player, _target, _alpha, _distance * 0.026, _icon] call FUNC(drawNameTagIcon);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -84,12 +84,12 @@ if (((GVAR(showPlayerNames) in [1,3]) && {_onKeyPressAlphaMax > 0}) || {GVAR(sho
|
|||||||
};
|
};
|
||||||
|
|
||||||
if ((_icon != ICON_NONE) &&
|
if ((_icon != ICON_NONE) &&
|
||||||
{(side (group _target)) == (side (group _player))} &&
|
{(side (group _target)) == (side (group ACE_player))} &&
|
||||||
{_target != _player} &&
|
{_target != ACE_player} &&
|
||||||
{GVAR(ShowNamesForAI) || {[_target] call EFUNC(common,isPlayer)}} &&
|
{GVAR(ShowNamesForAI) || {[_target] call EFUNC(common,isPlayer)}} &&
|
||||||
{!(_target getVariable ["ACE_hideName", false])}) then {
|
{!(_target getVariable ["ACE_hideName", false])}) then {
|
||||||
|
|
||||||
if (lineIntersects [_pos, (visiblePositionASL _target) vectorAdd [0,0,1], vehicle _player, _target]) exitWith {}; // Check if there is line of sight
|
if (lineIntersects [_pos, (visiblePositionASL _target) vectorAdd [0,0,1], vehicle ACE_player, _target]) exitWith {}; // Check if there is line of sight
|
||||||
_relPos = (visiblePositionASL _target) vectorDiff _pos;
|
_relPos = (visiblePositionASL _target) vectorDiff _pos;
|
||||||
_distance = vectorMagnitude _relPos;
|
_distance = vectorMagnitude _relPos;
|
||||||
_projDist = _relPos vectorDistance (_vecy vectorMultiply (_relPos vectorDotProduct _vecy));
|
_projDist = _relPos vectorDistance (_vecy vectorMultiply (_relPos vectorDotProduct _vecy));
|
||||||
@ -102,7 +102,7 @@ if (((GVAR(showPlayerNames) in [1,3]) && {_onKeyPressAlphaMax > 0}) || {GVAR(sho
|
|||||||
_alpha = _alpha min _onKeyPressAlphaMax;
|
_alpha = _alpha min _onKeyPressAlphaMax;
|
||||||
};
|
};
|
||||||
|
|
||||||
[_player, _target, _alpha, _distance * 0.026, _icon] call FUNC(drawNameTagIcon);
|
[ACE_player, _target, _alpha, _distance * 0.026, _icon] call FUNC(drawNameTagIcon);
|
||||||
};
|
};
|
||||||
} forEach _targets;
|
} forEach _targets;
|
||||||
};
|
};
|
||||||
|
@ -42,7 +42,7 @@ GVAR(ppEffectMuzzleFlash) ppEffectCommit 0;
|
|||||||
// Conditions: canInteract
|
// Conditions: canInteract
|
||||||
if !([ACE_player, objNull, ["isNotEscorting", "isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
if !([ACE_player, objNull, ["isNotEscorting", "isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||||
// Conditions: specific
|
// Conditions: specific
|
||||||
if ((currentVisionMode _player != 1)) exitWith {false};
|
if ((currentVisionMode ACE_player != 1)) exitWith {false};
|
||||||
|
|
||||||
// Statement
|
// Statement
|
||||||
[ACE_player, 1] call FUNC(changeNVGBrightness);
|
[ACE_player, 1] call FUNC(changeNVGBrightness);
|
||||||
@ -56,7 +56,7 @@ GVAR(ppEffectMuzzleFlash) ppEffectCommit 0;
|
|||||||
// Conditions: canInteract
|
// Conditions: canInteract
|
||||||
if !([ACE_player, objNull, ["isNotEscorting", "isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
if !([ACE_player, objNull, ["isNotEscorting", "isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||||
// Conditions: specific
|
// Conditions: specific
|
||||||
if ((currentVisionMode _player != 1)) exitWith {false};
|
if ((currentVisionMode ACE_player != 1)) exitWith {false};
|
||||||
|
|
||||||
// Statement
|
// Statement
|
||||||
[ACE_player, -1] call FUNC(changeNVGBrightness);
|
[ACE_player, -1] call FUNC(changeNVGBrightness);
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_currentVehicle", "_grainSetting", "_blurSetting", "_radBlurSetting", "_config"];
|
private ["_currentVehicle", "_grainSetting", "_blurSetting", "_radBlurSetting", "_config", "_hmd", "_cameraView", "_turret"];
|
||||||
|
|
||||||
_currentVehicle = vehicle ACE_player;
|
_currentVehicle = vehicle ACE_player;
|
||||||
|
|
||||||
@ -41,7 +41,7 @@ _fnc_isUsingHMD = {
|
|||||||
!("NVG" in getArray (_config >> "ViewOptics" >> "visionMode"));
|
!("NVG" in getArray (_config >> "ViewOptics" >> "visionMode"));
|
||||||
};
|
};
|
||||||
|
|
||||||
private ["_result", "_turretConfig", "_turretConfigOpticsIn"];
|
private ["_result", "_turretConfig", "_turretConfigOpticsIn", "_index"];
|
||||||
_result = true;
|
_result = true;
|
||||||
_turretConfig = [_config, _turret] call EFUNC(common,getTurretConfigPath);
|
_turretConfig = [_config, _turret] call EFUNC(common,getTurretConfigPath);
|
||||||
_turretConfigOpticsIn = _turretConfig >> "OpticsIn";
|
_turretConfigOpticsIn = _turretConfig >> "OpticsIn";
|
||||||
|
@ -2,15 +2,13 @@
|
|||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
_setupPlayer = {
|
[{
|
||||||
if (!isNull ACE_player) then {
|
if (!isNull ACE_player) then {
|
||||||
[(_this select 1)] call cba_fnc_removePerFrameHandler;
|
[(_this select 1)] call cba_fnc_removePerFrameHandler;
|
||||||
|
|
||||||
[ACE_player, "isPlayer"] call EFUNC(common,muteUnit);
|
[ACE_player, "isPlayer"] call EFUNC(common,muteUnit);
|
||||||
};
|
};
|
||||||
};
|
}, 0, []] call CBA_fnc_addPerFrameHandler;
|
||||||
|
|
||||||
[_setupPlayer, 0, []] call CBA_fnc_addPerFrameHandler;
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!hasInterface) exitWith {};
|
if (!hasInterface) exitWith {};
|
||||||
|
@ -18,6 +18,8 @@
|
|||||||
|
|
||||||
EXPLODE_2_PVT(_this,_player,_weapon);
|
EXPLODE_2_PVT(_this,_player,_weapon);
|
||||||
|
|
||||||
|
private ["_action"];
|
||||||
|
|
||||||
// Play animation and report temperature
|
// Play animation and report temperature
|
||||||
_action = getText (configFile >> "CfgWeapons" >> _weapon >> "ACE_checkTemperatureAction");
|
_action = getText (configFile >> "CfgWeapons" >> _weapon >> "ACE_checkTemperatureAction");
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
EXPLODE_2_PVT(_this,_player,_weapon);
|
EXPLODE_2_PVT(_this,_player,_weapon);
|
||||||
|
|
||||||
// Calculate cool down of weapon since last shot
|
// Calculate cool down of weapon since last shot
|
||||||
private ["_string", "_overheat", "_temperature", "_time", "_barrelMass"];
|
private ["_string", "_overheat", "_temperature", "_time", "_barrelMass", "_a"];
|
||||||
_string = format [QGVAR(%1), _weapon];
|
_string = format [QGVAR(%1), _weapon];
|
||||||
_overheat = _player getVariable [_string, [0, 0]];
|
_overheat = _player getVariable [_string, [0, 0]];
|
||||||
_temperature = _overheat select 0;
|
_temperature = _overheat select 0;
|
||||||
|
@ -17,7 +17,8 @@
|
|||||||
*/
|
*/
|
||||||
#include "\z\ace\addons\overheating\script_component.hpp"
|
#include "\z\ace\addons\overheating\script_component.hpp"
|
||||||
|
|
||||||
private ["_unit", "_weapon", "_ammo", "_projectile"];
|
private ["_unit", "_weapon", "_ammo", "_projectile", "_velocity", "_variableName", "_overheat", "_temperature", "_time", "_bulletMass", "_energyIncrement", "_barrelMass", "_scaledTemperature", "_intensity", "_position", "_direction", "_dispersion", "_count", "_slowdownFactor", "_jamChance", "_surface"];
|
||||||
|
|
||||||
_unit = _this select 0;
|
_unit = _this select 0;
|
||||||
_weapon = _this select 1;
|
_weapon = _this select 1;
|
||||||
_ammo = _this select 4;
|
_ammo = _this select 4;
|
||||||
@ -25,8 +26,6 @@ _projectile = _this select 6;
|
|||||||
|
|
||||||
_velocity = velocity _projectile;
|
_velocity = velocity _projectile;
|
||||||
|
|
||||||
private ["_variableName", "_overheat", "_temperature", "_time", "_energyIncrement", "_barrelMass", "_scaledTemperature"];
|
|
||||||
|
|
||||||
// each weapon has it's own variable. Can't store the temperature in the weapon since they are not objects unfortunately.
|
// each weapon has it's own variable. Can't store the temperature in the weapon since they are not objects unfortunately.
|
||||||
_variableName = format [QGVAR(%1), _weapon];
|
_variableName = format [QGVAR(%1), _weapon];
|
||||||
|
|
||||||
|
@ -13,6 +13,8 @@
|
|||||||
|
|
||||||
EXPLODE_2_PVT(_this,_player,_target);
|
EXPLODE_2_PVT(_this,_player,_target);
|
||||||
|
|
||||||
|
private ["_magazineType", "_magazineCfg"];
|
||||||
|
|
||||||
// Return true for static weapons if they have been fired once, @todo 1.40 this work-around doesn't work anymore
|
// Return true for static weapons if they have been fired once, @todo 1.40 this work-around doesn't work anymore
|
||||||
if (_target isKindOf "StaticWeapon") exitWith {
|
if (_target isKindOf "StaticWeapon") exitWith {
|
||||||
if (currentMagazine _target != "") exitWith {true};
|
if (currentMagazine _target != "") exitWith {true};
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
EXPLODE_1_PVT(_this,_target);
|
EXPLODE_1_PVT(_this,_target);
|
||||||
|
|
||||||
private ["_weapon","_muzzle","_magazine","_showNumber","_ammo","_maxRounds","_count","_text","_color","_picture"];
|
private ["_weapon","_muzzle","_magazine","_showNumber","_ammo","_maxRounds","_count","_text","_color","_picture", "_a", "_string"];
|
||||||
|
|
||||||
_weapon = currentWeapon _target;
|
_weapon = currentWeapon _target;
|
||||||
_muzzle = currentMuzzle _target;
|
_muzzle = currentMuzzle _target;
|
||||||
|
@ -15,7 +15,7 @@ EXPLODE_2_PVT(_this,_player,_target);
|
|||||||
|
|
||||||
if (vehicle _target != _target) exitWith {false};
|
if (vehicle _target != _target) exitWith {false};
|
||||||
|
|
||||||
private ["_magazineCfg","_magazineType"];
|
private ["_magazineCfg","_magazineType", "_condition", "_onFailure", "_onFinish"];
|
||||||
_magazineType = currentMagazine _target;
|
_magazineType = currentMagazine _target;
|
||||||
_magazineCfg = configFile >> "CfgMagazines" >> _magazineType;
|
_magazineCfg = configFile >> "CfgMagazines" >> _magazineType;
|
||||||
if (getNumber (_magazineCfg >> "ACE_isBelt") == 0) exitWith {false};
|
if (getNumber (_magazineCfg >> "ACE_isBelt") == 0) exitWith {false};
|
||||||
@ -54,7 +54,7 @@ _onFinish = {
|
|||||||
|
|
||||||
_onFailure = {
|
_onFailure = {
|
||||||
EXPLODE_3_PVT((_this select 0),_player,_target,_magazine);
|
EXPLODE_3_PVT((_this select 0),_player,_target,_magazine);
|
||||||
[_caller, "AmovPknlMstpSrasWrflDnon", 1] call EFUNC(common,doAnimation);
|
[_player, "AmovPknlMstpSrasWrflDnon", 1] call EFUNC(common,doAnimation);
|
||||||
|
|
||||||
// Add back the magazine with the former ammo count
|
// Add back the magazine with the former ammo count
|
||||||
_player addMagazine _magazine;
|
_player addMagazine _magazine;
|
||||||
|
@ -14,12 +14,7 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_unit", "_weapon", "_magazine"];
|
PARAMS_4(_unit,_target,_weapon,_magazine);
|
||||||
|
|
||||||
_unit = _this select 0;
|
|
||||||
_target = _this select 1;
|
|
||||||
_weapon = _this select 2;
|
|
||||||
_magazine = _this select 3;
|
|
||||||
|
|
||||||
_target selectWeapon _weapon;
|
_target selectWeapon _weapon;
|
||||||
|
|
||||||
|
@ -2,13 +2,11 @@
|
|||||||
// execute on server only!
|
// execute on server only!
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private "_unit";
|
PARAMS_1(_unit);
|
||||||
|
|
||||||
_unit = _this select 0;
|
|
||||||
|
|
||||||
private ["_group0", "_rallypoint"];
|
private ["_group0", "_rallypoint"];
|
||||||
|
|
||||||
_group0 = group _unit; // _group is a reserved veriable and shouldn't be used
|
_group0 = group _unit; // _group-is a reserved veriable and shouldn't be used
|
||||||
|
|
||||||
_rallypoint = [
|
_rallypoint = [
|
||||||
objNull,
|
objNull,
|
||||||
|
@ -16,11 +16,7 @@
|
|||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_rallypoint", "_respawnMarker", "_side"];
|
PARAMS_3(_rallypoint,_respawnMarker,_side);
|
||||||
|
|
||||||
_rallypoint = _this select 0;
|
|
||||||
_respawnMarker = _this select 1;
|
|
||||||
_side = _this select 2;
|
|
||||||
|
|
||||||
private "_name";
|
private "_name";
|
||||||
_name = typeOf _rallypoint;
|
_name = typeOf _rallypoint;
|
||||||
@ -29,12 +25,11 @@ _name = typeOf _rallypoint;
|
|||||||
if (hasInterface) then {
|
if (hasInterface) then {
|
||||||
// fix init having wrong position, vars etc.
|
// fix init having wrong position, vars etc.
|
||||||
[_rallypoint, _respawnMarker, _side, _name] spawn {
|
[_rallypoint, _respawnMarker, _side, _name] spawn {
|
||||||
_rallypoint = _this select 0;
|
PARAMS_4(_rallypoint,_respawnMarker,_side,_name);
|
||||||
_respawnMarker = _this select 1;
|
|
||||||
_side = _this select 2;
|
|
||||||
_name = _this select 3;
|
|
||||||
|
|
||||||
_marker = format ["ACE_Marker_%1", _name];
|
private ["_marker", "_type"];
|
||||||
|
|
||||||
|
_marker = format ["ACE_Marker_%1", _name];
|
||||||
|
|
||||||
// exit if it already exist
|
// exit if it already exist
|
||||||
if (_marker in allMapMarkers) exitWith {};
|
if (_marker in allMapMarkers) exitWith {};
|
||||||
|
@ -18,10 +18,9 @@
|
|||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
if !(isServer) exitWith {};
|
PARAMS_3(_logic,_units,_activated);
|
||||||
|
|
||||||
_logic = _this select 0;
|
if !(isServer) exitWith {};
|
||||||
_activated = _this select 2;
|
|
||||||
|
|
||||||
if !(_activated) exitWith {};
|
if !(_activated) exitWith {};
|
||||||
|
|
||||||
@ -32,9 +31,10 @@ GVAR(Module) = true;
|
|||||||
|
|
||||||
if (isServer) then {
|
if (isServer) then {
|
||||||
if (GVAR(RemoveDeadBodiesDisconnected)) then {
|
if (GVAR(RemoveDeadBodiesDisconnected)) then {
|
||||||
|
private "_fnc_deleteDisconnected";
|
||||||
_fnc_deleteDisconnected = {
|
_fnc_deleteDisconnected = {
|
||||||
_this spawn {
|
_this spawn {
|
||||||
_unit = _this select 0;
|
PARAMS_1(_unit);
|
||||||
|
|
||||||
sleep 4;
|
sleep 4;
|
||||||
|
|
||||||
|
@ -19,17 +19,13 @@
|
|||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
_this spawn {
|
_this spawn {
|
||||||
_logic = _this select 0;
|
PARAMS_3(_logic,_units,_activated);
|
||||||
_units = _this select 1;
|
|
||||||
_activated = _this select 2;
|
|
||||||
|
|
||||||
if !(_activated) exitWith {};
|
if !(_activated) exitWith {};
|
||||||
|
|
||||||
if (isServer) then {
|
if (isServer) then {
|
||||||
_varName = QGVAR(showFriendlyFireMessage);
|
missionNamespace setVariable [QGVAR(showFriendlyFireMessage), true];
|
||||||
|
publicVariable QGVAR(showFriendlyFireMessage);
|
||||||
missionNamespace setVariable [_varName, true];
|
|
||||||
publicVariable _varName;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
diag_log text "[ACE]: Friendly Fire Messages Module Initialized.";
|
diag_log text "[ACE]: Friendly Fire Messages Module Initialized.";
|
||||||
|
@ -16,11 +16,9 @@
|
|||||||
VOID
|
VOID
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
_logic = _this select 0;
|
PARAMS_3(_logic,_units,_activated);
|
||||||
_units = _this select 1;
|
|
||||||
_activated = _this select 2;
|
|
||||||
|
|
||||||
if !(_activated) exitWith {};
|
if !(_activated) exitWith {};
|
||||||
|
|
||||||
|
@ -18,8 +18,9 @@
|
|||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
_this spawn {
|
_this spawn {
|
||||||
_unit = _this select 0;
|
PARAMS_2(_unit,_side);
|
||||||
_side = _this select 1;
|
|
||||||
|
private ["_rallypoint", "_position"];
|
||||||
|
|
||||||
// rallypoint names are defined in CfgVehicles.hpp
|
// rallypoint names are defined in CfgVehicles.hpp
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_forceRemove", "_body"];
|
private ["_forceRemove", "_body", "_uid"];
|
||||||
|
|
||||||
_forceRemove = _this select 0;
|
_forceRemove = _this select 0;
|
||||||
|
|
||||||
|
@ -17,11 +17,10 @@
|
|||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_unit", "_allGear", "_headgear", "_goggles", "_uniform", "_uniformitems", "_vest", "_vestitems", "_backpack", "_backpackitems", "_primaryweapon", "_primaryweaponitems", "_primaryweaponmagazine", "_handgunweapon", "_handgunweaponitems", "_handgunweaponmagazine", "_assigneditems", "_binocular"];
|
PARAMS_2(_unit,_allGear);
|
||||||
|
|
||||||
|
private ["_unit", "_allGear", "_headgear", "_goggles", "_uniform", "_uniformitems", "_vest", "_vestitems", "_backpack", "_backpackitems", "_primaryweapon", "_primaryweaponitems", "_primaryweaponmagazine", "_handgunweapon", "_handgunweaponitems", "_handgunweaponmagazine", "_assigneditems", "_binocular", "_backpa", "_secondaryweapon", "_secondaryweaponitems", "_secondaryweaponmagazine"];
|
||||||
|
|
||||||
_unit = _this select 0;
|
|
||||||
_allGear = _this select 1;
|
|
||||||
|
|
||||||
// remove all starting gear of a player
|
// remove all starting gear of a player
|
||||||
removeAllWeapons _unit;
|
removeAllWeapons _unit;
|
||||||
|
@ -1,31 +1,29 @@
|
|||||||
/*
|
/*
|
||||||
Name: ACE_Respawn_fnc_teleportToRallypoint
|
* Author: commy2
|
||||||
|
* teleports a unit to a rallypoint
|
||||||
Author(s):
|
*
|
||||||
commy2
|
* Arguments:
|
||||||
|
* 0: unit <OBJECT>
|
||||||
Description:
|
* 1: side? <OBJECT>
|
||||||
teleports a unit to a rallypoint
|
* 2: teleport to base <BOOLEAN>
|
||||||
|
*
|
||||||
Parameters:
|
* Return Value:
|
||||||
0: OBJECT - unit
|
* Nothing
|
||||||
1: OBJECT - side
|
*
|
||||||
2: BOOLEAN - teleport to base
|
* Example:
|
||||||
|
* [,,] call ACE_Respawn_fnc_teleportToRallypoint;
|
||||||
Returns:
|
*
|
||||||
VOID
|
* Public: No
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_unit", "_side", "_rallypoint", "_toBase"];
|
PARAMS_3(_unit,_side,_rallypoint);
|
||||||
|
|
||||||
_unit = _this select 0;
|
private ["_toBase"];
|
||||||
_side = _this select 1;
|
|
||||||
_rallypoint = _this select 2;
|
|
||||||
|
|
||||||
// rallypoint names are defined in CfgVehicles.hpp
|
// rallypoint names are defined in CfgVehicles.hpp
|
||||||
|
|
||||||
|
//IGNORE_PRIVATE_WARNING("_Base")
|
||||||
_toBase = _rallypoint find "_Base" != -1;
|
_toBase = _rallypoint find "_Base" != -1;
|
||||||
|
|
||||||
_rallypoint = missionNamespace getVariable [_rallypoint, objNull],
|
_rallypoint = missionNamespace getVariable [_rallypoint, objNull],
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
if (!hasInterface) exitWith {};
|
if (!hasInterface) exitWith {};
|
||||||
|
|
||||||
|
// IGNORE_PRIVATE_WARNING(_player)
|
||||||
//["Soldier", {_player = ACE_player; if (currentWeapon _player in (_player getVariable [QGVAR(safedWeapons), []])) then {[false] call FUNC(setSafeModeVisual)}] call EFUNC(common,addInfoDisplayEventHandler);
|
//["Soldier", {_player = ACE_player; if (currentWeapon _player in (_player getVariable [QGVAR(safedWeapons), []])) then {[false] call FUNC(setSafeModeVisual)}] call EFUNC(common,addInfoDisplayEventHandler);
|
||||||
//@todo addEventHandler infoDisplayChanged with select 1 == "Soldier"
|
//@todo addEventHandler infoDisplayChanged with select 1 == "Soldier"
|
||||||
|
|
||||||
|
@ -14,11 +14,11 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
if !(vehicle _unit == _unit) exitWith {false};
|
PARAMS_3(_unit,_turretAndDirection,_majorStep);
|
||||||
|
|
||||||
private ["_unit", "_turretAndDirection", "_majorStep", "_weaponIndex", "_zeroing", "_optic", "_increment", "_maxVertical", "_maxHorizontal", "_elevation", "_windage", "_zero"];
|
if (vehicle _unit != _unit) exitWith {false};
|
||||||
|
|
||||||
EXPLODE_3_PVT(_this,_unit,_turretAndDirection,_majorStep);
|
private ["_weaponIndex", "_zeroing", "_optic", "_increment", "_maxVertical", "_maxHorizontal", "_elevation", "_windage", "_zero", "_adjustment"];
|
||||||
|
|
||||||
_weaponIndex = [_unit, currentWeapon _unit] call EFUNC(common,getWeaponIndex);
|
_weaponIndex = [_unit, currentWeapon _unit] call EFUNC(common,getWeaponIndex);
|
||||||
if (_weaponIndex < 0) exitWith {false};
|
if (_weaponIndex < 0) exitWith {false};
|
||||||
|
@ -12,10 +12,11 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
if !(vehicle _unit == _unit) exitWith {false};
|
PARAMS_1(_unit);
|
||||||
|
|
||||||
private ["_unit", "_adjustment", "_zeroing", "_elevation", "_windage", "_zero"];
|
if (vehicle _unit != _unit) exitWith {false};
|
||||||
_unit = _this select 0;
|
|
||||||
|
private ["_weaponIndex", "_adjustment", "_zeroing", "_elevation", "_windage", "_zero"];
|
||||||
|
|
||||||
_weaponIndex = [_unit, currentWeapon _unit] call EFUNC(common,getWeaponIndex);
|
_weaponIndex = [_unit, currentWeapon _unit] call EFUNC(common,getWeaponIndex);
|
||||||
if (_weaponIndex < 0) exitWith {false};
|
if (_weaponIndex < 0) exitWith {false};
|
||||||
|
@ -15,10 +15,10 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_unit", "_elevation", "_windage", "_zero", "_adjustmentDifference", "_pitchbankyaw", "_pitch", "_bank", "_yaw"];
|
|
||||||
|
|
||||||
EXPLODE_4_PVT(_this,_unit,_elevation,_windage,_zero);
|
EXPLODE_4_PVT(_this,_unit,_elevation,_windage,_zero);
|
||||||
|
|
||||||
|
private ["_adjustmentDifference", "_pitchbankyaw", "_pitch", "_bank", "_yaw", "_adjustment", "_weaponIndex"];
|
||||||
|
|
||||||
_weaponIndex = [_unit, currentWeapon _unit] call EFUNC(common,getWeaponIndex);
|
_weaponIndex = [_unit, currentWeapon _unit] call EFUNC(common,getWeaponIndex);
|
||||||
|
|
||||||
_adjustment = _unit getVariable QGVAR(Adjustment);
|
_adjustment = _unit getVariable QGVAR(Adjustment);
|
||||||
|
@ -12,13 +12,14 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
PARAMS_1(_unit);
|
||||||
|
|
||||||
|
private ["_weaponIndex", "_adjustment", "_elevation"];
|
||||||
|
|
||||||
if (cameraView == "GUNNER") exitWith {false};
|
if (cameraView == "GUNNER") exitWith {false};
|
||||||
if !(vehicle _unit == _unit) exitWith {false};
|
if !(vehicle _unit == _unit) exitWith {false};
|
||||||
if !(missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) exitWith {false};
|
if !(missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) exitWith {false};
|
||||||
|
|
||||||
private ["_unit", "_adjustment", "_elevation"];
|
|
||||||
_unit = _this select 0;
|
|
||||||
|
|
||||||
_weaponIndex = [_unit, currentWeapon _unit] call EFUNC(common,getWeaponIndex);
|
_weaponIndex = [_unit, currentWeapon _unit] call EFUNC(common,getWeaponIndex);
|
||||||
if (_weaponIndex < 0) exitWith {false};
|
if (_weaponIndex < 0) exitWith {false};
|
||||||
|
|
||||||
|
@ -17,12 +17,10 @@
|
|||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_unit", "_sides"];
|
PARAMS_2(_unit,_sides);
|
||||||
_unit = _this select 0;
|
|
||||||
_sides = _this select 1;
|
|
||||||
|
|
||||||
["theMapClick", "onMapSingleClick", {
|
["theMapClick", "onMapSingleClick", {
|
||||||
|
// IGNORE_PRIVATE_WARNING(_pos,_shift,_alt)
|
||||||
if (alive ACE_player && {GVAR(OriginalUnit) getVariable ["ACE_CanSwitchUnits", false]}) then {
|
if (alive ACE_player && {GVAR(OriginalUnit) getVariable ["ACE_CanSwitchUnits", false]}) then {
|
||||||
[_this, _pos, _shift, _alt] call FUNC(handleMapClick);
|
[_this, _pos, _shift, _alt] call FUNC(handleMapClick);
|
||||||
};
|
};
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
* None
|
* None
|
||||||
*
|
*
|
||||||
* Example:
|
* Example:
|
||||||
* [_unit, _sides] call FUNC(handleMapClick)
|
* [unit, _sides] call FUNC(handleMapClick)
|
||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
* None
|
* None
|
||||||
*
|
*
|
||||||
* Example:
|
* Example:
|
||||||
* [_player, _sides] call FUNC(initPlayer)
|
* [player, [west]] call FUNC(initPlayer)
|
||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
@ -19,8 +19,7 @@
|
|||||||
|
|
||||||
private ["_playerUnit", "_sides"];
|
private ["_playerUnit", "_sides"];
|
||||||
|
|
||||||
_playerUnit = _this select 0;
|
PARAMS_2(_playerUnit,_sides);
|
||||||
_sides = _this select 1;
|
|
||||||
|
|
||||||
if (vehicle _playerUnit == _playerUnit) then {
|
if (vehicle _playerUnit == _playerUnit) then {
|
||||||
|
|
||||||
|
@ -10,14 +10,15 @@
|
|||||||
* Player units <ARRAY<OBJECT>>
|
* Player units <ARRAY<OBJECT>>
|
||||||
*
|
*
|
||||||
* Example:
|
* Example:
|
||||||
* [_pos, 100] call FUNC(nearestPlayers)
|
* [[300,300,0], 100] call FUNC(nearestPlayers)
|
||||||
*
|
*
|
||||||
* Public: Yes
|
* Public: Yes
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_position", "_radius", "_nearestPlayers"];
|
private ["_nearestPlayers"];
|
||||||
|
|
||||||
|
PARAMS_2(_position,_radius);
|
||||||
|
|
||||||
_position = _this select 0;
|
_position = _this select 0;
|
||||||
_radius = _this select 1;
|
_radius = _this select 1;
|
||||||
@ -25,9 +26,9 @@ _radius = _this select 1;
|
|||||||
_nearestPlayers = [];
|
_nearestPlayers = [];
|
||||||
|
|
||||||
{
|
{
|
||||||
if ([_x] call EFUNC(common,isPlayer) && {alive _x}) then {
|
if ([_x] call EFUNC(common,isPlayer) && {alive _x}) then {
|
||||||
_nearestPlayers pushBack _x;
|
_nearestPlayers pushBack _x;
|
||||||
};
|
};
|
||||||
} forEach (nearestObjects [_position, ["Man"], _radius]);
|
} forEach (nearestObjects [_position, ["Man"], _radius]);
|
||||||
|
|
||||||
_nearestPlayers
|
_nearestPlayers
|
||||||
|
@ -10,26 +10,20 @@
|
|||||||
* None
|
* None
|
||||||
*
|
*
|
||||||
* Example:
|
* Example:
|
||||||
* [_origPlayer, _respPlayer] call FUNC(switchBack)
|
* [_originalPlayerUnit, _currentUnit] call FUNC(switchBack)
|
||||||
*
|
*
|
||||||
* Public: Yes
|
* Public: Yes
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_origPlayerUnit"];
|
PARAMS_1(_originalPlayerUnit);
|
||||||
|
|
||||||
_origPlayerUnit = _this select 0;
|
[_originalPlayerUnit] joinSilent GVAR(OriginalGroup);
|
||||||
[_origPlayerUnit] joinSilent GVAR(OriginalGroup);
|
|
||||||
|
|
||||||
DFUNC(pfhSwitchBack) = {
|
DFUNC(pfhSwitchBack) = {
|
||||||
|
PARAMS_2(_args,_pfID);
|
||||||
private ["_args", "_originalPlayerUnit", "_currentUnit"];
|
EXPLODE_2_PVT(_args,_originalPlayerUnit,_currentUnit);
|
||||||
|
|
||||||
_args = _this select 0;
|
|
||||||
|
|
||||||
_originalPlayerUnit = _args select 0;
|
|
||||||
_currentUnit = _args select 1;
|
|
||||||
|
|
||||||
if (local _originalPlayerUnit) exitWith {
|
if (local _originalPlayerUnit) exitWith {
|
||||||
selectPlayer _originalPlayerUnit;
|
selectPlayer _originalPlayerUnit;
|
||||||
|
@ -18,9 +18,9 @@
|
|||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_unit", "_allNearestPlayers", "_oldUnit", "_leave"];
|
private ["_nearestEnemyPlayers", "_allNearestPlayers", "_oldUnit", "_leave"];
|
||||||
|
|
||||||
_unit = _this select 1;
|
PARAMS_1(_unit);
|
||||||
|
|
||||||
// don't switch to original player units
|
// don't switch to original player units
|
||||||
if (!([_unit] call FUNC(isValidAi))) exitWith {};
|
if (!([_unit] call FUNC(isValidAi))) exitWith {};
|
||||||
|
@ -37,6 +37,7 @@ if (!isServer) exitWith {};
|
|||||||
};
|
};
|
||||||
|
|
||||||
{
|
{
|
||||||
|
private "_unit";
|
||||||
_unit = _x;
|
_unit = _x;
|
||||||
if (_unit isKindOf "CAManBase") then {
|
if (_unit isKindOf "CAManBase") then {
|
||||||
{
|
{
|
||||||
|
@ -21,6 +21,7 @@ PARAMS_2(_unit,_container);
|
|||||||
//Only check for player:
|
//Only check for player:
|
||||||
if (_unit != ace_player) exitWith {false};
|
if (_unit != ace_player) exitWith {false};
|
||||||
|
|
||||||
|
private "_handeled";
|
||||||
_handeled = false;
|
_handeled = false;
|
||||||
|
|
||||||
if (GVAR(LockVehicleInventory) && //if setting not enabled
|
if (GVAR(LockVehicleInventory) && //if setting not enabled
|
||||||
|
@ -26,6 +26,7 @@ GVAR(CurrentGrenadeMuzzleOther) = "";
|
|||||||
|
|
||||||
// Collect frag and other muzzles separately
|
// Collect frag and other muzzles separately
|
||||||
with uiNamespace do {
|
with uiNamespace do {
|
||||||
|
private ["_magazines", "_magazine", "_ammo", "_explosive"];
|
||||||
if (isNil QGVAR(FragMuzzles)) then {
|
if (isNil QGVAR(FragMuzzles)) then {
|
||||||
GVAR(FragMuzzles) = [];
|
GVAR(FragMuzzles) = [];
|
||||||
GVAR(NonFragMuzzles) = [];
|
GVAR(NonFragMuzzles) = [];
|
||||||
|
@ -12,18 +12,13 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_unit", "_muzzle"];
|
PARAMS_2(_unit,_muzzle);
|
||||||
|
|
||||||
_unit = _this select 0;
|
private ["_uniformMags", "_vestMags", "_backpackMags", "_numberOfMagazines", "_magazineClasses", "_firstMagazine"];
|
||||||
_muzzle = _this select 1;
|
|
||||||
|
|
||||||
private ["_uniformMags", "_vestMags", "_backPackMags"];
|
|
||||||
|
|
||||||
_uniformMags = getMagazineCargo uniformContainer _unit;
|
_uniformMags = getMagazineCargo uniformContainer _unit;
|
||||||
_vestMags = getMagazineCargo vestContainer _unit;
|
_vestMags = getMagazineCargo vestContainer _unit;
|
||||||
_backPackMags = getMagazineCargo backpackContainer _unit;
|
_backpackMags = getMagazineCargo backpackContainer _unit;
|
||||||
|
|
||||||
private ["_numberOfMagazines", "_magazineClasses", "_firstMagazine"];
|
|
||||||
|
|
||||||
_numberOfMagazines = 0;
|
_numberOfMagazines = 0;
|
||||||
_magazineClasses = getArray (configFile >> "CfgWeapons" >> "Throw" >> _muzzle >> "magazines");
|
_magazineClasses = getArray (configFile >> "CfgWeapons" >> "Throw" >> _muzzle >> "magazines");
|
||||||
|
@ -21,10 +21,10 @@ _numberofMagazines = _this select 1;
|
|||||||
|
|
||||||
private ["_color", "_name", "_text", "_picture"];
|
private ["_color", "_name", "_text", "_picture"];
|
||||||
|
|
||||||
_color = [[1,0,0], [1,1,1]] select (_numberOfMagazines > 0);
|
_color = [[1,0,0], [1,1,1]] select (_numberofMagazines > 0);
|
||||||
_name = getText (configFile >> "CfgMagazines" >> _magazine >> "displayNameShort");
|
_name = getText (configFile >> "CfgMagazines" >> _magazine >> "displayNameShort");
|
||||||
|
|
||||||
_text = [format["%1 x%2", _name, _numberOfMagazines], _color] call EFUNC(common,stringToColoredText);
|
_text = [format["%1 x%2", _name, _numberofMagazines], _color] call EFUNC(common,stringToColoredText);
|
||||||
_picture = getText (configFile >> "CfgMagazines" >> _magazine >> "picture");
|
_picture = getText (configFile >> "CfgMagazines" >> _magazine >> "picture");
|
||||||
|
|
||||||
[_text, _picture] call EFUNC(common,displayTextPicture);
|
[_text, _picture] call EFUNC(common,displayTextPicture);
|
||||||
|
@ -11,41 +11,41 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_unit", "_nextMuzzle"];
|
private ["_text", "_nextMuzzle"];
|
||||||
|
|
||||||
_unit = _this select 0;
|
PARAMS_1(_unit);
|
||||||
|
|
||||||
_nextMuzzle = ["All"] call FUNC(findNextGrenadeMuzzle);
|
_nextMuzzle = ["All"] call FUNC(findNextGrenadeMuzzle);
|
||||||
|
|
||||||
if (_nextMuzzle != "") then {
|
if (_nextMuzzle != "") then {
|
||||||
|
|
||||||
|
|
||||||
private ["_magazines", "_magazine", "_count", "_return"];
|
private ["_magazines", "_magazine", "_count", "_return"];
|
||||||
_magazines = GVAR(AllMagazines) select (GVAR(AllMuzzles) find _nextMuzzle);
|
_magazines = GVAR(AllMagazines) select (GVAR(AllMuzzles) find _nextMuzzle);
|
||||||
reverse _magazines;
|
reverse _magazines;
|
||||||
|
|
||||||
_magazine = "";
|
_magazine = "";
|
||||||
_count = {_return = _x in _magazines; if (_return) then {_magazine = _x}; _return} count magazines _unit;
|
_count = {_return = _x in _magazines; if (_return) then {_magazine = _x}; _return} count magazines _unit;
|
||||||
|
|
||||||
// There is a muzzle with magazines --> cycle to it
|
// There is a muzzle with magazines --> cycle to it
|
||||||
[_unit, _nextMuzzle] call FUNC(setNextGrenadeMuzzle);
|
[_unit, _nextMuzzle] call FUNC(setNextGrenadeMuzzle);
|
||||||
|
|
||||||
[_magazine, _count] call FUNC(displayGrenadeTypeAndNumber);
|
[_magazine, _count] call FUNC(displayGrenadeTypeAndNumber);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// There is a no muzzle with magazines --> select nothing
|
// There is a no muzzle with magazines --> select nothing
|
||||||
GVAR(CurrentGrenadeMuzzleFrag) = ""; GVAR(CurrentGrenadeMuzzleOther) = "";
|
GVAR(CurrentGrenadeMuzzleFrag) = ""; GVAR(CurrentGrenadeMuzzleOther) = "";
|
||||||
|
|
||||||
if (GVAR(DisplayText)) then {
|
if (GVAR(DisplayText)) then {
|
||||||
_text = [localize "STR_ACE_WeaponSelect_NoGrenadesLeft", [1,0,0]] call EFUNC(common,stringToColoredText);
|
_text = [localize "STR_ACE_WeaponSelect_NoGrenadesLeft", [1,0,0]] call EFUNC(common,stringToColoredText);
|
||||||
[composeText [lineBreak, _text]] call EFUNC(common,displayTextStructured);
|
[composeText [lineBreak, _text]] call EFUNC(common,displayTextStructured);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
if (_nextMuzzle in GVAR(FragMuzzles)) then {
|
if (_nextMuzzle in GVAR(FragMuzzles)) then {
|
||||||
GVAR(CurrentGrenadeMuzzleFrag) = _nextMuzzle;
|
GVAR(CurrentGrenadeMuzzleFrag) = _nextMuzzle;
|
||||||
GVAR(CurrentGrenadeMuzzleIsFrag) = true;
|
GVAR(CurrentGrenadeMuzzleIsFrag) = true;
|
||||||
} else {
|
} else {
|
||||||
GVAR(CurrentGrenadeMuzzleOther) = _nextMuzzle;
|
GVAR(CurrentGrenadeMuzzleOther) = _nextMuzzle;
|
||||||
GVAR(CurrentGrenadeMuzzleIsFrag) = false;
|
GVAR(CurrentGrenadeMuzzleIsFrag) = false;
|
||||||
};
|
};
|
||||||
|
@ -11,34 +11,34 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_unit", "_nextMuzzle"];
|
private ["_text", "_nextMuzzle"];
|
||||||
|
|
||||||
_unit = _this select 0;
|
PARAMS_1(_unit);
|
||||||
|
|
||||||
_nextMuzzle = ["Frag"] call FUNC(findNextGrenadeMuzzle);
|
_nextMuzzle = ["Frag"] call FUNC(findNextGrenadeMuzzle);
|
||||||
|
|
||||||
if (_nextMuzzle != "") then {
|
if (_nextMuzzle != "") then {
|
||||||
GVAR(CurrentGrenadeMuzzleFrag) = _nextMuzzle;
|
GVAR(CurrentGrenadeMuzzleFrag) = _nextMuzzle;
|
||||||
|
|
||||||
private ["_magazines", "_magazine", "_count", "_return"];
|
private ["_magazines", "_magazine", "_count", "_return"];
|
||||||
_magazines = GVAR(FragMagazines) select (GVAR(FragMuzzles) find _nextMuzzle);
|
_magazines = GVAR(FragMagazines) select (GVAR(FragMuzzles) find _nextMuzzle);
|
||||||
reverse _magazines;
|
reverse _magazines;
|
||||||
|
|
||||||
_magazine = "";
|
_magazine = "";
|
||||||
_count = {_return = _x in _magazines; if (_return) then {_magazine = _x}; _return} count magazines _unit;
|
_count = {_return = _x in _magazines; if (_return) then {_magazine = _x}; _return} count magazines _unit;
|
||||||
|
|
||||||
// There is a muzzle with magazines --> cycle to it
|
// There is a muzzle with magazines --> cycle to it
|
||||||
[_unit, _nextMuzzle] call FUNC(setNextGrenadeMuzzle);
|
[_unit, _nextMuzzle] call FUNC(setNextGrenadeMuzzle);
|
||||||
|
|
||||||
[_magazine, _count] call FUNC(displayGrenadeTypeAndNumber);
|
[_magazine, _count] call FUNC(displayGrenadeTypeAndNumber);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// There is a no muzzle with magazines --> select nothing
|
// There is a no muzzle with magazines --> select nothing
|
||||||
GVAR(CurrentGrenadeMuzzleFrag) = "";
|
GVAR(CurrentGrenadeMuzzleFrag) = "";
|
||||||
if (GVAR(DisplayText)) then {
|
if (GVAR(DisplayText)) then {
|
||||||
_text = [localize "STR_ACE_WeaponSelect_NoFragsLeft", [1,0,0]] call EFUNC(common,stringToColoredText);
|
_text = [localize "STR_ACE_WeaponSelect_NoFragsLeft", [1,0,0]] call EFUNC(common,stringToColoredText);
|
||||||
[composeText [lineBreak, _text]] call EFUNC(common,displayTextStructured);
|
[composeText [lineBreak, _text]] call EFUNC(common,displayTextStructured);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
GVAR(CurrentGrenadeMuzzleIsFrag) = true;
|
GVAR(CurrentGrenadeMuzzleIsFrag) = true;
|
||||||
|
@ -11,34 +11,34 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_unit", "_nextMuzzle"];
|
private ["_nextMuzzle", "_text"];
|
||||||
|
|
||||||
_unit = _this select 0;
|
PARAMS_1(_unit);
|
||||||
|
|
||||||
_nextMuzzle = ["NonFrag"] call FUNC(findNextGrenadeMuzzle);
|
_nextMuzzle = ["NonFrag"] call FUNC(findNextGrenadeMuzzle);
|
||||||
|
|
||||||
if (_nextMuzzle != "") then {
|
if (_nextMuzzle != "") then {
|
||||||
GVAR(CurrentGrenadeMuzzleOther) = _nextMuzzle;
|
GVAR(CurrentGrenadeMuzzleOther) = _nextMuzzle;
|
||||||
|
|
||||||
private ["_magazines", "_magazine", "_count", "_return"];
|
private ["_magazines", "_magazine", "_count", "_return"];
|
||||||
_magazines = GVAR(NonFragMagazines) select (GVAR(NonFragMuzzles) find _nextMuzzle);
|
_magazines = GVAR(NonFragMagazines) select (GVAR(NonFragMuzzles) find _nextMuzzle);
|
||||||
reverse _magazines;
|
reverse _magazines;
|
||||||
|
|
||||||
_magazine = "";
|
_magazine = "";
|
||||||
_count = {_return = _x in _magazines; if (_return) then {_magazine = _x}; _return} count magazines _unit;
|
_count = {_return = _x in _magazines; if (_return) then {_magazine = _x}; _return} count magazines _unit;
|
||||||
|
|
||||||
// There is a muzzle with magazines --> cycle to it
|
// There is a muzzle with magazines --> cycle to it
|
||||||
[_unit, _nextMuzzle] call FUNC(setNextGrenadeMuzzle);
|
[_unit, _nextMuzzle] call FUNC(setNextGrenadeMuzzle);
|
||||||
|
|
||||||
[_magazine, _count] call FUNC(displayGrenadeTypeAndNumber);
|
[_magazine, _count] call FUNC(displayGrenadeTypeAndNumber);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// There is a no muzzle with magazines --> select nothing
|
// There is a no muzzle with magazines --> select nothing
|
||||||
GVAR(CurrentGrenadeMuzzleOther) = "";
|
GVAR(CurrentGrenadeMuzzleOther) = "";
|
||||||
if (GVAR(DisplayText)) then {
|
if (GVAR(DisplayText)) then {
|
||||||
_text = [localize "STR_ACE_WeaponSelect_NoMiscGrenadeLeft", [1,0,0]] call EFUNC(common,stringToColoredText);
|
_text = [localize "STR_ACE_WeaponSelect_NoMiscGrenadeLeft", [1,0,0]] call EFUNC(common,stringToColoredText);
|
||||||
[composeText [lineBreak, _text]] call EFUNC(common,displayTextStructured);
|
[composeText [lineBreak, _text]] call EFUNC(common,displayTextStructured);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
GVAR(CurrentGrenadeMuzzleIsFrag) = false;
|
GVAR(CurrentGrenadeMuzzleIsFrag) = false;
|
||||||
|
@ -17,19 +17,15 @@ private ["_unit", "_muzzle"];
|
|||||||
_unit = _this select 0;
|
_unit = _this select 0;
|
||||||
_muzzle = _this select 1;
|
_muzzle = _this select 1;
|
||||||
|
|
||||||
private ["_uniformMags", "_vestMags", "_backPackMags"];
|
private ["_uniformMags", "_vestMags", "_backpackMags", "_i", "_uniformMagsToRemove", "_vestMagsToRemove", "_backpackMagsToRemove", "_firstMagazine", "_throwMuzzleNames"];
|
||||||
|
|
||||||
_uniformMags = getMagazineCargo uniformContainer _unit;
|
_uniformMags = getMagazineCargo uniformContainer _unit;
|
||||||
_vestMags = getMagazineCargo vestContainer _unit;
|
_vestMags = getMagazineCargo vestContainer _unit;
|
||||||
_backPackMags = getMagazineCargo backpackContainer _unit;
|
_backpackMags = getMagazineCargo backpackContainer _unit;
|
||||||
|
|
||||||
private ["_uniformMagsToRemove", "_vestMagsToRemove", "_backPackMagsToRemove"];
|
|
||||||
|
|
||||||
_uniformMagsToRemove = [];
|
_uniformMagsToRemove = [];
|
||||||
_vestMagsToRemove = [];
|
_vestMagsToRemove = [];
|
||||||
_backPackMagsToRemove = [];
|
_backpackMagsToRemove = [];
|
||||||
|
|
||||||
private ["_firstMagazine", "_throwMuzzleNames"];
|
|
||||||
|
|
||||||
_firstMagazine = "";
|
_firstMagazine = "";
|
||||||
_throwMuzzleNames = getArray (configfile >> "CfgWeapons" >> "Throw" >> "muzzles");
|
_throwMuzzleNames = getArray (configfile >> "CfgWeapons" >> "Throw" >> "muzzles");
|
||||||
@ -99,7 +95,7 @@ _throwMuzzleNames = getArray (configfile >> "CfgWeapons" >> "Throw" >> "muzzles"
|
|||||||
for [{_i = 0}, {_i < (_x select 1)}, {_i = _i + 1}] do {
|
for [{_i = 0}, {_i < (_x select 1)}, {_i = _i + 1}] do {
|
||||||
_unit removeItem (_x select 0);
|
_unit removeItem (_x select 0);
|
||||||
};
|
};
|
||||||
} forEach _backPackMagsToRemove;
|
} forEach _backpackMagsToRemove;
|
||||||
|
|
||||||
// Readd magazines
|
// Readd magazines
|
||||||
{
|
{
|
||||||
@ -118,4 +114,4 @@ _throwMuzzleNames = getArray (configfile >> "CfgWeapons" >> "Throw" >> "muzzles"
|
|||||||
for [{_i = 0}, {_i < (_x select 1)}, {_i = _i + 1}] do {
|
for [{_i = 0}, {_i < (_x select 1)}, {_i = _i + 1}] do {
|
||||||
_unit addItemToBackpack (_x select 0);
|
_unit addItemToBackpack (_x select 0);
|
||||||
};
|
};
|
||||||
} forEach _backPackMagsToRemove;
|
} forEach _backpackMagsToRemove;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
import fnmatch
|
import fnmatch
|
||||||
import os
|
import os
|
||||||
@ -21,7 +21,7 @@ def get_private_declare(content):
|
|||||||
priv_split = sorted(set(priv_split))
|
priv_split = sorted(set(priv_split))
|
||||||
priv_declared += priv_split;
|
priv_declared += priv_split;
|
||||||
|
|
||||||
srch = re.compile('PARAMS_[0-9].*|EXPLODE_[0-9]_PVT.*|DEFAULT_PARAM.*|KEY_PARAM.*')
|
srch = re.compile('PARAMS_[0-9].*|EXPLODE_[0-9]_PVT.*|DEFAULT_PARAM.*|KEY_PARAM.*|IGNORE_PRIVATE_WARNING.*')
|
||||||
priv_srch_declared = srch.findall(content)
|
priv_srch_declared = srch.findall(content)
|
||||||
priv_srch_declared = sorted(set(priv_srch_declared))
|
priv_srch_declared = sorted(set(priv_srch_declared))
|
||||||
|
|
||||||
@ -37,7 +37,7 @@ def get_private_declare(content):
|
|||||||
return priv_declared
|
return priv_declared
|
||||||
|
|
||||||
def check_privates(filepath):
|
def check_privates(filepath):
|
||||||
|
bad_count_file = 0
|
||||||
def pushClosing(t):
|
def pushClosing(t):
|
||||||
closingStack.append(closing.expr)
|
closingStack.append(closing.expr)
|
||||||
closing << Literal( closingFor[t[0]] )
|
closing << Literal( closingFor[t[0]] )
|
||||||
@ -70,17 +70,22 @@ def check_privates(filepath):
|
|||||||
if '_forEachIndex' in priv_use: priv_use.remove('_forEachIndex')
|
if '_forEachIndex' in priv_use: priv_use.remove('_forEachIndex')
|
||||||
if '_foreachIndex' in priv_declared: priv_declared.remove('_foreachIndex')
|
if '_foreachIndex' in priv_declared: priv_declared.remove('_foreachIndex')
|
||||||
if '_foreachIndex' in priv_use: priv_use.remove('_foreachIndex')
|
if '_foreachIndex' in priv_use: priv_use.remove('_foreachIndex')
|
||||||
|
if '_foreachindex' in priv_declared: priv_declared.remove('_foreachindex')
|
||||||
|
if '_foreachindex' in priv_use: priv_use.remove('_foreachindex')
|
||||||
|
|
||||||
missing = []
|
missing = []
|
||||||
for s in priv_use:
|
for s in priv_use:
|
||||||
if s not in priv_declared:
|
if s.lower() not in map(str.lower,priv_declared):
|
||||||
if s not in missing:
|
if s.lower() not in map(str.lower,missing):
|
||||||
missing.append(s)
|
missing.append(s)
|
||||||
|
|
||||||
if len(missing) > 0:
|
if len(missing) > 0:
|
||||||
print (filepath)
|
print (filepath)
|
||||||
for bad_priv in missing:
|
for bad_priv in missing:
|
||||||
print ('\t' + bad_priv)
|
print ('\t' + bad_priv)
|
||||||
|
bad_count_file = bad_count_file + 1
|
||||||
|
|
||||||
|
return bad_count_file
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|
||||||
@ -89,6 +94,7 @@ def main():
|
|||||||
print("#########################")
|
print("#########################")
|
||||||
|
|
||||||
sqf_list = []
|
sqf_list = []
|
||||||
|
bad_count = 0
|
||||||
|
|
||||||
parser = argparse.ArgumentParser()
|
parser = argparse.ArgumentParser()
|
||||||
parser.add_argument('-m','--module', help='only search specified module addon folder', required=False, default=".")
|
parser.add_argument('-m','--module', help='only search specified module addon folder', required=False, default=".")
|
||||||
@ -99,7 +105,10 @@ def main():
|
|||||||
sqf_list.append(os.path.join(root, filename))
|
sqf_list.append(os.path.join(root, filename))
|
||||||
|
|
||||||
for filename in sqf_list:
|
for filename in sqf_list:
|
||||||
check_privates(filename)
|
bad_count = bad_count + check_privates(filename)
|
||||||
|
|
||||||
|
|
||||||
|
print ("Bad Count {0}".format(bad_count))
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
||||||
|
Loading…
Reference in New Issue
Block a user