mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Fixed module value not overriding.
This commit is contained in:
parent
f4d7c6818b
commit
cad86280c1
@ -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;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -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);
|
||||
|
@ -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:
|
||||
|
@ -10,8 +10,6 @@
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
*
|
||||
*/
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user