ACE3/addons/medical/functions/fnc_handleCreateLitter.sqf

23 lines
704 B
Plaintext

#include "script_component.hpp"
PARAMS_3(_litterClass,_position,_direction);
private["_litterObject"];
if (isnil QGVAR(allCreatedLitter)) then {
GVAR(allCreatedLitter) = [];
GVAR(litterPFHRunning) = false;
};
if((count GVAR(allCreatedLitter)) <= GVAR(litterSimulationDetail) )then {
_litterObject = createVehicleLocal [_litterClass, _position, [], 0, "NONE"];
_litterObject setDir _direction;
} else {
// @TODO: We hit max litter items, remove a few of them to work with what we have.
// Basically, we should just start FIFO'ing these
};
GVAR(allCreatedLitter) pushBack _litterObject;
//GVAR(allCreatedLitter) = GVAR(allCreatedLitter) - [objNull];
true