mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Laser designation information localized to vehicle.
This commit is contained in:
parent
0c3b51c28b
commit
d3d5554c49
@ -18,7 +18,7 @@ if(!(local _laserTarget)) exitWith { };
|
||||
if(!isDedicated) then {
|
||||
_laserTarget setVariable ["ACE_LASERTARGET_SHOOTER", ACE_player, true];
|
||||
|
||||
//[FUNC(laserTargetPFH), 0, [_laserTarget, ACE_player]] call cba_fnc_addPerFrameHandler;
|
||||
[FUNC(laserTargetPFH), 0, [_laserTarget, ACE_player]] call cba_fnc_addPerFrameHandler;
|
||||
} else {
|
||||
// server side ownership of laser
|
||||
//_laserTarget setVariable ["ACE_LASERTARGET_SHOOTER", nil, false];
|
||||
|
@ -1,11 +1,9 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
if(!isNil "_this") then {
|
||||
if( (count _this) > 2) then {
|
||||
EXPLODE_3_PVT((_this select 0),_vehicle,_shooter,_laserTarget);
|
||||
// We got the optional vehicle list, clear the parameters
|
||||
_vehicle setVariable[QGVAR(currentTarget), [], true];
|
||||
};
|
||||
if( (count _this) > 2) then {
|
||||
EXPLODE_3_PVT(_this,_vehicle,_shooter,_laserTarget);
|
||||
// We got the optional vehicle list, clear the parameters
|
||||
_vehicle setVariable[QGVAR(currentTarget), [], true];
|
||||
};
|
||||
|
||||
if(isNil QGVAR(laser)) exitWith {
|
||||
@ -20,6 +18,7 @@ if(!isNil "_handle") then {
|
||||
[_handle] call cba_fnc_removePerFrameHandler;
|
||||
};
|
||||
|
||||
REM(ACE_LASERS, GVAR(laser));
|
||||
deleteVehicle GVAR(laser);
|
||||
GVAR(laser) = nil;
|
||||
GVAR(active) = false;
|
||||
|
@ -5,19 +5,6 @@ TRACE_1("enter", _this);
|
||||
|
||||
#define FCS_UPDATE_DELAY 1
|
||||
|
||||
FUNC(magnitude) = {
|
||||
_this distance [0, 0, 0]
|
||||
};
|
||||
|
||||
FUNC(mat_normalize3d) = {
|
||||
private ["_mag"];
|
||||
PARAMS_3(_vx,_vy,_vz);
|
||||
|
||||
_mag = _this call FUNC(magnitude);
|
||||
if (_mag == 0) then {_mag = 1};
|
||||
[(_vx/_mag), (_vy/_mag), (_vz/_mag)]
|
||||
};
|
||||
|
||||
FUNC(laserHudDesignatePFH) = {
|
||||
private["_args", "_laserTarget", "_shooter", "_vehicle", "_weapon", "_gunnerInfo", "_turret", "_pov", "_gunBeg", "_gunEnd", "_povPos", "_povDir", "_result", "_resultPositions", "_firstResult", "_forceUpdateTime"];
|
||||
_args = _this select 0;
|
||||
@ -26,10 +13,10 @@ FUNC(laserHudDesignatePFH) = {
|
||||
|
||||
TRACE_1("", _args);
|
||||
|
||||
if(!alive _shooter || isNull _vehicle || isNull _laserTarget || !GVAR(active) ) exitWith {
|
||||
if(vehicle ACE_player) != _shooter || !alive _shooter || isNull _vehicle || isNull _laserTarget || !GVAR(active) ) exitWith {
|
||||
[_vehicle, _shooter, _laserTarget] call FUNC(laserHudDesignateOff);
|
||||
};
|
||||
if(!([ACE_player] call FUNC(unitTurretHasDesignator)) ) exitWith {
|
||||
if(!([_shooter] call FUNC(unitTurretHasDesignator)) ) exitWith {
|
||||
[_vehicle, _shooter, _laserTarget] call FUNC(laserHudDesignateOff);
|
||||
};
|
||||
|
||||
@ -79,10 +66,10 @@ FUNC(laserHudDesignatePFH) = {
|
||||
["ace_fcs_forceUpdate", []] call ace_common_fnc_localEvent;
|
||||
};
|
||||
|
||||
if( (_laserTarget distance _pos) > 0.1) then {
|
||||
//if( (_laserTarget distance _pos) > 0.1) then {
|
||||
TRACE_1("LaserPos Update", "");
|
||||
_laserTarget setPosATL (ASLToATL _pos);
|
||||
};
|
||||
//};
|
||||
|
||||
if(diag_tickTime > _forceUpdateTime) then {
|
||||
_args set[2, diag_tickTime + FCS_UPDATE_DELAY];
|
||||
@ -102,8 +89,7 @@ FUNC(laserHudDesignatePFH) = {
|
||||
_this set[0, _args];
|
||||
};
|
||||
|
||||
private "_laserTarget";
|
||||
private "_handle";
|
||||
private ["_laserTarget", "_handle", "_vehicle"];
|
||||
|
||||
if(isNil QGVAR(laser)) then {
|
||||
_laserTarget = "LaserTargetW" createVehicle (getpos ACE_player);
|
||||
|
@ -2,33 +2,48 @@ class CfgAmmo {
|
||||
class MissileBase;
|
||||
|
||||
class M_PG_AT : MissileBase {
|
||||
irLock = 0;
|
||||
laserLock = 0;
|
||||
airLock = 0;
|
||||
manualControl = 0;
|
||||
timeToLive = 120;
|
||||
model = "\A3\Weapons_F\Ammo\Rocket_01_fly_F";
|
||||
proxyShape = "\A3\Weapons_F\Ammo\Rocket_01_F";
|
||||
|
||||
hit = 150;
|
||||
indirectHit = 40;
|
||||
indirectHitRange = 2.5;
|
||||
explosive = 0.1; // KE penetrators
|
||||
inittime = 0.05;
|
||||
thrust = 1900;
|
||||
thrusttime = 1;
|
||||
maxspeed = 1030;
|
||||
irLock = 0;
|
||||
laserLock = 0;
|
||||
airLock = 0;
|
||||
manualControl = 1;
|
||||
weaponLockSystem = "2 + 16";
|
||||
|
||||
hit = 600;
|
||||
indirectHit = 50;
|
||||
indirectHitRange = 4;
|
||||
|
||||
maxSpeed = 720;
|
||||
maxControlRange = 5000;
|
||||
trackOversteer = 1;
|
||||
trackLead = 1;
|
||||
maneuvrability = 8;
|
||||
sideairfriction = 0.065;
|
||||
timeToLive = 60;
|
||||
simulationStep = 0.01;
|
||||
airFriction = 0.1;
|
||||
sideAirFriction = 0.16;
|
||||
initTime = 0.002;
|
||||
thrustTime = 1.07;
|
||||
thrust = 530;
|
||||
fuseDistance = 5;
|
||||
|
||||
effectsMissileInit = "MissileDAR1";
|
||||
effectsMissile = "missile2";
|
||||
whistleDist = 4;
|
||||
muzzleEffect = "";
|
||||
|
||||
ACE_maxDeflection = 0.15; // Maximum flap deflection for guidance
|
||||
ACE_minDeflection = 0.005; // Minium flap deflection for guidance
|
||||
ACE_incDeflection = 0.005; // The incrmeent in which deflection adjusts.
|
||||
|
||||
ACE_seekerTypes = [ "SALH" ]; // {"SALH", "LIDAR", "BeamRide", "SARH", "Optic", "Thermal"};
|
||||
ACE_seekerTypes[] = { "SALH" }; // {"SALH", "LIDAR", "BeamRide", "SARH", "Optic", "Thermal"};
|
||||
ACE_seekerAngle = 90; // Angle in front of the missile which can be searched
|
||||
ACE_seekerAccuracy = 1; // seeker accuracy multiplier
|
||||
ACE_seekerMaxRange = 2500; // Range from the missile which the seeker can visually search
|
||||
|
||||
ACE_attackProfiles = [ "LOAL-LIN", "LOAL-DIR", "LOAL-MID", "LOAL-HI"];
|
||||
ACE_attackProfiles[] = { "LOAL-LIN", "LOAL-DIR", "LOAL-MID", "LOAL-HI" };
|
||||
};
|
||||
|
||||
class ACE_Hydra70_DAGR : M_PG_AT {
|
||||
|
@ -21,3 +21,4 @@ class CfgVehicles {
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -8,6 +8,6 @@ class CfgWeapons {
|
||||
};
|
||||
class missiles_DAGR : RocketPods {
|
||||
canLock = 1;
|
||||
magazines[] = {"24Rnd_ACE_Hydra70_DAGR", "12Rnd_ACE_Hydra70_DAGR", "6Rnd_ACE_Hydra70_DAGR", "24Rnd_ACE_Hellfire_AGM114K", "12Rnd_ACE_Hellfire_AGM114K", "6Rnd_ACE_Hellfire_AGM114K" };
|
||||
magazines[] += {"24Rnd_ACE_Hydra70_DAGR", "12Rnd_ACE_Hydra70_DAGR", "6Rnd_ACE_Hydra70_DAGR", "24Rnd_ACE_Hellfire_AGM114K", "12Rnd_ACE_Hellfire_AGM114K", "6Rnd_ACE_Hellfire_AGM114K" };
|
||||
};
|
||||
};
|
Loading…
Reference in New Issue
Block a user