Overpressure changes (#4770)

* Add setting to overpressure

* Change overpressure on 2a70 cannon

Close #4691
Also fix gl smoke causing frag

* Handle 2a28 cannon

* Fix base class
This commit is contained in:
PabstMirror
2016-12-22 13:29:05 -06:00
committed by GitHub
parent 04d4353b5d
commit c22fce273f
10 changed files with 56 additions and 20 deletions

View File

@ -7,42 +7,41 @@
* 1: End point ASL <ARRAY>
* 2: Color <ARRAY>
*
* None
* Return Value:
* Nothing
*
* Example:
* [[0,0,0], [1,1,0], [1,0,0,1]]] call ace_common_fnc_addLineToDebugDraw;
*
* Public: No
*/
#include "script_component.hpp"
params ["_startASL", "_endASL", "_color"];
if (isNil QGVAR(debugLines)) then {
GVAR(debugLines) = [];
GVAR(debugLinesIndex) = 0;
};
if (count GVAR(debugLines) < 100) then {
GVAR(debugLines) pushBack _this;
GVAR(debugLines) pushBack [ASLtoAGL _startASL, ASLtoAGL _endASL, _color];
GVAR(debugLinesIndex) = 0;
} else {
GVAR(debugLines) set [GVAR(debugLinesIndex), _this];
GVAR(debugLines) set [GVAR(debugLinesIndex), [ASLtoAGL _startASL, ASLtoAGL _endASL, _color]];
GVAR(debugLinesIndex) = (GVAR(debugLinesIndex) + 1) mod 100;
};
if (isNil QGVAR(debugDrawHandler)) then {
GVAR(debugDrawHandler) = addMissionEventHandler ["Draw3D", {
if (count GVAR(debugLines) == 0) exitWith {
if (GVAR(debugLines) isEqualTo []) exitWith {
removeMissionEventHandler ["Draw3D", GVAR(debugDrawHandler)];
GVAR(debugDrawHandler) = nil;
};
{
_p0 = _x select 0;
if (!surfaceIsWater _p0) then {
_p0 = ASLtoATL _p0;
};
_p1 = _x select 1;
if (!surfaceIsWater _p1) then {
_p1 = ASLtoATL _p1;
};
drawLine3D [_p0, _p1, _x select 2];
_x params ["_start", "_end", "_color"];
drawLine3D [_start, _end, _color];
} forEach GVAR(debugLines);
}];
};