mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
ace_lasers
This commit is contained in:
parent
953faf3d4b
commit
8361ec3812
@ -8,9 +8,6 @@ PREP(checkLos);
|
||||
|
||||
PREP(findStrongestRay);
|
||||
|
||||
PREP(translateToModelSpace);
|
||||
PREP(translateToWeaponSpace);
|
||||
|
||||
PREP(onLaserDesignatorDraw);
|
||||
|
||||
PREP(seekerFindLaserSpot);
|
||||
|
@ -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 = [];
|
||||
|
@ -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;
|
||||
|
@ -3,6 +3,7 @@
|
||||
TRACE_1("enter", _this);
|
||||
|
||||
PARAMS_1(_laserTarget);
|
||||
private["_uuid"];
|
||||
|
||||
// Add the target to the global targets array
|
||||
// Everyone tracks them
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
private["_d", "_map", "_p", "_theta", "_u"];
|
||||
_map = _this select 0;
|
||||
_theta = _this select 1;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
@ -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;
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user