Functions: Garbage: addDead
This is a function that is, ideally, run via a
killed event handler when an AI unit is, unsurprisingly, killed. It adds the dead object's corpse (be it a vehicle or a body) to a global array that has a "limit" of sorts, definable via parameters. Once this limit is reached, the oldest item in the array is deleted. This way, the map can contain a limited number of dead objects and therefore doesn't "overload."
The dead object to add to the array
Adding a soldier's (
aSoldier) dead body to the array.
aSoldier call AW_fnc_addDead;