Merge branch 'release'

This commit is contained in:
PabstMirror 2015-09-15 16:16:10 -05:00
commit 1ea1094a73
107 changed files with 430 additions and 367 deletions

View File

@ -19,6 +19,8 @@
params ["_attachToVehicle", "_unit"];
TRACE_2("params",_attachToVehicle,_unit);
if ((vehicle _unit) != _unit) exitWith {false};
_attachedList = _attachToVehicle getVariable [QGVAR(attached), []];
if ((count _attachedList) == 0) exitWith {false};

View File

@ -25,14 +25,6 @@ class Extended_GetOut_EventHandlers {
};
};
};
//reset captivity and escorting status when getting killed
class Extended_Killed_EventHandlers {
class CAManBase {
class GVAR(AutoDetachCaptive) {
killed = QUOTE(_this call FUNC(handleKilled));
};
};
};
//mission start
class Extended_InitPost_EventHandlers {
class CAManBase {

View File

@ -19,7 +19,6 @@ PREP(doUnloadCaptive);
PREP(findEmptyNonFFVCargoSeat);
PREP(handleGetIn);
PREP(handleGetOut);
PREP(handleKilled);
PREP(handleOnUnconscious);
PREP(handlePlayerChanged);
PREP(handleRespawn);

View File

@ -1,32 +0,0 @@
/*
* Author: PabstMirror
* Handles when a unit is kill. Reset captivity and escorting status
*
* Arguments:
* 0: _oldUnit <OBJECT>
*
* Return Value:
* None
*
* Example:
* [bob1] call ACE_captives_fnc_handleKilled
*
* Public: No
*/
#include "script_component.hpp"
params ["_oldUnit"];
if (!local _oldUnit) exitWith {};
if (_oldUnit getVariable [QGVAR(isHandcuffed), false]) then {
[_oldUnit, false] call FUNC(setHandcuffed);
};
if (_oldUnit getVariable [QGVAR(isEscorting), false]) then {
_oldUnit setVariable [QGVAR(isEscorting), false, true];
};
if (_oldUnit getVariable [QGVAR(isSurrendering), false]) then {
[_oldUnit, false] call FUNC(setSurrendered);
};

View File

@ -20,20 +20,34 @@ params ["_unit","_dead"];
if (!local _unit) exitWith {};
//With respawn="group", we could be respawning into a unit that is handcuffed/captive
//If they are, reset and rerun the SET function
//if not, make sure to explicity disable the setCaptivityStatus, because captiveNum does not work correctly on respawn
// Group and side respawn can potentially respawn you as a captive unit
// Base and instant respawn cannot, so captive should be entirely reset
// So we explicity account for the respawn type
private ["_respawn"];
_respawn = [0] call BIS_fnc_missionRespawnType;
if (_unit getVariable [QGVAR(isHandcuffed), false]) then {
_unit setVariable [QGVAR(isHandcuffed), false];
[_unit, true] call FUNC(setHandcuffed);
if (_respawn > 3) then {
if (_unit getVariable [QGVAR(isHandcuffed), false]) then {
_unit setVariable [QGVAR(isHandcuffed), false];
[_unit, true] call FUNC(setHandcuffed);
};
if (_unit getVariable [QGVAR(isSurrendering), false]) then {
_unit setVariable [QGVAR(isSurrendering), false];
[_unit, true] call FUNC(setSurrendered);
};
} else {
if (_unit getVariable [QGVAR(isHandcuffed), false]) then {
[_unit, false] call FUNC(setHandcuffed);
};
[_unit, QGVAR(Handcuffed), false] call EFUNC(common,setCaptivityStatus);
};
if (_unit getVariable [QGVAR(isSurrendering), false]) then {
_unit setVariable [QGVAR(isSurrendering), false];
[_unit, true] call FUNC(setSurrendered);
} else {
if (_unit getVariable [QGVAR(isSurrendering), false]) then {
[_unit, false] call FUNC(setSurrendered);
};
[_unit, QGVAR(Surrendered), false] call EFUNC(common,setCaptivityStatus);
if (_oldUnit getVariable [QGVAR(isEscorting), false]) then {
_oldUnit setVariable [QGVAR(isEscorting), false, true];
};
};

View File

@ -25,4 +25,4 @@ if (!_activated) exitWith {};
[_logic, QGVAR(enable), "enable"] call EFUNC(common,readSettingFromModule);
diag_log text "[ACE]: Cargo Module Initialized.";
ACE_LOGINFO("Cargo Module Initialized.");

View File

@ -42,7 +42,7 @@
["HeadbugFixUsed", {
PARAMS_2(_profileName,_animation);
diag_log text format ["[ACE] Headbug Used: Name: %1, Animation: %2", _profileName, _animation];
ACE_LOGINFO_2("Headbug Used: Name: %1, Animation: %2",_profileName,_animation);
}] call FUNC(addEventHandler);
@ -102,7 +102,7 @@ if (_currentVersion != _previousVersion) then {
// Handle JIP scenario
if(!isServer) then {
["PlayerJip", {
diag_log text format["[ACE] * JIP event synchronization initialized"];
ACE_LOGINFO("JIP event synchronization initialized");
["SEH_all", [player]] call FUNC(serverEvent);
}] call FUNC(addEventHandler);
} else {
@ -128,13 +128,13 @@ call FUNC(checkFiles);
if (isNil QGVAR(settings) || {(!isServer) && (isNil QEGVAR(modules,serverModulesRead))}) exitWith {
if (!_waitingMsgSent) then {
_args set [0, true];
diag_log text format["[ACE] Waiting on settings from server"];
ACE_LOGINFO("Waiting on settings from server...");
};
};
[(_this select 1)] call cba_fnc_removePerFrameHandler;
diag_log text format["[ACE] Settings received from server"];
ACE_LOGINFO("Settings received from server.");
// Event so that ACE_Modules have their settings loaded:
["InitSettingsFromModules", []] call FUNC(localEvent);
@ -145,7 +145,7 @@ call FUNC(checkFiles);
call FUNC(loadSettingsLocalizedText);
};
diag_log text format["[ACE] Settings initialized"];
ACE_LOGINFO("Settings initialized.");
//Event that settings are safe to use:
["SettingsInitialized", []] call FUNC(localEvent);
@ -284,7 +284,7 @@ GVAR(OldVisibleMap) = false;
GVAR(OldPlayerWeapon) = _newPlayerWeapon;
["playerWeaponChanged", [ACE_player, _newPlayerWeapon]] call FUNC(localEvent);
};
// "visibleMapChanged" event
_newVisibleMap = visibleMap;
if (!_newVisibleMap isEqualTo GVAR(OldVisibleMap)) then {
@ -292,9 +292,9 @@ GVAR(OldVisibleMap) = false;
GVAR(OldVisibleMap) = _newVisibleMap;
["visibleMapChanged", [ACE_player, _newVisibleMap]] call FUNC(localEvent);
};
END_COUNTER(stateChecker);
}, 0, []] call CBA_fnc_addPerFrameHandler;

View File

@ -11,22 +11,22 @@ PARAMS_2(_eventType,_event);
if (_eventType == "ACEg") then {
_eventName = _event select 0;
_eventArgs = _event select 1;
_eventNames = GVAR(events) select 0;
_eventIndex = _eventNames find _eventName;
if (_eventIndex != -1) then {
_events = (GVAR(events) select 1) select _eventIndex;
#ifdef DEBUG_EVENTS
diag_log text format[ARR_2("* Net Event %1",_eventName)];
diag_log text format[ARR_2(" args=%1",_eventArgs)];
ACE_LOGINFO_1("* Net Event %1",_eventName);
ACE_LOGINFO_1(" args=%1",_eventArgs);
#endif
{
if (!isNil "_x") then {
_eventArgs call CALLSTACK_NAMED(_x, format[ARR_3("Net Event %1 ID: %2",_eventName,_forEachIndex)]);
_eventArgs call CALLSTACK_NAMED(_x, FORMAT_2("Net Event %1 ID: %2",_eventName,_forEachIndex);
#ifdef DEBUG_EVENTS_CALLSTACK
diag_log text format[ARR_2(" ID: %1",_forEachIndex)];
ACE_LOGINFO_1(" ID: %1",_forEachIndex);
#endif
};
} forEach _events;
@ -38,7 +38,7 @@ if (_eventType == "ACEc") then {
_eventName = _event select 0;
_eventTargets = _event select 1;
_eventArgs = _event select 2;
_sentEvents = [];
if (!IS_ARRAY(_eventTargets)) then {
_eventTargets = [_eventTargets];
@ -72,4 +72,4 @@ if (_eventType == "ACEc") then {
};
} forEach _eventTargets;
};
};
};

View File

@ -1,16 +1,16 @@
/*
* Author: jaynus
*
*
* Receives either requests for synchronization from clients, or the synchronization data from the server.
*
* Arguments [Client] :
* 0: eventName (String)
* 1: eventLog (Array)
*
*
* Arguments [Server] :
* 0: eventName (String)
* 1: client (Object)
*
*
* Return value:
* Boolean of success
*/
@ -24,14 +24,14 @@ if(isServer) then {
// Find the event name, and shovel out the events to the client
PARAMS_2(_eventName,_client);
private["_eventEntry", "_eventLog"];
if(!HASH_HASKEY(GVAR(syncedEvents),_eventName)) exitWith {
diag_log text format["[ACE] Error, request for synced event - key not found."];
ACE_LOGERROR("Request for synced event - key not found.");
false
};
_eventEntry = HASH_GET(GVAR(syncedEvents),_eventName);
_eventLog = _eventEntry select 1;
["SEH_s", _client, [_eventName, _eventLog] ] call FUNC(targetEvent);
} else {
PARAMS_2(_eventName,_eventLog);
@ -42,7 +42,7 @@ if(isServer) then {
_eventArgs = _x select 1;
[_eventName, _eventArgs, (_x select 2)] call FUNC(_handleSyncedEvent);
} forEach _eventLog;
diag_log text format["[ACE] + [%1] synchronized", _eventName];
ACE_LOGINFO_1("[%1] synchronized",_eventName);
};
true
true

View File

@ -1,13 +1,13 @@
/*
* Author: jaynus
*
*
* Handles synced events being received. Server will log them, and server/client will execute them.
*
* Arguments [Client] :
* 0: eventName (String)
* 1: arguments (Array)
* 2: ttl (Scalar)
*
*
* Return value:
* Boolean of success
*/
@ -17,7 +17,7 @@ PARAMS_3(_name,_args,_ttl);
private["_internalData", "_eventLog", "_eventCode"];
if(!HASH_HASKEY(GVAR(syncedEvents),_name)) exitWith {
diag_log text format["[ACE] Error, synced event key not found."];
ACE_LOGERROR("Synced event key not found.");
false
};
@ -33,4 +33,4 @@ if(isServer) then {
};
_eventCode = _internalData select 0;
_args call _eventCode;
_args call _eventCode;

View File

@ -5,9 +5,9 @@
*
* Argument:
* 0: Name (String)
* 1: Handler (Code)
* 1: Handler (Code)
* 2: TTL (Number or Code) [Optional]
*
*
* Return value:
* Boolean of success
*/
@ -25,10 +25,10 @@ if( (count _this) > 2) then {
};
if(HASH_HASKEY(GVAR(syncedEvents),_name)) exitWith {
diag_log text format["[ACE] Error, duplicate synced event creation."];
ACE_LOGERROR("Duplicate synced event creation.");
false
};
_eventId = [_name, FUNC(_handleSyncedEvent)] call FUNC(addEventHandler);
_data = [_handler,[],_ttl,_eventId];
HASH_SET(GVAR(syncedEvents),_name,_data);
HASH_SET(GVAR(syncedEvents),_name,_data);

View File

@ -87,7 +87,9 @@ switch ((_type select 0)) do {
_unit setPosATL _pos;
};
};
default {diag_log format ["ACE: Incorrect item type passed to %1, passed: %2",QFUNC(AddToInventory),_type];};
default {
ACE_LOGWARNING_2("Incorrect item type passed to %1, passed: %2",QFUNC(AddToInventory),_type);
};
};
[_addedToPlayer,_unit]

View File

@ -10,6 +10,8 @@
#include "script_component.hpp"
if (!hasInterface) exitWith {};
private ["_show"];
PARAMS_1(_id);
_show = if (count _this > 1) then {_this select 1} else {false};

View File

@ -40,7 +40,7 @@ if (((_namespace getVariable [_uid, [-99999]]) select 0) < ACE_diagTime) then {
private ["_varName","_cacheList"];
// _eventName is defined on the function that calls the event
#ifdef DEBUG_MODE_FULL
diag_log text format ["ACE: Clear cached variables on event: %1", _eventName];
ACE_LOGINFO_1("Clear cached variables on event: %1",_eventName);
#endif
// Get the list of caches to clear
_varName = format [QGVAR(clearCache_%1),_eventName];
@ -58,9 +58,9 @@ if (((_namespace getVariable [_uid, [-99999]]) select 0) < ACE_diagTime) then {
_cacheList pushBack [_namespace, _uid];
};
#ifdef DEBUG_MODE_FULL
diag_log format ["Calculated result: %1 %2", _namespace, _uid];
ACE_LOGINFO_2("Calculated result: %1 %2",_namespace,_uid);
} else {
diag_log format ["Cached result : %1 %2", _namespace, _uid];
ACE_LOGINFO_2("Cached result: %1 %2",_namespace,_uid);
#endif
};

View File

@ -17,7 +17,7 @@
private "_version";
_version = getText (configFile >> "CfgPatches" >> "ace_main" >> "versionStr");
diag_log text format ["[ACE]: ACE is version %1.", _version];
ACE_LOGINFO_1("ACE is version %1.",_version);
private "_addons";
//_addons = activatedAddons; // broken with High-Command module, see #2134
@ -30,7 +30,7 @@ _addons = [_addons, {_this find "ace_" == 0}] call FUNC(filter);
private "_errorMsg";
_errorMsg = format ["File %1.pbo is outdated.", _x];
diag_log text format ["[ACE] ERROR: %1", _errorMsg];
ACE_LOGERROR(_errorMsg);
if (hasInterface) then {
["[ACE] ERROR", _errorMsg, {findDisplay 46 closeDisplay 0}] call FUNC(errorMessage);
@ -46,14 +46,14 @@ _addons = [_addons, {_this find "ace_" == 0}] call FUNC(filter);
private "_errorMsg";
_errorMsg = format ["Extension %1.dll not installed.", _x];
diag_log text format ["[ACE] ERROR: %1", _errorMsg];
ACE_LOGERROR(_errorMsg);
if (hasInterface) then {
["[ACE] ERROR", _errorMsg, {findDisplay 46 closeDisplay 0}] call FUNC(errorMessage);
};
} else {
// Print the current extension version
diag_log text format ["[ACE] Extension version: %1: %2", _x, (_x callExtension "version")];
ACE_LOGINFO_2("Extension version: %1: %2",_x,(_x callExtension "version"));
};
} forEach getArray (configFile >> "ACE_Extensions" >> "extensions");
@ -80,7 +80,7 @@ if (isMultiplayer) then {
private "_errorMsg";
_errorMsg = format ["Client/Server Version Mismatch. Server: %1, Client: %2.", GVAR(ServerVersion), _version];
diag_log text format ["[ACE] ERROR: %1", _errorMsg];
ACE_LOGERROR(_errorMsg);
if (hasInterface) then {
["[ACE] ERROR", _errorMsg, {findDisplay 46 closeDisplay 0}] call FUNC(errorMessage);
@ -91,7 +91,7 @@ if (isMultiplayer) then {
if !(_addons isEqualTo []) then {
_errorMsg = format ["Client/Server Addon Mismatch. Client has extra addons: %1.",_addons];
diag_log text format ["[ACE] ERROR: %1", _errorMsg];
ACE_LOGERROR(_errorMsg);
if (hasInterface) then {
["[ACE] ERROR", _errorMsg, {findDisplay 46 closeDisplay 0}] call FUNC(errorMessage);

View File

@ -67,7 +67,7 @@ if (!isServer) then {
};
//[_error, "{systemChat _this}"] call FUNC(execRemoteFnc);
diag_log text _error;
ACE_LOGERROR(_error);
if (_mode < 2) then {
_text = composeText [lineBreak, parseText format ["<t align='center'>%1</t>", _text]];

View File

@ -13,7 +13,7 @@
*
*/
#include "script_component.hpp"
PARAMS_3(_unit,_target,_lockTarget);
if (isNil "_lockTarget") then {_lockTarget = false};
@ -22,7 +22,7 @@ private "_owner";
_owner = _target getVariable [QGVAR(owner), objNull];
if (!isNull _owner && {!isNull _unit} && {_unit != _owner}) then {
diag_log text "[ACE] ERROR: Claiming already owned object.";
ACE_LOGERROR("Claiming already owned object.");
};
// transfer this immediately

View File

@ -55,4 +55,4 @@ if (_level <= _defaultLoglevel) then {
// pass it onwards to the log function:
// [0, [], compile format["%1",_msg], true] call FUNC(log);
};
true
true

View File

@ -23,7 +23,7 @@ _force = False;
// no animation given
if (isNil "_animation") exitWith {
diag_log format ["[ACE] ERROR: No animation specified in %1", _fnc_scriptNameParent];
ACE_LOGERROR_1("No animation specified in %1.",_fnc_scriptNameParent);
};
if (isNil "_priority") then {

View File

@ -5,7 +5,7 @@ PARAMS_1(_target);
{
if (isNil "_x") then {
diag_log text format ["[ACE] ERROR: No argument and function for remote function. ID: %1", _forEachIndex];
ACE_LOGERROR_1("No argument and function for remote function. ID: %1",_forEachIndex);
} else {
if (typeName _x == "ARRAY") then {
[_x select 0, _target] call (_x select 1);

View File

@ -20,7 +20,7 @@ private ["_newArray", "_index"];
PARAMS_2(_array,_code);
if (isNil "_array") exitWith {
diag_log text format ["[ACE] ERROR: No array for function filter in %1", _fnc_scriptNameParent];
ACE_LOGERROR_1("No array for function filter in %1.",_fnc_scriptNameParent);
[]
};

View File

@ -44,7 +44,7 @@ _letterGrid = false;
if (((toLower _formatX) find "a") != -1) then {_letterGrid = true};
if (((toLower _formatY) find "a") != -1) then {_letterGrid = true};
if (_letterGrid) exitWith {
diag_log text format ["[ACE] Map Grid Warning (%1) - Map uses letter grids [%2,%3]", worldName, _formatX, _formatY];
ACE_LOGWARNING_3("Map Grid Warning (%1) - Map uses letter grids [%2, %3]",worldName,_formatX,_formatY);
};
//Start at [0, 500] and move north until we get a change in grid
@ -64,13 +64,13 @@ _stepXat5 = _stepX * 10 ^ ((count _formatX) - 5);
_stepYat5 = -1 * _stepY * 10 ^ ((count _formatY) - 5);
if (_stepYat5 < 0) then {
diag_log text format ["[ACE] Map Grid Warning (%1) - Northing is reversed", worldName];
ACE_LOGWARNING_1("Map Grid Warning (%1) - Northing is reversed.",worldName);
};
if (_stepXat5 != 1) then {
diag_log text format ["[ACE] Map Grid Warning (%1) - MGRS 10 digit grid does not equal 1 meter: (%2) for x", worldName, _stepXat5];
ACE_LOGWARNING_2("Map Grid Warning (%1) - MGRS 10 digit grid does not equal 1 meter: (%2) for x.",worldName,_stepXat5);
};
if ((_stepYat5 != 1) && {_stepYat5 != -1}) then {
diag_log text format ["[ACE] Map Grid Warning (%1) - MGRS 10 digit grid does not equal 1 meter: (%2) for y", worldName, _stepXat5];
ACE_LOGWARNING_2("Map Grid Warning (%1) - MGRS 10 digit grid does not equal 1 meter: (%2) for y.",worldName,_stepXat5);
};
GVAR(mapGridData) = [_offsetX, _realOffsetY, _stepXat5, _stepYat5];

View File

@ -42,7 +42,7 @@ _parseConfigForDisplayNames = {
if !([configFile >> "ACE_Settings" >> _name] call _parseConfigForDisplayNames) then {
if !([configFile >> "ACE_ServerSettings" >> _name] call _parseConfigForDisplayNames) then {
if !([missionConfigFile >> "ACE_Settings" >> _name] call _parseConfigForDisplayNames) then {
diag_log text format ["[ACE] - Setting found, but couldn't localize [%1] (server has but we don't?)", _name];
ACE_LOGWARNING_1("Setting found, but couldn't localize [%1] (server has but we don't?)",_name);
};
};
};

View File

@ -21,16 +21,16 @@ _eventIndex = _eventNames find _eventName;
if(_eventIndex != -1) then {
_events = (GVAR(events) select 1) select _eventIndex;
#ifdef DEBUG_EVENTS
diag_log text format[ARR_2("* Local Event: %1",_eventName)];
diag_log text format[ARR_2(" args=%1",_eventArgs)];
ACE_LOGINFO_1("* Local Event: %1",_eventName);
ACE_LOGINFO_1(" args=%1",_eventArgs);
#endif
{
if(!isNil "_x") then {
_eventArgs call CALLSTACK_NAMED(_x, format[ARR_3("Local Event %1 ID: %2",_eventName,_forEachIndex)]);
_eventArgs call CALLSTACK_NAMED(_x, FORMAT_2("Local Event %1 ID: %2",_eventName,_forEachIndex));
#ifdef DEBUG_EVENTS_CALLSTACK
diag_log text format[ARR_2(" ID: %1",_forEachIndex)];
ACE_LOGINFO_1(" ID: %1",_forEachIndex);
#endif
};
} forEach _events;
};
};

View File

@ -21,7 +21,7 @@ _array = + _this select 0;
_code = _this select 1;
if (isNil "_array") exitWith {
diag_log text format ["[ACE] ERROR: No array for function map in %1", _fnc_scriptNameParent];
ACE_LOGERROR_1("No array for function map in %1.",_fnc_scriptNameParent);
[]
};

View File

@ -22,4 +22,4 @@ if !(_activated) exitWith {};
[_logic, QGVAR(checkPBOsCheckAll), "CheckAll" ] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(checkPBOsWhitelist), "Whitelist" ] call EFUNC(common,readSettingFromModule);
diag_log text format ["[ACE]: Check-PBOs Module Initialized. Mode: %1.", GVAR(checkPBOsAction)];
ACE_LOGINFO_1("Check-PBOs Module Initialized. Mode: %1.",GVAR(checkPBOsAction));

View File

@ -44,4 +44,4 @@ if !(_activated) exitWith {};
};
} count _units;
diag_log text "[ACE]: WEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE.";
ACE_LOGINFO("WEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE.");

View File

@ -20,7 +20,7 @@ PARAMS_3(_logic,_settingName,_moduleVariable);
// Check if the parameter is defined in the module
if (isNil {_logic getVariable _moduleVariable}) exitWith {
diag_log text format["[ACE]: Warning in %1 module: %2 setting is missing. Probably an obsolete version of the module is used in the mission.", typeOf _logic, _moduleVariable];
ACE_LOGWARNING_2("Warning in %1 module: %2 setting is missing. Probably an obsolete version of the module is used in the mission.",typeOf _logic,_moduleVariable);
};
// Set the setting globally and force it

View File

@ -5,7 +5,7 @@
*
* Argument:
* 0: Name (String)
*
*
* Return value:
* Boolean of success
*/
@ -16,7 +16,7 @@ PARAMS_1(_name);
private ["_data", "_eventId"];
if (!HASH_HASKEY(GVAR(syncedEvents),_name)) exitWith {
diag_log text format["[ACE] Error, synced event key not found."];
ACE_LOGERROR("Synced event key not found.");
false
};
@ -24,4 +24,4 @@ _data = HASH_GET(GVAR(syncedEvents),_name);
_eventId = _data select 3;
[_eventId] call ace_common_fnc_removeEventHandler;
HASH_REM(GVAR(syncedEvents),_name);
HASH_REM(GVAR(syncedEvents),_name);

View File

@ -16,8 +16,8 @@
PARAMS_2(_eventName,_eventArgs);
#ifdef DEBUG_EVENTS
diag_log text format[ARR_2("* Server Event: %1",_eventName)];
diag_log text format[ARR_2(" args=%1",_eventArgs)];
ACE_LOGINFO_1("* Server Event: %1",_eventName);
ACE_LOGINFO_1(" args=%1",_eventArgs);
#endif
ACEg = [_eventName, _eventArgs];

View File

@ -7,7 +7,7 @@
* 0: Name (String)
* 1: Arguments (Array)
* 2: TTL (Number or Code) [Optional] for this specific event call
*
*
* Return value:
* Boolean of success
*/
@ -25,9 +25,9 @@ if( (count _this) > 2) then {
};
if(!HASH_HASKEY(GVAR(syncedEvents),_name)) exitWith {
diag_log text format["[ACE] Error, synced event key not found."];
ACE_LOGERROR("Synced event key not found.");
false
};
_eventData = [_name, _args,_ttl];
["SEH", _eventData] call FUNC(globalEvent);
["SEH", _eventData] call FUNC(globalEvent);

View File

@ -21,8 +21,8 @@
PARAMS_3(_eventName,_eventTargets,_eventArgs);
#ifdef DEBUG_EVENTS
diag_log text format[ARR_3("* Target Event: %1 - %2",_eventName,_eventTargets)];
diag_log text format[ARR_2(" args=%1",_eventArgs)];
ACE_LOGINFO_2("* Target Event: %1 - %2",_eventName,_eventTargets);
ACE_LOGINFO_1(" args=%1",_eventArgs);
#endif
ACEc = [_eventName, _eventTargets, _eventArgs];
@ -30,4 +30,4 @@ if(!isServer) then {
publicVariableServer "ACEc";
} else {
["ACEc", ACEc] call FUNC(_handleNetEvent);
};
};

View File

@ -37,11 +37,15 @@ if (_vehicle isKindOf "Ship" ) then {
};
TRACE_1("getPosASL Vehicle Check", getPosASL _vehicle);
if (!_validVehiclestate) exitwith { diag_log format["Unable to unload patient because invalid (%1) vehicle state. Either moving or Not close enough on the ground. position: %2 isTouchingGround: %3 Speed: %4", _vehicle, getPos _vehicle, isTouchingGround _vehicle, speed _vehicle]; false };
if (!_validVehiclestate) exitwith {
ACE_LOGWARNING_4("Unable to unload patient because invalid (%1) vehicle state. Either moving or Not close enough on the ground. position: %2 isTouchingGround: %3 Speed: %4",_vehicle,getPos _vehicle,isTouchingGround _vehicle,speed _vehicle);
false
};
diag_log str _emptyPos;
if (count _emptyPos == 0) exitwith {diag_log format["No safe empty spots to unload patient. %1", _emptyPos]; false}; //consider displaying text saying there are no safe places to exit the vehicle
if (count _emptyPos == 0) exitwith {
ACE_LOGWARNING_1("No safe empty spots to unload patient. %1",_emptyPos);
false
}; //consider displaying text saying there are no safe places to exit the vehicle
unassignVehicle _unit;
@ -75,4 +79,4 @@ _loaded = _vehicle getvariable [QGVAR(loaded_persons),[]];
_loaded = _loaded - [_unit];
_vehicle setvariable [QGVAR(loaded_persons),_loaded,true];
true
true

View File

@ -23,4 +23,4 @@ params ["_caller", "_target", "_errorMsg"];
if (_caller != ACE_player) exitWith {};
systemChat format ["Debug-Caller: Disarm finished from [%1] with code [%2]", _target, _errorMsg];
diag_log text format ["[ACE_Disarming] %1 - eventCallerFinish: %2", ACE_time, _this];
ACE_LOGINFO_2("%1 - eventCallerFinish: %2",ACE_time,_this);

View File

@ -22,6 +22,6 @@
params ["_caller", "_target", "_errorMsg"];
if (_errorMsg != "") then {
diag_log text format ["[ACE_Disarming] %1 - eventTargetFinish: %2", ACE_time, _this];
ACE_LOGINFO_2("%1 - eventTargetFinish: %2",ACE_time,_this);
["DisarmDebugCallback", [_caller], [_caller, _target, _errorMsg]] call EFUNC(common,targetEvent);
};

View File

@ -29,7 +29,7 @@ if (isServer) then {
}] call EFUNC(common,addEventHandler);
};
if !(hasInterface) exitWith {};
if (!hasInterface) exitWith {};
GVAR(PlacedCount) = 0;
GVAR(Setup) = objNull;

View File

@ -23,4 +23,4 @@ params ["_logic"];
[_logic, QGVAR(PunishNonSpecialists),"PunishNonSpecialists"] call EFUNC(Common,readSettingFromModule);
[_logic, QGVAR(ExplodeOnDefuse),"ExplodeOnDefuse"] call EFUNC(Common,readSettingFromModule);
diag_log text "[ACE]: Explosive Module Initialized.";
ACE_LOGINFO("Explosive Module Initialized.");

View File

@ -36,7 +36,7 @@ if (!isNull _setupPlaceholderObject) then {
};
if (isNil "_triggerConfig") exitWith {
diag_log format ["ACE_Explosives: Error config not passed to PlaceExplosive: %1", _this];
ACE_LOGERROR_1("Config not passed to PlaceExplosive: %1",_this);
objNull
};
@ -44,7 +44,7 @@ _magazineTrigger = ConfigFile >> "CfgMagazines" >> _magazineClass >> "ACE_Trigge
_triggerConfig = ConfigFile >> "ACE_Triggers" >> _triggerConfig;
if (isNil "_triggerConfig") exitWith {
diag_log format ["ACE_Explosives: Error config not found in PlaceExplosive: %1", _this];
ACE_LOGERROR_1("Config not found in PlaceExplosive: %1",_this);
objNull
};

View File

@ -1,7 +1,7 @@
#include "script_component.hpp"
// Exit on Headless as well
if !(hasInterface) exitWith {};
if (!hasInterface) exitWith {};
LOG(MSG_INIT);

View File

@ -1,6 +1,6 @@
//fnc_doSpall.sqf
#include "script_component.hpp"
// ACE_player sideChat "WAAAAAAAAAAAAAAAAAAAAA";
// ACE_player sideChat "WAAAAAAAAAAAAAAAAAAAAA";
private ["_hitData", "_initialData", "_hpData", "_object", "_foundObjects", "_index", "_foundObjecsts", "_roundType", "_round", "_caliber", "_explosive", "_idh", "_alive", "_exit", "_vm", "_velocity", "_oldVelocity", "_curVelocity", "_diff", "_polar", "_unitDir", "_spallPos", "_pos1", "_i", "_pos2", "_blah", "_data", "_spallPolar", "_warn", "_c", "_m", "_k", "_gC", "_fragPower", "_fragTypes", "_spread", "_spallCount", "_elev", "_dir", "_vel", "_spallFragVect", "_fragType", "_fragment", "_pos"];
@ -86,7 +86,7 @@ if(_alive || {_caliber >= 2.5} || {(_explosive > 0 && {_idh >= 1})}) then {
if(_gC == 0) then { _gC = 2440; _warn = true;};
if(_warn) then {
diag_log text format["Ammo class %1 lacks proper explosive properties definitions for frag!", _roundType]; //TODO: turn this off when we get closer to release
ACE_LOGWARNING_1("Ammo class %1 lacks proper explosive properties definitions for frag!",_roundType); //TODO: turn this off when we get closer to release
};
_fragPower = (((_m/_c)+_k)^-(1/2))*_gC;

View File

@ -67,7 +67,7 @@ _gC = getNumber(configFile >> "CfgAmmo" >> _shellType >> "ACE_frag_GURNEY_C");
if(_gC == 0) then { _gC = 2440; _warn = true;};
if(_warn) then {
diag_log text format["Ammo class %1 lacks proper explosive properties definitions for frag!", _shellType]; //TODO: turn this off when we get closer to release
ACE_LOGWARNING_1("Ammo class %1 lacks proper explosive properties definitions for frag!",_shellType); //TODO: turn this off when we get closer to release
};
_fragPower = (((_m/_c)+_k)^-(1/2))*_gC;
@ -187,9 +187,9 @@ if(_isArmed && (count _objects) > 0) then {
_sectorOffset = 360 * (_i - 1) / (_randomCount max 1);
_randomDir = random(_sectorSize);
_vec = [cos(_sectorOffset + _randomDir), sin(_sectorOffset + _randomDir), sin(30 - (random 45))];
_fp = (_fragPower-(random (_fragPowerRandom)));
_vel = _vec vectorMultiply _fp;
_fragType = round (random ((count _fragTypes)-1));
@ -197,7 +197,7 @@ if(_isArmed && (count _objects) > 0) then {
_fragObj setPosASL _lastPos;
_fragObj setVectorDir _vec;
_fragObj setVelocity _vel;
if(GVAR(traceFrags)) then {
GVAR(TOTALFRAGS) = GVAR(TOTALFRAGS) + 1;
[ACE_player, _fragObj, [1,0.5,0,1]] call FUNC(addTrack);
@ -205,7 +205,7 @@ if(_isArmed && (count _objects) > 0) then {
_fragCount = _fragCount + 1;
};
};
};
// #ifdef DEBUG_MODE_FULL
// ACE_player sideChat format["total frags: %1", GVAR(TOTALFRAGS)];

View File

@ -1,6 +1,6 @@
#include "script_component.hpp"
if !(hasInterface) exitWith {};
if (!hasInterface) exitWith {};
// Setup ppEffect
GVAR(GForces_CC) = ppEffectCreate ["ColorCorrections", 4215];

View File

@ -14,7 +14,7 @@
#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);
_interval = ACE_time - GVAR(lastUpdateTime);

View File

@ -14,6 +14,7 @@
* Public: Yes
*/
#include "script_component.hpp"
if (call FUNC(ExternalCamera)) exitWith {};
if ([ace_player] call FUNC(isGogglesVisible)) exitWith {
100 cutRsc["RscACE_GogglesEffects", "PLAIN",2,false];

View File

@ -16,6 +16,7 @@
* Public: No
*/
#include "script_component.hpp"
private["_postProcessColour", "_postProcessTintAmount", "_glassesClassname", "_glassImagePath"];
_glassesClassname = _this select 0;

View File

@ -4,7 +4,7 @@
["flashbangExplosion", DFUNC(flashbangExplosionEH)] call EFUNC(common,addEventHandler);
if !(hasInterface) exitWith {};
if (!hasInterface) exitWith {};
GVAR(flashbangPPEffectCC) = ppEffectCreate ["ColorCorrections", 4265];
GVAR(flashbangPPEffectCC) ppEffectForceInNVG true;

View File

@ -94,7 +94,7 @@ _affected = _grenade nearEntities ["CAManBase", 20];
}, [_light], 0.1] call EFUNC(common,waitAndExecute);
// blind player
if (_strength > 0.1) then {
if (_strength > 0.1 && hasInterface) then {
GVAR(flashbangPPEffectCC) ppEffectEnable true;
GVAR(flashbangPPEffectCC) ppEffectAdjust [1,1,(0.8 + _strength) min 1,[1,1,1,0],[0,0,0,1],[0,0,0,0]];
GVAR(flashbangPPEffectCC) ppEffectCommit 0.01;

View File

@ -20,5 +20,4 @@ if ((_logic getVariable "DisableEarRinging") != -1) then {
};
[_logic, QGVAR(enabledForZeusUnits), "enabledForZeusUnits"] call EFUNC(common,readSettingFromModule);
diag_log text "[ACE]: Hearing Module Initialized.";
ACE_LOGINFO("Hearing Module Initialized.");

View File

@ -140,12 +140,9 @@
<Portuguese>Ativar surdez em combate?</Portuguese>
</Key>
<Key ID="STR_ACE_Hearing_Module_Description">
<French>Activer la surdité au combat?</French>
<English>Controls combat deafness and ear ringing. When activated, players can be deafened when a gun is fired in their vicinity or an explosion takes place without hearing protection</English>
<Hungarian>Harci süketség engedélyezése?</Hungarian>
<Russian>Уменьшает способность игроков слышать при повреждении слуха</Russian>
</Key>
<Key ID="STR_ACE_Hearing_Module_Description">
<English>Controls combat deafness and ear ringing. When activated, players can be deafened when a gun is fired in their vicinity or an explosion takes place without hearing protection</English>
<Polish>Głuchota bojowa pojawia się w momentach, kiedy stoimy w pobliżu broni wielkokalibrowej bez ochrony słuchu, lub np. podczas ostrzału artyleryjskiego. Moduł ten pozwala na włączenie lub wyłączenie tego efektu.</Polish>
<German>Dieses Modul aktiviert/deaktiviert die Taubheit im Gefecht. Wenn aktiviert, können Spieler ohne Gehörschutz taub werden, wenn eine Waffe in ihrer Nähe abgefeuert wird oder eine Explosion stattfindet.</German>
<Czech>Ztráta sluchu je možná ve chvíly, kdy se v bezprostřední blízkosti střílí z velkorážní zbraně nebo při bombardování a osoba je bez ochrany sluchu (např. špunty). Tento modul umožňuje tuto věc povolit nebo zakázat.</Czech>

View File

@ -13,6 +13,7 @@
*/
#include "script_component.hpp"
if (!hasInterface) exitWith {};
params ["_huntIR"];
GVAR(huntIR) = _huntIR;

View File

@ -44,7 +44,7 @@ if (_parentPath isEqualTo ["ACE_MainActions"]) then {
_parentNode = [_actionTrees, _parentPath] call FUNC(findActionNode);
if (isNil {_parentNode}) exitWith {
ERROR("Failed to add action");
diag_log text format ["action (%1) to parent %2 on object %3 [%4]", (_action select 0), _parentPath, _objectType, _typeNum];
ACE_LOGERROR_4("action (%1) to parent %2 on object %3 [%4]",(_action select 0),_parentPath,_objectType,_typeNum);
};
// Add action node as children of the correct node of action tree

View File

@ -26,4 +26,4 @@ if !(_activated) exitWith {};
[_logic, QGVAR(EnableTeamManagement), "EnableTeamManagement"] call EFUNC(common,readSettingFromModule);
diag_log text "[ACE]: Interaction Module Initialized.";
ACE_LOGINFO("Interaction Module Initialized.");

View File

@ -1,9 +1,9 @@
// This is a debug function for displaying visible lasers for ourselves
#include "script_component.hpp"
diag_log text format["[ACE]: Laser Emitter Dump"];
ACE_LOGINFO("Laser Emitter Dump");
{
diag_log text format[" %1", _x];
diag_log text format[" %2", HASH_GET(GVAR(laserEmitters), _x)];
} forEach GVAR(laserEmitters) select 0;
{
ACE_LOGINFO_1(" %1", _x);
ACE_LOGINFO_1(" %1",HASH_GET(GVAR(laserEmitters),_x));
} forEach GVAR(laserEmitters) select 0;

View File

@ -4,7 +4,7 @@
// fixes laser when being captured. Needed, because the selectionPosition of the right hand is used
["SetHandcuffed", {if (_this select 1) then {(_this select 0) action ["GunLightOff", _this select 0]};}] call EFUNC(common,addEventHandler);
if !(hasInterface) exitWith {};
if (!hasInterface) exitWith {};
GVAR(nearUnits) = [];

View File

@ -84,6 +84,6 @@ switch (_currentWeaponType) do {
if (!_error) then {
[_description, _picture] call EFUNC(common,displayTextPicture);
} else {
diag_log text format ["Failed to add %1 to %2 - reverting to %3", _nextPointer, _weapon, _pointer];
ACE_LOGERROR_3("Failed to add %1 to %2 - reverting to %3",_nextPointer,_weapon,_pointer);
};
playSound "ACE_Sound_Click";

View File

@ -6,7 +6,7 @@
#define MAJOR 3
#define MINOR 3
#define PATCHLVL 0
#define BUILD 1
#define BUILD 2
#define VERSION MAJOR.MINOR.PATCHLVL.BUILD
#define VERSION_AR MAJOR,MINOR,PATCHLVL,BUILD

View File

@ -12,7 +12,7 @@
#include "script_component.hpp"
if !(hasInterface) exitWith {};
if (!hasInterface) exitWith {};
PARAMS_3(_logic,_units,_activated);
@ -22,5 +22,5 @@ if !(_activated) exitWith {};
[_logic, QGVAR(BFT_Interval), "Interval"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(BFT_HideAiGroups), "HideAiGroups"] call EFUNC(common,readSettingFromModule);
diag_log text "[ACE]: Blue Force Tracking Module initialized.";
ACE_LOGINFO("Blue Force Tracking Module Initialized.");
TRACE_2("[ACE]: Blue Force Tracking Module initialized.", GVAR(BFT_Interval), GVAR(BFT_HideAiGroups));

View File

@ -23,4 +23,4 @@ if !(_activated) exitWith {};
[_logic, QGVAR(mapLimitZoom), "MapLimitZoom" ] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(mapShowCursorCoordinates), "MapShowCursorCoordinates"] call EFUNC(common,readSettingFromModule);
diag_log text "[ACE]: Map Module Initialized.";
ACE_LOGINFO("Map Module Initialized.");

View File

@ -17,8 +17,6 @@ private ["_dir", "_params", "_control", "_button", "_screenPos", "_shiftKey", "_
_control = _this select 0;
_dir = _this select 1;
diag_log "Scroll";
diag_log _this;
_handled = false;
_handled = true;

View File

@ -33,6 +33,8 @@ GVAR(heartBeatSounds_Slow) = ["ACE_heartbeat_slow_1", "ACE_heartbeat_slow_2"];
// Initialize all effects
if (hasInterface) then {
_fnc_createEffect = {
private "_effect";
params ["_type", "_layer", "_default"];
@ -159,7 +161,7 @@ GVAR(lastHeartBeatSound) = ACE_time;
_heartRate = 60 + 40 * _pain;
};
if (_heartRate <= 0) exitwith {};
_interval = 60 / (_heartRate min 50);
_interval = 60 / (_heartRate min 40);
if ((ACE_player getVariable ["ACE_isUnconscious", false])) then {
if (GVAR(painEffectType) == 1) then {
@ -173,7 +175,7 @@ GVAR(lastHeartBeatSound) = ACE_time;
// Pain effect, no pain effect in zeus camera
if (isNull curatorCamera) then {
_strength = (_pain - (ACE_player getvariable [QGVAR(painSuppress), 0])) max 0;
_strength = ((_pain - (ACE_player getvariable [QGVAR(painSuppress), 0])) max 0) min 1;
_strength = _strength * (ACE_player getVariable [QGVAR(painCoefficient), GVAR(painCoefficient)]);
if (GVAR(painEffectType) == 1) then {
GVAR(effectPainCC) ppEffectEnable false;
@ -241,7 +243,7 @@ GVAR(lastHeartBeatSound) = ACE_time;
};
}, 0, []] call CBA_fnc_addPerFrameHandler;
};
["SettingsInitialized", {
if (GVAR(level) == 2) exitwith {
@ -279,7 +281,7 @@ GVAR(lastHeartBeatSound) = ACE_time;
if (hasInterface) then {
["PlayerJip", {
diag_log format["[ACE] JIP Medical init for player"];
ACE_LOGINFO("JIP Medical init for player.");
[player] call FUNC(init);
}] call EFUNC(common,addEventHandler);
};

Binary file not shown.

View File

@ -22,7 +22,7 @@ _bloodPressure = if (!alive _target) then {
} else {
[_target] call FUNC(getBloodPressure)
};
_bloodPressure params ["_bloodPressureHigh", "_bloodPressureLow"];
_bloodPressure params [ "_bloodPressureLow", "_bloodPressureHigh"];
_output = "";
_logOutPut = "";
if ([_caller] call FUNC(isMedic)) then {

View File

@ -14,7 +14,15 @@
*/
#include "script_component.hpp"
private ["_damageThreshold", "_damageBodyPart"];
#define INCREASE_CHANCE_HEAD 0.05
#define INCREASE_CHANCE_TORSO 0.03
#define INCREASE_CHANGE_LIMB 0.01
#define CHANGE_FATAL_HEAD 0.7
#define CHANGE_FATAL_TORSO 0.6
#define CHANGE_FATAL_LIMB 0.1
private ["_damageThreshold", "_damageBodyPart", "_chanceFatal"];
params ["_unit", "_part", ["_withDamage", 0]];
if (!alive _unit) exitwith {true};
@ -28,17 +36,22 @@ if ([_unit] call EFUNC(common,IsPlayer)) then {
} else {
_damageThreshold =_unit getvariable[QGVAR(unitDamageThreshold), [GVAR(AIDamageThreshold), GVAR(AIDamageThreshold), GVAR(AIDamageThreshold) * 1.7]];
};
_damageThreshold params ["_thresholdHead", "_thresholdTorso", "_thresholdLimbs"];
_damageBodyPart = ((_unit getvariable [QGVAR(bodyPartStatus),[0, 0, 0, 0, 0, 0]]) select _part) + _withDamage;
// Check if damage to body part is higher as damage head
if (_part == 0) exitwith {
(_damageBodyPart >= (_damageThreshold select 0) && {(random(1) > 0.2)});
_chanceFatal = CHANGE_FATAL_HEAD + ((INCREASE_CHANCE_HEAD * (_damageBodyPart - _thresholdHead)) * 10);
(_damageBodyPart >= _thresholdHead && {(_chanceFatal >= random(1))});
};
// Check if damage to body part is higher as damage torso
if (_part == 1) exitwith {
(_damageBodyPart >= (_damageThreshold select 1) && {(random(1) > 0.35)});
_chanceFatal = CHANGE_FATAL_TORSO + ((INCREASE_CHANCE_TORSO * (_damageBodyPart - _thresholdTorso)) * 10);
(_damageBodyPart >= _thresholdTorso && {(_chanceFatal >= random(1))});
};
// Check if damage to body part is higher as damage limbs
(_damageBodyPart >= (_damageThreshold select 2) && {(random(1) > 0.95)});
// We use a slightly lower decrease for limbs, as we want any injuries done to those to be less likely to be fatal compared to head shots or torso.
_chanceFatal = CHANGE_FATAL_LIMB + ((INCREASE_CHANGE_LIMB * (_damageBodyPart - _thresholdLimbs)) * 10);
(_damageBodyPart >= _thresholdLimbs && {(_chanceFatal >= random(1))});

View File

@ -20,7 +20,7 @@
#include "script_component.hpp"
private ["_typeOfProjectile", "_part", "_damageBodyParts", "_hitPoints"];
params ["_unit", "_selectionName", "_amountOfDamage", "_sourceOfDamage", "_typeOfProjectile", "_newDamage"];
params ["_unit", "_selectionName", "_amountOfDamage", "_sourceOfDamage", "_typeOfProjectile", "_hitPointNumber", "_newDamage"];
_part = [_selectionName] call FUNC(selectionNameToNumber);
if (_part < 0) exitwith {};

View File

@ -36,7 +36,7 @@ TRACE_4("ACE_DEBUG: HandleDamage BASIC",_unit, _damageBodyParts,_cache_params,_c
if (alive _unit && {!(_unit getvariable ["ACE_isUnconscious", false])}) then {
// If it reaches this, we can assume that the hit did not kill this unit, as this function is called 3 frames after the damage has been passed.
if ([_unit, _part, if (_part > 1) then {_newDamage * 1.3} else {_newDamage * 2}] call FUNC(determineIfFatal)) then {
[_unit, true, 0.5+random(3)] call FUNC(setUnconscious);
[_unit, true, 0.5+random(10)] call FUNC(setUnconscious);
};
};
_pain = _unit getVariable [QGVAR(pain), 0];

View File

@ -76,7 +76,7 @@ if (diag_frameno > (_unit getVariable [QGVAR(frameNo_damageCaching), -3]) + 2) t
private ["_args", "_params"];
params ["_args", "_idPFH"];
_args params ["_unit", "_frameno"];
if (diag_frameno > _frameno + 2) then {
if (diag_frameno >= _frameno + 2) then {
_unit setDamage 0;
if (GVAR(level) < 2 || {!([_unit] call FUNC(hasMedicalEnabled))}) then {

View File

@ -25,7 +25,14 @@ _part = [_selectionName] call FUNC(selectionNameToNumber);
if (_part < 0) exitwith {false};
if ((_damageBodyParts select _part) > 0) then {
_damageBodyParts set [_part, ((_damageBodyParts select _part) - BANDAGEHEAL) max 0];
_damageOnPart = (_damageBodyParts select _part);
// Temp quick fix to change in behaviour of basic medical bandaging
if (_damageOnPart - BANDAGEHEAL > 0) then {
_damageOnPart = _damageOnPart - (_damageOnPart * BANDAGEHEAL);
} else {
_damageOnPart = _damageOnPart - BANDAGEHEAL;
};
_damageBodyParts set [_part, _damageOnPart max 0];
_target setvariable [QGVAR(bodyPartStatus), _damageBodyParts, true];
TRACE_2("ACE_DEBUG: Treatment BASIC Bandage Broadcast value here",_unit, _target getvariable QGVAR(bodyPartStatus));
};

View File

@ -3,6 +3,9 @@
if (!hasInterface) exitWith {};
//Functions that are called for each draw of the map:
GVAR(miniMapDrawHandlers) = [];
//Add deviceKey entry:
private ["_conditonCode", "_toggleCode", "_closeCode"];
_conditonCode = {

View File

@ -18,7 +18,7 @@
private ["_display", "_wpIndex"];
disableSerialization;
_display = uiNamespace getVariable [[QGVAR(RscTitleDisplay), QGVAR(DialogDisplay)] select GVAR(currentShowMode) == DISPLAY_MODE_DIALOG, displayNull];
_display = uiNamespace getVariable [[QGVAR(RscTitleDisplay), QGVAR(DialogDisplay)] select (GVAR(currentShowMode) == DISPLAY_MODE_DIALOG), displayNull];
if (isNull _display) exitWith {ERROR("No Display");};

View File

@ -48,6 +48,9 @@ if (GVAR(currentApplicationPage) == 1) then {
};
} else { //Map Mode:
//Call all added minimap draw event handlers:
{_this call _x;} forEach GVAR(miniMapDrawHandlers);
if (GVAR(mapAutoTrackPosition)) then {
_theMap ctrlMapAnimAdd [0, (GVAR(mapZoom)/_mapSize), (getPosASL ACE_player)];
ctrlMapAnimCommit _theMap;

View File

@ -36,13 +36,13 @@ while {_stillInRange} do {
_stillInRange = false;
} else {
if (_airFriction == 0) then {
_result set [4, 0];
_result set [5, 0];
_result set [6, 0];
_result set [7, 0];
_result set [8, 0];
_result set [9, 0];
_result set [10, 0];
_result set [11, 0];
};
if ((_result select 1) < 88) then {
_outputArray pushBack [

View File

@ -133,135 +133,135 @@ case ((abs(_muzzleVelocity - 200) < 0.00001) && {(abs(_airFriction - -0.0001) <
};
case ((abs(_muzzleVelocity - 70) < 0.00001) && {(abs(_airFriction - 0) < 0.00001)}): {
[
["100","1497","9","1.3","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["150","1445","14","1.3","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["200","1390","19","1.4","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["250","1333","26","1.4","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["300","1272","34","1.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["350","1204","45","1.6","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["400","1127","61","1.8","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["450","1028","91","2.1","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"]
["100","1497","9","1.3","14.2","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["150","1445","14","1.3","14.1","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["200","1390","19","1.4","14.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["250","1333","26","1.4","13.8","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["300","1272","34","1.5","13.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["350","1204","45","1.6","13.2","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["400","1127","61","1.8","12.8","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["450","1028","91","2.1","12.1","0.0","0.0","0.0","0.0","0.0","0.0","0.0"]
]
};
case ((abs(_muzzleVelocity - 140) < 0.00001) && {(abs(_airFriction - 0) < 0.00001)}): {
[
["150","1562","1","0.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["200","1549","1","0.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["250","1536","2","0.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["300","1523","2","0.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["350","1510","2","0.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["400","1497","3","0.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["450","1484","3","0.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["500","1471","3","0.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["550","1458","4","0.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["600","1445","4","0.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["650","1431","4","0.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["700","1418","5","0.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["750","1404","5","0.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["800","1390","6","0.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["850","1376","6","0.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["900","1362","6","0.8","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["950","1348","7","0.8","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["1000","1333","7","0.8","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["1050","1318","8","0.8","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["1100","1303","9","0.8","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["1150","1288","9","0.8","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["1200","1272","10","0.8","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["1250","1256","11","0.8","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["1300","1239","12","0.8","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["1350","1222","13","0.9","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["1400","1205","13","0.9","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["1450","1187","15","0.9","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["1500","1168","16","0.9","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["1550","1148","18","1.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["1600","1127","19","1.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["1650","1105","21","1.1","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["1700","1082","24","1.1","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["1750","1057","27","1.2","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["1800","1029","31","1.3","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["1850","997","37","1.4","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["1900","960","46","1.6","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["1950","912","63","1.9","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"]
["150","1562","1","0.7","28.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["200","1549","1","0.7","28.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["250","1536","2","0.7","28.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["300","1523","2","0.7","28.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["350","1510","2","0.7","28.4","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["400","1497","3","0.7","28.4","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["450","1484","3","0.7","28.4","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["500","1471","3","0.7","28.3","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["550","1458","4","0.7","28.3","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["600","1445","4","0.7","28.2","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["650","1431","4","0.7","28.2","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["700","1418","5","0.7","28.1","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["750","1404","5","0.7","28.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["800","1390","6","0.7","27.9","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["850","1376","6","0.7","27.9","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["900","1362","6","0.8","27.8","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["950","1348","7","0.8","27.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["1000","1333","7","0.8","27.6","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["1050","1318","8","0.8","27.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["1100","1303","9","0.8","27.3","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["1150","1288","9","0.8","27.2","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["1200","1272","10","0.8","27.1","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["1250","1256","11","0.8","26.9","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["1300","1239","12","0.8","26.8","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["1350","1222","13","0.9","26.6","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["1400","1205","13","0.9","26.4","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["1450","1187","15","0.9","26.2","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["1500","1168","16","0.9","26.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["1550","1148","18","1.0","25.8","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["1600","1127","19","1.0","25.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["1650","1105","21","1.1","25.2","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["1700","1082","24","1.1","24.9","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["1750","1057","27","1.2","24.6","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["1800","1029","31","1.3","24.2","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["1850","997","37","1.4","23.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["1900","960","46","1.6","23.1","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["1950","912","63","1.9","22.3","0.0","0.0","0.0","0.0","0.0","0.0","0.0"]
]
};
case ((abs(_muzzleVelocity - 200) < 0.00001) && {(abs(_airFriction - 0) < 0.00001)}): {
[
["300","1563","0","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["350","1556","1","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["400","1550","1","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["450","1544","1","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["500","1537","1","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["550","1531","1","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["600","1525","1","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["650","1519","1","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["700","1512","1","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["750","1506","1","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["800","1499","1","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["850","1493","1","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["900","1487","1","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["950","1480","1","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["1000","1474","2","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["1050","1467","2","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["1100","1461","2","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["1150","1454","2","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["1200","1448","2","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["1250","1441","2","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["1300","1435","2","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["1350","1428","2","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["1400","1422","2","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["1450","1415","2","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["1500","1408","2","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["1550","1402","3","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["1600","1395","3","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["1650","1388","3","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["1700","1381","3","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["1750","1374","3","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["1800","1367","3","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["1850","1360","3","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["1900","1353","3","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["1950","1346","4","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["2000","1339","4","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["2050","1332","4","0.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["2100","1325","4","0.6","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["2150","1317","4","0.6","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["2200","1310","4","0.6","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["2250","1302","4","0.6","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["2300","1295","5","0.6","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["2350","1287","5","0.6","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["2400","1280","5","0.6","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["2450","1272","5","0.6","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["2500","1264","5","0.6","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["2550","1256","5","0.6","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["2600","1248","6","0.6","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["2650","1240","6","0.6","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["2700","1232","6","0.6","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["2750","1223","6","0.6","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["2800","1215","7","0.6","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["2850","1206","7","0.6","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["2900","1197","7","0.6","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["2950","1188","7","0.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["3000","1179","8","0.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["3050","1170","8","0.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["3100","1160","8","0.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["3150","1151","9","0.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["3200","1141","9","0.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["3250","1131","10","0.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["3300","1120","10","0.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["3350","1109","11","0.8","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["3400","1098","11","0.8","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["3450","1087","12","0.8","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["3500","1075","13","0.8","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["3550","1062","14","0.8","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["3600","1049","15","0.9","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["3650","1036","16","0.9","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["3700","1021","17","0.9","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["3750","1006","19","1.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["3800","990","21","1.1","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["3850","971","24","1.1","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["3900","952","27","1.2","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["3950","929","32","1.4","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["4000","900","40","1.6","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["4050","861","56","2.1","0.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"]
["300","1563","0","0.5","40.8","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["350","1556","1","0.5","40.8","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["400","1550","1","0.5","40.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["450","1544","1","0.5","40.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["500","1537","1","0.5","40.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["550","1531","1","0.5","40.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["600","1525","1","0.5","40.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["650","1519","1","0.5","40.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["700","1512","1","0.5","40.6","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["750","1506","1","0.5","40.6","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["800","1499","1","0.5","40.6","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["850","1493","1","0.5","40.6","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["900","1487","1","0.5","40.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["950","1480","1","0.5","40.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["1000","1474","2","0.5","40.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["1050","1467","2","0.5","40.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["1100","1461","2","0.5","40.4","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["1150","1454","2","0.5","40.4","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["1200","1448","2","0.5","40.3","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["1250","1441","2","0.5","40.3","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["1300","1435","2","0.5","40.3","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["1350","1428","2","0.5","40.2","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["1400","1422","2","0.5","40.2","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["1450","1415","2","0.5","40.1","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["1500","1408","2","0.5","40.1","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["1550","1402","3","0.5","40.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["1600","1395","3","0.5","40.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["1650","1388","3","0.5","39.9","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["1700","1381","3","0.5","39.9","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["1750","1374","3","0.5","39.8","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["1800","1367","3","0.5","39.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["1850","1360","3","0.5","39.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["1900","1353","3","0.5","39.6","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["1950","1346","4","0.5","39.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["2000","1339","4","0.5","39.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["2050","1332","4","0.5","39.4","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["2100","1325","4","0.6","39.3","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["2150","1317","4","0.6","39.2","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["2200","1310","4","0.6","39.2","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["2250","1302","4","0.6","39.1","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["2300","1295","5","0.6","39.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["2350","1287","5","0.6","38.9","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["2400","1280","5","0.6","38.8","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["2450","1272","5","0.6","38.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["2500","1264","5","0.6","38.6","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["2550","1256","5","0.6","38.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["2600","1248","6","0.6","38.4","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["2650","1240","6","0.6","38.3","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["2700","1232","6","0.6","38.2","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["2750","1223","6","0.6","38.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["2800","1215","7","0.6","37.9","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["2850","1206","7","0.6","37.8","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["2900","1197","7","0.6","37.6","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["2950","1188","7","0.7","37.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["3000","1179","8","0.7","37.4","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["3050","1170","8","0.7","37.2","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["3100","1160","8","0.7","37.1","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["3150","1151","9","0.7","36.9","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["3200","1141","9","0.7","36.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["3250","1131","10","0.7","36.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["3300","1120","10","0.7","36.3","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["3350","1109","11","0.8","36.2","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["3400","1098","11","0.8","35.9","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["3450","1087","12","0.8","35.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["3500","1075","13","0.8","35.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["3550","1062","14","0.8","35.2","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["3600","1049","15","0.9","35.0","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["3650","1036","16","0.9","34.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["3700","1021","17","0.9","34.4","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["3750","1006","19","1.0","34.1","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["3800","990","21","1.1","33.7","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["3850","971","24","1.1","33.3","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["3900","952","27","1.2","32.8","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["3950","929","32","1.4","32.2","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["4000","900","40","1.6","31.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0"],
["4050","861","56","2.1","30.5","0.0","0.0","0.0","0.0","0.0","0.0","0.0"]
]
};
default {

View File

@ -38,14 +38,14 @@ if (!hasInterface) exitWith {};
if (isClass (configFile >> "cfgPatches" >> "acre_api")) then {
diag_log text format ["[ACE_nametags] - ACRE Detected"];
ACE_LOGINFO("ACRE Detected.");
DFUNC(isSpeaking) = {
params ["_unit"];
(([_unit] call acre_api_fnc_isSpeaking) || {[ACE_player] call acre_api_fnc_isBroadcasting}) && {!(_unit getVariable ["ACE_isUnconscious", false])}
};
} else {
if (isClass (configFile >> "cfgPatches" >> "task_force_radio")) then {
diag_log text format ["[ACE_nametags] - TFR Detected"];
ACE_LOGINFO("TFR Detected.");
DFUNC(isSpeaking) = {
params ["_unit"];
(_unit getVariable ["tf_isSpeaking", false]) && {!(_unit getVariable ["ACE_isUnconscious", false])}

View File

@ -33,4 +33,4 @@ if ((_logic getVariable "showVehicleCrewInfo") != -1) then {
[_logic, QGVAR(showVehicleCrewInfo), "showVehicleCrewInfo" ] call EFUNC(common,readSettingFromModule);
};
diag_log text "[ACE]: NameTags Module Initialized.";
ACE_LOGINFO("Nametags Module Initialized.");

View File

@ -21,6 +21,8 @@
*/
#include "script_component.hpp"
if (!hasInterface) exitWith {};
private ["_vehicle", "_weapon", "_ammo", "_magazine", "_player"];
_vehicle = _this select 0;

View File

@ -16,6 +16,7 @@
*/
#include "script_component.hpp"
if (!hasInterface) exitWith {};
private ["_brightness"];
PARAMS_2(_player,_changeInBrightness);

View File

@ -15,6 +15,8 @@
*/
#include "script_component.hpp"
if (!hasInterface) exitWith {};
private ["_currentVehicle", "_grainSetting", "_blurSetting", "_radBlurSetting", "_config", "_hmd", "_cameraView", "_turret"];
_currentVehicle = vehicle ACE_player;

View File

@ -32,3 +32,10 @@ class CfgAddons {
class ACE_Extensions {
extensions[] += {"ace_clipboard"};
};
class CfgCommands {
allowedHTMLLoadURIs[] += {
"http://ace3mod.com/version.html"
};
};

View File

@ -356,12 +356,6 @@
<Czech>Pošle debug informace do RPT a schránky.</Czech>
<German>Protokolliert Debug-Informationen im RPT und speichert sie in der Zwischenablage.</German>
<Portuguese>Envia informação de depuração para RPT e área de transferência.</Portuguese>
</Key>
<Key ID="STR_ACE_OptionsMenu_headBugFix">
<English>Headbug Fix</English>
</Key>
<Key ID="STR_ACE_OptionsMenu_headBugFixTooltip">
<English>Resets your animation state.</English>
<French>Copie le Debug dans le RPT et le presse papier</French>
<Hungarian>Debug információt küld az RPT-be és a vágólapra.</Hungarian>
<Russian>Отправляет отладочную информацию в RPT и буфер обмена.</Russian>

View File

@ -1,7 +1,7 @@
// by esteldunedain
#include "script_component.hpp"
if !(hasInterface) exitWith {};
if (!hasInterface) exitWith {};
// Add keybinds
["ACE3 Weapons", QGVAR(unjamWeapon), localize LSTRING(UnjamWeapon),

View File

@ -39,7 +39,7 @@ while {true} do {
if (_temperature < 1) exitWith {0};
if (isNil "_temperature") exitWith {
diag_log text format ["[ACE] ERROR: _totalTime = %1; _time = %2; _deltaTime = %3;", _totalTime, _time, _deltaTime];
ACE_LOGERROR_3("_totalTime = %1; _time = %2; _deltaTime = %3;",_totalTime,_time,_deltaTime);
0
};

View File

@ -1,7 +1,7 @@
// by esteldunedain
#include "script_component.hpp"
if !(hasInterface) exitWith {};
if (!hasInterface) exitWith {};
// Add keybinds
["ACE3 Weapons", QGVAR(checkAmmo), localize LSTRING(checkAmmo),
@ -27,8 +27,6 @@ if !(hasInterface) exitWith {};
// Listen for attempts to link ammo
["linkedAmmo", {
EXPLODE_3_PVT(_this,_receiver,_giver,_magazine);
diag_log "linkedAmmo";
diag_log _this;
private ["_magazineCfg","_magazineType"];
_magazineType = currentMagazine _receiver;
@ -62,8 +60,6 @@ if !(hasInterface) exitWith {};
// Listen for returned magazines
["returnedAmmo", {
EXPLODE_3_PVT(_this,_receiver,_giver,_magazine);
diag_log "returnedAmmo";
diag_log _this;
_receiver addMagazine _magazine;
}] call EFUNC(common,addEventhandler);

View File

@ -8,7 +8,7 @@ class ACE_Repair {
requiredEngineer = QGVAR(engineerSetting_Wheel);
repairingTime = 10;
repairingTimeSelfCoef = 1;
items[] = {"ToolKit"};
items = QGVAR(wheelRepairRequiredItems);
condition = QUOTE(call FUNC(canReplaceWheel));
itemConsumed = 0;
@ -35,6 +35,7 @@ class ACE_Repair {
requiredEngineer = 0;
repairingTime = 15;
callbackSuccess = QUOTE(call FUNC(doRepair));
items[] = {"ToolKit"};
};
class RepairTrack: MiscRepair {
displayName = CSTRING(Repairing);

View File

@ -68,4 +68,13 @@ class ACE_Settings {
value = 1;
category = ECSTRING(OptionsMenu,CategoryLogistics);
};
class GVAR(wheelRepairRequiredItems) {
displayName = CSTRING(wheelRepairRequiredItems_name);
description = CSTRING(wheelRepairRequiredItems_description);
category = ECSTRING(OptionsMenu,CategoryLogistics);
typeName = "SCALAR";
value = 0;
values[] = {"None", "ToolKit"};
_values[] = {{}, {"ToolKit"}};
};
};

View File

@ -97,6 +97,15 @@ class CfgVehicles {
typeName = "BOOL";
defaultValue = 1;
};
class wheelRepairRequiredItems {
displayName = CSTRING(wheelRepairRequiredItems_name);
description = CSTRING(wheelRepairRequiredItems_description);
typeName = "NUMBER";
class values {
class None { name = "None"; value = 0; default = 1;};
class ToolKit { name = "ToolKit"; value = 1; };
};
};
};
class ModuleDescription {
description = CSTRING(moduleDescription);

View File

@ -131,7 +131,7 @@ _hitPointsAddedAmount = [];
if (typeName _position == "STRING") exitWith {
_selection = _vehicle selectionPosition _position; // Selection name
};
diag_log text format ["[ACE] ERROR: Invalid custom position %1 of hitpoint %2 in vehicle %3", _position, _hitpoint, _vehicle];
ACE_LOGERROR_3("Invalid custom position %1 of hitpoint %2 in vehicle %3.",_position,_hitpoint,_vehicle);
};
} forEach (getArray _customSelectionsConfig);
};

View File

@ -21,7 +21,7 @@
params ["_caller", "_target", "_hitPoint", "_className"];
TRACE_4("params",_caller,_target,_hitPoint,_className);
private ["_config", "_engineerRequired", "_items", "_locations", "_return", "_condition", "_vehicleStateCondition"];
private ["_config", "_engineerRequired", "_items", "_locations", "_return", "_condition", "_vehicleStateCondition", "_settingName", "_settingItemsArray"];
_config = (ConfigFile >> "ACE_Repair" >> "Actions" >> _className);
if !(isClass _config) exitwith {false}; // or go for a default?
@ -38,7 +38,17 @@ _engineerRequired = if (isNumber (_config >> "requiredEngineer")) then {
};
if !([_caller, _engineerRequired] call FUNC(isEngineer)) exitwith {false};
_items = getArray (_config >> "items");
//Items can be an array of required items or a string to a ACE_Setting array
_items = if (isArray (_config >> "items")) then {
getArray (_config >> "items");
} else {
_settingName = getText (_config >> "items");
_settingItemsArray = getArray (configFile >> "ACE_Settings" >> _settingName >> "_values");
if ((isNil _settingName) || {(missionNamespace getVariable _settingName) >= (count _settingItemsArray)}) exitWith {
ERROR("bad setting"); ["BAD"]
};
_settingItemsArray select (missionNamespace getVariable _settingName);
};
if (count _items > 0 && {!([_caller, _items] call FUNC(hasItems))}) exitwith {false};
_return = true;

View File

@ -33,4 +33,6 @@ if (!isServer) exitWith {};
[_logic, QGVAR(addSpareParts), "addSpareParts"] call EFUNC(common,readSettingFromModule);
diag_log text "[ACE]: Repair Module Initialized.";
[_logic, QGVAR(wheelRepairRequiredItems), "wheelRepairRequiredItems"] call EFUNC(common,readSettingFromModule);
ACE_LOGINFO("Repair Module Initialized.");

View File

@ -21,7 +21,7 @@
params ["_caller", "_target", "_hitPoint", "_className"];
TRACE_4("params",_calller,_target,_hitPoint,_className);
private["_callbackProgress", "_callerAnim", "_calller", "_condition", "_config", "_consumeItems", "_displayText", "_engineerRequired", "_iconDisplayed", "_items", "_locations", "_repairTime", "_repairTimeConfig", "_return", "_usersOfItems", "_vehicleStateCondition", "_wpn"];
private["_callbackProgress", "_callerAnim", "_calller", "_condition", "_config", "_consumeItems", "_displayText", "_engineerRequired", "_iconDisplayed", "_items", "_locations", "_repairTime", "_repairTimeConfig", "_return", "_usersOfItems", "_vehicleStateCondition", "_wpn", "_settingName", "_settingItemsArray"];
_config = (ConfigFile >> "ACE_Repair" >> "Actions" >> _className);
if !(isClass _config) exitwith {false}; // or go for a default?
@ -37,7 +37,18 @@ _engineerRequired = if (isNumber (_config >> "requiredEngineer")) then {
};
if !([_caller, _engineerRequired] call FUNC(isEngineer)) exitwith {false};
if (isEngineOn _target) exitwith {false};
_items = getArray (_config >> "items");
//Items can be an array of required items or a string to a ACE_Setting array
_items = if (isArray (_config >> "items")) then {
getArray (_config >> "items");
} else {
_settingName = getText (_config >> "items");
_settingItemsArray = getArray (configFile >> "ACE_Settings" >> _settingName >> "_values");
if ((isNil _settingName) || {(missionNamespace getVariable _settingName) >= (count _settingItemsArray)}) exitWith {
ERROR("bad setting"); ["BAD"]
};
_settingItemsArray select (missionNamespace getVariable _settingName);
};
if (count _items > 0 && {!([_caller, _items] call FUNC(hasItems))}) exitwith {false};
_return = true;

View File

@ -901,5 +901,11 @@
<Polish>Ilość wybranych części zamiennych.</Polish>
<Portuguese>Número de partes sobressalentes.</Portuguese>
</Key>
<Key ID="STR_ACE_Repair_wheelRepairRequiredItems_name">
<English>Wheel repair requirements</English>
</Key>
<Key ID="STR_ACE_Repair_wheelRepairRequiredItems_description">
<English>Items required to remove/replace wheels</English>
</Key>
</Package>
</Project>

View File

@ -1,15 +1,15 @@
/*
Name: ACE_Respawn_fnc_initRallypoint
Author(s):
commy2
Description:
init code for rally points
Parameters:
0: OBJECT - rally
Returns:
VOID
*/
@ -26,9 +26,9 @@ if (hasInterface) then {
// fix init having wrong position, vars etc.
[_rallypoint, _respawnMarker, _side, _name] spawn {
PARAMS_4(_rallypoint,_respawnMarker,_side,_name);
private ["_marker", "_type"];
_marker = format ["ACE_Marker_%1", _name];
// exit if it already exist
@ -65,5 +65,5 @@ if (isNil _name) then {
} else {
deleteVehicle _rallypoint;
diag_log text "[ACE] Respawn: ERROR Multiple Rallypoints of same type.";
ACE_LOGERROR("Multiple Rallypoints of same type.");
};

View File

@ -18,7 +18,7 @@
#include "script_component.hpp"
PARAMS_3(_logic,_units,_activated);
PARAMS_3(_logic,_units,_activated);
if !(isServer) exitWith {};
@ -45,4 +45,4 @@ if (isServer) then {
};
};
diag_log text "[ACE]: Respawn Module Initialized.";
ACE_LOGINFO("Respawn Module Initialized.");

View File

@ -1,17 +1,17 @@
/*
Name: ACE_Respawn_fnc_moduleFriendlyFire
Author(s):
commy2
Description:
initializes the Friendly Fire Messages module
Parameters:
0: OBJECT - logic
1: ARRAY<OBJECT> - synced units
2: BOOLEAN - activated
Returns:
VOID
*/
@ -19,7 +19,7 @@
#include "script_component.hpp"
_this spawn {
PARAMS_3(_logic,_units,_activated);
PARAMS_3(_logic,_units,_activated);
if !(_activated) exitWith {};
@ -28,5 +28,5 @@ _this spawn {
publicVariable QGVAR(showFriendlyFireMessage);
};
diag_log text "[ACE]: Friendly Fire Messages Module Initialized.";
ACE_LOGINFO("Friendly Fire Messages Module Initialized.");
};

View File

@ -1,17 +1,17 @@
/*
Name: ACE_Respawn_fnc_moduleRallypoint
Author(s):
commy2
Description:
initializes the Rallypoint module
Parameters:
0: OBJECT - logic
1: ARRAY<OBJECT> - synced units
2: BOOLEAN - activated
Returns:
VOID
*/
@ -26,4 +26,4 @@ if !(_activated) exitWith {};
_x setVariable ["ACE_canMoveRallypoint", true];
} forEach _units;
diag_log text "[ACE]: Rallypoint Module Initialized.";
ACE_LOGINFO("Rallypoint Module Initialized.");

View File

@ -7,7 +7,7 @@
*/
#include "script_component.hpp"
if !(hasInterface) exitWith {};
if (!hasInterface) exitWith {};
// Check inventory when it changes
["playerInventoryChanged", {

View File

@ -1,7 +1,7 @@
#include "script_component.hpp"
// Exit on Headless
if !(hasInterface) exitWith {};
if (!hasInterface) exitWith {};
// Add interaction menu exception
["isNotSitting", {!((_this select 0) getVariable [QGVAR(isSitting), false])}] call EFUNC(common,addCanInteractWithCondition);

View File

@ -22,4 +22,4 @@ if (!_activated) exitWith {};
[_logic, QGVAR(enable), "enable"] call EFUNC(common,readSettingFromModule);
diag_log text "[ACE]: Sitting Module Initialized.";
ACE_LOGINFO("Sitting Module Initialized.");

View File

@ -24,7 +24,7 @@ params ["_objects", "_controllers", "_images", "_names", "_duration"];
// Verify data
if (count _images != count _names || {count _images == 0} || {count _names == 0}) exitWith {
diag_log "[ACE] ERROR: Slideshow Images or Names fields can NOT be empty and must have equal number of items!"
ACE_LOGERROR("Slideshow Images or Names fields can NOT be empty and must have equal number of items!");
};
// Objects synced to the module
@ -55,7 +55,7 @@ _currentSlideshow = GVAR(slideshows); // Local variable in case GVAR gets change
// If interaction menu module is not present, set default duration value
if !(["ace_interact_menu"] call EFUNC(common,isModLoaded)) then {
_duration = 5;
diag_log text format ["[ACE]: Slideshow: Interaction Menu module not present, defaulting duration value to %1", _duration];
ACE_LOGINFO_1("Interaction Menu module not present, defaulting duration value to %1",_duration);
};
// Add interactions if automatic transitions are disabled, else setup automatic transitions

View File

@ -33,4 +33,4 @@ _duration = _logic getVariable ["Duration", 0];
// Prepare with actions
[_objects, _controllers, _images, _names, _duration] call FUNC(createSlideshow);
diag_log text format ["[ACE]: Slideshow Module Initialized for: %1 with Duration: %2", _objects, _duration];
ACE_LOGINFO_2("Slideshow Module Initialized for: %1 with Duration: %2", _objects, _duration);

View File

@ -21,15 +21,17 @@
params [["_unit",objNull,[objNull]], ["_killer",objNull,[objNull]], ["_respawn",0,[0]], ["_respawnDelay",0,[0]]];
private ["_vision","_pos"];
// End mission when all are dead with respawn type "None"
// When all are dead with respawn type "None" the mission should end
if ((_respawn == 0) && {{alive _x} count allPlayers <= 0}) exitWith {
[["endDeath",false],"BIS_fnc_endMission"] call EFUNC(common,execRemoteFnc);
};
// Some environment information can be used for the initial camera attributes
if (isNull _killer) then {_killer = _unit};
_vision = [-2,-1] select (sunOrMoon < 1);
_pos = (getPosATL _unit) vectorAdd [0,0,5];
// Enter/exit spectator based on the respawn type and whether killed/respawned
if (alive _unit) then {
if (_respawn == 1) then {
[_unit,QGVAR(isSeagull)] call EFUNC(common,hideUnit);
@ -39,6 +41,9 @@ if (alive _unit) then {
[false] call FUNC(setSpectator);
};
} else {
// Negligible respawn delay can result in entering spectator after respawn
if (playerRespawnTime <= 1) exitWith {};
[2,_killer,_vision,_pos,getDir _unit] call FUNC(setCameraAttributes);
[true] call FUNC(setSpectator);
};

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