//dev fix by Eggbeast/Tankbuster - not using at the moment - kept in case its needed again
//fixes ifrit/galkin conflict in A3 missions
//in dev: 
//in A3 non-dev:

//put this in the init.sqf

/*
if ((productVersion select 3)==95208) then
{
//non dev
	dev=0;
}else
{
//non dev
	dev=1;
};
_fix = [dev] execVM "EGG_EVO_devfix.sqf";
*/

_EGG_dev = _this select 0;

switch (_Egg_dev) do:
{
	case 0:
	{
		activateAddons [	"A3_Soft_F_Galkin"];
		sleep 2;
//replace all my mrked vehicles in mission.sqm with correct vehicles
		{
			_pos = getPosASL _x;
			_dir = getdir _x;
		//	_side = side _x;
			_type = "O_MRAP_02_F";
			if ((_x == ifrit1gmg) or (_x == ifrit4gmg)) then
			{
				_type = "O_MRAP_02_gmg_F";
			};
			if (_x == ifrit5mg)then
			{
				_type = "O_MRAP_02_hmg_F";
			};
			_hasname = false;
			_unitname = vehicleVarName _x;
			if (isNil _unitname) then {_hasname = false;} else {_hasname = true;};
			_unitinit = "";
			_haveinit = false;
			if ( (_x== ifrit3) || (_x == ifrit4gmg) || (_x== ifrit5mg) || (_x== ifrit6) )then
			{
				_unitinit = "veh = [this, 30, 3600, 0, FALSE, TRUE, ""this setDamage 0.5;this setFuel 0""] execVM ""scripts\vehicle.sqf""";
				_haveinit = true;
			};
//make replacement vehicle

			_newpos = getmarkerpos "centerp";
			_unit = _type createVehicle _newpos;
			if (_haveinit) then 
			{
				_unit setVehicleInit format ["%1;", _unitinit];
				processInitCommands;
			};
			if (_hasname) then 
			{
				_unit setVehicleInit format ["%1 = this; this setVehicleVarName ""%1""",_unitname];
				processInitCommands;};
			};
		_unit setPosASL _pos;
		_unit setDir _dir;
		}forEach [ifrit1gmg,ifrit2,ifrit3,ifrit4gmg,ifrit5mg,ifrit6];
	};
	case 1:
	{
		//activateAddons ["A3_Soft_F_Ifrit"];
		sleep 2;
//replace all my mrked vehicles in mission.sqm with correct vehicles
		{
			_pos = getPosASL _x;
			_dir = getdir _x;
		//	_side = side _x;
			_type = "O_MRAP_02_F";
			if ((_x == ifrit1gmg) or (_x == ifrit4gmg)) then
			{
				_type = "O_MRAP_02_gmg_F";
			};
			if (_x == ifrit5mg)then
			{
				_type = "O_MRAP_02_hmg_F";
			};
			_hasname = false;
			_unitname = vehicleVarName _x;
			if (isNil _unitname) then {_hasname = false;} else {_hasname = true;};
			_unitinit = "";
			_haveinit = false;
			if ( (_x== ifrit3) || (_x == ifrit4gmg) || (_x== ifrit5mg) || (_x== ifrit6) )then
			{
				_unitinit = "veh = [this, 30, 3600, 0, FALSE, TRUE, ""this setDamage 0.5;this setFuel 0""] execVM ""scripts\vehicle.sqf""";
				_haveinit = true;
			};
//make replacement vehicle

			_newpos = getmarkerpos "centerp";
			_unit = _type createVehicle _newpos;
			if (_haveinit) then 
			{
				_unit setVehicleInit format ["%1;", _unitinit];
				processInitCommands;
			};
			if (_hasname) then 
			{
				_unit setVehicleInit format ["%1 = this; this setVehicleVarName ""%1""",_unitname];
				processInitCommands;};
			};
		_unit setPosASL _pos;
		_unit setDir _dir;
		}forEach [ifrit1gmg,ifrit2,ifrit3,ifrit4gmg,ifrit5mg,ifrit6];
	};
};



