diff --git a/Sources/epoch_code/gui/scripts/dynamenu/Epoch_dynamicMenu.sqf b/Sources/epoch_code/gui/scripts/dynamenu/Epoch_dynamicMenu.sqf index fa35579f..73d76d80 100644 --- a/Sources/epoch_code/gui/scripts/dynamenu/Epoch_dynamicMenu.sqf +++ b/Sources/epoch_code/gui/scripts/dynamenu/Epoch_dynamicMenu.sqf @@ -108,11 +108,21 @@ _checkConfigs = { format ["%2 %1 call Epoch_dynamicMenu;",_arr + [(configName _x)],getText(_x >> "action")] }; + _tooltip = ""; + _tooltipcode = getText(_x >> "tooltipcode"),; + if (_tooltipcode != "") then { + _tooltip = [] call compile _tooltipcode; + } + else { + _tooltip = getText(_x >> "tooltip"); + }; + _buttonSettings pushBack [ getText(_x >> "icon"), - getText(_x >> "tooltip"), + _tooltip, _action ]; + }; }; } forEach _configs; diff --git a/Sources/epoch_server/compile/epoch_vehicle/EPOCH_server_lockVehicle.sqf b/Sources/epoch_server/compile/epoch_vehicle/EPOCH_server_lockVehicle.sqf index 942bb790..77671b50 100644 --- a/Sources/epoch_server/compile/epoch_vehicle/EPOCH_server_lockVehicle.sqf +++ b/Sources/epoch_server/compile/epoch_vehicle/EPOCH_server_lockVehicle.sqf @@ -54,7 +54,7 @@ _crew = []; _logic = if !(_crew isEqualTo []) then { if (_player in _crew) then { // allow unlock if player is the driver or is inside the vehicle with out a driver. - (_player isEqualTo _driver || isNull(_driver)) + (_player isEqualTo _driver || isNull(_driver) || _lockedOwner == _lockOwner || !alive _driver) } else { // allow only if player is already the owner as they are not inside the occupied vehicle. (_lockedOwner == _lockOwner) diff --git a/Sources/epoch_server/compile/epoch_vehicle/EPOCH_server_save_storage.sqf b/Sources/epoch_server/compile/epoch_vehicle/EPOCH_server_save_storage.sqf index a407bdaa..e6ddca33 100644 --- a/Sources/epoch_server/compile/epoch_vehicle/EPOCH_server_save_storage.sqf +++ b/Sources/epoch_server/compile/epoch_vehicle/EPOCH_server_save_storage.sqf @@ -35,6 +35,18 @@ if (!isNull _vehicle) then { if (isNil "_magsAmmoCargo") then { _magsAmmoCargo = []; }; + + { + _cargo = _x select 1; + _magsAmmoCargox = magazinesAmmoCargo _cargo; + { + _magsAmmoCargo pushback _x; + } foreach _magsAmmoCargox; + _wepsItemsCargox = weaponsItemsCargo _cargo; + { + _wepsItemsCargo pushback _x; + } foreach _wepsItemsCargox; + } foreach everycontainer _vehicle; // minimize magazine ammo cargo _magsAmmoCargoMinimized = [[],[]]; diff --git a/Sources/epoch_server/compile/epoch_vehicle/EPOCH_server_save_vehicle.sqf b/Sources/epoch_server/compile/epoch_vehicle/EPOCH_server_save_vehicle.sqf index 21cd329f..9ca086c9 100644 --- a/Sources/epoch_server/compile/epoch_vehicle/EPOCH_server_save_vehicle.sqf +++ b/Sources/epoch_server/compile/epoch_vehicle/EPOCH_server_save_vehicle.sqf @@ -34,6 +34,18 @@ if (!isNull _vehicle) then { if (isNil "_magsAmmoCargo") then { _magsAmmoCargo = []; }; + + { + _cargo = _x select 1; + _magsAmmoCargox = magazinesAmmoCargo _cargo; + { + _magsAmmoCargo pushback _x; + } foreach _magsAmmoCargox; + _wepsItemsCargox = weaponsItemsCargo _cargo; + { + _wepsItemsCargo pushback _x; + } foreach _wepsItemsCargox; + } foreach everycontainer _vehicle; // minimize magazine ammo cargo _magsAmmoCargoMinimized = [[],[]]; diff --git a/Sources/epoch_server/init/server_init.sqf b/Sources/epoch_server/init/server_init.sqf index 48d9cb32..964cf6a3 100644 --- a/Sources/epoch_server/init/server_init.sqf +++ b/Sources/epoch_server/init/server_init.sqf @@ -140,6 +140,8 @@ _allowedVehicleListName = ["allowedVehiclesList","allowedVehiclesList_CUP"] sele _allowedVehiclesList = getArray(configFile >> "CfgEpoch" >> worldName >> _allowedVehicleListName); _vehicleSlotLimit = 0; {_vehicleSlotLimit = _vehicleSlotLimit + (_x select 1)} forEach _allowedVehiclesList; +_ReservedSlots = 50; +_vehicleSlotLimit = _vehicleSlotLimit + _ReservedSlots; _vehicleSlotLimit call EPOCH_load_vehicles; diag_log "Epoch: Spawning vehicles"; diff --git a/Sources/epoch_server/system/server_monitor.fsm b/Sources/epoch_server/system/server_monitor.fsm index d0dfc9da..86aa9232 100644 --- a/Sources/epoch_server/system/server_monitor.fsm +++ b/Sources/epoch_server/system/server_monitor.fsm @@ -294,7 +294,7 @@ class FSM " _deSim = false;" \n " if (crew _selectedVehicle isEqualTo []) then {" \n " if ((getPos _selectedVehicle) select 2 < 1) then {" \n - " if ({isPlayer _selectedVehicle} count (_selectedVehicle nearEntities[[""CAManBase"", ""LandVehicle"", ""Ship"", ""Air"", ""Tank""], 300]) == 0) then {" \n + " if ({isPlayer _x} count (_selectedVehicle nearEntities[[""CAManBase"", ""LandVehicle"", ""Ship"", ""Air"", ""Tank""], 300]) == 0) then {" \n " _selectedVehicle enableSimulationGlobal false;" \n " _deSim = true;" \n " };" \n @@ -458,4 +458,4 @@ class FSM { }; }; -/*%FSM*/ \ No newline at end of file +/*%FSM*/