mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
c9f9b89ea2
Use short circuit for loadout change and add note
17 lines
482 B
Plaintext
17 lines
482 B
Plaintext
#include "script_component.hpp"
|
|
|
|
// Delete map glow lights from disconnecting players, #2810
|
|
addMissionEventHandler ["HandleDisconnect",{
|
|
params ["_disconnectedPlayer"];
|
|
if (!GVAR(mapGlow)) exitWith {};
|
|
private _unitLight = _disconnectedPlayer getVariable [QGVAR(flashlight), ["", objNull]];
|
|
_unitLight params ["", "_glow"];
|
|
|
|
if ((!isNull _disconnectedPlayer) && {!isNull _glow}) then {
|
|
detach _glow;
|
|
deleteVehicle _glow;
|
|
};
|
|
|
|
nil
|
|
}];
|