happydayz

Exile Bug Fixes

15 posts in this topic

 

Collection of Exile Fixes for Server Admins



Exploit Fixes:

ARMA PERFORMANCE BUILD V1 introduced player body duping
(Prevent players joining your server with that build version!)

Spoiler

if ((productVersion select 3) isEqualto 138587) then
{
 // End loading screen
 endLoadingScreen;

 // End the mission
 endMission "END6";
};

Add this to the top of your init.sqf



Stop Players Dupe selling Vehicles at trader

http://pastebin.com/JYif9vpW
http://pastebin.com/aXTeMxQH



Other Fixes:

Stop throwing zipties as  grenades, do ziptie/handcuff action instead

http://pastebin.com/XbAJvPU0

 

post any fixes you have below and Ill add them to this list so they can be added to Exiles next update

Edited by happydayz
Woops forgot to set a variable true defeating the purpose of this fix...
  • Like 12

Share this post


Link to post
Share on other sites
Advertisement

Ever since Dynamic Simulation was implemented (A3 1.66), players have reported vehicles starting and stopping when getting out of them. Though it does not always occur, I have implemented the following fix on my servers and it has stopped the issue from occurring. Here is the fix:

Change code in ExileServer_system_simulationMonitor_network_enableSimulationRequest.sqf (Server Side) to the following:

Spoiler

/**
 * ExileServer_system_simulationMonitor_network_enableSimulationRequest
 *
 * Exile Mod
 * exile.majormittens.co.uk
 * © 2015 Exile Mod Team
 *
 * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. 
 * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
 */
 
private["_parameters","_netId","_object"];
_parameters = _this select 1;
_netId = _parameters select 0;
_object = objectFromNetId _netId;
if (isNull _object) then
{
	"Cannot enable simulation for unknown network ID!" call ExileServer_util_log;
}
else 
{
	if !(dynamicSimulationEnabled _object) then 
	{
		_object enableDynamicSimulation true;
	};
};
true

 

EDIT: Additionally, change code in ExileServer_system_simulationMonitor_thread_toggleSimulation.sqf (Server Side) to the following:

Spoiler

/**
 * ExileServer_system_simulationMonitor_thread_toggleSimulation
 *
 * Exile Mod
 * exile.majormittens.co.uk
 * © 2015 Exile Mod Team
 *
 * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. 
 * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
 */
 
private["_vehicle","_simulationShouldBeEnabled","_position"];
{
	_vehicle = _x;
	_simulationShouldBeEnabled = false;
	if !(crew _vehicle isEqualTo []) then 
	{
		_simulationShouldBeEnabled = true;	
	}
	else 
	{
		_position = getPos _vehicle;
		if (_position select 2 > 20) then
		{
			_simulationShouldBeEnabled = true;
		}
		else 
		{
			if ([_position, 250] call ExileClient_util_world_isAlivePlayerInRange) then
			{
				_simulationShouldBeEnabled = true;
			};
		};
	};
	if (_simulationShouldBeEnabled) then
	{
		if !(dynamicSimulationEnabled _vehicle) then
		{
			_vehicle enableDynamicSimulation true;
		};
	};
}
forEach ExileSimulationMonitoredVehicles;
true

Thanks to @DirtySanchez for his help with this one.

EDIT2: Found some additional places that needed fixing.

ExileServer_object_player_createBambi.sqf (Server Side)

Spoiler

/**
 * ExileServer_object_player_createBambi
 *
 * Exile Mod
 * exile.majormittens.co.uk
 * © 2015 Exile Mod Team
 *
 * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. 
 * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
 */
 
private["_sessionID","_requestingPlayer","_spawnLocationMarkerName","_bambiPlayer","_accountData","_direction","_position","_spawnAreaPosition","_spawnAreaRadius","_clanID","_clanData","_clanGroup","_player","_devFriendlyMode","_devs","_parachuteNetID","_spawnType","_parachuteObject"];
_sessionID = _this select 0;
_requestingPlayer = _this select 1;
_spawnLocationMarkerName = _this select 2;
_bambiPlayer = _this select 3;
_accountData = _this select 4;
_direction = random 360;
if ((count ExileSpawnZoneMarkerPositions) isEqualTo 0) then 
{
	_position = call ExileClient_util_world_findCoastPosition;
	if ((toLower worldName) isEqualTo "namalsk") then 
	{
		while {(_position distance2D [76.4239, 107.141, 0]) < 100} do 
		{
			_position = call ExileClient_util_world_findCoastPosition;
		};
	};
}
else 
{
	_spawnAreaPosition = getMarkerPos _spawnLocationMarkerName;
	_spawnAreaRadius = getNumber(configFile >> "CfgSettings" >> "BambiSettings" >> "spawnZoneRadius");
	_position = [_spawnAreaPosition, _spawnAreaRadius] call ExileClient_util_math_getRandomPositionInCircle;
	while {surfaceIsWater _position} do 
	{
		_position = [_spawnAreaPosition, _spawnAreaRadius] call ExileClient_util_math_getRandomPositionInCircle;
	};
};
_name = name _requestingPlayer;
_clanID = (_accountData select 3);
if !((typeName _clanID) isEqualTo "SCALAR") then
{
	_clanID = -1;
	_clanData = [];
}
else
{
	_clanData = missionNamespace getVariable [format ["ExileServer_clan_%1",_clanID],[]];
	if(isNull (_clanData select 5))then
	{
		_clanGroup = createGroup independent;
		_clanData set [5,_clanGroup];
		_clanGroup setGroupIdGlobal [_clanData select 0];
		missionNameSpace setVariable [format ["ExileServer_clan_%1",_clanID],_clanData];
	}
	else
	{
		_clanGroup = (_clanData select 5);
	};
	[_player] joinSilent _clanGroup;
};
_bambiPlayer setPosATL [_position select 0,_position select 1,0];
_bambiPlayer disableAI "FSM";
_bambiPlayer disableAI "MOVE";
_bambiPlayer disableAI "AUTOTARGET";
_bambiPlayer disableAI "TARGET";
_bambiPlayer disableAI "CHECKVISIBLE";
_bambiPlayer setDir _direction;
_bambiPlayer setName _name;
_bambiPlayer setVariable ["ExileMoney", 0, true]; 
_bambiPlayer setVariable ["ExileScore", (_accountData select 0)];
_bambiPlayer setVariable ["ExileKills", (_accountData select 1)];
_bambiPlayer setVariable ["ExileDeaths", (_accountData select 2)];
_bambiPlayer setVariable ["ExileClanID", _clanID];
_bambiPlayer setVariable ["ExileClanData", _clanData];
_bambiPlayer setVariable ["ExileHunger", 100];
_bambiPlayer setVariable ["ExileThirst", 100];
_bambiPlayer setVariable ["ExileTemperature", 37];
_bambiPlayer setVariable ["ExileWetness", 0];
_bambiPlayer setVariable ["ExileAlcohol", 0]; 
_bambiPlayer setVariable ["ExileName", _name]; 
_bambiPlayer setVariable ["ExileOwnerUID", getPlayerUID _requestingPlayer]; 
_bambiPlayer setVariable ["ExileIsBambi", true];
_bambiPlayer setVariable ["ExileXM8IsOnline", false, true];
_bambiPlayer setVariable ["ExileLocker", (_accountData select 4), true];
_devFriendlyMode = getNumber (configFile >> "CfgSettings" >> "ServerSettings" >> "devFriendyMode");
if (_devFriendlyMode isEqualTo 1) then 
{
	_devs = getArray (configFile >> "CfgSettings" >> "ServerSettings" >> "devs");
	{
		if ((getPlayerUID _requestingPlayer) isEqualTo (_x select 0))exitWith 
		{
			if((name _requestingPlayer) isEqualTo (_x select 1))then
			{
				_bambiPlayer setVariable ["ExileMoney", 500000, true];
				_bambiPlayer setVariable ["ExileScore", 100000];
			};
		};
	}
	forEach _devs;
};
_parachuteNetID = "";
if ((getNumber(configFile >> "CfgSettings" >> "BambiSettings" >> "parachuteSpawning")) isEqualTo 1) then
{
	_position set [2, getNumber(configFile >> "CfgSettings" >> "BambiSettings" >> "parachuteDropHeight")]; 
	if ((getNumber(configFile >> "CfgSettings" >> "BambiSettings" >> "haloJump")) isEqualTo 1) then
	{
		_bambiPlayer addBackpackGlobal "B_Parachute";
		_bambiPlayer setPosATL _position;
		_spawnType = 2;
	}
	else 
	{
		_parachuteObject = createVehicle ["Steerable_Parachute_F", _position, [], 0, "CAN_COLLIDE"];
		_parachuteObject setDir _direction;
		_parachuteObject setPosATL _position;
		if !(dynamicSimulationEnabled _parachuteObject) then 
		{
			_parachuteObject enableDynamicSimulation true;
		};
		// _parachuteObject enableSimulationGlobal true;
		_parachuteNetID = netId _parachuteObject;
		_spawnType = 1;
	};
}
else
{
	_spawnType = 0;
};
_bambiPlayer addMPEventHandler ["MPKilled", {_this call ExileServer_object_player_event_onMpKilled}];
_bambiPlayer call ExileServer_object_player_database_insert;
_bambiPlayer call ExileServer_object_player_database_update;
[
	_sessionID, 
	"createPlayerResponse", 
	[
		_bambiPlayer, 
		_parachuteNetID, 
		str (_accountData select 0),
		(_accountData select 1),
		(_accountData select 2),
		100,
		100,
		0,
		(getNumber (configFile >> "CfgSettings" >> "BambiSettings" >> "protectionDuration")) * 60, 
		_clanData,
		_spawnType
	]
] 
call ExileServer_system_network_send_to;
[_sessionID, _bambiPlayer] call ExileServer_system_session_update;
true

 

ExileServer_object_construction_database_load.sqf (Server Side)

Spoiler

/**
 * ExileServer_object_construction_database_load
 *
 * Exile Mod
 * exile.majormittens.co.uk
 * © 2015 Exile Mod Team
 *
 * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. 
 * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
 */
 
private["_constructionID","_data","_position","_vectorDirection","_vectorUp","_constructionObject","_damageLevel","_public","_pinCode"];
_constructionID = _this;
_data = format ["loadConstruction:%1", _constructionID] call ExileServer_system_database_query_selectSingle;
_position = [_data select 4, _data select 5, _data select 6];
_vectorDirection = [_data select 7, _data select 8, _data select 9];
_vectorUp = [_data select 10, _data select 11, _data select 12];
_constructionObject = createVehicle [(_data select 1), _position, [], 0, "CAN_COLLIDE"];
_constructionObject setPosATL _position;
_constructionObject setVectorDirAndUp [_vectorDirection, _vectorUp];
_constructionObject setVariable ["ExileDatabaseID", _data select 0];
_constructionObject setVariable ["ExileOwnerUID", (_data select 2)];
_constructionObject setVariable ["ExileIsPersistent", true];
_constructionObject setVariable ["ExileTerritoryID", (_data select 15)];
_damageLevel = (_data select 17);
if (typeName (_data select 18) == "ARRAY") then
{
	{
		if(_x != "") then
		{
			_constructionObject setObjectTextureGlobal [_forEachIndex, _x];
		};
	} forEach (_data select 18);
};
_public = _damageLevel > 0;
_constructionObject setVariable ["ExileConstructionDamage",_damageLevel,_public];
if(_public)then
{
	_constructionObject call ExileServer_util_setDamageTexture;
};
_pinCode = _data select 14;
if !(_pinCode isEqualTo "000000") then
{
	_constructionObject setVariable ["ExileAccessCode", _pinCode];
	_constructionObject setVariable ["ExileIsLocked", (_data select 13), true];
};
if (getNumber(configFile >> "CfgVehicles" >> (_data select 1) >> "exileRequiresSimulation") isEqualTo 1) then
{
	if !(dynamicSimulationEnabled _constructionObject) then 
	{
		_constructionObject enableDynamicSimulation true;
	};
	// _constructionObject enableSimulationGlobal true;
	_constructionObject call ExileServer_system_simulationMonitor_addVehicle;
}
else 
{
	if !(dynamicSimulationEnabled _constructionObject) then 
	{
		_constructionObject enableDynamicSimulation true;
	};
	// _constructionObject enableSimulationGlobal false;
};
_constructionObject setVelocity [0, 0, 0];
_constructionObject setPosATL _position;
_constructionObject setVelocity [0, 0, 0];
_constructionObject setVectorDirAndUp [_vectorDirection, _vectorUp];
_constructionObject setVelocity [0, 0, 0];
_constructionObject

 

ExileServer_object_construction_network_buildConstructionRequest.sqf (Server Side)

Spoiler

/**
 * ExileServer_object_construction_network_buildConstructionRequest
 *
 * Exile Mod
 * exile.majormittens.co.uk
 * © 2015 Exile Mod Team
 *
 * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. 
 * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
 */
 
private["_sessionID","_parameters","_objectClassName","_objectPosition","_playerObject","_constructionConfig","_canBuildHereResult","_object"];
_sessionID = _this select 0;
_parameters = _this select 1;
_objectClassName = _parameters select 0;
_objectPosition = _parameters select 1;
try
{
	_playerObject = _sessionID call ExileServer_system_session_getPlayerObject;
	if (isNull _playerObject) then 
	{
		throw "Player object is null!";
	};
	_constructionConfig = ("getText(_x >> 'previewObject') == _objectClassName" configClasses(configFile >> "CfgConstruction")) select 0;
	_canBuildHereResult = [configName _constructionConfig, (ASLtoAGL (ATLtoASL _objectPosition)), getPlayerUID _playerObject] call ExileClient_util_world_canBuildHere;
	switch (_canBuildHereResult) do
	{
		case 1:
		{
			throw "You are not in your territory.";
		};
		case 11:
		{
			throw "You are too close to a concrete mixer.";
		};
		case 10:
		{
			throw "Building is blocked here.";
		};
		case 2:
		{
			throw "You are inside enemy territory.";
		};
		case 8:
		{
			throw "You are in a contaminated zone.";
		};
		case 3:
		{
			throw "This cannot be placed on roads.";
		};
		case 5:
		{
			throw "You are too close to a spawn zone.";
		};
		case 4:
		{
			throw "You are too close to traders.";
		};
		case 6:
		{
			throw "Maximum number of objects reached.";
		};
		case 7:
		{
			throw "This snap location is already being used.";
		};
	};
	_object = createVehicle[_objectClassName, _objectPosition, [], 0, "CAN_COLLIDE"];
	_object setPosATL _objectPosition;
	_object setVariable ["BIS_enableRandomization", false];
	_object setOwner (owner _playerObject);
	if !(dynamicSimulationEnabled _object) then 
	{
		_object enableDynamicSimulation true;
	};
	// _object enableSimulationGlobal false;
	_object setVariable ["ExileOwnerUID", getPlayerUID _playerObject];
	_playerObject setVariable ["ExileConstructionObject", _object];
	[_object, _playerObject] call ExileServer_system_swapOwnershipQueue_add;
	[_sessionID, "constructionResponse", [netid _object]] call ExileServer_system_network_send_to;
}
catch
{
	[_sessionID, "toastRequest", ["ErrorTitleAndText", ["Construction aborted!", _exception]]] call ExileServer_system_network_send_to;
};
true

 

ExileServer_object_construction_network_buildTerritoryRequest.sqf (Server Side)

Spoiler

/**
 * ExileServer_object_construction_network_buildTerritoryRequest
 *
 * Exile Mod
 * exile.majormittens.co.uk
 * © 2015 Exile Mod Team
 *
 * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. 
 * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
 */
 
private["_sessionID","_paramaters","_objectClassName","_objectPosition","_flag","_territoryName","_alphabet","_forbiddenCharacter","_playerObject","_minimumDistanceToTraderZones","_minimumDistanceToSpawnZones","_maximumTerritoryRadius","_object"];
_sessionID = _this select 0;
_paramaters = _this select 1;
_objectClassName = _paramaters select 0;
_objectPosition = _paramaters select 1; 
_flag = _paramaters select 2;
_territoryName = _paramaters select 3;
try
{
	_territoryName = _territoryName call ExileClient_util_string_trim;
	_alphabet = getText (missionConfigFile >> "CfgClans" >> "clanNameAlphabet");
	_forbiddenCharacter = [_territoryName, _alphabet] call ExileClient_util_string_containsForbiddenCharacter;
	if !(_forbiddenCharacter isEqualTo -1) then 
	{
		throw "Forbidden Character";
	};
	if !(_objectClassName isEqualTo "Exile_Construction_Flag_Preview") then 
	{
		throw "What a hell are you doing";
	};
	_playerObject = _sessionID call ExileServer_system_session_getPlayerObject;
	if (isNull _playerObject) then 
	{
		throw "Invalid Player Object";
	};
	_minimumDistanceToTraderZones = getNumber (missionConfigFile >> "CfgTerritories" >> "minimumDistanceToTraderZones");
	if ([_objectPosition, _minimumDistanceToTraderZones] call ExileClient_util_world_isTraderZoneInRange) then 
	{
		throw "You cannot build close to trader zones.";
	};
	_minimumDistanceToSpawnZones = getNumber (missionConfigFile >> "CfgTerritories" >> "minimumDistanceToSpawnZones");
	if ([_objectPosition, _minimumDistanceToSpawnZones] call ExileClient_util_world_isSpawnZoneInRange) then 
	{
		throw "You cannot build close to spawn zones.";
	};
	_maximumTerritoryRadius = getNumber (missionConfigFile >> "CfgTerritories" >> "minimumDistanceToOtherTerritories");
	if ([_objectPosition, _maximumTerritoryRadius] call ExileClient_util_world_isTerritoryInRange) then 
	{
		throw "You are too close to enemy territory.";
	};
	_object = createVehicle[_objectClassName, _objectPosition, [], 0, "CAN_COLLIDE"];	
	_object setPos _objectPosition;
	if !(dynamicSimulationEnabled _object) then 
	{
		_object enableDynamicSimulation true;
	};
	// _object enableSimulationGlobal true;
	if (isClass (configFile >> "CfgFlagsNative" >> _flag)) then
	{
		_flag = getText(configFile >> "CfgFlagsNative" >> _flag >> "texture");
	}
	else
	{
		_flag = getText(missionConfigFile >> "CfgFlags" >> _flag >> "texture");
	};
	_object setVariable ["ExileFlagTexture",_flag];
	_object setFlagTexture _flag;
	_object setVariable ["ExileTerritoryName",_territoryName];
	_object setVariable ["ExileOwnerUID",getPlayerUID _playerObject,true];
	[_object, _playerObject] call ExileServer_system_swapOwnershipQueue_add;
	[_sessionID, "constructionResponse", [netid _object]] call ExileServer_system_network_send_to;
}
catch
{
	[_sessionID, "toastRequest", ["ErrorTitleAndText", ["Construction aborted!", _exception]]] call ExileServer_system_network_send_to;
	_exception call ExileServer_util_log;
};
true

 

ExileServer_object_container_database_load.sqf (Server Side)

Spoiler

/**
 * ExileServer_object_container_database_load
 *
 * Exile Mod
 * exile.majormittens.co.uk
 * © 2015 Exile Mod Team
 *
 * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. 
 * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
 */
 
private["_containerID","_data","_position","_vectorDirection","_vectorUp","_abandoned","_containerObject","_cargoContainers"];
_containerID = _this;
_data = format ["loadContainer:%1", _containerID] call ExileServer_system_database_query_selectSingle;
_position = [_data select 4, _data select 5, _data select 6];
_vectorDirection = [_data select 7, _data select 8, _data select 9];
_vectorUp = [_data select 10, _data select 11, _data select 12];
_abandoned = _data select 18;
_containerObject = [(_data select 1), _position, 0] call ExileServer_object_container_createContainer;
_containerObject setVectorDirAndUp [_vectorDirection, _vectorUp];
_containerObject setVariable ["ExileDatabaseID", _containerID];
_containerObject setVariable ["ExileOwnerUID", (_data select 2),true];
_containerObject setVariable ["ExileAccessCode",(_data select 16)];
_containerObject setVariable ["ExileTerritoryID", (_data select 17)];
_containerObject setVariable ["ExileMoney", (_data select 20), true];
if (typeName (_data select 21) == "ARRAY") then
{
	{
		if(_x != "") then
		{
			_containerObject setObjectTextureGlobal [_forEachIndex, _x];
		};
	} forEach (_data select 21);
};
if(getNumber(configFile >> "CfgVehicles" >> typeOf _containerObject >> "exileIsLockable") isEqualTo 1)then
{
	_containerObject setVariable ["ExileIsLocked",(_data select 3),true];
};
[_containerObject, (_data select 13)] call ExileServer_util_fill_fillItems;
[_containerObject, (_data select 14)] call ExileServer_util_fill_fillMagazines;
[_containerObject, (_data select 15)] call ExileServer_util_fill_fillWeapons;
_cargoContainers = format ["loadContainerCargo:%1", _containerID] call ExileServer_system_database_query_selectSingle;
if !(_cargoContainers isEqualTo []) then
{
	[_containerObject, (_cargoContainers select 0)] call ExileServer_util_fill_fillContainers;
};
if !(_abandoned isEqualTo "") then
{
	format ["ExileServer - Adding Container %1 to Abandonded Safes", _containerID] call ExileClient_util_log;
	ExileAbandondedSafes pushBack _containerObject;
};
if !(dynamicSimulationEnabled _containerObject) then 
{
	_containerObject enableDynamicSimulation true;
};
// _containerObject enableSimulationGlobal false;
_containerObject call ExileServer_system_simulationMonitor_addVehicle;
_containerObject addMPEventHandler ["MPKilled", { if !(isServer) exitWith {}; (_this select 0) call ExileServer_object_container_event_onMpKilled; }];
_containerObject

 

ExileServer_object_vehicle_database_load.sqf (Server Side)

Spoiler

/**
 * ExileServer_object_vehicle_database_load
 *
 * Exile Mod
 * exile.majormittens.co.uk
 * © 2015 Exile Mod Team
 *
 * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. 
 * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
 */
 
private["_vehicleID","_data","_position","_vectorDirection","_vectorUp","_pinCode","_texture","_vehicleObject","_lock","_unlockInSafeZonesAfterRestart","_isLocked","_hitpoints","_cargoContainers"];
_vehicleID = _this;
_data = format ["loadVehicle:%1", _vehicleID] call ExileServer_system_database_query_selectSingle;
_position = [_data select 8, _data select 9, _data select 10];
_vectorDirection = [_data select 11, _data select 12, _data select 13];
_vectorUp = [_data select 14, _data select 15, _data select 16];
_pinCode = _data select 20;
_texture = _data select 21;
_vehicleObject = [(_data select 1), _position, [_vectorDirection, _vectorUp], true,_pinCode] call ExileServer_object_vehicle_createPersistentVehicle;
_vehicleObject setVariable ["ExileDatabaseID", _vehicleID];
_vehicleObject setVariable ["ExileOwnerUID", (_data select 3)];
_vehicleObject setVariable ["ExileMoney", (_data select 23), true];
if (typeName (_data select 24) == "ARRAY") then
{
	{
		if(_x != "") then
		{
			_vehicleObject setObjectTextureGlobal [_forEachIndex, _x];
		};
	} forEach (_data select 24);
};
_lock = (_data select 4);
_unlockInSafeZonesAfterRestart = (getNumber (configFile >> "CfgSettings" >> "VehicleSpawn" >> "unlockInSafeZonesAfterRestart")) isEqualTo 1;
_isLocked = (_lock isEqualTo -1);
if (_isLocked) then 
{
	if (_unlockInSafeZonesAfterRestart) then 
	{
		if (_position call ExileClient_util_world_isInTraderZone) then 
		{
			_isLocked = false;
		};
	};
};
if (_isLocked) then
{
	_vehicleObject setVariable ["ExileIsLocked", -1];
	_vehicleObject lock 2;
	_vehicleObject enableRopeAttach false;
}
else
{
	_vehicleObject setVariable ["ExileIsLocked", 0];
	_vehicleObject lock 0;
	_vehicleObject enableRopeAttach true;
};
_vehicleObject setFuel (_data select 5);
_vehicleObject setDamage (_data select 6);
_hitpoints = _data select 7;
if ((typeName _hitpoints) isEqualTo "ARRAY") then 
{
	{
		_vehicleObject setHitPointDamage [_x select 0, _x select 1];
	}
	forEach _hitpoints;
};
[_vehicleObject, (_data select 17)] call ExileServer_util_fill_fillItems;
[_vehicleObject, (_data select 18)] call ExileServer_util_fill_fillMagazines;
[_vehicleObject, (_data select 19)] call ExileServer_util_fill_fillWeapons;
_cargoContainers = format ["loadVehicleContainer:%1", _vehicleID] call ExileServer_system_database_query_selectSingle;
if ((typeName _cargoContainers) isEqualTo "ARRAY") then 
{
	if !(_cargoContainers isEqualTo []) then
	{
		[_vehicleObject, (_cargoContainers select 0)] call ExileServer_util_fill_fillContainers;
	};
};
if !(_texture isEqualTo "") then
{
	{
		_vehicleObject setObjectTextureGlobal [_forEachIndex, _texture select _forEachIndex];
	}
	forEach _texture;
};
if !(dynamicSimulationEnabled _vehicleObject) then 
{
	_vehicleObject enableDynamicSimulation true;
};
// _vehicleObject enableSimulationGlobal false;
_vehicleObject call ExileServer_system_simulationMonitor_addVehicle;
if (_vehicleObject call ExileClient_util_world_isInTraderZone) then 
{
	_vehicleObject allowDamage false;
};
_vehicleObject

 

ExileServer_object_vehicle_event_onGetIn.sqf (Server Side)

Spoiler

/**
 * ExileServer_object_vehicle_event_onGetIn
 *
 * Exile Mod
 * exile.majormittens.co.uk
 * © 2015 Exile Mod Team
 *
 * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. 
 * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
 */
 
private["_vehicleObject"];
_vehicleObject = _this select 0;
if !(dynamicSimulationEnabled _vehicleObject) then 
{
	_vehicleObject enableDynamicSimulation true;
};
true

 

The idea is to enable dynamic simulation for any vehicle that doesn't have it activated. Once dynamic simulation is enabled the vehicle simulation will automatically enable/disable when a player is within the default Arma settings for dynamic simulation range. It is possible to change those defaults, however, I do not believe it is necessary (Ref: https://community.bistudio.com/wiki/Arma_3_Dynamic_Simulation).

Enjoy!

Edited by Ultima-weapon
was not enabling dynamic simulation for all vehicles
  • Like 4

Share this post


Link to post
Share on other sites

@Ultima-weapon, have you been experiencing any issues with vehicles and containers when using your fix? I'm using the updated version but it's almost totally broken entering vehicles (seems to be those with an enter animation) and storage containers. :(

Share this post


Link to post
Share on other sites

@kuplion so far, no, but I also don't have a very large player base on A3 atm.
Edit: Seems vehicles spawned from the a Virtual Garage (if you have this script running) don't properly simulate and cannot be entered (not sure if this is always or just in the few tests that have been done).

Edited by Ultima-weapon

Share this post


Link to post
Share on other sites
6 hours ago, Ultima-weapon said:

@kuplion so far, no, but I also don't have a very large player base on A3 atm.
Edit: Seems vehicles spawned from the a Virtual Garage (if you have this script running) don't properly simulate and cannot be entered (not sure if this is always or just in the few tests that have been done).

I'm not using VG but as soon as I removed the fix everything seemed to start working again. :(

Share this post


Link to post
Share on other sites
6 minutes ago, [RG] Salutesh said:

The Dynamic Simulation thing is not yet complete implemented on the stable branch..

Also i dont have this issue on my server.

It might be because I was using Perf' builds..

Share this post


Link to post
Share on other sites
5 minutes ago, kuplion said:

It might be because I was using Perf' builds..

So if you guys think its the dynamic simulation thing just disable it:

enableDynamicSimulation false;

But i dont think its realy running because you have no mission settings for this Features in the Editor yet like displayed here:

A3_dynSim_globalSystemSettings.jpg

Edited by [RG] Salutesh

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.