From 4aa72d5a5d9ea2b09961ad5b74df1f7f9a24b037 Mon Sep 17 00:00:00 2001 From: DirtySanchez Date: Thu, 19 Oct 2017 11:30:42 -0500 Subject: [PATCH] add config mapOnZoomSetMarkerSize --- .../compile/setup/masterLoop/Event1.sqf | 95 ++++++++++--------- .../epoch_config/Configs/CfgEpochClient.hpp | 5 +- 2 files changed, 51 insertions(+), 49 deletions(-) diff --git a/Sources/epoch_code/compile/setup/masterLoop/Event1.sqf b/Sources/epoch_code/compile/setup/masterLoop/Event1.sqf index fda39bd2..b29ed2c2 100644 --- a/Sources/epoch_code/compile/setup/masterLoop/Event1.sqf +++ b/Sources/epoch_code/compile/setup/masterLoop/Event1.sqf @@ -376,57 +376,58 @@ if(_markerName in allMapMarkers)then{ }forEach _markerArray; }; }; - -if(visibleMap)then{ - _mapControl = (findDisplay 12) displayCtrl 51; - _mapScale = ctrlMapScale _mapControl; - _zoomMarkers = allMapMarkers; - if(isNil {EPOCH_lastMapScale})then{EPOCH_lastMapScale = 0}; - for "_i" from 0 to ((count _zoomMarkers) - 1) do { - _zoomMarker = _zoomMarkers select _i; - private "_markerString"; - _markerString = toArray _zoomMarker; - _markerString resize 6; - if (toString _markerString == "EPOCH_") then { - switch(true)do{ - case ( (_mapScale >= 0.95) && (_mapScale <= 1) ): { - _zoomMarker setMarkerSizeLocal [0.666,0.666]; - //_zoomMarker setMarkerAlphaLocal 0; - }; - case ( (_mapScale >= 0.75) && (_mapScale < 0.95) ): { - _zoomMarker setMarkerSizeLocal [0.8,0.8]; - }; - case ( (_mapScale >= 0.55) && (_mapScale < 0.75) ): { - _zoomMarker setMarkerSizeLocal [0.9,0.9]; - }; - case ( (_mapScale >= 0.5) && (_mapScale < 0.55) ): { - _zoomMarker setMarkerSizeLocal [1.0,1.0]; - }; - case ( (_mapScale >= 0.45) && (_mapScale < 0.5) ): { - _zoomMarker setMarkerSizeLocal [1.1,1.1]; - }; - case ( (_mapScale >= 0.35) && (_mapScale < 0.45) ): { - _zoomMarker setMarkerSizeLocal [1.2,1.2]; - }; - case ( (_mapScale >= 0.25) && (_mapScale < 0.35) ): { - _zoomMarker setMarkerSizeLocal [1.3,1.3]; - }; - case ( (_mapScale >= 0.15) && (_mapScale < 0.25) ): { - _zoomMarker setMarkerSizeLocal [1.4,1.4]; - }; - case ( (_mapScale >= 0.1) && (_mapScale < 0.15) ): { - _zoomMarker setMarkerSizeLocal [1.5,1.5]; - }; - case ( (_mapScale >= 0.0666) && (_mapScale < 0.1) ): { - _zoomMarker setMarkerSizeLocal [1.6,1.6]; - }; - case ( (_mapScale >= 0) && (_mapScale < 0.0666) ): { - _zoomMarker setMarkerSizeLocal [1.7,1.7]; +if(getNumber(('CfgEpochClient' call EPOCH_returnConfig) >> 'mapOnZoomSetMarkerSize') isEqualTo 1)then{ + if(visibleMap)then{ + _mapControl = (findDisplay 12) displayCtrl 51; + _mapScale = ctrlMapScale _mapControl; + _zoomMarkers = allMapMarkers; + if(isNil {EPOCH_lastMapScale})then{EPOCH_lastMapScale = 0}; + for "_i" from 0 to ((count _zoomMarkers) - 1) do { + _zoomMarker = _zoomMarkers select _i; + private "_markerString"; + _markerString = toArray _zoomMarker; + _markerString resize 6; + if (toString _markerString == "EPOCH_") then { + switch(true)do{ + case ( (_mapScale >= 0.95) && (_mapScale <= 1) ): { + _zoomMarker setMarkerSizeLocal [0.666,0.666]; + //_zoomMarker setMarkerAlphaLocal 0; + }; + case ( (_mapScale >= 0.75) && (_mapScale < 0.95) ): { + _zoomMarker setMarkerSizeLocal [0.8,0.8]; + }; + case ( (_mapScale >= 0.55) && (_mapScale < 0.75) ): { + _zoomMarker setMarkerSizeLocal [0.9,0.9]; + }; + case ( (_mapScale >= 0.5) && (_mapScale < 0.55) ): { + _zoomMarker setMarkerSizeLocal [1.0,1.0]; + }; + case ( (_mapScale >= 0.45) && (_mapScale < 0.5) ): { + _zoomMarker setMarkerSizeLocal [1.1,1.1]; + }; + case ( (_mapScale >= 0.35) && (_mapScale < 0.45) ): { + _zoomMarker setMarkerSizeLocal [1.2,1.2]; + }; + case ( (_mapScale >= 0.25) && (_mapScale < 0.35) ): { + _zoomMarker setMarkerSizeLocal [1.3,1.3]; + }; + case ( (_mapScale >= 0.15) && (_mapScale < 0.25) ): { + _zoomMarker setMarkerSizeLocal [1.4,1.4]; + }; + case ( (_mapScale >= 0.1) && (_mapScale < 0.15) ): { + _zoomMarker setMarkerSizeLocal [1.5,1.5]; + }; + case ( (_mapScale >= 0.0666) && (_mapScale < 0.1) ): { + _zoomMarker setMarkerSizeLocal [1.6,1.6]; + }; + case ( (_mapScale >= 0) && (_mapScale < 0.0666) ): { + _zoomMarker setMarkerSizeLocal [1.7,1.7]; + }; }; }; }; + EPOCH_lastMapScale = _mapScale; }; - EPOCH_lastMapScale = _mapScale; }; // force update diff --git a/Sources/epoch_config/Configs/CfgEpochClient.hpp b/Sources/epoch_config/Configs/CfgEpochClient.hpp index dc735b13..d04e4af3 100644 --- a/Sources/epoch_config/Configs/CfgEpochClient.hpp +++ b/Sources/epoch_config/Configs/CfgEpochClient.hpp @@ -176,8 +176,9 @@ class CfgEpochClient playerKilledScreen = "TapOut2"; playerDisableRevenge = 0; playerRevengeMinAliveTime = 900; - playerLocationMarkerGPSOnly = 1; // Map marker toggle in map dyna menu with assigned GPS only - playerDeathMarkerGPSOnly = 1; // Map marker toggle in map dyna menu on death with assigned GPS only + playerLocationMarkerGPSOnly = 1; // Map marker toggle in map dyna menu with assigned GPS only + playerDeathMarkerGPSOnly = 1; // Map marker toggle in map dyna menu on death with assigned GPS only + mapOnZoomSetMarkerSize = 1; // When in map markers will change to larger size as player zooms in bankTransferTime[] = {0.0006,1.2,0.06}; // Favorite Bar