mirror of
https://github.com/EpochModTeam/Epoch.git
synced 2024-08-30 18:22:13 +00:00
Merge pull request #788 from ravmustang/Dynamic-Simulation-#3
DynSim #3 Configs
This commit is contained in:
commit
10a762b541
@ -113,9 +113,14 @@ _say3dsounds = "isClass _x" configClasses (_say3dsoundsConfig);
|
|||||||
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
|
// DynSim is handled locally and yes server and clients will need these configurations
|
||||||
enableDynamicSimulationSystem true;
|
_dynSimToggle = ["CfgDynamicSimulation", "enableDynamicSimulationSystem", true] call EPOCH_fnc_returnConfigEntryV2;
|
||||||
"Group" setDynamicSimulationDistance 1600;
|
enableDynamicSimulationSystem _dynSimToggle;
|
||||||
"Vehicle" setDynamicSimulationDistance 1600;
|
if(_dynSimToggle)then
|
||||||
"EmptyVehicle" setDynamicSimulationDistance 1600;
|
{
|
||||||
"Prop" setDynamicSimulationDistance 1600;
|
_cfgDynamicSimulation = 'CfgDynamicSimulation' call EPOCH_returnConfig;
|
||||||
"IsMoving" setDynamicSimulationDistanceCoef 1.5;
|
"IsMoving" setDynamicSimulationDistanceCoef getNumber(_cfgDynamicSimulation >> "isMovingCoefValue");
|
||||||
|
"Group" setDynamicSimulationDistance getNumber(_cfgDynamicSimulation >> "groupDynSimDistance");
|
||||||
|
"Vehicle" setDynamicSimulationDistance getNumber(_cfgDynamicSimulation >> "vehicleDynSimDistance");
|
||||||
|
"EmptyVehicle" setDynamicSimulationDistance getNumber(_cfgDynamicSimulation >> "emptyVehicleDynSimDistance");
|
||||||
|
"Prop" setDynamicSimulationDistance getNumber(_cfgDynamicSimulation >> "propDynSimDistance");
|
||||||
|
};
|
16
Sources/epoch_config/Configs/CfgDynamicSimulation.hpp
Normal file
16
Sources/epoch_config/Configs/CfgDynamicSimulation.hpp
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
class CfgDynamicSimulation
|
||||||
|
{
|
||||||
|
//If this is false none of the below settings matter
|
||||||
|
enableDynamicSimulationSystem = true;
|
||||||
|
|
||||||
|
//Individual toggles for testing
|
||||||
|
vehicleDynamicSimulationSystem = true; // type car, air, boat
|
||||||
|
playerDynamicSimulationSystem = true; // clients
|
||||||
|
baseDynamicSimulationSystem = true; // plot pole and base pieces
|
||||||
|
|
||||||
|
// Distances and Coef
|
||||||
|
groupDynSimDistance = 1600;
|
||||||
|
vehicleDynSimDistance = 1600;
|
||||||
|
emptyVehicleDynSimDistance = 1600;
|
||||||
|
propDynSimDistance = 1600;
|
||||||
|
};
|
@ -76,6 +76,7 @@ disableRandomization[] = {"All"};
|
|||||||
#include "Configs\CfgSwitchMovehandler.hpp"
|
#include "Configs\CfgSwitchMovehandler.hpp"
|
||||||
#include "Configs\CfgVehicleUpgrades.hpp"
|
#include "Configs\CfgVehicleUpgrades.hpp"
|
||||||
#include "Configs\CfgReadingDocuments.hpp"
|
#include "Configs\CfgReadingDocuments.hpp"
|
||||||
|
#include "Configs\CfgDynamicSimulation.hpp"
|
||||||
|
|
||||||
// A3 specific configs
|
// A3 specific configs
|
||||||
#include "Configs\CfgFunctions.hpp"
|
#include "Configs\CfgFunctions.hpp"
|
||||||
|
@ -93,9 +93,12 @@ for "_i" from 0 to _this do {
|
|||||||
_baseObj setposATL _location;
|
_baseObj setposATL _location;
|
||||||
|
|
||||||
// new Dynamicsimulation
|
// new Dynamicsimulation
|
||||||
|
if(["CfgDynamicSimulation", "baseDynamicSimulationSystem", true] call EPOCH_fnc_returnConfigEntryV2)then
|
||||||
|
{
|
||||||
_baseObj enableSimulationGlobal false; // turn off sim on server start, let dynSim activate it to true
|
_baseObj enableSimulationGlobal false; // turn off sim on server start, let dynSim activate it to true
|
||||||
_baseObj enableDynamicSimulation true;
|
_baseObj enableDynamicSimulation true;
|
||||||
_baseObj triggerDynamicSimulation false; // this object doesnt need to turn anything on in the server
|
_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");
|
||||||
|
@ -11,8 +11,11 @@ if (!isNull _object && !(_class isEqualTo "")) then {
|
|||||||
_object hideObjectGlobal true;
|
_object hideObjectGlobal true;
|
||||||
|
|
||||||
// new Dynamicsimulation
|
// new Dynamicsimulation
|
||||||
|
if(["CfgDynamicSimulation", "baseDynamicSimulationSystem", true] call EPOCH_fnc_returnConfigEntryV2)then
|
||||||
|
{
|
||||||
_newObj enableDynamicSimulation true;
|
_newObj enableDynamicSimulation true;
|
||||||
_newObj triggerDynamicSimulation false; // this object doesnt need to turn anything on in the server
|
_newObj triggerDynamicSimulation false; // this object doesnt need to turn anything on in the server
|
||||||
|
};
|
||||||
|
|
||||||
switch (_method) do {
|
switch (_method) do {
|
||||||
case 0: {
|
case 0: {
|
||||||
|
@ -320,9 +320,12 @@ if (!isNull _player) then {
|
|||||||
_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
|
// new Dynamicsimulation
|
||||||
|
if(["CfgDynamicSimulation", "playerDynamicSimulationSystem", true] call EPOCH_fnc_returnConfigEntryV2)then
|
||||||
|
{
|
||||||
_newPlyr enableDynamicSimulation true;
|
_newPlyr enableDynamicSimulation true;
|
||||||
_newPlyr triggerDynamicSimulation 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];
|
||||||
};
|
};
|
||||||
|
@ -112,8 +112,11 @@ if (!local _player) then {
|
|||||||
_newPlyr = _group createUnit[_class, _location, [], 0, "CAN_COLLIDE"];
|
_newPlyr = _group createUnit[_class, _location, [], 0, "CAN_COLLIDE"];
|
||||||
|
|
||||||
// new Dynamicsimulation
|
// new Dynamicsimulation
|
||||||
|
if(["CfgDynamicSimulation", "playerDynamicSimulationSystem", true] call EPOCH_fnc_returnConfigEntryV2)then
|
||||||
|
{
|
||||||
_newPlyr enableDynamicSimulation true;
|
_newPlyr enableDynamicSimulation true;
|
||||||
_newPlyr triggerDynamicSimulation true;
|
_newPlyr triggerDynamicSimulation true;
|
||||||
|
};
|
||||||
|
|
||||||
addToRemainsCollector[_newPlyr];
|
addToRemainsCollector[_newPlyr];
|
||||||
|
|
||||||
|
@ -213,8 +213,11 @@ for "_i" from 1 to _maxVehicleLimit do {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// new Dynamicsimulation
|
// new Dynamicsimulation
|
||||||
|
if(["CfgDynamicSimulation", "vehicleDynamicSimulationSystem", true] call EPOCH_fnc_returnConfigEntryV2)then
|
||||||
|
{
|
||||||
_vehicle enableSimulationGlobal false; // turn it off until activated by dynamicSim
|
_vehicle enableSimulationGlobal false; // turn it off until activated by dynamicSim
|
||||||
_vehicle enableDynamicSimulation true;
|
_vehicle enableDynamicSimulation true;
|
||||||
|
};
|
||||||
|
|
||||||
// turrets
|
// turrets
|
||||||
/*
|
/*
|
||||||
|
@ -99,8 +99,11 @@ if !(_allHitpoints isEqualTo []) then{
|
|||||||
};
|
};
|
||||||
|
|
||||||
// new Dynamicsimulation
|
// new Dynamicsimulation
|
||||||
|
if(["CfgDynamicSimulation", "vehicleDynamicSimulationSystem", true] call EPOCH_fnc_returnConfigEntryV2)then
|
||||||
|
{
|
||||||
_newveh enableSimulationGlobal false; // turn it off until activated by dynamicSim
|
_newveh enableSimulationGlobal false; // turn it off until activated by dynamicSim
|
||||||
_newveh enableDynamicSimulation true;
|
_newveh enableDynamicSimulation true;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
// add back old inventory
|
// add back old inventory
|
||||||
|
@ -109,8 +109,11 @@ if !(isNull _vehObj) then{
|
|||||||
};
|
};
|
||||||
|
|
||||||
// new Dynamicsimulation
|
// new Dynamicsimulation
|
||||||
|
if(["CfgDynamicSimulation", "vehicleDynamicSimulationSystem", true] call EPOCH_fnc_returnConfigEntryV2)then
|
||||||
|
{
|
||||||
_vehObj enableSimulationGlobal false; // turn it off until activated by dynamicSim
|
_vehObj enableSimulationGlobal false; // turn it off until activated by dynamicSim
|
||||||
_vehObj enableDynamicSimulation true;
|
_vehObj enableDynamicSimulation true;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
// SAVE VEHICLE
|
// SAVE VEHICLE
|
||||||
|
Loading…
Reference in New Issue
Block a user