Fixed module value not overriding.

This commit is contained in:
SAM 2015-05-09 14:51:23 +02:00
parent f4d7c6818b
commit cad86280c1
4 changed files with 4 additions and 9 deletions

View File

@ -12,8 +12,8 @@ class CfgVehicles {
class moduleViewDistanceLimit {
displayName = "View Distance Limit";
description = "Sets the limit for how high clients can raise their view distance (< 10000)";
typeName = "SCALAR";
defaultValue = 6000;
typeName = "NUMBER";
defaultValue = 10000;
};
};
};

View File

@ -19,13 +19,10 @@
private ["_text","_new_view_distance","_view_distance_limit"];
// Change the received index number into an actual view distance number as set in the config:
// Change the received index number into an actual view distance:
_new_view_distance = [GVAR(viewDistance)] call FUNC(returnValue);
_view_distance_limit = GVAR(limit); // Grab the limit
diag_log format ["[ACE]: DEBUG View Distance change requested: %1 Limit is: %2 Under Limit: %3",_new_view_distance,_view_distance_limit,_new_view_distance<_view_distance_limit]; // ONLY FOR DEBUG, REMOVE LATER ON
if (_new_view_distance <= _view_distance_limit) then {
_text = composeText ["View distance successfully changed to: ",str(_new_view_distance)];
[_text,1] call EFUNC(common,displayTextStructured);

View File

@ -1,6 +1,6 @@
/*
* Author: Winter
* Assigns the Event Handler which fires when a player adjusts their view distance in the menu
* Assigns the Event Handler which triggers when a player adjusts their view distance in the menu
*
*
* Arguments:

View File

@ -10,8 +10,6 @@
*
* Return Value:
* None
*
* Example:
*
*/