Merge pull request #2008 from jokoho48/codeCleanupViewdistance

Code cleanup Viewdistance module
This commit is contained in:
Glowbal 2015-08-08 14:18:45 +02:00
commit 94be0d9fbd
5 changed files with 11 additions and 11 deletions

View File

@ -17,10 +17,10 @@
#include "script_component.hpp"
PARAMS_1(_show_prompt);
private["_land_vehicle","_air_vehicle"];
params ["_show_prompt"];
if (!GVAR(enabled) || isNull ACE_player) exitWith {};
_land_vehicle = (vehicle ACE_player) isKindOf "LandVehicle";

View File

@ -20,7 +20,7 @@
private ["_text","_new_view_distance","_view_distance_limit","_object_view_distance_coeff"];
PARAMS_2(_index_requested,_show_prompt);
params ["_index_requested", "_show_prompt"];
_new_view_distance = [_index_requested] call FUNC(returnValue); // changes the setting index into an actual view distance value
_object_view_distance_coeff = [GVAR(objectViewDistanceCoeff)] call FUNC(returnObjectCoeff); // changes the setting index into a coefficient.

View File

@ -17,7 +17,7 @@
if (!isServer) exitWith {};
PARAMS_3(_logic,_units,_activated);
params ["_logic", "_units", "_activated"];
if (!_activated) exitWith {
diag_log text "[ACE]: View Distance Limit Module is placed but NOT active.";

View File

@ -1,7 +1,7 @@
/*
* Author: Winter
* Returns the object view distance coefficient according to the given index
*
*
*
* Arguments:
* 0: Object View Distance setting Index <SCALAR>
@ -17,10 +17,10 @@
#include "script_component.hpp"
PARAMS_1(_index);
private ["_return"];
params ["_index"];
_return = switch (_index) do {
case 0: {0.00}; // Off
case 1: {0.20}; // Very Low
@ -31,4 +31,4 @@ _return = switch (_index) do {
default {0.50}; // something broke if this returns
};
_return;
_return;

View File

@ -17,10 +17,10 @@
#include "script_component.hpp"
PARAMS_1(_index);
private ["_return"];
params ["_index"]
_return = switch (_index) do {
case 0: {-1};
case 1: {500};
@ -40,4 +40,4 @@ _return = switch (_index) do {
default {1000};
};
_return;
_return;