Merge pull request #752 from acemod/jaynusPrivates

Jaynus privates
This commit is contained in:
jaynus 2015-04-18 10:59:26 -07:00
commit 952666ab90
24 changed files with 46 additions and 60 deletions

View File

@ -5,12 +5,15 @@ TRACE_1("enter", _this);
#define __TRACKINTERVAL 0 // how frequent the check should be.
#define __LOCKONTIME 3 // Lock on won't occur sooner
private["_apos", "_aposX", "_aposY", "_args", "_boundsInput", "_bpos", "_canFire", "_constraintBottom"];
private["_constraintLeft", "_constraintRight", "_constraintTop", "_currentTarget", "_fireDisabledEH"];
private["_firedEH", "_fov", "_lastTick", "_lockTime", "_maxX", "_maxY", "_minX", "_minY", "_newTarget"];
private["_offsetX", "_offsetY", "_pos", "_randomLockInterval", "_randomPosWithinBounds", "_range"];
private["_runTime", "_soundTime", "_targetArray", "_zamerny"];
#define __OffsetX ((ctrlPosition __JavelinIGUITargetingLineV) select 0) - 0.5
#define __OffsetY ((ctrlPosition __JavelinIGUITargetingLineH) select 1) - 0.5
private["_isJavelin", "_args", "_lastTick", "_runTime", "_soundTime", "_lockTime", "_newTarget", "_currentTarget", "_range", "_pos", "_targetArray"];
// Reset arguments if we havnt rendered in over a second
_args = uiNamespace getVariable[QGVAR(arguments), [] ];
if( (count _args) > 0) then {

View File

@ -1,6 +1,7 @@
//#define DEBUG_MODE_FULL
#include "script_component.hpp"
TRACE_1("enter", _this);
private["_args", "_disableFireEH", "_pfh"];
uiNameSpace setVariable ['ACE_RscOptics_javelin',nil];

View File

@ -8,9 +8,6 @@ PREP(checkLos);
PREP(findStrongestRay);
PREP(translateToModelSpace);
PREP(translateToWeaponSpace);
PREP(onLaserDesignatorDraw);
PREP(seekerFindLaserSpot);

View File

@ -1,5 +1,5 @@
#include "script_component.hpp"
private["_checkPos", "_i", "_largest", "_largestSpot", "_list", "_outliers", "_remainingSpots", "_samplePos", "_spot", "_spots", "_testPos"];
_list = _this select 0;
_checkPos = _this select 1;
_spots = [];

View File

@ -2,7 +2,7 @@
#include "script_component.hpp"
TRACE_1("enter", _this);
private["_args", "_laserTarget"];
private["_args", "_laserTarget", "_pos", "_shooter", "_uuid"];
//TRACE_1("enter", _this);
_args = _this select 0;
_laserTarget = _args select 0;

View File

@ -3,6 +3,7 @@
TRACE_1("enter", _this);
PARAMS_1(_laserTarget);
private["_uuid"];
// Add the target to the global targets array
// Everyone tracks them

View File

@ -1,5 +1,5 @@
#include "script_component.hpp"
private["_d", "_map", "_p", "_theta", "_u"];
_map = _this select 0;
_theta = _this select 1;

View File

@ -15,10 +15,11 @@
#include "script_component.hpp"
private ["_pos", "_seekerWavelengths", "_seekerCode", "_spots", "_buckets", "_excludes", "_bucketIndex", "_finalPos", "_owner", "_obj", "_x", "_method",
"_emitterWavelength", "_laserCode", "_divergence", "_laser", "_laserPos", "_laserDir", "_res", "_bucketPos", "_bucketList", "_c", "_forEachIndex", "_index",
"_testPos", "_finalBuckets", "_largest", "_largestIndex", "_finalBucket", "_owners", "_avgX", "_avgY", "_avgZ", "_count", "_maxOwner", "_maxOwnerIndex", "_finalOwner"];
private ["_pos", "_seekerWavelengths", "_seekerCode", "_spots", "_buckets", "_excludes", "_bucketIndex", "_finalPos", "_owner", "_obj", "_x", "_method"];
private ["_emitterWavelength", "_laserCode", "_divergence", "_laser", "_laserPos", "_laserDir", "_res", "_bucketPos", "_bucketList", "_c", "_forEachIndex", "_index"];
private ["_testPos", "_finalBuckets", "_largest", "_largestIndex", "_finalBucket", "_owners", "_avgX", "_avgY", "_avgZ", "_count", "_maxOwner", "_maxOwnerIndex", "_finalOwner"];
private["_dir", "_seekerCos", "_seekerFov", "_testDotProduct", "_testPoint", "_testPointVector"];
_pos = _this select 0;
_dir = vectorNormalized (_this select 1);
_seekerFov = _this select 2;

View File

@ -1,7 +1,6 @@
#include "script_component.hpp"
//#define DEBUG_MODE_FULL
private ["_divergence","_pos","_vec","_longestReturn","_shortestReturn","_resultPositions","_p1","_p2","_p","_v","_cp","_vecRotateMap","_result",
"_resultPos","_distance","_count","_pos2","_radOffset","_offset","_offsetPos","_offsetVector"];
private ["_i", "_divergence","_pos","_vec","_longestReturn","_shortestReturn","_resultPositions","_p1","_p2","_p","_v","_cp","_vecRotateMap","_result", "_resultPos","_distance","_count","_pos2","_radOffset","_offset","_offsetPos","_offsetVector"];
_divergence = 0.3;
_pos = _this select 0;
_vec = _this select 1;

View File

@ -1,16 +0,0 @@
_object = _this select 0;
_origin = getPosASL _object;
_matrix = _this select 1;
_xVec = _matrix select 0;
_yVec = _matrix select 1;
_zVec = _matrix select 2;
_offset = _this select 2;
_x = _offset select 0;
_y = _offset select 1;
_z = _offset select 2;
_out = (((_xVec vectorMultiply _x) vectorAdd (_yVec vectorMultiply _y)) vectorAdd (_zVec vectorMultiply _z)) vectorAdd _origin;
_out;

View File

@ -1,22 +0,0 @@
_object = _this select 0;
_origin = getPosASL _object;
_matrix = _this select 1;
_xVec = _matrix select 0;
_yVec = _matrix select 1;
_zVec = _matrix select 2;
_offset = _this select 2;
_offset = _offset vectorDiff _origin;
_x = _offset select 0;
_y = _offset select 1;
_z = _offset select 2;
_out = [
((_xVec select 0)*_x) + ((_xVec select 1)*_y) + ((_xVec select 2)*_z),
((_yVec select 0)*_x) + ((_yVec select 1)*_y) + ((_yVec select 2)*_z),
((_zVec select 0)*_x) + ((_zVec select 1)*_y) + ((_zVec select 2)*_z)
];
_out;

View File

@ -12,7 +12,7 @@
//#define DEBUG_MODE_FULL
#include "script_component.hpp"
private["_emitter", "_owner", "_gunnerInfo", "_turretInfo", "_povPos", "_povDir"];
private["_emmiter", "_owner", "_gunnerInfo", "_turretInfo", "_povPos", "_povDir"];
_emmiter = _this select 0;
_owner = _this select 1;

View File

@ -13,7 +13,7 @@
//#define DEBUG_MODE_FULL
#include "script_component.hpp"
private["_emitter", "_owner", "_gunnerInfo", "_turretInfo", "_povPos", "_povDir"];
private["_emmiter", "_owner", "_gunnerInfo", "_turretInfo", "_povPos", "_povDir"];
_emmiter = _this select 0;
_owner = _this select 1;

View File

@ -9,6 +9,7 @@
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", "_state"];
private["_cruisAlt", "_distanceShooterToTarget", "_shooterPos"];
_seekerTargetPos = _this select 0;
_launchParams = _this select 1;

View File

@ -9,6 +9,8 @@
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", "_state"];
private["_cruisAlt", "_distanceShooterToTarget", "_shooterPos"];
_seekerTargetPos = _this select 0;
_launchParams = _this select 1;

View File

@ -3,7 +3,7 @@
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"];
private["_distanceToTarget", "_distanceToShooter", "_addHeight", "_returnTargetPos", "_shooterPos"];
_seekerTargetPos = _this select 0;
_launchParams = _this select 1;

View File

@ -2,8 +2,7 @@
#include "script_component.hpp"
EXPLODE_7_PVT(((_this select 1) select 0),_shooter,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile);
private["_attackProfilePos"];
private["_testName", "_attackProfilePos", "_attackProfile", "_attackProfileName", "_attackProfilesCfg", "_i", "_launchParams", "_testame", "_testProfile"];
_launchParams = ((_this select 1) select 1);
_attackProfileName = _launchParams select 3;

View File

@ -2,7 +2,7 @@
#include "script_component.hpp"
EXPLODE_7_PVT(((_this select 1) select 0),_shooter,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile);
private["_seekerProfilePos"];
private["_seekerProfilePos", "_i", "_launchParams", "_seekerType", "_seekerTypeName", "_seekerTypesCfg", "_testName", "_testProfile"];
_launchParams = ((_this select 1) select 1);
_seekerTypeName = _launchParams select 2;

View File

@ -7,6 +7,7 @@ private["_launchParams", "_targetLaunchParams", "_flightParams", "_seekerParams"
private["_lastRunTime", "_runtimeDelta", "_adjustTime", "_args", "_seekerTargetPos", "_projectilePos"];
private["_profileAdjustedTargetPos", "_incDeflection", "_minDeflection", "_maxDeflection"];
private["_targetVector", "_adjustVector", "_finalAdjustVector", "_changeVector", "_pitch", "_yaw", "_roll"];
private["_PS", "_distanceToTarget", "_targetRelativeVector", "_vectorTo"];
_args = _this select 0;
EXPLODE_7_PVT((_args select 0),_shooter,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile);

View File

@ -8,6 +8,8 @@ if(GVAR(enabled) < 1 || {!local _projectile} ) exitWith { false };
if( !isPlayer _shooter && { GVAR(enabled) < 2 } ) exitWith { false };
private["_config", "_enabled", "_target", "_seekerType", "_attackProfile"];
private["_args", "_canUseLock", "_guidingUnit", "_launchPos", "_lockMode", "_targetPos", "_vanillaTarget"];
PARAMS_7(_shooter,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile);
// Bail on not missile

View File

@ -1,4 +1,5 @@
#include "script_component.hpp"
private["_d", "_map", "_p", "_theta", "_u"];
_map = _this select 0;
_theta = _this select 1;

View File

@ -3,6 +3,7 @@
EXPLODE_7_PVT(((_this select 1) select 0),_shooter,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile);
private["_targets", "_foundTargetPos", "_launchParams", "_seekerParams", "_targetLaunchParams"];
private["_angleFov", "_angleOkay", "_losOkay", "_seekerTargetPos", "_sensorPos", "_target"];
_seekerTargetPos = _this select 0;

View File

@ -2,8 +2,8 @@
#include "script_component.hpp"
EXPLODE_7_PVT(((_this select 1) select 0),_shooter,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile);
private["_angleFov", "_canSeeTarget", "_foundTargetPos", "_laserResult", "_launchParams", "_seekerParams", "_seekerTargetPos", "_sensorPos", "_target"];
_seekerTargetPos = _this select 0;
_launchParams = _this select 1;
_seekerParams = _launchParams select 3;
_angleFov = _seekerParams select 0;

View File

@ -81,10 +81,25 @@ def check_privates(filepath):
if len(missing) > 0:
print (filepath)
private_output = 'private[';
first = True
for bad_priv in missing:
if first:
first = False
private_output = private_output + '"' + bad_priv
else:
private_output = private_output + '", "' + bad_priv
private_output = private_output + '"];';
print private_output
for bad_priv in missing:
print ('\t' + bad_priv)
bad_count_file = bad_count_file + 1
return bad_count_file
def main():