Merge pull request #2829 from acemod/FlashlightProxyModel

Fix empty flashlightProxy model + Delete map glow lights from disconnecting players
This commit is contained in:
PabstMirror 2015-11-08 11:25:06 -06:00
commit 28738517e8
2 changed files with 18 additions and 1 deletions

View File

@ -6,7 +6,7 @@ class CfgAmmo {
class F_20mm_White: FlareBase {};
class ACE_FlashlightProxy_White: F_20mm_White {
model = "";
model = "\A3\Weapons_f\empty";
effectFlare = "FlareShell";
triggerTime = 0;

View File

@ -1,5 +1,22 @@
#include "script_component.hpp"
//Delete map glow lights from disconnecting players #2810
if (isServer) then {
addMissionEventHandler ["HandleDisconnect",{
params ["_disconnectedPlayer"];
if ((!GVAR(mapGlow)) || {isNull _disconnectedPlayer}) exitWith {};
{
if (_x isKindOf "ACE_FlashlightProxy_White") then {
// ACE_LOGINFO_2("Deleting leftover light [%1:%2] from DC player [%3]", _x, typeOf _x, _disconnectedPlayer);
deleteVehicle _x;
};
} forEach attachedObjects _disconnectedPlayer;
nil
}];
};
// Exit on Headless as well
if (!hasInterface) exitWith {};