mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Some Headers
This commit is contained in:
parent
5c5b8f656e
commit
a8b000c159
@ -1,5 +1,4 @@
|
|||||||
class ACE_82mm_RangeTable_Dialog
|
class ACE_82mm_RangeTable_Dialog {
|
||||||
{
|
|
||||||
idd = -1;
|
idd = -1;
|
||||||
movingEnable = 1;
|
movingEnable = 1;
|
||||||
onLoad = "uiNamespace setVariable ['ACE_82mm_RangeTable_Dialog', _this select 0];";
|
onLoad = "uiNamespace setVariable ['ACE_82mm_RangeTable_Dialog', _this select 0];";
|
||||||
|
@ -3,4 +3,3 @@
|
|||||||
if (!hasInterface) exitWith {};
|
if (!hasInterface) exitWith {};
|
||||||
|
|
||||||
["playerVehicleChanged", {_this call FUNC(handlePlayerVehicleChanged);}] call EFUNC(common,addEventHandler);
|
["playerVehicleChanged", {_this call FUNC(handlePlayerVehicleChanged);}] call EFUNC(common,addEventHandler);
|
||||||
|
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
ADDON = false;
|
ADDON = false;
|
||||||
|
|
||||||
|
|
||||||
PREP(dev_buildTable);
|
PREP(dev_buildTable);
|
||||||
PREP(dev_formatNumber);
|
PREP(dev_formatNumber);
|
||||||
PREP(dev_simulateCalcRangeTableLine);
|
PREP(dev_simulateCalcRangeTableLine);
|
||||||
|
@ -25,7 +25,6 @@ class RscControlsGroup;
|
|||||||
class ScrollBar;
|
class ScrollBar;
|
||||||
class RscActiveText;
|
class RscActiveText;
|
||||||
|
|
||||||
|
|
||||||
#include "RscInGameUI.hpp"
|
#include "RscInGameUI.hpp"
|
||||||
#include "RscRangeTable.hpp"
|
#include "RscRangeTable.hpp"
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Author: PabstMirror
|
* Author: PabstMirror
|
||||||
|
* Called when the mortar is fired.
|
||||||
*
|
*
|
||||||
* Arguments:
|
* Arguments:
|
||||||
* 0: mortar - Object the event handler is assigned to <OBJECT>
|
* 0: mortar - Object the event handler is assigned to <OBJECT>
|
||||||
@ -14,7 +15,7 @@
|
|||||||
* Nothing
|
* Nothing
|
||||||
*
|
*
|
||||||
* Example:
|
* Example:
|
||||||
* [clientFiredBIS-XEH] call ace_
|
* [clientFiredBIS-XEH] call ace_mk6mortars_fnc_handleFired
|
||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
@ -24,11 +25,14 @@ disableSerialization;
|
|||||||
|
|
||||||
PARAMS_7(_vehicle,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile);
|
PARAMS_7(_vehicle,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile);
|
||||||
|
|
||||||
|
|
||||||
if (!GVAR(airResistanceEnabled)) exitWith {};
|
if (!GVAR(airResistanceEnabled)) exitWith {};
|
||||||
|
|
||||||
if (_unit distance ACE_player > 3000) exitWith {false}; // Large enough distance to not simulate any wind deflection.
|
if (_unit distance ACE_player > 3000) exitWith {false}; // Large enough distance to not simulate any wind deflection.
|
||||||
if (!GVAR(EnableForAI) && !([_unit] call EFUNC(common,isPlayer))) exitWith {false};
|
|
||||||
|
//AI will have no clue how to use:
|
||||||
|
_shooterMan = gunner _vehicle;
|
||||||
|
if (!([_shooterMan] call EFUNC(common,isPlayer))) exitWith {false};
|
||||||
|
|
||||||
|
|
||||||
//Hack Until these are intergrated:
|
//Hack Until these are intergrated:
|
||||||
if (isNil QEGVAR(weather,currentRelativeDensity)) then {
|
if (isNil QEGVAR(weather,currentRelativeDensity)) then {
|
||||||
@ -38,6 +42,7 @@ if (isNil QEGVAR(weather,currentTemperature)) then {
|
|||||||
EGVAR(weather,currentTemperature) = 20;
|
EGVAR(weather,currentTemperature) = 20;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
//powder effects:
|
//powder effects:
|
||||||
_temperature = EGVAR(weather,currentTemperature);
|
_temperature = EGVAR(weather,currentTemperature);
|
||||||
_newMuzzleVelocityCoefficent = (((_temperature + 273.13) / 288.13 - 1) / 40 + 1);
|
_newMuzzleVelocityCoefficent = (((_temperature + 273.13) / 288.13 - 1) / 40 + 1);
|
||||||
@ -71,17 +76,12 @@ if (_newMuzzleVelocityCoefficent != 1) then {
|
|||||||
_trueVelocity = _bulletVelocity vectorDiff ACE_wind;
|
_trueVelocity = _bulletVelocity vectorDiff ACE_wind;
|
||||||
_trueSpeed = vectorMagnitude _trueVelocity;
|
_trueSpeed = vectorMagnitude _trueVelocity;
|
||||||
|
|
||||||
// _dragRef = _deltaT * _airFriction * _bulletSpeed * _bulletSpeed;
|
|
||||||
// _accelRef = (vectorNormalized _bulletVelocity) vectorMultiply (_dragRef);
|
|
||||||
// _bulletVelocity = _bulletVelocity vectorDiff _accelRef;
|
|
||||||
|
|
||||||
_drag = _deltaT * _airFriction * _trueSpeed * EGVAR(weather,currentRelativeDensity);
|
_drag = _deltaT * _airFriction * _trueSpeed * EGVAR(weather,currentRelativeDensity);
|
||||||
_accel = _trueVelocity vectorMultiply (_drag);
|
_accel = _trueVelocity vectorMultiply (_drag);
|
||||||
|
|
||||||
_bulletVelocity = _bulletVelocity vectorAdd _accel;
|
_bulletVelocity = _bulletVelocity vectorAdd _accel;
|
||||||
};
|
};
|
||||||
_shell setVelocity _bulletVelocity;
|
_shell setVelocity _bulletVelocity;
|
||||||
// TODO expand with advanced ballistics functionality.
|
|
||||||
|
|
||||||
}, 0, [_projectile, MK6_82mm_AIR_FRICTION, time]] call CBA_fnc_addPerFrameHandler;
|
}, 0, [_projectile, MK6_82mm_AIR_FRICTION, time]] call CBA_fnc_addPerFrameHandler;
|
||||||
// };
|
// };
|
||||||
|
@ -1,10 +1,13 @@
|
|||||||
/*
|
/*
|
||||||
* Author: PabstMirror
|
* Author: PabstMirror
|
||||||
*
|
* Handles player getting into new vehicle. Loads PFEG for mortar display if it is a mortar.
|
||||||
*
|
*
|
||||||
* Arguments:
|
* Arguments:
|
||||||
|
* 0:Player <OBJECT>
|
||||||
|
* 1: New Vehicle <OBJECT>
|
||||||
*
|
*
|
||||||
* Return Value:
|
* Return Value:
|
||||||
|
* No
|
||||||
*
|
*
|
||||||
* Example:
|
* Example:
|
||||||
*
|
*
|
||||||
@ -17,8 +20,6 @@ PARAMS_2(_player,_newVehicle);
|
|||||||
if (isNull _newVehicle) exitWith {};
|
if (isNull _newVehicle) exitWith {};
|
||||||
if (!(_newVehicle isKindOf "Mortar_01_base_F")) exitWith {};
|
if (!(_newVehicle isKindOf "Mortar_01_base_F")) exitWith {};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
_chargeText = (findDisplay 46) ctrlCreate ["RscStructuredText", 80085];
|
_chargeText = (findDisplay 46) ctrlCreate ["RscStructuredText", 80085];
|
||||||
|
|
||||||
_xPos = (profilenamespace getvariable ["IGUI_GRID_WEAPON_X", ((safezoneX + safezoneW) - (12.4 * (((safezoneW / safezoneH) min 1.2) / 40)) - 0.5 * (((safezoneW / safezoneH) min 1.2) / 40))]);
|
_xPos = (profilenamespace getvariable ["IGUI_GRID_WEAPON_X", ((safezoneX + safezoneW) - (12.4 * (((safezoneW / safezoneH) min 1.2) / 40)) - 0.5 * (((safezoneW / safezoneH) min 1.2) / 40))]);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Author: PabstMirror
|
* Author: PabstMirror
|
||||||
*
|
* Loads settings from the module.
|
||||||
*
|
*
|
||||||
* Arguments:
|
* Arguments:
|
||||||
* 0: The Module Logic Object <OBJECT>
|
* 0: The Module Logic Object <OBJECT>
|
||||||
|
@ -1,11 +1,16 @@
|
|||||||
/*
|
/*
|
||||||
* Author: PabstMirror
|
* Author: PabstMirror
|
||||||
|
* Opens the rangetable and fills the charge listbox.
|
||||||
*
|
*
|
||||||
* Arguments:
|
* Arguments:
|
||||||
|
* No
|
||||||
|
*
|
||||||
* Return Value:
|
* Return Value:
|
||||||
|
* No
|
||||||
*
|
*
|
||||||
* Example:
|
* Example:
|
||||||
*
|
*
|
||||||
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
@ -1,13 +1,16 @@
|
|||||||
/*
|
/*
|
||||||
* Author: PabstMirror
|
* Author: PabstMirror
|
||||||
*
|
* Called when listbox selection changes. Updates the rangetable with new values.
|
||||||
*
|
*
|
||||||
* Arguments:
|
* Arguments:
|
||||||
|
* No
|
||||||
*
|
*
|
||||||
* Return Value:
|
* Return Value:
|
||||||
|
* No
|
||||||
*
|
*
|
||||||
* Example:
|
* Example:
|
||||||
*
|
*
|
||||||
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
@ -1,15 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
* Author: PabstMirror
|
* Author: PabstMirror
|
||||||
Simple Lookup Table for various muzzle velocities and air frictions.
|
* Simple Lookup Table for various muzzle velocities and air frictions.
|
||||||
Use ACE_Artillery_fnc_dev_buildTable to build
|
* Use ace_mk6mortar_fnc_dev_buildTable to build
|
||||||
*
|
*
|
||||||
* Arguments:
|
* Arguments:
|
||||||
* 0: NUMBER - Muzzle Velocity
|
* 0: Muzzle Velocity <NUMBER>
|
||||||
1: NUMBER - Air Friction
|
* 1: Air Friction <NUMBER>
|
||||||
|
*
|
||||||
* Return Value:
|
* Return Value:
|
||||||
|
* <ARRAY>
|
||||||
*
|
*
|
||||||
* Example:
|
* Example:
|
||||||
*
|
*
|
||||||
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
@ -1,12 +1,16 @@
|
|||||||
/*
|
/*
|
||||||
* Author: PabstMirror
|
* Author: PabstMirror
|
||||||
*
|
* Toggles the mortart to show mils or degrees
|
||||||
*
|
*
|
||||||
* Arguments:
|
* Arguments:
|
||||||
|
* 0: Vehicle <OBJECT>
|
||||||
|
* 1: Player <OBJECT>
|
||||||
*
|
*
|
||||||
* Return Value:
|
* Return Value:
|
||||||
|
* No
|
||||||
*
|
*
|
||||||
* Example:
|
* Example:
|
||||||
|
* [mortar,bob] call ace_mk6mortar_fnc_toggleMils;
|
||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
|
@ -1,10 +1,12 @@
|
|||||||
/*
|
/*
|
||||||
* Author: PabstMirror
|
* Author: PabstMirror
|
||||||
*
|
* Called when the mk6's in game UI is loaded. Hides rangefinder data if it is disabled.
|
||||||
*
|
*
|
||||||
* Arguments:
|
* Arguments:
|
||||||
|
* None
|
||||||
*
|
*
|
||||||
* Return Value:
|
* Return Value:
|
||||||
|
* None
|
||||||
*
|
*
|
||||||
* Example:
|
* Example:
|
||||||
*
|
*
|
||||||
@ -12,7 +14,6 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
|
||||||
#define CTRL_CA_OPTICSPITCH (configFile >> "RscInGameUI" >> "ACE_Mk6_RscWeaponRangeArtillery" >> "CA_IGUI_elements_group" >> "controls" >> "CA_OPTICSPITCH")
|
#define CTRL_CA_OPTICSPITCH (configFile >> "RscInGameUI" >> "ACE_Mk6_RscWeaponRangeArtillery" >> "CA_IGUI_elements_group" >> "controls" >> "CA_OPTICSPITCH")
|
||||||
#define CTRL_CA_OPTICSZOOM (configFile >> "RscInGameUI" >> "ACE_Mk6_RscWeaponRangeArtillery" >> "CA_IGUI_elements_group" >> "controls" >> "CA_OPTICSZOOM")
|
#define CTRL_CA_OPTICSZOOM (configFile >> "RscInGameUI" >> "ACE_Mk6_RscWeaponRangeArtillery" >> "CA_IGUI_elements_group" >> "controls" >> "CA_OPTICSZOOM")
|
||||||
#define CTRL_CA_SOLUTION_TEXT (configFile >> "RscInGameUI" >> "ACE_Mk6_RscWeaponRangeArtillery" >> "CA_IGUI_elements_group" >> "controls" >> "CA_SOLUTION_TEXT")
|
#define CTRL_CA_SOLUTION_TEXT (configFile >> "RscInGameUI" >> "ACE_Mk6_RscWeaponRangeArtillery" >> "CA_IGUI_elements_group" >> "controls" >> "CA_SOLUTION_TEXT")
|
||||||
@ -27,7 +28,6 @@
|
|||||||
#define CTRL_CA_ELEV (configFile >> "RscInGameUI" >> "ACE_Mk6_RscWeaponRangeArtillery" >> "CA_IGUI_elements_group" >> "controls" >> "CA_ELEV")
|
#define CTRL_CA_ELEV (configFile >> "RscInGameUI" >> "ACE_Mk6_RscWeaponRangeArtillery" >> "CA_IGUI_elements_group" >> "controls" >> "CA_ELEV")
|
||||||
#define CTRL_CA_ELEV_NEED (configFile >> "RscInGameUI" >> "ACE_Mk6_RscWeaponRangeArtillery" >> "CA_IGUI_elements_group" >> "controls" >> "CA_ELEV_NEED")
|
#define CTRL_CA_ELEV_NEED (configFile >> "RscInGameUI" >> "ACE_Mk6_RscWeaponRangeArtillery" >> "CA_IGUI_elements_group" >> "controls" >> "CA_ELEV_NEED")
|
||||||
|
|
||||||
|
|
||||||
disableSerialization;
|
disableSerialization;
|
||||||
|
|
||||||
// PARAMS_1(_display);
|
// PARAMS_1(_display);
|
||||||
|
Loading…
Reference in New Issue
Block a user