mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Dragon flight dynamics tweaked. Now assuming there is a booster angle creating wobble. Add a slight delay when the wire breaks to fire all of the service charges
This commit is contained in:
parent
3b0b249e1f
commit
953d2d7ae9
@ -7,6 +7,7 @@ class CfgAmmo {
|
||||
caliber = 60;
|
||||
warheadName = "HEAT";
|
||||
hit = 460;
|
||||
fuseDistance = 75;
|
||||
};
|
||||
|
||||
class GVAR(dragonBase): Rocket_03_AP_F {
|
||||
@ -97,9 +98,9 @@ class CfgAmmo {
|
||||
missileLeadDistance = 0;
|
||||
|
||||
serviceInterval = 0.33; // how many seconds between pops
|
||||
serviceCharges = 65; // how many charges are in this missile
|
||||
serviceChargeAcceleration = 10;
|
||||
dragonSpeed = 200; // meters per second
|
||||
serviceCharges = 60; // how many charges are in this missile
|
||||
serviceChargeAcceleration = 6.5;
|
||||
dragonSpeed = 100; // meters per second
|
||||
|
||||
defaultAttackProfile = "DRAGON";
|
||||
attackProfiles[] = {"DRAGON"};
|
||||
|
@ -6,7 +6,7 @@ class CfgMagazines {
|
||||
soundHit[] = {};
|
||||
model = QPATHTOF(models\dragon.p3d);
|
||||
ammo = QGVAR(super);
|
||||
initSpeed = 200;
|
||||
initSpeed = 120;
|
||||
scope = 1;
|
||||
displayName = CSTRING(dragonName);
|
||||
displayNameShort = CSTRING(dragonName);
|
||||
|
@ -38,6 +38,8 @@ class CfgWeapons {
|
||||
EGVAR(overpressure,range) = 30;
|
||||
EGVAR(overpressure,damage) = 0.85;
|
||||
|
||||
initSpeed = 120;
|
||||
|
||||
displayName = CSTRING(dragonName);
|
||||
descriptionShort = CSTRING(dragonDescription);
|
||||
magazines[] = { QGVAR(super) };
|
||||
|
@ -32,8 +32,9 @@ if ((_distanceToProjectile > _seekerMaxRangeSqr) || _wireCut) exitWith {
|
||||
playSound3D ["a3\sounds_f\air\sfx\SL_rope_break.wss", objNull, false, AGLtoASL (_shooter modelToWorld _wireCutSource), 150, 1, 25];
|
||||
};
|
||||
|
||||
if (_serviceChargeCount > 0) then {
|
||||
_projectile setVelocityModelSpace ((velocityModelSpace _projectile) vectorAdd ([(random 2) - 1, (random 2) - 1, random 1] vectorMultiply _serviceChargeAcceleration));
|
||||
if (_serviceChargeCount > 0 && {(_lastTime - CBA_missionTime) <= 0}) then {
|
||||
_attackProfileStateParams set [5, CBA_missionTime + 0.05];
|
||||
_projectile setVelocityModelSpace ((velocityModelSpace _projectile) vectorAdd ([(random 2) - 1, random 1, (random 2) - 1] vectorMultiply _serviceChargeAcceleration));
|
||||
private _charge = createVehicle [QGVAR(serviceCharge), [0, 0, 0], [], 0, "NONE"];
|
||||
_charge setPosASL (_projectilePos vectorAdd ((_vectorToCrosshair vectorMultiply -1) vectorMultiply 0.025));
|
||||
_attackProfileStateParams set [7, _serviceChargeCount - 1];
|
||||
@ -47,14 +48,21 @@ if (_distanceToProjectile <= _seekerMinRangeSqr || { _serviceChargeCount <= 0 })
|
||||
// if the time between updates is less than the pop time we want to fire the rockets OR if the missile wants to make a major correction pop it rapidly
|
||||
if (((_lastTime - CBA_missionTime) <= 0) || {(_lastTime - CBA_missionTime) < (_serviceInterval / 2) && (_projectilePos vectorDistance _seekerTargetPos > 1)}) then {
|
||||
_attackProfileStateParams set [5, CBA_missionTime + _serviceInterval];
|
||||
|
||||
|
||||
private _vectorToCrosshair = vectorNormalized (_projectile worldToModel (ASLToAGL _seekerTargetPos));
|
||||
private _vectorToPos = vectorNormalized (((_projectile vectorWorldToModelVisual (_shooter weaponDirection _weapon)) vectorMultiply (_dragonSpeed * _serviceInterval)) vectorAdd (_vectorToCrosshair vectorMultiply _maxCorrectableDistance));
|
||||
|
||||
|
||||
if ((_vectorToPos select 2) < 0) then {
|
||||
_vectorToPos set [2, 0];
|
||||
} else {
|
||||
private _a = _vectorToPos select 1;
|
||||
private _b = _vectorToPos select 2;
|
||||
// The booster has some angle to it, so we introduce that axis if the angle is too low
|
||||
if (abs(_a) > 0 && { abs(atan (_b / _a)) < DRAGON_BOOSTER_ANGLE }) then {
|
||||
_vectorToPos set [2, abs(_a)];
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
_projectile setVelocityModelSpace ((velocityModelSpace _projectile) vectorAdd (_vectorToPos vectorMultiply _serviceChargeAcceleration));
|
||||
|
||||
private _charge = createVehicle [QGVAR(serviceCharge), [0, 0, 0], [], 0, "NONE"];
|
||||
|
Binary file not shown.
@ -15,4 +15,5 @@
|
||||
#endif
|
||||
|
||||
#include "\z\ace\addons\main\script_macros.hpp"
|
||||
#define DRAGON_BOOSTER_ANGLE 45
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user