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.
|
||||
disableRemoteSensors (["CfgEpochClient", "disableRemoteSensors", true] call EPOCH_fnc_returnConfigEntryV2);
|
||||
// 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;
|
||||
"Group" setDynamicSimulationDistance 1600;
|
||||
"Vehicle" setDynamicSimulationDistance 1600;
|
||||
"EmptyVehicle" setDynamicSimulationDistance 1600;
|
||||
"Prop" setDynamicSimulationDistance 1600;
|
||||
"IsMoving" setDynamicSimulationDistanceCoef 1.5;
|
@ -92,7 +92,11 @@ for "_i" from 0 to _this do {
|
||||
_baseObj setVectorDirAndUp _worldspace;
|
||||
_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
|
||||
_ammoClass = (_cfgBaseBuilding >> _class >> "ammoClass");
|
||||
if(isText _ammoClass) then {
|
||||
|
@ -9,7 +9,11 @@ if (!isNull _object && !(_class isEqualTo "")) then {
|
||||
_newObj = createVehicle [_class, ASLtoAGL _objectPos, [], 0, "CAN_COLLIDE"];
|
||||
if (!isNull _newObj) then {
|
||||
_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 {
|
||||
case 0: {
|
||||
_newObj setVectorDirAndUp [vectordir _object, vectorup _object];
|
||||
|
@ -318,7 +318,10 @@ if (!isNull _player) then {
|
||||
|
||||
// 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
|
||||
|
||||
|
||||
// new Dynamicsimulation
|
||||
_newPlyr enableDynamicSimulation true;
|
||||
_newPlyr triggerDynamicSimulation true;
|
||||
};
|
||||
} else {
|
||||
diag_log format["LOGIN FAILED UNIT NULL: %1 [%2|%3]", _player, _group, count allgroups];
|
||||
|
@ -110,7 +110,11 @@ if (!local _player) then {
|
||||
};
|
||||
|
||||
_newPlyr = _group createUnit[_class, _location, [], 0, "CAN_COLLIDE"];
|
||||
|
||||
|
||||
// new Dynamicsimulation
|
||||
_newPlyr enableDynamicSimulation true;
|
||||
_newPlyr triggerDynamicSimulation true;
|
||||
|
||||
addToRemainsCollector[_newPlyr];
|
||||
|
||||
{
|
||||
|
@ -212,8 +212,13 @@ for "_i" from 1 to _maxVehicleLimit do {
|
||||
|
||||
// vehicle simulation handler
|
||||
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
|
||||
/*
|
||||
_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
|
||||
[_newveh,_cargo] call EPOCH_server_CargoFill;
|
||||
|
||||
|
@ -107,7 +107,12 @@ if !(isNull _vehObj) then{
|
||||
_vehLockHiveKey = format["%1:%2", (call EPOCH_fn_InstanceID), _slot];
|
||||
["VehicleLock", _vehLockHiveKey] call EPOCH_fnc_server_hiveDEL;
|
||||
};
|
||||
|
||||
// new Dynamicsimulation
|
||||
_vehObj enableSimulationGlobal false; // turn it off until activated by dynamicSim
|
||||
_vehObj enableDynamicSimulation true;
|
||||
|
||||
|
||||
// SAVE VEHICLE
|
||||
_vehObj call EPOCH_server_save_vehicle;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user