Merge branch 'master' into pr/7984

This commit is contained in:
johnb432 2024-07-17 17:03:44 +02:00
commit 61883dac06
4 changed files with 6 additions and 4 deletions

View File

@ -25,7 +25,7 @@ private _hpData = (_hitData select 1) select _hitPartDataIndex;
private _objectHit = _hpData param [0, objNull];
TRACE_1("",_objectHit);
if ((isNil "_objectHit") || {isNull _objectHit}) exitWith {WARNING_1("Problem with hitPart data - bad object [%1]",_objectHit);};
_objectHit removeEventHandler ["hitPart", _hpId];
_objectHit removeEventHandler ["HitPart", _hpId];
private _caliber = getNumber (configFile >> "CfgAmmo" >> _roundType >> "caliber");
private _explosive = getNumber (configFile >> "CfgAmmo" >> _roundType >> "explosive");

View File

@ -41,7 +41,7 @@ if (!alive _round) exitWith {
TRACE_1("doSpall",_foundObjectHPIds);
{
if (!isNil "_x") then {
_x removeEventHandler ["hitPart", _foundObjectHPIds select _forEachIndex];
_x removeEventHandler ["HitPart", _foundObjectHPIds select _forEachIndex];
};
} forEach _spallTrack;
};

View File

@ -31,7 +31,7 @@ if (_intersectsWith isEqualTo []) exitWith {};
{
// diag_log text format ["Adding HP: %1", _x];
private _index = count GVAR(spallHPData);
private _hpId = _x addEventHandler ["hitPart", compile format ["[%1, _this] call " + QFUNC(spallHP), _index]];
private _hpId = _x addEventHandler ["HitPart", compile format ["[%1, _this] call " + QFUNC(spallHP), _index]];
_foundObjects pushBack _x;
_foundObjectHPIds pushBack _hpId;
private _data = [_hpId, _x, typeOf _round, _round, _curPos, _velocity, 0, _foundObjects, _foundObjectHPIds];

View File

@ -132,6 +132,9 @@ if (_init) then {
GVAR(camDummy) = nil;
// Stop tracking everything
{ deleteVehicle _x; } forEach GVAR(camLights);
GVAR(camLights) = nil;
GVAR(camMode) = nil;
GVAR(camVision) = nil;
GVAR(camFocus) = nil;
@ -144,6 +147,5 @@ if (_init) then {
GVAR(camYaw) = nil;
GVAR(camPitch) = nil;
GVAR(camSlow) = nil;
GVAR(camLights) = nil;
GVAR(camLight) = nil;
};