Cleaned up headers, newlines in viewdistance

This commit is contained in:
jonpas 2015-08-12 20:16:01 +02:00
parent 1a2b99c76c
commit e20811c0f2
11 changed files with 22 additions and 27 deletions

View File

@ -1,4 +1,3 @@
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
@ -7,6 +6,6 @@ class Extended_PreInit_EventHandlers {
class Extended_PostInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_postInit));
clientInit = QUOTE(call COMPILE_FILE(XEH_postInit));
};
};
};

View File

@ -5,23 +5,24 @@ if (!hasInterface) exitWith {};
["SettingsInitialized", {
// if not enabled, then bugger off.
if !(GVAR(enabled)) exitWith {};
// Force the view distance down to the limit.
if (viewDistance > GVAR(limitViewDistance)) then {
setViewDistance GVAR(limitViewDistance);
};
// Adapt view distance when the player is created or changed according to whether client is on foot or vehicle.
["playerChanged",{
[false] call FUNC(adaptViewDistance);
}] call EFUNC(common,addEventHandler);
// Set the EH which waits for any of the view distance settings to be changed, so that the effect is show immediately
["SettingChanged",{
if ((_this select 0 == QGVAR(viewDistanceOnFoot)) ||
(_this select 0 == QGVAR(viewDistanceLandVehicle)) ||
(_this select 0 == QGVAR(viewDistanceAirVehicle)) ||
(_this select 0 == QGVAR(objectViewDistanceCoeff))) then {
params ["_name"];
if ((_name == QGVAR(viewDistanceOnFoot)) ||
(_name == QGVAR(viewDistanceLandVehicle)) ||
(_name == QGVAR(viewDistanceAirVehicle)) ||
(_name == QGVAR(objectViewDistanceCoeff))) then {
[true] call FUNC(adaptViewDistance);
};
@ -31,4 +32,4 @@ if (!hasInterface) exitWith {};
["playerVehicleChanged",{
[false] call FUNC(adaptViewDistance)
}] call EFUNC(common,addEventHandler);
}] call EFUNC(common,addEventHandler);
}] call EFUNC(common,addEventHandler);

View File

@ -8,4 +8,4 @@ PREP(returnObjectCoeff);
PREP(changeViewDistance);
PREP(adaptViewDistance);
ADDON = true;
ADDON = true;

View File

@ -10,7 +10,7 @@
* None
*
* Example:
* [] call ace_viewdistance_fnc_adaptViewDistance;
* [] call ace_viewdistance_fnc_adaptViewDistance
*
* Public: No
*/
@ -36,4 +36,4 @@ if (_land_vehicle) exitWith {
if (_air_vehicle) exitWith {
[GVAR(viewDistanceAirVehicle),_show_prompt] call FUNC(changeViewDistance);
};
};

View File

@ -2,7 +2,6 @@
* Author: Winter
* Sets the player's current view distance according to allowed values.
*
*
* Arguments:
* 0: View Distance setting INDEX <SCALAR>
* 1: Show Prompt <BOOL>
@ -11,7 +10,7 @@
* None
*
* Example:
* [] call ace_viewdistance_fnc_changeViewDistance;
* [] call ace_viewdistance_fnc_changeViewDistance
*
* Public: No
*/

View File

@ -1,7 +1,6 @@
/*
* Author: Winter
* Initialises the view distance limiter module
*
* Initializes the view distance limiter module.
*
* Arguments:
* 0: logic <OBJECT>
@ -10,7 +9,6 @@
*
* Return Value:
* None
*
*/
#include "script_component.hpp"
@ -26,4 +24,4 @@ if (!_activated) exitWith {
[_logic, QGVAR(enabled),"moduleViewDistanceEnabled"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(limitViewDistance),"moduleViewDistanceLimit"] call EFUNC(common,readSettingFromModule);
diag_log format ["[ACE]: View Distance Limit Module Initialized. Limit set by module: %1",GVAR(limitViewDistance)];
diag_log format ["[ACE]: View Distance Limit Module Initialized. Limit set by module: %1",GVAR(limitViewDistance)];

View File

@ -2,7 +2,6 @@
* Author: Winter
* Returns the object view distance coefficient according to the given index
*
*
* Arguments:
* 0: Object View Distance setting Index <SCALAR>
*

View File

@ -1,7 +1,6 @@
/*
* Author: Winter
* Returns the view distance value according to the given index
*
* Returns the view distance value according to the given index.
*
* Arguments:
* 0: View Distance Index <SCALAR>
@ -10,7 +9,7 @@
* View Distance <SCALAR>
*
* Example:
* [2] call ace_viewdistance_fnc_returnViewDistanceValue;
* [2] call ace_viewdistance_fnc_returnViewDistanceValue
*
* Public: No
*/

View File

@ -1 +1 @@
#include "\z\ace\addons\viewdistance\script_component.hpp"
#include "\z\ace\addons\viewdistance\script_component.hpp"

View File

@ -9,4 +9,4 @@
#define DEBUG_SETTINGS DEBUG_SETTINGS_VIEWDISTANCE
#endif
#include "\z\ace\addons\main\script_macros.hpp"
#include "\z\ace\addons\main\script_macros.hpp"

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project name="ACE">
<Package name="View Distance">
<Package name="ViewDistance">
<Key ID="STR_ACE_ViewDistance_Module_DisplayName">
<English>View Distance Limiter</English>
<Polish>Ogranicznik zasięgu widzenia</Polish>