Skip to content

Commit

Permalink
Merge pull request #2008 from jokoho48/codeCleanupViewdistance
Browse files Browse the repository at this point in the history
Code cleanup Viewdistance module
  • Loading branch information
thojkooi committed Aug 8, 2015
2 parents 13f7d0f + ade6c99 commit 94be0d9
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions addons/viewdistance/functions/fnc_adaptViewDistance.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
2 changes: 1 addition & 1 deletion addons/viewdistance/functions/fnc_changeViewDistance.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion addons/viewdistance/functions/fnc_initModule.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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.";
Expand Down
8 changes: 4 additions & 4 deletions addons/viewdistance/functions/fnc_returnObjectCoeff.sqf
Original file line number Diff line number Diff line change
@@ -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>
Expand All @@ -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
Expand All @@ -31,4 +31,4 @@ _return = switch (_index) do {
default {0.50}; // something broke if this returns
};

_return;
_return;
6 changes: 3 additions & 3 deletions addons/viewdistance/functions/fnc_returnValue.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand All @@ -40,4 +40,4 @@ _return = switch (_index) do {
default {1000};
};

_return;
_return;

0 comments on commit 94be0d9

Please sign in to comment.