Fix Dynamic Simulation Issues

This commit is contained in:
Cloudhax23 2017-11-06 23:46:50 -06:00 committed by GitHub
parent 27e731ae63
commit 2273c5e16a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 14 additions and 1 deletions

View File

@ -35,5 +35,11 @@ _extDB2Message = ["insertConstruction", _data] call ExileServer_util_extDB2_crea
_constructionID = _extDB2Message call ExileServer_system_database_query_insertSingle; _constructionID = _extDB2Message call ExileServer_system_database_query_insertSingle;
_constructionObject setVariable ["ExileDatabaseID", _constructionID]; _constructionObject setVariable ["ExileDatabaseID", _constructionID];
_constructionObject setVariable ["ExileTerritoryID", _territoryID]; _constructionObject setVariable ["ExileTerritoryID", _territoryID];
_constructionObject enableDynamicSimulation true;
_constructionObject enableSimulationGlobal false;
if (getNumber(configFile >> "CfgVehicles" >> (typeOf _constructionObject) >> "exileRequiresSimulation") isEqualTo 1) then
{
_constructionObject enableDynamicSimulation true;
};
_constructionID _constructionID

View File

@ -38,6 +38,8 @@ if !(_pinCode isEqualTo "000000") then
_constructionObject setVariable ["ExileAccessCode", _pinCode]; _constructionObject setVariable ["ExileAccessCode", _pinCode];
_constructionObject setVariable ["ExileIsLocked", (_data select 13), true]; _constructionObject setVariable ["ExileIsLocked", (_data select 13), true];
}; };
_constructionObject enableSimulationGlobal false;
if ((getNumber(configFile >> "CfgVehicles" >> (_data select 1) >> "exileRequiresSimulation") isEqualTo 1) || (typeOf _constructionObject in _DynamicObjects)) then if ((getNumber(configFile >> "CfgVehicles" >> (_data select 1) >> "exileRequiresSimulation") isEqualTo 1) || (typeOf _constructionObject in _DynamicObjects)) then
{ {
_constructionObject enableDynamicSimulation true; _constructionObject enableDynamicSimulation true;

View File

@ -26,5 +26,6 @@ if(getNumber(configFile >> "CfgVehicles" >> typeOf _containerObject >> "exileIsL
{ {
_containerObject setVariable ["ExileIsLocked", -1,true]; _containerObject setVariable ["ExileIsLocked", -1,true];
}; };
_containerObject enableSimulationGlobal false;
_containerObject enableDynamicSimulation true; _containerObject enableDynamicSimulation true;
_containerObject _containerObject

View File

@ -63,6 +63,7 @@ if !(_abandoned isEqualTo "") then
format ["ExileServer - Adding Container %1 to Abandonded Safes", _containerID] call ExileClient_util_log; format ["ExileServer - Adding Container %1 to Abandonded Safes", _containerID] call ExileClient_util_log;
ExileAbandondedSafes pushBack _containerObject; ExileAbandondedSafes pushBack _containerObject;
}; };
_containerObject enableSimulationGlobal false;
_containerObject enableDynamicSimulation true; _containerObject enableDynamicSimulation true;
_containerObject addMPEventHandler ["MPKilled", { if !(isServer) exitWith {}; (_this select 0) call ExileServer_object_container_event_onMpKilled; }]; _containerObject addMPEventHandler ["MPKilled", { if !(isServer) exitWith {}; (_this select 0) call ExileServer_object_container_event_onMpKilled; }];
_containerObject _containerObject

View File

@ -18,5 +18,6 @@ _vehicleObject = [_className, _position, _direction, _usePositionATL] call Exile
_vehicleObject setVariable ["ExileIsPersistent", false]; _vehicleObject setVariable ["ExileIsPersistent", false];
_vehicleObject addEventHandler ["GetIn", {_this call ExileServer_object_vehicle_event_onGetIn}]; _vehicleObject addEventHandler ["GetIn", {_this call ExileServer_object_vehicle_event_onGetIn}];
_vehicleObject addMPEventHandler ["MPKilled", { if !(isServer) exitWith {}; _this call ExileServer_object_vehicle_event_onMPKilled;}]; _vehicleObject addMPEventHandler ["MPKilled", { if !(isServer) exitWith {}; _this call ExileServer_object_vehicle_event_onMPKilled;}];
_vehicleObject enableSimulationGlobal false;
_vehicleObject enableDynamicSimulation true; _vehicleObject enableDynamicSimulation true;
_vehicleObject _vehicleObject

View File

@ -21,5 +21,6 @@ _vehicleObject setVariable ["ExileAccessCode", _pinCode];
_vehicleObject addEventHandler ["GetOut", {_this call ExileServer_object_vehicle_event_onGetOut}]; _vehicleObject addEventHandler ["GetOut", {_this call ExileServer_object_vehicle_event_onGetOut}];
_vehicleObject addEventHandler ["GetIn", {_this call ExileServer_object_vehicle_event_onGetIn}]; _vehicleObject addEventHandler ["GetIn", {_this call ExileServer_object_vehicle_event_onGetIn}];
_vehicleObject addMPEventHandler ["MPKilled", { if !(isServer) exitWith {}; _this call ExileServer_object_vehicle_event_onMPKilled;}]; _vehicleObject addMPEventHandler ["MPKilled", { if !(isServer) exitWith {}; _this call ExileServer_object_vehicle_event_onMPKilled;}];
_vehicleObject enableSimulationGlobal false;
_vehicleObject enableDynamicSimulation true; _vehicleObject enableDynamicSimulation true;
_vehicleObject _vehicleObject

View File

@ -97,6 +97,7 @@ if !(_texture isEqualTo "") then
} }
forEach _texture; forEach _texture;
}; };
_vehicleObject enableSimulationGlobal false;
_vehicleObject enableDynamicSimulation true; _vehicleObject enableDynamicSimulation true;
if (_vehicleObject call ExileClient_util_world_isInTraderZone) then if (_vehicleObject call ExileClient_util_world_isInTraderZone) then
{ {