mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Laser - Handle Bad Data Returns
This commit is contained in:
parent
63dd19825b
commit
822115214f
@ -16,7 +16,7 @@
|
|||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_pos", "_seekerWavelengths", "_seekerCode", "_spots", "_buckets", "_excludes", "_bucketIndex", "_finalPos", "_owner", "_obj", "_x", "_method"];
|
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 ["_emitterWavelength", "_laserCode", "_divergence", "_laser", "_res", "_bucketPos", "_bucketList", "_c", "_forEachIndex", "_index"];
|
||||||
private ["_testPos", "_finalBuckets", "_largest", "_largestIndex", "_finalBucket", "_owners", "_avgX", "_avgY", "_avgZ", "_count", "_maxOwner", "_maxOwnerIndex", "_finalOwner"];
|
private ["_testPos", "_finalBuckets", "_largest", "_largestIndex", "_finalBucket", "_owners", "_avgX", "_avgY", "_avgZ", "_count", "_maxOwner", "_maxOwnerIndex", "_finalOwner"];
|
||||||
private["_dir", "_seekerCos", "_seekerFov", "_testDotProduct", "_testPoint", "_testPointVector"];
|
private["_dir", "_seekerCos", "_seekerFov", "_testDotProduct", "_testPoint", "_testPointVector"];
|
||||||
|
|
||||||
@ -62,8 +62,9 @@ _finalOwner = nil;
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
_laserPos = _laser select 0;
|
|
||||||
_laserDir = _laser select 1;
|
//Handle Weird Data Return
|
||||||
|
if (_laser params [["_laserPos", [], [[]], 3], ["_laserDir", [], [[]], 3]]) then {
|
||||||
_res = [_laserPos, _laserDir, _divergence] call FUNC(shootCone);
|
_res = [_laserPos, _laserDir, _divergence] call FUNC(shootCone);
|
||||||
{
|
{
|
||||||
_testPoint = _x select 0;
|
_testPoint = _x select 0;
|
||||||
@ -74,6 +75,7 @@ _finalOwner = nil;
|
|||||||
};
|
};
|
||||||
} forEach (_res select 2);
|
} forEach (_res select 2);
|
||||||
};
|
};
|
||||||
|
};
|
||||||
} forEach (GVAR(laserEmitters) select 1);
|
} forEach (GVAR(laserEmitters) select 1);
|
||||||
|
|
||||||
if((count _spots) > 0) then {
|
if((count _spots) > 0) then {
|
||||||
|
Loading…
Reference in New Issue
Block a user