mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Added proper dummy object cleanup code
This commit is contained in:
parent
87d1f7c281
commit
608af39a67
@ -19,13 +19,19 @@
|
||||
* Public: Yes
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
private ["_result", "_ignoreRange", "_pos"];
|
||||
private ["_result", "_ignoreRange", "_helpers", "_pos"];
|
||||
EXPLODE_3_PVT(_this,_unit,_range,_item);
|
||||
_ignoreRange = (_range == -1);
|
||||
_result = true;
|
||||
|
||||
if (!_ignoreRange && {(_unit distance (_item select 0)) > _range}) exitWith {false};
|
||||
|
||||
_helpers = attachedObjects (_item select 0);
|
||||
{
|
||||
detach _x;
|
||||
deleteVehicle _x;
|
||||
} forEach _helpers;
|
||||
|
||||
if (getNumber (ConfigFile >> "CfgAmmo" >> typeof (_item select 0) >> "TriggerWhenDestroyed") == 0) then {
|
||||
private ["_exp", "_previousExp"];
|
||||
_previousExp = _item select 0;
|
||||
|
Loading…
Reference in New Issue
Block a user