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;
|
||||
movingEnable = 1;
|
||||
onLoad = "uiNamespace setVariable ['ACE_82mm_RangeTable_Dialog', _this select 0];";
|
||||
@ -25,7 +24,7 @@ class ACE_82mm_RangeTable_Dialog
|
||||
};
|
||||
};
|
||||
class controls {
|
||||
class TheTable : RscListNBox {
|
||||
class TheTable: RscListNBox {
|
||||
idc = 20001;
|
||||
// style = ST_CENTER + ST_MULTI + LB_TEXTURES;
|
||||
// style = ST_LEFT + ST_MULTI + LB_TEXTURES;
|
||||
@ -84,4 +83,4 @@ class ACE_82mm_RangeTable_Dialog
|
||||
onButtonClick = "closeDialog 0";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -3,4 +3,3 @@
|
||||
if (!hasInterface) exitWith {};
|
||||
|
||||
["playerVehicleChanged", {_this call FUNC(handlePlayerVehicleChanged);}] call EFUNC(common,addEventHandler);
|
||||
|
||||
|
@ -2,7 +2,6 @@
|
||||
|
||||
ADDON = false;
|
||||
|
||||
|
||||
PREP(dev_buildTable);
|
||||
PREP(dev_formatNumber);
|
||||
PREP(dev_simulateCalcRangeTableLine);
|
||||
|
@ -25,7 +25,6 @@ class RscControlsGroup;
|
||||
class ScrollBar;
|
||||
class RscActiveText;
|
||||
|
||||
|
||||
#include "RscInGameUI.hpp"
|
||||
#include "RscRangeTable.hpp"
|
||||
|
||||
@ -40,7 +39,7 @@ class ACE_Settings {
|
||||
value = 1;
|
||||
typeName = "BOOL";
|
||||
isClientSetable = 0;
|
||||
};
|
||||
};
|
||||
class GVAR(allowCompass) {
|
||||
value = 1;
|
||||
typeName = "BOOL";
|
||||
|
@ -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;
|
||||
// };
|
||||
|
@ -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))]);
|
||||
@ -42,7 +43,7 @@ _fireModes = getArray (configFile >> "CfgWeapons" >> _tubeWeaponName >> "modes")
|
||||
} else {
|
||||
|
||||
_useMils = _mortarVeh getVariable [QGVAR(useMils), true];
|
||||
|
||||
|
||||
//Compute: 'charge' from weaponstate
|
||||
_currentFireMode = (weaponState [_mortarVeh, [0]]) select 2;
|
||||
_currentChargeMode = _fireModes find _currentFireMode;
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Author: PabstMirror
|
||||
*
|
||||
* Loads settings from the module.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: The Module Logic Object <OBJECT>
|
||||
@ -11,7 +11,7 @@
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
*
|
||||
*
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
@ -1,16 +1,21 @@
|
||||
/*
|
||||
* Author: PabstMirror
|
||||
* Opens the rangetable and fills the charge listbox.
|
||||
*
|
||||
* Arguments:
|
||||
* No
|
||||
*
|
||||
* Return Value:
|
||||
* No
|
||||
*
|
||||
* Example:
|
||||
*
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
#define LIST_CHARGE ((uiNamespace getVariable "ACE_82mm_RangeTable_Dialog") displayCtrl 1501)
|
||||
#define LIST_CHARGE ((uiNamespace getVariable "ACE_82mm_RangeTable_Dialog") displayCtrl 1501)
|
||||
|
||||
_weaponName = "mortar_82mm";
|
||||
|
||||
|
@ -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"
|
||||
|
@ -1,14 +1,17 @@
|
||||
/*
|
||||
* 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
|
||||
*/
|
||||
|
@ -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
|
||||
*/
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user