Merge branch 'network_lasers' of github.com:acemod/ACE3 into network_lasers

This commit is contained in:
jaynus 2015-04-12 11:01:27 -07:00
commit 16cd05edc8
2 changed files with 13 additions and 9 deletions

View File

@ -5,7 +5,7 @@
* Arguments:
* 0: Emitter <object>
* 1: Owner <object>
* 2: Method, can be code, which emitter and owner are passed to, an array with a position memory point and weapon name, or an array with a position memory point, a vector begining memory point, and vector ending memory point.
* 2: Method, can be code, which emitter and owner are passed to, a string function name, an array with a position memory point and weapon name, or an array with a position memory point, a vector begining memory point, and vector ending memory point.
* 3: Wavelength (1550nm is common eye safe) <number>
* 4: Laser code <number>
* 5: Beam divergence (in mils off beam center).

View File

@ -39,6 +39,9 @@ _finalOwner = nil;
_laser = [];
if(IS_CODE(_method)) then {
_laser = _x call _method;
} else {
if(IS_STRING(_method)) then {
_laser = _x call (missionNamespace getVariable [_method, {}]);
} else {
if(IS_ARRAY(_method)) then {
if(count _method == 2) then {
@ -50,6 +53,7 @@ _finalOwner = nil;
};
};
};
};
_laserPos = _laser select 0;
_laserDir = _laser select 1;
_res = [_laserPos, _laserDir, _divergence] call FUNC(shootCone);