mirror of
https://github.com/EpochModTeam/Epoch.git
synced 2024-08-30 18:22:13 +00:00
Merge pull request #780 from ravmustang/Dynamic-Simulation-System-#1
Dynamic Simulation #1
This commit is contained in:
commit
312868bc70
@ -112,4 +112,10 @@ _say3dsounds = "isClass _x" configClasses (_say3dsoundsConfig);
|
|||||||
// disable remote sensors on server and client as all Epoch AI is local to the side controlling it.
|
// disable remote sensors on server and client as all Epoch AI is local to the side controlling it.
|
||||||
disableRemoteSensors (["CfgEpochClient", "disableRemoteSensors", true] call EPOCH_fnc_returnConfigEntryV2);
|
disableRemoteSensors (["CfgEpochClient", "disableRemoteSensors", true] call EPOCH_fnc_returnConfigEntryV2);
|
||||||
// Enable Dynamic simulation on both server and clients (maybe only needed server side)
|
// Enable Dynamic simulation on both server and clients (maybe only needed server side)
|
||||||
|
// DynSim is handled locally and yes server and clients will need these configurations
|
||||||
enableDynamicSimulationSystem true;
|
enableDynamicSimulationSystem true;
|
||||||
|
"Group" setDynamicSimulationDistance 1600;
|
||||||
|
"Vehicle" setDynamicSimulationDistance 1600;
|
||||||
|
"EmptyVehicle" setDynamicSimulationDistance 1600;
|
||||||
|
"Prop" setDynamicSimulationDistance 1600;
|
||||||
|
"IsMoving" setDynamicSimulationDistanceCoef 1.5;
|
@ -92,6 +92,10 @@ for "_i" from 0 to _this do {
|
|||||||
_baseObj setVectorDirAndUp _worldspace;
|
_baseObj setVectorDirAndUp _worldspace;
|
||||||
_baseObj setposATL _location;
|
_baseObj setposATL _location;
|
||||||
|
|
||||||
|
// new Dynamicsimulation
|
||||||
|
_baseObj enableSimulationGlobal false; // turn off sim on server start, let dynSim activate it to true
|
||||||
|
_baseObj enableDynamicSimulation true;
|
||||||
|
_baseObj triggerDynamicSimulation false; // this object doesnt need to turn anything on in the server
|
||||||
|
|
||||||
// spawn additional object for trap
|
// spawn additional object for trap
|
||||||
_ammoClass = (_cfgBaseBuilding >> _class >> "ammoClass");
|
_ammoClass = (_cfgBaseBuilding >> _class >> "ammoClass");
|
||||||
|
@ -10,6 +10,10 @@ if (!isNull _object && !(_class isEqualTo "")) then {
|
|||||||
if (!isNull _newObj) then {
|
if (!isNull _newObj) then {
|
||||||
_object hideObjectGlobal true;
|
_object hideObjectGlobal true;
|
||||||
|
|
||||||
|
// new Dynamicsimulation
|
||||||
|
_newObj enableDynamicSimulation true;
|
||||||
|
_newObj triggerDynamicSimulation false; // this object doesnt need to turn anything on in the server
|
||||||
|
|
||||||
switch (_method) do {
|
switch (_method) do {
|
||||||
case 0: {
|
case 0: {
|
||||||
_newObj setVectorDirAndUp [vectordir _object, vectorup _object];
|
_newObj setVectorDirAndUp [vectordir _object, vectorup _object];
|
||||||
|
@ -319,6 +319,9 @@ if (!isNull _player) then {
|
|||||||
// This is a test to see setUnitLoadout can force propagation of unit loadout.
|
// This is a test to see setUnitLoadout can force propagation of unit loadout.
|
||||||
_newPlyr setUnitLoadout (getUnitLoadout _newPlyr); // if this works, possibly replace all inventory code with with get|setUnitLoadout
|
_newPlyr setUnitLoadout (getUnitLoadout _newPlyr); // if this works, possibly replace all inventory code with with get|setUnitLoadout
|
||||||
|
|
||||||
|
// new Dynamicsimulation
|
||||||
|
_newPlyr enableDynamicSimulation true;
|
||||||
|
_newPlyr triggerDynamicSimulation true;
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
diag_log format["LOGIN FAILED UNIT NULL: %1 [%2|%3]", _player, _group, count allgroups];
|
diag_log format["LOGIN FAILED UNIT NULL: %1 [%2|%3]", _player, _group, count allgroups];
|
||||||
|
@ -111,6 +111,10 @@ if (!local _player) then {
|
|||||||
|
|
||||||
_newPlyr = _group createUnit[_class, _location, [], 0, "CAN_COLLIDE"];
|
_newPlyr = _group createUnit[_class, _location, [], 0, "CAN_COLLIDE"];
|
||||||
|
|
||||||
|
// new Dynamicsimulation
|
||||||
|
_newPlyr enableDynamicSimulation true;
|
||||||
|
_newPlyr triggerDynamicSimulation true;
|
||||||
|
|
||||||
addToRemainsCollector[_newPlyr];
|
addToRemainsCollector[_newPlyr];
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -212,8 +212,13 @@ for "_i" from 1 to _maxVehicleLimit do {
|
|||||||
|
|
||||||
// vehicle simulation handler
|
// vehicle simulation handler
|
||||||
if (_simulationHandler) then{
|
if (_simulationHandler) then{
|
||||||
_vehicle enableDynamicSimulation true;
|
_vehicle enableSimulationGlobal false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// new Dynamicsimulation
|
||||||
|
_vehObj enableSimulationGlobal false; // turn it off until activated by dynamicSim
|
||||||
|
_vehObj enableDynamicSimulation true;
|
||||||
|
|
||||||
// turrets
|
// turrets
|
||||||
/*
|
/*
|
||||||
_mags = _vehicle magazinesTurret [0];
|
_mags = _vehicle magazinesTurret [0];
|
||||||
|
@ -98,6 +98,11 @@ if !(_allHitpoints isEqualTo []) then{
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// new Dynamicsimulation
|
||||||
|
_vehObj enableSimulationGlobal false; // turn it off until activated by dynamicSim
|
||||||
|
_vehObj enableDynamicSimulation true;
|
||||||
|
|
||||||
|
|
||||||
// add back old inventory
|
// add back old inventory
|
||||||
[_newveh,_cargo] call EPOCH_server_CargoFill;
|
[_newveh,_cargo] call EPOCH_server_CargoFill;
|
||||||
|
|
||||||
|
@ -108,6 +108,11 @@ if !(isNull _vehObj) then{
|
|||||||
["VehicleLock", _vehLockHiveKey] call EPOCH_fnc_server_hiveDEL;
|
["VehicleLock", _vehLockHiveKey] call EPOCH_fnc_server_hiveDEL;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// new Dynamicsimulation
|
||||||
|
_vehObj enableSimulationGlobal false; // turn it off until activated by dynamicSim
|
||||||
|
_vehObj enableDynamicSimulation true;
|
||||||
|
|
||||||
|
|
||||||
// SAVE VEHICLE
|
// SAVE VEHICLE
|
||||||
_vehObj call EPOCH_server_save_vehicle;
|
_vehObj call EPOCH_server_save_vehicle;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user