mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
c4ed18f39f
Fix that findNearestVehicle dont return any time the nearest car Small Performance Improvement in getSizeItem/handleDestroyed/startUnload Enhance Some legibility
28 lines
499 B
Plaintext
28 lines
499 B
Plaintext
/*
|
|
* Author: Glowbal
|
|
* Handle object being destroyed
|
|
*
|
|
* Arguments:
|
|
* 0: Object <OBJECT>
|
|
*
|
|
* Return value:
|
|
* None
|
|
*
|
|
* Public: No
|
|
*/
|
|
|
|
#include "script_component.hpp"
|
|
|
|
params ["_vehicle"];
|
|
|
|
_loaded = _vehicle getvariable [QGVAR(loaded), []];
|
|
if (count _loaded == 0) exitwith {};
|
|
|
|
{
|
|
// TODO deleteVehicle or just delete vehicle? Do we want to be able to recover destroyed equipment?
|
|
deleteVehicle _x;
|
|
//_x setDamage 1;
|
|
} count _loaded;
|
|
|
|
[_vehicle] call FUNC(validateCargoSpace);
|