Jump to content

How can I change the view distance cap on my server?


rsxownes

Recommended Posts

  • 11 months later...
On 2/7/2018 at 4:01 PM, Grahame said:

UPDATE: I got some time before heading off for meetings and tested the below "solution". Can confirm that admin's viewdistance is now limited as a player's is... Other admin tools seem to be fine too. If others can also test then I will work on adding a variable to epochAH.hpp, the reading of same in server_securityfunctions.sqf and then wrap the added lines in an if based on that variable. Hopefully the devs will accept that back and people will not have to maintain custom code each release...

Would inserting the following:


	[] spawn {
		disableSerialization;
		waitUntil{!isNull (findDisplay 46)};
		setViewDistance "+str _skn_viewDistance+";
		setObjectViewDistance["+str _skn_viewDistanceObects+", 100];
		setTerrainGrid "+str _skn_terrainGrid+";
	};		

before line 1271 which reads:


	uiNamespace setVariable['ESP_mainMap', findDisplay 12 displayCtrl 51];

in server_securityfunctions.sqf do the trick. Might have time to test this evening. Basically though, the admins have a separate code path for AH initialization than non-admins as shown in the following code:


531	EPOCH_server_pushPlayer = compileFinal ("
	params ['_playerNetID','_playerUID','_C_SET','_fsmHandle','_player'];
	if (_playerUID in "+ str _skn_adminUIDArray+") then {
		_playerNetID publicVariableClient '"+_skn_Admin_Code+"';
		_playerNetID publicVariableClient '"+_skn_pv_adminLog+"';
		_playerNetID publicVariableClient '"+_skn_pv_hackerLog+"';
		_C_SET pushBack '[] spawn "+_skn_Admin_Init+"';
	} else {
		_C_SET pushBack '[] spawn "+_skn_AH_Init+"';
	};
	[_fsmHandle,['_C_SET', _C_SET]] remoteExecCall ['setFSMVariable', _player];
	true
	");

So basically the _skn_code_antihack function that includes the viewdistance settings for normal players is replaced by _skn_admincode for admins and the proposal above runs the viewdistance related code in the admin function too...

Since 1.3 it's breaking admin menu, when i add this...May someone please help me for a solution ?

Link to comment
Share on other sites

You have tried adding this:

	setViewDistance "+str _skn_viewDistance+";
	setObjectViewDistance["+str _skn_viewDistanceObects+", 100];
	setTerrainGrid "+str _skn_terrainGrid+";



just before before line 1299

	uiNamespace setVariable['ESP_mainMap', findDisplay 12 displayCtrl 51];

On a quick look, it should still work (we have nothing changed here)

Link to comment
Share on other sites

1 hour ago, He-Man said:

You have tried adding this:


	setViewDistance "+str _skn_viewDistance+";
	setObjectViewDistance["+str _skn_viewDistanceObects+", 100];
	setTerrainGrid "+str _skn_terrainGrid+";



just before before line 1299


	uiNamespace setVariable['ESP_mainMap', findDisplay 12 displayCtrl 51];

On a quick look, it should still work (we have nothing changed here)

Thank you He-Man... without this :

[] spawn {
		disableSerialization;
		waitUntil{!isNull (findDisplay 46)};



};

admin menu and view distance changes work again together.. how ever that makes sence..

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...