mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Changed: Laser functionality tweaking
Changed: DAGR deflection refinement Clean up of tabs
This commit is contained in:
parent
d6b227e654
commit
ec64a1b0ca
@ -13,7 +13,7 @@ class Extended_PostInit_EventHandlers {
|
|||||||
class Extended_GetIn_EventHandlers {
|
class Extended_GetIn_EventHandlers {
|
||||||
class B_Heli_Attack_01_F {
|
class B_Heli_Attack_01_F {
|
||||||
class ADDON {
|
class ADDON {
|
||||||
getIn = QUOTE(call FUNC(onGetin));
|
getIn = QUOTE(_this call FUNC(onGetin));
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -21,7 +21,7 @@ class Extended_GetIn_EventHandlers {
|
|||||||
class Extended_GetOut_EventHandlers {
|
class Extended_GetOut_EventHandlers {
|
||||||
class B_Heli_Attack_01_F {
|
class B_Heli_Attack_01_F {
|
||||||
class ADDON {
|
class ADDON {
|
||||||
getOut = QUOTE(call FUNC(onGetout));
|
getOut = QUOTE(_this call FUNC(onGetout));
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -17,6 +17,7 @@ FUNC(mat_normalize3d) = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
FUNC(laserHudDesignatePFH) = {
|
FUNC(laserHudDesignatePFH) = {
|
||||||
|
private["_args", "_laserTarget", "_shooter", "_vehicle", "_weapon", "_gunnerInfo", "_turret", "_pov", "_gunBeg", "_gunEnd", "_povPos", "_povDir", "_result", "_resultPositions", "_firstResult"];
|
||||||
_args = _this select 0;
|
_args = _this select 0;
|
||||||
_laserTarget = _args select 0;
|
_laserTarget = _args select 0;
|
||||||
_shooter = _args select 1;
|
_shooter = _args select 1;
|
||||||
@ -24,6 +25,8 @@ FUNC(laserHudDesignatePFH) = {
|
|||||||
_vehicle = vehicle _shooter;
|
_vehicle = vehicle _shooter;
|
||||||
_weapon = currentWeapon _vehicle;
|
_weapon = currentWeapon _vehicle;
|
||||||
|
|
||||||
|
TRACE_1("", _args);
|
||||||
|
|
||||||
if(!alive _shooter || isNull _vehicle || isNull _laserTarget || !GVAR(laserActive) ) exitWith {
|
if(!alive _shooter || isNull _vehicle || isNull _laserTarget || !GVAR(laserActive) ) exitWith {
|
||||||
[(_this select 1)] call cba_fnc_removePerFrameHandler;
|
[(_this select 1)] call cba_fnc_removePerFrameHandler;
|
||||||
};
|
};
|
||||||
@ -74,8 +77,12 @@ FUNC(laserHudDesignatePFH) = {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
private "_laserTarget";
|
||||||
|
private "_handle";
|
||||||
|
|
||||||
if(isNil QGVAR(laser)) then {
|
if(isNil QGVAR(laser)) then {
|
||||||
_laserTarget = "LaserTarget" createVehicle (getpos player);
|
|
||||||
|
_laserTarget = "LaserTargetW" createVehicle (getpos player);
|
||||||
|
|
||||||
GVAR(laserActive) = true;
|
GVAR(laserActive) = true;
|
||||||
|
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
FUNC(guidance_DIRECT_LOAL_PFH) = {
|
FUNC(guidance_DIRECT_LOAL_PFH) = {
|
||||||
//TRACE_1("enter", _this);
|
//TRACE_1("enter", _this);
|
||||||
|
private["_args", "_shooter", "_dagr", "_curVelocity", "_targets", "_target", "_yVec", "_xVec", "_zVec", "_dagrPos", "_shooterPos", "_distanceToTarget", "_distanceToShooter", "_def"];
|
||||||
_args = _this select 0;
|
_args = _this select 0;
|
||||||
//PARAMS_7(_shooter,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile);
|
//PARAMS_7(_shooter,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile);
|
||||||
_shooter = _args select 0;
|
_shooter = _args select 0;
|
||||||
@ -30,8 +31,11 @@ FUNC(guidance_DIRECT_LOAL_PFH) = {
|
|||||||
_dagrPos = getPosASL _dagr;
|
_dagrPos = getPosASL _dagr;
|
||||||
// player sideChat "G!";
|
// player sideChat "G!";
|
||||||
_targetPos = getPosASL _target;
|
_targetPos = getPosASL _target;
|
||||||
|
_shooterPos = getPosASL _shooter;
|
||||||
|
|
||||||
if((count _targetPos) > 0) then {
|
if((count _targetPos) > 0) then {
|
||||||
_distanceToTarget = _dagrPos vectorDistance _targetPos;
|
_distanceToTarget = _dagrPos vectorDistance _targetPos;
|
||||||
|
_distanceToShooter = _dagrPos vectorDistance _shooterPos;
|
||||||
|
|
||||||
_addHeight = [0,0,(_dagrPos distance _targetPos)*0.02];
|
_addHeight = [0,0,(_dagrPos distance _targetPos)*0.02];
|
||||||
#ifdef DEBUG_MODE_FULL
|
#ifdef DEBUG_MODE_FULL
|
||||||
@ -40,7 +44,10 @@ FUNC(guidance_DIRECT_LOAL_PFH) = {
|
|||||||
|
|
||||||
_targetPos = _targetPos vectorAdd _addHeight;
|
_targetPos = _targetPos vectorAdd _addHeight;
|
||||||
|
|
||||||
_def = 0.0050;
|
_def = 0.0030;
|
||||||
|
if(_distanceToShooter > 100) then {
|
||||||
|
_def = 0.0020;
|
||||||
|
};
|
||||||
|
|
||||||
_targetVectorSeeker = [_dagr, [_xVec, _yVec, _zVec], _targetPos] call FUNC(translateToWeaponSpace);
|
_targetVectorSeeker = [_dagr, [_xVec, _yVec, _zVec], _targetPos] call FUNC(translateToWeaponSpace);
|
||||||
// _targetVectorSeeker = _dagr worldToModel (ASLtoATL _targetPos);
|
// _targetVectorSeeker = _dagr worldToModel (ASLtoATL _targetPos);
|
||||||
|
Loading…
Reference in New Issue
Block a user