Some Headers

This commit is contained in:
PabstMirror 2015-04-05 17:50:07 -05:00
parent 5c5b8f656e
commit a8b000c159
12 changed files with 44 additions and 32 deletions

View File

@ -1,5 +1,4 @@
class ACE_82mm_RangeTable_Dialog
{
class ACE_82mm_RangeTable_Dialog {
idd = -1;
movingEnable = 1;
onLoad = "uiNamespace setVariable ['ACE_82mm_RangeTable_Dialog', _this select 0];";

View File

@ -3,4 +3,3 @@
if (!hasInterface) exitWith {};
["playerVehicleChanged", {_this call FUNC(handlePlayerVehicleChanged);}] call EFUNC(common,addEventHandler);

View File

@ -2,7 +2,6 @@
ADDON = false;
PREP(dev_buildTable);
PREP(dev_formatNumber);
PREP(dev_simulateCalcRangeTableLine);

View File

@ -25,7 +25,6 @@ class RscControlsGroup;
class ScrollBar;
class RscActiveText;
#include "RscInGameUI.hpp"
#include "RscRangeTable.hpp"

View File

@ -1,5 +1,6 @@
/*
* Author: PabstMirror
* Called when the mortar is fired.
*
* Arguments:
* 0: mortar - Object the event handler is assigned to <OBJECT>
@ -14,7 +15,7 @@
* Nothing
*
* Example:
* [clientFiredBIS-XEH] call ace_
* [clientFiredBIS-XEH] call ace_mk6mortars_fnc_handleFired
*
* Public: No
*/
@ -24,11 +25,14 @@ disableSerialization;
PARAMS_7(_vehicle,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile);
if (!GVAR(airResistanceEnabled)) exitWith {};
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:
if (isNil QEGVAR(weather,currentRelativeDensity)) then {
@ -38,6 +42,7 @@ if (isNil QEGVAR(weather,currentTemperature)) then {
EGVAR(weather,currentTemperature) = 20;
};
//powder effects:
_temperature = EGVAR(weather,currentTemperature);
_newMuzzleVelocityCoefficent = (((_temperature + 273.13) / 288.13 - 1) / 40 + 1);
@ -71,17 +76,12 @@ if (_newMuzzleVelocityCoefficent != 1) then {
_trueVelocity = _bulletVelocity vectorDiff ACE_wind;
_trueSpeed = vectorMagnitude _trueVelocity;
// _dragRef = _deltaT * _airFriction * _bulletSpeed * _bulletSpeed;
// _accelRef = (vectorNormalized _bulletVelocity) vectorMultiply (_dragRef);
// _bulletVelocity = _bulletVelocity vectorDiff _accelRef;
_drag = _deltaT * _airFriction * _trueSpeed * EGVAR(weather,currentRelativeDensity);
_accel = _trueVelocity vectorMultiply (_drag);
_bulletVelocity = _bulletVelocity vectorAdd _accel;
};
_shell setVelocity _bulletVelocity;
// TODO expand with advanced ballistics functionality.
}, 0, [_projectile, MK6_82mm_AIR_FRICTION, time]] call CBA_fnc_addPerFrameHandler;
// };

View File

@ -1,10 +1,13 @@
/*
* Author: PabstMirror
*
* Handles player getting into new vehicle. Loads PFEG for mortar display if it is a mortar.
*
* Arguments:
* 0:Player <OBJECT>
* 1: New Vehicle <OBJECT>
*
* Return Value:
* No
*
* Example:
*
@ -17,8 +20,6 @@ PARAMS_2(_player,_newVehicle);
if (isNull _newVehicle) exitWith {};
if (!(_newVehicle isKindOf "Mortar_01_base_F")) exitWith {};
_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))]);

View File

@ -1,6 +1,6 @@
/*
* Author: PabstMirror
*
* Loads settings from the module.
*
* Arguments:
* 0: The Module Logic Object <OBJECT>

View File

@ -1,11 +1,16 @@
/*
* Author: PabstMirror
* Opens the rangetable and fills the charge listbox.
*
* Arguments:
* No
*
* Return Value:
* No
*
* Example:
*
*
* Public: No
*/
#include "script_component.hpp"

View File

@ -1,13 +1,16 @@
/*
* Author: PabstMirror
*
* Called when listbox selection changes. Updates the rangetable with new values.
*
* Arguments:
* No
*
* Return Value:
* No
*
* Example:
*
*
* Public: No
*/
#include "script_component.hpp"

View File

@ -1,15 +1,18 @@
/*
* Author: PabstMirror
Simple Lookup Table for various muzzle velocities and air frictions.
Use ACE_Artillery_fnc_dev_buildTable to build
* Simple Lookup Table for various muzzle velocities and air frictions.
* Use ace_mk6mortar_fnc_dev_buildTable to build
*
* Arguments:
* 0: NUMBER - Muzzle Velocity
1: NUMBER - Air Friction
* 0: Muzzle Velocity <NUMBER>
* 1: Air Friction <NUMBER>
*
* Return Value:
* <ARRAY>
*
* Example:
*
*
* Public: No
*/
#include "script_component.hpp"

View File

@ -1,12 +1,16 @@
/*
* Author: PabstMirror
*
* Toggles the mortart to show mils or degrees
*
* Arguments:
* 0: Vehicle <OBJECT>
* 1: Player <OBJECT>
*
* Return Value:
* No
*
* Example:
* [mortar,bob] call ace_mk6mortar_fnc_toggleMils;
*
* Public: No
*/

View File

@ -1,10 +1,12 @@
/*
* Author: PabstMirror
*
* Called when the mk6's in game UI is loaded. Hides rangefinder data if it is disabled.
*
* Arguments:
* None
*
* Return Value:
* None
*
* Example:
*
@ -12,7 +14,6 @@
*/
#include "script_component.hpp"
#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_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_NEED (configFile >> "RscInGameUI" >> "ACE_Mk6_RscWeaponRangeArtillery" >> "CA_IGUI_elements_group" >> "controls" >> "CA_ELEV_NEED")
disableSerialization;
// PARAMS_1(_display);