// Deletes dead Enemy from core mission

_unit = _this select 0;
_tag = _this select 1;

switch (_tag) do //who died where?
{
	case "INF":
	{
		_curtownInf = (EGG_EVO_Infantry select EGG_EVO_MissionProgress) select 0;
		(EGG_EVO_Infantry select EGG_EVO_MissionProgress) set [0, _curtownInf-1];
	};	
	 case "MEC":
	{
		_curtownMec = (EGG_EVO_Mechanized select EGG_EVO_MissionProgress) select 0;
		(EGG_EVO_Mechanized select EGG_EVO_MissionProgress) set [0, _curtownMec-1];
	};
	 default
	{
	};	
};
/*

if (not (_unit isKindOf "Man")) then
{
	{_x setpos position _unit} forEach crew _unit;
	sleep 300.0;
	deletevehicle _unit;
};

if (_unit isKindOf "Man") then
{
	if(not ((vehicle _unit) isKindOf "Man")) then {_unit setpos (position vehicle _unit)} ;
	sleep 310.0;
	
	hideBody _unit;
	sleep 8;
	
	//Remove dropped weapon
	_holder = objNull;
	_holders = getPosATL _unit nearEntities ["WeaponHolderSimulated", 10];
	if (count _holders > 0) then
	{
		_holder = _holders select 0;
	};
	deleteVehicle _holder;
	
	deleteVehicle _unit;
};
*/
