mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Cleaned up headers, newlines in viewdistance
This commit is contained in:
parent
1a2b99c76c
commit
e20811c0f2
@ -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));
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -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);
|
||||
|
@ -8,4 +8,4 @@ PREP(returnObjectCoeff);
|
||||
PREP(changeViewDistance);
|
||||
PREP(adaptViewDistance);
|
||||
|
||||
ADDON = true;
|
||||
ADDON = true;
|
||||
|
@ -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);
|
||||
};
|
||||
};
|
||||
|
@ -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
|
||||
*/
|
||||
|
@ -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)];
|
||||
|
@ -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>
|
||||
*
|
||||
|
@ -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
|
||||
*/
|
||||
|
@ -1 +1 @@
|
||||
#include "\z\ace\addons\viewdistance\script_component.hpp"
|
||||
#include "\z\ace\addons\viewdistance\script_component.hpp"
|
||||
|
@ -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"
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user