From e89c172d34288ec2a6059cfe681a7b08cb5b451b Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Wed, 11 Mar 2020 15:09:36 -0500 Subject: [PATCH] Arsenal - Fix main menu mission (#7594) * Arsenal - Fix main menu mission * fix double space * Add note --- addons/arsenal/missions/Arsenal.VR/CfgEventHandlers.hpp | 5 +++-- addons/arsenal/missions/Arsenal.VR/XEH_preInit.sqf | 2 ++ addons/arsenal/missions/Arsenal.VR/fnc_createTarget.sqf | 4 ++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/addons/arsenal/missions/Arsenal.VR/CfgEventHandlers.hpp b/addons/arsenal/missions/Arsenal.VR/CfgEventHandlers.hpp index e75956f440..6e90665ffc 100644 --- a/addons/arsenal/missions/Arsenal.VR/CfgEventHandlers.hpp +++ b/addons/arsenal/missions/Arsenal.VR/CfgEventHandlers.hpp @@ -1,11 +1,12 @@ +// These files are from the VR mission, not the base addon folder class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call compile preprocessFileLineNumbers 'XEH_preInit.sqf'); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call compile preprocessFileLineNumbers 'XEH_postInit.sqf'); }; }; diff --git a/addons/arsenal/missions/Arsenal.VR/XEH_preInit.sqf b/addons/arsenal/missions/Arsenal.VR/XEH_preInit.sqf index 329d5fd1a5..6d6acca865 100644 --- a/addons/arsenal/missions/Arsenal.VR/XEH_preInit.sqf +++ b/addons/arsenal/missions/Arsenal.VR/XEH_preInit.sqf @@ -1,4 +1,6 @@ #include "script_component.hpp" +INFO("Loading VR Mission"); + PREP(onPause); PREP(createTarget); diff --git a/addons/arsenal/missions/Arsenal.VR/fnc_createTarget.sqf b/addons/arsenal/missions/Arsenal.VR/fnc_createTarget.sqf index 7ff1ea58e6..30eac04a7f 100644 --- a/addons/arsenal/missions/Arsenal.VR/fnc_createTarget.sqf +++ b/addons/arsenal/missions/Arsenal.VR/fnc_createTarget.sqf @@ -52,6 +52,10 @@ _target setVariable ["origin", _position]; _target addEventHandler ["killed", { params ["_target"]; + + // Killed may fire twice, 2nd will be null - https://github.com/acemod/ACE3/pull/7561 + if (isNull _target) exitWith { TRACE_1("Ignoring null death",_target); }; + private _position = _target getVariable ["origin", position _target]; private _varName = vehicleVarName _target;