mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge pull request #2829 from acemod/FlashlightProxyModel
Fix empty flashlightProxy model + Delete map glow lights from disconnecting players
This commit is contained in:
commit
28738517e8
@ -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;
|
||||
|
@ -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 {};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user