mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge pull request #2509 from acemod/miscFixNilFunctions
Fix some nil functions
This commit is contained in:
commit
079d88ded7
@ -18,7 +18,6 @@ if (isServer) then {
|
|||||||
}];
|
}];
|
||||||
};
|
};
|
||||||
|
|
||||||
["playerVehicleChanged", {_this call FUNC(handleVehicleChanged)}] call EFUNC(common,addEventHandler);
|
|
||||||
["zeusDisplayChanged", {_this call FUNC(handleZeusDisplayChanged)}] call EFUNC(common,addEventHandler);
|
["zeusDisplayChanged", {_this call FUNC(handleZeusDisplayChanged)}] call EFUNC(common,addEventHandler);
|
||||||
["playerChanged", {_this call FUNC(handlePlayerChanged)}] call EFUNC(common,addEventhandler);
|
["playerChanged", {_this call FUNC(handlePlayerChanged)}] call EFUNC(common,addEventhandler);
|
||||||
["MoveInCaptive", {_this call FUNC(vehicleCaptiveMoveIn)}] call EFUNC(common,addEventHandler);
|
["MoveInCaptive", {_this call FUNC(vehicleCaptiveMoveIn)}] call EFUNC(common,addEventHandler);
|
||||||
|
@ -26,7 +26,7 @@ if (local _unit) then {
|
|||||||
};
|
};
|
||||||
|
|
||||||
if (_unit getVariable [QGVAR(isSurrendering), false]) then {
|
if (_unit getVariable [QGVAR(isSurrendering), false]) then {
|
||||||
[_unit, false] call FUNC(setSurrender);
|
[_unit, false] call FUNC(setSurrendered);
|
||||||
};
|
};
|
||||||
|
|
||||||
if (_unit getVariable [QGVAR(isHandcuffed), false]) then {
|
if (_unit getVariable [QGVAR(isHandcuffed), false]) then {
|
||||||
|
@ -17,8 +17,6 @@
|
|||||||
|
|
||||||
params ["_projectile", "_adjustDir", "_adjustUp", ["_adjustSpeed",0]];
|
params ["_projectile", "_adjustDir", "_adjustUp", ["_adjustSpeed",0]];
|
||||||
|
|
||||||
//["CPD", [_fnc_scriptNameParent, _adjustDir, _adjustUp, _adjustSpeed], nil, false] call FUNC(log);
|
|
||||||
|
|
||||||
private ["_vdir", "_dir", "_up", "_vlat", "_vup", "_vel"];
|
private ["_vdir", "_dir", "_up", "_vlat", "_vup", "_vel"];
|
||||||
|
|
||||||
// get old direction vector
|
// get old direction vector
|
||||||
|
@ -38,8 +38,7 @@ if (_level <= _defaultLoglevel) then {
|
|||||||
};
|
};
|
||||||
diag_log _message;
|
diag_log _message;
|
||||||
|
|
||||||
// pass it onwards to the log function:
|
|
||||||
// [0, [], compile format["%1",_msg], true] call FUNC(log);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
true
|
true
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
params ["_unit", "_vehicle", "_caller"];
|
params ["_unit", "_vehicle", "_caller"];
|
||||||
|
|
||||||
if (!alive _unit) then {
|
if (!alive _unit) then {
|
||||||
_unit = [_unit, _caller] call FUNC(makeCopyOfBody);
|
// _unit = [_unit, _caller] call FUNC(makeCopyOfBody); //func does not exist
|
||||||
};
|
};
|
||||||
|
|
||||||
private "_slotsOpen";
|
private "_slotsOpen";
|
||||||
|
@ -19,10 +19,10 @@ _unit setvariable ["ACE_isUnconscious", nil, true];
|
|||||||
|
|
||||||
if (isPlayer _unit) then {
|
if (isPlayer _unit) then {
|
||||||
[true] call FUNC(setVolume);
|
[true] call FUNC(setVolume);
|
||||||
[false] call FUNC(disableKeyInput);
|
// [false] call FUNC(disableKeyInput); //func does not exist
|
||||||
|
|
||||||
if (["ace_medical"] call FUNC(isModLoader)) then {
|
if (["ace_medical"] call FUNC(isModLoaded)) then {
|
||||||
[false] call EFUNC(medical,effectBlackOut);
|
// [false] call EFUNC(medical,effectBlackOut); //func does not exist
|
||||||
};
|
};
|
||||||
|
|
||||||
if !(isNil QGVAR(DISABLE_USER_INPUT_COLLECTION)) then {
|
if !(isNil QGVAR(DISABLE_USER_INPUT_COLLECTION)) then {
|
||||||
|
@ -87,8 +87,6 @@ if (_suitCoef == 0) then {_suitCoef = 0.001};
|
|||||||
_gBlackOut = MAXVIRTUALG / _classCoef + MAXVIRTUALG / _suitCoef - MAXVIRTUALG;
|
_gBlackOut = MAXVIRTUALG / _classCoef + MAXVIRTUALG / _suitCoef - MAXVIRTUALG;
|
||||||
_gRedOut = MINVIRTUALG / _classCoef;
|
_gRedOut = MINVIRTUALG / _classCoef;
|
||||||
|
|
||||||
["GForces", [], {format ["_g _gBO _coef: %1, %2, %3", _average, _gBlackOut, 2 * ((1.0 - ((_average - 0.30 * _gBlackOut) / (0.70 * _gBlackOut)) ^ 2) max 0) ]}] call EFUNC(common,log);
|
|
||||||
|
|
||||||
// @todo: Sort the interaction with medical
|
// @todo: Sort the interaction with medical
|
||||||
if ((_average > _gBlackOut) and {isClass (configFile >> "CfgPatches" >> "ACE_Medical") and {!(ACE_player getVariable ["ACE_isUnconscious", false])}}) then {
|
if ((_average > _gBlackOut) and {isClass (configFile >> "CfgPatches" >> "ACE_Medical") and {!(ACE_player getVariable ["ACE_isUnconscious", false])}}) then {
|
||||||
[ACE_player, true, (10 + floor(random 5))] call EFUNC(medical,setUnconscious);
|
[ACE_player, true, (10 + floor(random 5))] call EFUNC(medical,setUnconscious);
|
||||||
|
@ -18,7 +18,7 @@ private ["_log", "_inList", "_amount"];
|
|||||||
params ["_unit", "_newItem"];
|
params ["_unit", "_newItem"];
|
||||||
|
|
||||||
if (!local _unit) exitwith {
|
if (!local _unit) exitwith {
|
||||||
[_this, QUOTE(DFUNC(addToTriageList)), _unit] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */
|
[_this, QUOTE(DFUNC(addToTriageCard)), _unit] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */
|
||||||
};
|
};
|
||||||
|
|
||||||
_log = _unit getvariable [QGVAR(triageCard), []];
|
_log = _unit getvariable [QGVAR(triageCard), []];
|
||||||
|
@ -28,7 +28,7 @@ if (count _items == 0) exitwith {false};
|
|||||||
|
|
||||||
_part = [_selectionName] call FUNC(selectionNameToNumber);
|
_part = [_selectionName] call FUNC(selectionNameToNumber);
|
||||||
if (_part == 0 || _part == 1) exitwith {
|
if (_part == 0 || _part == 1) exitwith {
|
||||||
// [_caller,"You cannot apply a CAT on this body part!"] call EFUNC(common,sendHintTo);
|
// ["displayTextStructured", [_caller], ["You cannot apply a CAT on this body part!"]] call EFUNC(common,targetEvent);
|
||||||
false;
|
false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ GVAR(MenuPFHID) = [{
|
|||||||
[GVAR(INTERACTION_TARGET)] call FUNC(updateIcons);
|
[GVAR(INTERACTION_TARGET)] call FUNC(updateIcons);
|
||||||
[GVAR(LatestDisplayOptionMenu)] call FUNC(handleUI_DisplayOptions);
|
[GVAR(LatestDisplayOptionMenu)] call FUNC(handleUI_DisplayOptions);
|
||||||
|
|
||||||
_status = [GVAR(INTERACTION_TARGET)] call FUNC(getTriageStatus);
|
_status = [GVAR(INTERACTION_TARGET)] call EFUNC(medical,getTriageStatus);
|
||||||
(_display displayCtrl 2000) ctrlSetText (_status select 0);
|
(_display displayCtrl 2000) ctrlSetText (_status select 0);
|
||||||
(_display displayCtrl 2000) ctrlSetBackgroundColor (_status select 2);
|
(_display displayCtrl 2000) ctrlSetBackgroundColor (_status select 2);
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
* ARRAY - [NUMBER - Elevation In Degrees, NUMBER - Shot Durration]
|
* ARRAY - [NUMBER - Elevation In Degrees, NUMBER - Shot Durration]
|
||||||
*
|
*
|
||||||
* Example:
|
* Example:
|
||||||
* [_rangeToHit, _heightToHit, _muzzleVelocity, _airFriction, TIME_STEP] call FUNC(simulateFindSolution);
|
* [_rangeToHit, _heightToHit, _muzzleVelocity, _airFriction, TIME_STEP] call ace_mk6mortar_fnc_dev_simulateFindSolution;
|
||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
|
@ -28,8 +28,6 @@ _barrelMass = 0.50 * (getNumber (configFile >> "CfgWeapons" >> _weapon >> "Weapo
|
|||||||
// Calculate cooling
|
// Calculate cooling
|
||||||
_temperature = [_temperature, _barrelMass, ACE_time - _time] call FUNC(cooldown);
|
_temperature = [_temperature, _barrelMass, ACE_time - _time] call FUNC(cooldown);
|
||||||
|
|
||||||
//["Overheating", _temperature, {format ["Temperature: %1 °C", _this]}] call EFUNC(common,log);
|
|
||||||
|
|
||||||
// Store new temperature
|
// Store new temperature
|
||||||
_time = ACE_time;
|
_time = ACE_time;
|
||||||
_player setVariable [_string, [_temperature, _time], false];
|
_player setVariable [_string, [_temperature, _time], false];
|
||||||
|
@ -165,8 +165,6 @@ if ("Jam" in (missionNamespace getvariable ["ACE_Debug", []])) then {
|
|||||||
_jamChance = 0.5;
|
_jamChance = 0.5;
|
||||||
};
|
};
|
||||||
|
|
||||||
["Overheating", [_temperature, _jamChance], {format ["Temperature: %1 - JamChance: %2", _this select 0, _this select 1]}] call EFUNC(common,log);
|
|
||||||
|
|
||||||
if (random 1 < _jamChance) then {
|
if (random 1 < _jamChance) then {
|
||||||
[_unit, _weapon] call FUNC(jamWeapon);
|
[_unit, _weapon] call FUNC(jamWeapon);
|
||||||
};
|
};
|
||||||
|
@ -136,30 +136,3 @@ if (!hasInterface) exitWith {};
|
|||||||
},
|
},
|
||||||
{false},
|
{false},
|
||||||
[201, [true, true, false]], true] call cba_fnc_addKeybind;
|
[201, [true, true, false]], true] call cba_fnc_addKeybind;
|
||||||
|
|
||||||
// init shortdot
|
|
||||||
GVAR(showShortdot) = false;
|
|
||||||
|
|
||||||
["playerInventoryChanged", {
|
|
||||||
if (_this select 1 isEqualTo []) exitWith {}; //@todo fix eh
|
|
||||||
|
|
||||||
private "_showShortdot";
|
|
||||||
_showShortdot = _this select 1 select 9 select 2 == "ACE_optic_DMS";
|
|
||||||
|
|
||||||
if (GVAR(showShortdot)) then {
|
|
||||||
if (!_showShortdot) then {
|
|
||||||
// hide control and turn onDraw handler off
|
|
||||||
(uiNamespace getVariable ["ACE_ctrlShortdotReticle", controlNull]) ctrlShow false;
|
|
||||||
GVAR(showShortdot) = false;
|
|
||||||
};
|
|
||||||
} else {
|
|
||||||
if (_showShortdot) then {
|
|
||||||
// create control and turn onDraw handler on
|
|
||||||
([QGVAR(reticle)] call BIS_fnc_rscLayer) cutRsc ["ACE_Shortdot_Reticle", "PLAIN", 0, false];
|
|
||||||
(uiNamespace getVariable "ACE_ctrlShortdotReticle") ctrlSetText QUOTE(PATHTOF(data\reticles\ace_shortdot_reticle_1.paa));
|
|
||||||
GVAR(showShortdot) = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}] call EFUNC(common,addEventHandler);
|
|
||||||
|
|
||||||
addMissionEventHandler ["Draw3D", {if (GVAR(showShortdot)) then {call FUNC(onDrawShortdot)};}];
|
|
||||||
|
Loading…
Reference in New Issue
Block a user