From 3d3ef45f3b7b484e4e9504ee6ca06692bf666020 Mon Sep 17 00:00:00 2001 From: He-Man Date: Fri, 2 Aug 2019 18:41:50 +0200 Subject: [PATCH] PaintShop Tweaks --- .../CfgActionMenu/CfgActionMenu_target.hpp | 2 +- Sources/epoch_server/init/server_init.sqf | 21 +++++++++++-------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/Sources/epoch_config/Configs/CfgActionMenu/CfgActionMenu_target.hpp b/Sources/epoch_config/Configs/CfgActionMenu/CfgActionMenu_target.hpp index a997609f..8fc6ae68 100644 --- a/Sources/epoch_config/Configs/CfgActionMenu/CfgActionMenu_target.hpp +++ b/Sources/epoch_config/Configs/CfgActionMenu/CfgActionMenu_target.hpp @@ -24,7 +24,7 @@ class build_upgrade }; class PaintGarage { - condition = "(dyna_cursortargettype isEqualTo 'paintshop' && {player distance2d (dyna_cursorTarget modelToWorld (dyna_cursorTarget selectionPosition 'action1')) < 1}) || dyna_cursortargettype in ['Add other Buildings here']"; + condition = "(dyna_cursortargettype isEqualTo 'paintshop' && {player distance2d (dyna_cursorTarget modelToWorld (dyna_cursorTarget selectionPosition 'action1')) < 1.5}) || dyna_cursortargettype in ['Add other Buildings here']"; action = ""; icon = "x\addons\a3_epoch_code\Data\UI\buttons\Paint.paa"; tooltip = "Paint Garage"; diff --git a/Sources/epoch_server/init/server_init.sqf b/Sources/epoch_server/init/server_init.sqf index 788d2990..dfe9b835 100644 --- a/Sources/epoch_server/init/server_init.sqf +++ b/Sources/epoch_server/init/server_init.sqf @@ -172,15 +172,6 @@ for "_i" from 0 to 9 do { UseCustomTextures = ([_serverSettingsConfig, "UseCustomTextures", false] call EPOCH_fnc_returnConfigEntry); -if (([_serverSettingsConfig, "ReplaceCarService", false] call EPOCH_fnc_returnConfigEntry)) then { - { - private _shop = "paintshop" createvehicle (getpos _x); - _shop setposatl (getposatl _x); - _shop setVectorDirAndUp [VectorDir _x, VectorUp _x]; - _x HideobjectGlobal true; - } foreach (epoch_centerMarkerPosition nearObjects ["Land_CarService_F", EPOCH_dynamicVehicleArea]); -}; - //Execute Server Functions diag_log "Epoch: Loading buildings"; EPOCH_BuildingSlotsLimit call EPOCH_server_loadBuildings; @@ -196,6 +187,18 @@ diag_log "Epoch: Spawning NPC traders"; call EPOCH_server_spawnTraders; publicvariable "EPOCH_Traders"; +if (([_serverSettingsConfig, "ReplaceCarService", false] call EPOCH_fnc_returnConfigEntry)) then { + { + private _shop = "paintshop" createvehicle (getpos _x); + _shop setposatl (getposatl _x); + _shop setVectorDirAndUp [VectorDir _x, VectorUp _x]; + _x HideobjectGlobal true; + } foreach (epoch_centerMarkerPosition nearObjects ["Land_CarService_F", EPOCH_dynamicVehicleArea]); +}; +{ + _markers = ["ServicePoint", (getpos _x),"PaintGarage"] call EPOCH_server_createGlobalMarkerSet; +} foreach (allmissionobjects "paintshop"); + diag_log "Epoch: Loading vehicles"; // Vehicle slot limit set to total of all allowed limits _allowedVehicleIndex = if (EPOCH_modCUPVehiclesEnabled) then {if (EPOCH_mod_madArma_Enabled) then {3} else {1}} else {if (EPOCH_mod_madArma_Enabled) then {2} else {0}};