Disable all debug.

This commit is contained in:
jaynus 2015-04-10 12:12:25 -07:00
parent bcb7d18e7e
commit 391b1556cb
8 changed files with 12 additions and 162 deletions

View File

@ -99,6 +99,8 @@ class CfgAmmo {
// Turn off arma crosshair-guidance
manualControl = 0;
hit = 1400;
// ACE uses these values
//trackOversteer = 1;
//trackLead = 0;

View File

@ -1,54 +1,4 @@
#define DEBUG_MODE_FULL
#include "script_component.hpp"
EXPLODE_7_PVT(((_this select 1) select 0),_shooter,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile);
private["_targetPos", "_projectilePos", "_target", "_seekerTargetPos", "_launchParams", "_targetLaunchParams"];
private["_distanceToTarget", "_distanceToShooter", "_addHeight", "_returnTargetPos"];
_seekerTargetPos = _this select 0;
_launchParams = _this select 1;
_target = _launchParams select 0;
_targetLaunchParams = _launchParams select 1;
_shooterPos = getPosASL _shooter;
_projectilePos = getPosASL _projectile;
_distanceToTarget = _projectilePos vectorDistance _seekerTargetPos;
_distanceToShooter = _projectilePos vectorDistance _shooterPos;
TRACE_2("", _distanceToTarget, _distanceToShooter);
// Add height depending on distance for compensate
_addHeight = [0,0,0];
// Always climb an arc on initial launch if we are close to the round
if( ((ASLtoATL _projectilePos) select 2) < 50 && _distanceToShooter < 50) then {
_addHeight = _addHeight vectorAdd [0,0,_distanceToTarget];
} else {
// If we are below the target, increase the climbing arc
if((_projectilePos select 2) < (_seekerTargetPos select 2) + 20 && _distanceToTarget > 100) then {
_addHeight = _addHeight vectorAdd [0,0, ((_seekerTargetPos select 2) - (_projectilePos select 2))+20];
};
};
// Handle arcing terminal low for high decent
if( (_projectilePos select 2) > (_seekerTargetPos select 2) && _distanceToTarget < 100) then {
_addHeight = _addHeight vectorDiff [0,0, ((_projectilePos select 2) - (_seekerTargetPos select 2)) * 0.5];
} else {
if((_projectilePos select 2) > (_seekerTargetPos select 2) && _distanceToTarget > 100) then {
_addHeight = _addHeight vectorAdd [0,0, _distanceToTarget*0.02];
};
};
TRACE_3("", _distanceToTarget,_distanceToShooter,_addHeight);
_returnTargetPos = _seekerTargetPos vectorAdd _addHeight;
#ifdef DEBUG_MODE_FULL
drawLine3D [(ASLtoATL _returnTargetPos) vectorAdd _addHeight, ASLtoATL _returnTargetPos, [0,1,0,1]];
#endif
TRACE_1("Adjusted target position", _returnTargetPos);
_returnTargetPos;
_this call FUNC(attackProfile_LIN);

View File

@ -1,54 +1,4 @@
#define DEBUG_MODE_FULL
#include "script_component.hpp"
EXPLODE_7_PVT(((_this select 1) select 0),_shooter,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile);
private["_targetPos", "_projectilePos", "_target", "_seekerTargetPos", "_launchParams", "_targetLaunchParams"];
private["_distanceToTarget", "_distanceToShooter", "_addHeight", "_returnTargetPos"];
_seekerTargetPos = _this select 0;
_launchParams = _this select 1;
_target = _launchParams select 0;
_targetLaunchParams = _launchParams select 1;
_shooterPos = getPosASL _shooter;
_projectilePos = getPosASL _projectile;
_distanceToTarget = _projectilePos vectorDistance _seekerTargetPos;
_distanceToShooter = _projectilePos vectorDistance _shooterPos;
TRACE_2("", _distanceToTarget, _distanceToShooter);
// Add height depending on distance for compensate
_addHeight = [0,0,0];
// Always climb an arc on initial launch if we are close to the round
if( ((ASLtoATL _projectilePos) select 2) < 50 && _distanceToShooter < 50) then {
_addHeight = _addHeight vectorAdd [0,0,_distanceToTarget];
} else {
// If we are below the target, increase the climbing arc
if((_projectilePos select 2) < (_seekerTargetPos select 2) && _distanceToTarget > 100) then {
_addHeight = _addHeight vectorAdd [0,0, ((_seekerTargetPos select 2) - (_projectilePos select 2))+50];
};
};
// Handle arcing terminal low for high decent
if( (_projectilePos select 2) > (_seekerTargetPos select 2) && _distanceToTarget < 100) then {
_addHeight = _addHeight vectorDiff [0,0, ((_projectilePos select 2) - (_seekerTargetPos select 2)) * 0.5];
} else {
if((_projectilePos select 2) > (_seekerTargetPos select 2) && _distanceToTarget > 100) then {
_addHeight = _addHeight vectorAdd [0,0, _distanceToTarget*0.02];
};
};
TRACE_3("", _distanceToTarget,_distanceToShooter,_addHeight);
_returnTargetPos = _seekerTargetPos vectorAdd _addHeight;
#ifdef DEBUG_MODE_FULL
drawLine3D [(ASLtoATL _returnTargetPos) vectorAdd _addHeight, ASLtoATL _returnTargetPos, [0,1,0,1]];
#endif
TRACE_1("Adjusted target position", _returnTargetPos);
_returnTargetPos;
_this call FUNC(attackProfile_LIN);

View File

@ -1,54 +1,4 @@
#define DEBUG_MODE_FULL
#include "script_component.hpp"
EXPLODE_7_PVT(((_this select 1) select 0),_shooter,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile);
private["_targetPos", "_projectilePos", "_target", "_seekerTargetPos", "_launchParams", "_targetLaunchParams"];
private["_distanceToTarget", "_distanceToShooter", "_addHeight", "_returnTargetPos"];
_seekerTargetPos = _this select 0;
_launchParams = _this select 1;
_target = _launchParams select 0;
_targetLaunchParams = _launchParams select 1;
_shooterPos = getPosASL _shooter;
_projectilePos = getPosASL _projectile;
_distanceToTarget = _projectilePos vectorDistance _seekerTargetPos;
_distanceToShooter = _projectilePos vectorDistance _shooterPos;
TRACE_2("", _distanceToTarget, _distanceToShooter);
// Add height depending on distance for compensate
_addHeight = [0,0,0];
// Always climb an arc on initial launch if we are close to the round
if( ((ASLtoATL _projectilePos) select 2) < 50 && _distanceToShooter < 50) then {
_addHeight = _addHeight vectorAdd [0,0,_distanceToTarget];
} else {
// If we are below the target, increase the climbing arc
if((_projectilePos select 2) < (_seekerTargetPos select 2) + 50 && _distanceToTarget > 100) then {
_addHeight = _addHeight vectorAdd [0,0, ((_seekerTargetPos select 2) - (_projectilePos select 2))+50];
};
};
// Handle arcing terminal low for high decent
if( (_projectilePos select 2) > (_seekerTargetPos select 2) && _distanceToTarget < 100) then {
_addHeight = _addHeight vectorDiff [0,0, ((_projectilePos select 2) - (_seekerTargetPos select 2)) * 0.5];
} else {
if((_projectilePos select 2) > (_seekerTargetPos select 2) && _distanceToTarget > 100) then {
_addHeight = _addHeight vectorAdd [0,0, _distanceToTarget*0.02];
};
};
TRACE_3("", _distanceToTarget,_distanceToShooter,_addHeight);
_returnTargetPos = _seekerTargetPos vectorAdd _addHeight;
#ifdef DEBUG_MODE_FULL
drawLine3D [(ASLtoATL _returnTargetPos) vectorAdd _addHeight, ASLtoATL _returnTargetPos, [0,1,0,1]];
#endif
TRACE_1("Adjusted target position", _returnTargetPos);
_returnTargetPos;
_this call FUNC(attackProfile_LIN);

View File

@ -1,4 +1,4 @@
#define DEBUG_MODE_FULL
//#define DEBUG_MODE_FULL
#include "script_component.hpp"
_this call FUNC(attackProfile_LIN);

View File

@ -1,4 +1,4 @@
#define DEBUG_MODE_FULL
//#define DEBUG_MODE_FULL
#include "script_component.hpp"
EXPLODE_7_PVT(((_this select 1) select 0),_shooter,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile);
@ -32,16 +32,14 @@ if( ((ASLtoATL _projectilePos) select 2) < 140 && _distanceToShooter < 50) then
};
// Handle arcing terminal low for high decent
if( (_projectilePos select 2) > (_seekerTargetPos select 2) && _distanceToTarget < 100) then {
if( (_projectilePos select 2) > (_seekerTargetPos select 2) && _distanceToTarget < 140) then {
_addHeight = _addHeight vectorDiff [0,0, ((_projectilePos select 2) - (_seekerTargetPos select 2)) * 0.5];
} else {
if((_projectilePos select 2) > (_seekerTargetPos select 2) && _distanceToTarget > 100) then {
_addHeight = _addHeight vectorDiff [0,0, ((_projectilePos select 2) - (_seekerTargetPos select 2)) * 0.5];
if((_projectilePos select 2) > (_seekerTargetPos select 2) && _distanceToTarget > 140) then {
_addHeight = _addHeight vectorAdd [0,0, ((_projectilePos select 2) - (_seekerTargetPos select 2)) * 0.02];
};
};
TRACE_3("", _distanceToTarget,_distanceToShooter,_addHeight);
_returnTargetPos = _seekerTargetPos vectorAdd _addHeight;

View File

@ -1,3 +1,3 @@
#define DEBUG_MODE_FULL
//#define DEBUG_MODE_FULL
#include "script_component.hpp"
TRACE_1("enter", _this);

View File

@ -1,3 +1,3 @@
#define DEBUG_MODE_FULL
//#define DEBUG_MODE_FULL
#include "script_component.hpp"
TRACE_1("enter", _this);