mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge branch 'master' into medicalFixes
This commit is contained in:
commit
5e82c51926
@ -4,7 +4,8 @@
|
||||
*
|
||||
* Arguments:
|
||||
* gunID <number>
|
||||
* update solution <BOOL>
|
||||
* restore workingMemory from gunList <BOOL>
|
||||
* update display <BOOL>
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
@ -16,23 +17,30 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_gunID", "_updateSolution"];
|
||||
_gunID = _this select 0;
|
||||
_updateSolution = _this select 1;
|
||||
private ["_gunID", "_restoreMemory", "_updateDisplay"];
|
||||
_gunID = _this select 0;
|
||||
_restoreMemory = _this select 1;
|
||||
_updateDisplay = _this select 2;
|
||||
|
||||
if (_gunID < 0 || _gunID > (count GVAR(gunList)) - 1) exitWith {};
|
||||
|
||||
GVAR(workingMemory) = +(GVAR(gunList) select _gunID);
|
||||
if (_restoreMemory) then {
|
||||
GVAR(workingMemory) = +(GVAR(gunList) select _gunID);
|
||||
};
|
||||
GVAR(currentGun) = _gunID;
|
||||
|
||||
lbSetCurSel [6000, GVAR(currentGun)];
|
||||
if (_updateDisplay) then {
|
||||
lbSetCurSel [6000, GVAR(currentGun)];
|
||||
};
|
||||
|
||||
GVAR(currentScopeUnit) = 0 max (GVAR(workingMemory) select 6) min 3;
|
||||
GVAR(currentScopeClickUnit) = 0 max (GVAR(workingMemory) select 7) min 2;
|
||||
GVAR(currentScopeClickNumber) = 1 max (GVAR(workingMemory) select 8) min 10;
|
||||
|
||||
[] call FUNC(update_gun);
|
||||
[] call FUNC(update_gun_ammo_data);
|
||||
if (_updateDisplay) then {
|
||||
[] call FUNC(update_gun);
|
||||
[] call FUNC(update_gun_ammo_data);
|
||||
};
|
||||
|
||||
GVAR(elevationOutput) set [GVAR(currentTarget), 0];
|
||||
GVAR(windage1Output) set [GVAR(currentTarget), 0];
|
||||
@ -41,6 +49,6 @@ GVAR(leadOutput) set [GVAR(currentTarget), 0];
|
||||
GVAR(tofOutput) set [GVAR(currentTarget), 0];
|
||||
GVAR(velocityOutput) set [GVAR(currentTarget), 0];
|
||||
|
||||
if (_updateSolution) then {
|
||||
if (_updateDisplay) then {
|
||||
[] call FUNC(calculate_target_solution);
|
||||
};
|
||||
|
@ -40,7 +40,7 @@ GVAR(showTargetRangeAssist) call FUNC(show_target_range_assist);
|
||||
GVAR(showTargetSpeedAssist) call FUNC(show_target_speed_assist);
|
||||
GVAR(showTargetSpeedAssistTimer) call FUNC(show_target_speed_assist_timer);
|
||||
|
||||
[GVAR(currentGun), false] call FUNC(change_gun);
|
||||
[GVAR(currentGun), false, true] call FUNC(change_gun);
|
||||
|
||||
{
|
||||
lbAdd [6000, _x select 0];
|
||||
|
@ -17,4 +17,4 @@
|
||||
|
||||
if (!(GVAR(showMainPage) || GVAR(showGunList))) exitWith {};
|
||||
|
||||
[(GVAR(currentGun) + (count GVAR(gunList)) + _this) % (count GVAR(gunList)), true] call FUNC(change_gun);
|
||||
[(GVAR(currentGun) + (count GVAR(gunList)) + _this) % (count GVAR(gunList)), true, true] call FUNC(change_gun);
|
||||
|
@ -16,7 +16,7 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
GVAR(currentUnit) = 0 max (profileNamespace getVariable ["ACE_ATragMX_currentUnit", 2]) min 2;
|
||||
GVAR(currentGun) = 0 max (profileNamespace getVariable ["ACE_ATragMX_currentGun", 0]);
|
||||
[(profileNamespace getVariable ["ACE_ATragMX_currentGun", 0]), true, false] call FUNC(change_gun);
|
||||
GVAR(currentTarget) = 0 max (profileNamespace getVariable ["ACE_ATragMX_currentTarget", 0]) min 3;
|
||||
GVAR(currentScopeUnit) = 0 max (profileNamespace getVariable ["ACE_ATragMX_currentScopeUnit", 0]) min 3;
|
||||
|
||||
|
@ -20,7 +20,7 @@ if (ctrlVisible 6000) then {
|
||||
true call FUNC(show_main_page);
|
||||
|
||||
if (_this) then {
|
||||
[lbCurSel 6000, true] call FUNC(change_gun);
|
||||
[lbCurSel 6000, true, true] call FUNC(change_gun);
|
||||
};
|
||||
} else {
|
||||
false call FUNC(show_main_page);
|
||||
|
@ -79,7 +79,11 @@ class ACE_Settings {
|
||||
displayName = "$STR_ACE_Medical_litterSimulationDetail";
|
||||
description = "$STR_ACE_Medical_litterSimulationDetail_Desc";
|
||||
typeName = "SCALAR";
|
||||
value = 500;
|
||||
|
||||
value = 3;
|
||||
values[] = {"Off", "Low", "Medium", "High", "Ultra"};
|
||||
_values[] = { 0, 50, 100, 1000, 5000 };
|
||||
|
||||
isClientSettable = 1;
|
||||
};
|
||||
class GVAR(litterCleanUpDelay) {
|
||||
|
@ -4,7 +4,7 @@
|
||||
if(!hasInterface) exitWith { false };
|
||||
|
||||
PARAMS_3(_litterClass,_position,_direction);
|
||||
private["_litterObject"];
|
||||
private["_litterObject", "_maxLitterCount"];
|
||||
|
||||
if (isNil QGVAR(allCreatedLitter)) then {
|
||||
GVAR(allCreatedLitter) = [];
|
||||
@ -14,7 +14,8 @@ if (isNil QGVAR(allCreatedLitter)) then {
|
||||
_litterObject = _litterClass createVehicleLocal _position;
|
||||
_litterObject setDir _direction;
|
||||
|
||||
if((count GVAR(allCreatedLitter)) > GVAR(litterSimulationDetail) ) then {
|
||||
_maxLitterCount = getArray (configFile >> "ACE_Settings" >> QGVAR(litterSimulationDetail) >> "_values") select GVAR(litterSimulationDetail);
|
||||
if((count GVAR(allCreatedLitter)) > _maxLitterCount ) then {
|
||||
// gank the first litter object, and spawn ours.
|
||||
private["_oldLitter"];
|
||||
_oldLitter = GVAR(allCreatedLitter) deleteAt 0;
|
||||
|
Loading…
Reference in New Issue
Block a user