mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Fix bug regarding missile direction. Add official US Army training manual for the dragon for reference purposes
This commit is contained in:
parent
677feffcd1
commit
4df8fd77b1
@ -32,16 +32,16 @@ class CfgAmmo {
|
||||
class Rocket_03_AP_F;
|
||||
class ace_missile_dragon : Rocket_03_AP_F {
|
||||
model = QPATHTOF(models\dragon.p3d);
|
||||
maxSpeed = 120;
|
||||
thrust = 0;
|
||||
initTime = 0;
|
||||
maxSpeed = 200;
|
||||
thrust = 300;
|
||||
initTime = 0.151;
|
||||
thrustTime = 0;
|
||||
sideAirFriction = 0.5;
|
||||
effectsMissile = "";
|
||||
sideAirFriction = 0.05;
|
||||
effectsMissile = "missile2";
|
||||
effectFlare = "";
|
||||
airFriction = 0.5;
|
||||
irLock = 0;
|
||||
manualControl = 0;
|
||||
irLock = 1;
|
||||
manualControl = 1;
|
||||
deflecting = 0;
|
||||
fuseDistance = 5;
|
||||
whistleDist = 2;
|
||||
@ -80,10 +80,11 @@ class CfgAmmo {
|
||||
seekerAngle = 30;
|
||||
seekerAccuracy = 1;
|
||||
|
||||
seekerMinRange = 75;
|
||||
seekerMaxRange = 4000;
|
||||
seekerMinRange = 65;
|
||||
seekerMaxRange = 1500;
|
||||
|
||||
correctionDistance = 15;
|
||||
missileLeadDistance = 0;
|
||||
offsetFromCrosshair[] = { 0, 0, 0 };
|
||||
|
||||
defaultAttackProfile = "DRAGON";
|
||||
|
@ -1,7 +1,5 @@
|
||||
class MainTurret;
|
||||
class CfgVehicles {
|
||||
class EGVAR(csw,baseTripod);
|
||||
|
||||
class LandVehicle;
|
||||
|
||||
class StaticWeapon : LandVehicle {
|
||||
@ -18,7 +16,16 @@ class CfgVehicles {
|
||||
};
|
||||
};
|
||||
|
||||
class ACE_M47_Dragon_Static_Base : StaticMGWeapon {
|
||||
class AT_01_base_F: StaticMGWeapon {
|
||||
class Turrets : Turrets {
|
||||
class MainTurret : MainTurret {
|
||||
class ViewOptics: ViewOptics {
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class ACE_M47_Dragon_Static_Base : AT_01_base_F {
|
||||
features = "Balls";
|
||||
scope = 0;
|
||||
displayName = "ACE M47 Dragon";
|
||||
@ -41,53 +48,53 @@ class CfgVehicles {
|
||||
{
|
||||
optics = 1;
|
||||
turretInfoType = "RscWeaponEmpty";
|
||||
gunnerOpticsModel = PATHTOF(models\optics_m47.p3d);
|
||||
gunnerOpticsModel = QPATHTOF(models\optics_m47.p3d);
|
||||
minElev = -60;
|
||||
maxElev = 0;
|
||||
weapons[] = {};
|
||||
magazines[] = {};
|
||||
|
||||
gunnerAction = "gunner_static_low01";
|
||||
gunnergetInAction = "";
|
||||
gunnergetOutAction = "";
|
||||
gunnergetInAction = "";
|
||||
gunnergetOutAction = "";
|
||||
|
||||
discreteDistance[] = {};
|
||||
discreteDistanceInitIndex = 0;
|
||||
discreteDistanceInitIndex = 0;
|
||||
|
||||
class OpticsIn
|
||||
{
|
||||
class Wide: ViewOptics
|
||||
{
|
||||
initFov = 0.015;
|
||||
minFov = 0.015;
|
||||
maxFov = 0.015;
|
||||
gunnerOpticsModel = PATHTOF(models\optics_m47.p3d);
|
||||
initFov = 0.055;
|
||||
minFov = 0.055;
|
||||
maxFov = 0.055;
|
||||
gunnerOpticsModel = QPATHTOF(models\optics_m47.p3d);
|
||||
gunnerOutOpticsModel = "\A3\weapons_f\reticle\optics_empty";
|
||||
gunnerOpticsEffect[] = {"TankGunnerOptics1","OpticsBlur2","OpticsCHAbera2"};
|
||||
};
|
||||
};
|
||||
|
||||
displayName = "Balls in your face";
|
||||
displayName = "Balls in your face";
|
||||
|
||||
class ViewOptics: ViewOptics
|
||||
{
|
||||
initAngleX = 0;
|
||||
minAngleX = -30;
|
||||
maxAngleX = 30;
|
||||
initAngleY = 5;
|
||||
minAngleY = -100;
|
||||
maxAngleY = 100;
|
||||
initFov = 0.015;
|
||||
minFov = 0.015;
|
||||
maxFov = 0.015;
|
||||
visionMode[] = {"Normal"};
|
||||
thermalMode[] = {0};
|
||||
};
|
||||
gunnerRightHandAnimName = "OtocHlaven_shake";
|
||||
gunnerLeftHandAnimName = "OtocHlaven_shake";
|
||||
gunBeg = "spice rakety";
|
||||
gunEnd = "konec rakety";
|
||||
memoryPointGunnerOptics = "look";
|
||||
class ViewOptics: ViewOptics
|
||||
{
|
||||
initAngleX = 0;
|
||||
minAngleX = -30;
|
||||
maxAngleX = 30;
|
||||
initAngleY = 5;
|
||||
minAngleY = -100;
|
||||
maxAngleY = 100;
|
||||
initFov = 0.015;
|
||||
minFov = 0.015;
|
||||
maxFov = 0.015;
|
||||
visionMode[] = {"Normal"};
|
||||
thermalMode[] = {0};
|
||||
};
|
||||
gunnerRightHandAnimName = "OtocHlaven_shake";
|
||||
gunnerLeftHandAnimName = "OtocHlaven_shake";
|
||||
gunBeg = "spice rakety";
|
||||
gunEnd = "konec rakety";
|
||||
memoryPointGunnerOptics = "look";
|
||||
};
|
||||
};
|
||||
class AnimationSources {
|
||||
|
@ -21,3 +21,21 @@ class CfgPatches {
|
||||
#include "CfgAmmo.hpp"
|
||||
#include "CfgVehicles.hpp"
|
||||
|
||||
class ace_m47_serviceExplosion {
|
||||
class Light1 {
|
||||
simulation = "light";
|
||||
type = "GrenadeExploLight";
|
||||
position[] = {0,0,0};
|
||||
intensity = 0.005;
|
||||
interval = 1;
|
||||
lifeTime = 0.5;
|
||||
};
|
||||
class GrenadeSmoke1 {
|
||||
simulation = "particles";
|
||||
type = "ImpactSmoke2";
|
||||
position[] = {0,0,0};
|
||||
intensity = 0.15;
|
||||
interval = 0.1;
|
||||
lifeTime = 0.5;
|
||||
};
|
||||
};
|
||||
|
@ -17,6 +17,7 @@
|
||||
* Public: No
|
||||
*
|
||||
*/
|
||||
#define SERVICE_INTERVAL 0.33
|
||||
params ["_seekerTargetPos", "_args", "_attackProfileStateParams"];
|
||||
_args params ["_firedEH", "", "", "", "_stateParams"];
|
||||
_firedEH params ["_shooter","_weapon","","","","","_projectile"];
|
||||
@ -39,16 +40,33 @@ if ((((getPosASL _shooter) vectorDistanceSqr _projectilePos) > _seekerMaxRangeSq
|
||||
_maxCorrectableDistance = 30;
|
||||
// if the time between updates is less than the pop time we want to fire the rockets
|
||||
if ((_lastTime - CBA_missionTime) <= 0) then {
|
||||
_attackProfileStateParams set [6, CBA_missionTime + 0.3];
|
||||
_attackProfileStateParams set [6, CBA_missionTime + SERVICE_INTERVAL];
|
||||
|
||||
private _vectorToCrosshair = vectorNormalized (_projectile worldToModel (ASLToAGL _seekerTargetPos));
|
||||
private _vectorToPos = vectorNormalized (((_projectile vectorWorldToModelVisual (_shooter weaponDirection _weapon)) vectorMultiply (100 * 0.3)) vectorAdd (_vectorToCrosshair vectorMultiply _maxCorrectableDistance));
|
||||
private _vectorToPos = vectorNormalized (((_projectile vectorWorldToModelVisual (_shooter weaponDirection _weapon)) vectorMultiply (100 * SERVICE_INTERVAL)) vectorAdd (_vectorToCrosshair vectorMultiply _maxCorrectableDistance));
|
||||
|
||||
if ((_vectorToPos select 2) < 0) then {
|
||||
_vectorToPos set [2, 0];
|
||||
};
|
||||
|
||||
_projectile setVelocityModelSpace ((velocityModelSpace _projectile) vectorAdd (_vectorToPos vectorMultiply 6.5));
|
||||
|
||||
private _charge = createVehicle ["ace_m47_dragon_serviceCharge", [0, 0, 0], [], 0, "NONE"];
|
||||
_charge setPosASL (_projectilePos vectorAdd ((_vectorToCrosshair vectorMultiply -1) vectorMultiply 0.025));
|
||||
} else {
|
||||
/*if((_lastTime - CBA_missionTime) < (SERVICE_INTERVAL / 2)) then {
|
||||
if ((_projectilePos vectorDistance _seekerTargetPos > 1)) then {
|
||||
_attackProfileStateParams set [6, CBA_missionTime + SERVICE_INTERVAL];
|
||||
private _vectorToCrosshair = vectorNormalized (_projectile worldToModel (ASLToAGL _seekerTargetPos));
|
||||
private _vectorToPos = vectorNormalized (((_projectile vectorWorldToModelVisual (_shooter weaponDirection _weapon)) vectorMultiply (100 * 0.3)) vectorAdd (_vectorToCrosshair vectorMultiply _maxCorrectableDistance));
|
||||
|
||||
if ((_vectorToPos select 2) < 0) then {
|
||||
_vectorToPos set [2, 0];
|
||||
};
|
||||
|
||||
_projectile setVelocityModelSpace ((velocityModelSpace _projectile) vectorAdd (_vectorToPos vectorMultiply 6.5));
|
||||
};
|
||||
};*/
|
||||
};
|
||||
|
||||
// Return position in-front of projectile. Because we simulate the velocity updates in this function we dont want missile guidance taking over
|
||||
|
Binary file not shown.
Binary file not shown.
@ -13,7 +13,7 @@ class CfgSkeletons {
|
||||
"launcher","grav_box",
|
||||
"optic","launcher",
|
||||
"missile","launcher"
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
Binary file not shown.
@ -25,7 +25,7 @@ _seekerStateParams params ["_memoryPointGunnerOptics", "_animationSourceBody", "
|
||||
private _shooterPos = AGLToASL (_shooter modelToWorld(_shooter selectionPosition _memoryPointGunnerOptics));
|
||||
private _projPos = getPosASL _projectile;
|
||||
|
||||
private _lookDirection = if !(_shooter isKindOf "CAManBase") then {
|
||||
private _lookDirection = if !(_shooter isKindOf "CAManBase" || _shooter isKindOf "StaticWeapon") then {
|
||||
private _gBody = -deg(_shooter animationPhase _animationSourceBody);
|
||||
private _gGun = deg(_shooter animationPhase _animationSourceGun);
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
#include "\z\ace\addons\main\script_mod.hpp"
|
||||
|
||||
// #define DEBUG_MODE_FULL
|
||||
// #define DISABLE_COMPILE_CACHE
|
||||
#define DISABLE_COMPILE_CACHE
|
||||
// #define ENABLE_PERFORMANCE_COUNTERS
|
||||
|
||||
#ifdef DEBUG_ENABLED_HOT
|
||||
|
@ -2,9 +2,9 @@
|
||||
#define COMPONENT_BEAUTIFIED Missile Guidance
|
||||
#include "\z\ace\addons\main\script_mod.hpp"
|
||||
|
||||
// #define DRAW_GUIDANCE_INFO
|
||||
#define DRAW_GUIDANCE_INFO
|
||||
// #define DEBUG_MODE_FULL
|
||||
// #define DISABLE_COMPILE_CACHE
|
||||
#define DISABLE_COMPILE_CACHE
|
||||
// #define ENABLE_PERFORMANCE_COUNTERS
|
||||
|
||||
#ifdef DEBUG_ENABLED_MISSILEGUIDANCE
|
||||
|
Loading…
x
Reference in New Issue
Block a user