diff --git a/Server_Install_Pack/@epochhive/addons/epoch_server.pbo b/Server_Install_Pack/@epochhive/addons/epoch_server.pbo index 5c6763fb..3d70c375 100644 Binary files a/Server_Install_Pack/@epochhive/addons/epoch_server.pbo and b/Server_Install_Pack/@epochhive/addons/epoch_server.pbo differ diff --git a/Server_Install_Pack/@epochhive/addons/epoch_server_core.pbo b/Server_Install_Pack/@epochhive/addons/epoch_server_core.pbo index 5b7e6870..1ae0e958 100644 Binary files a/Server_Install_Pack/@epochhive/addons/epoch_server_core.pbo and b/Server_Install_Pack/@epochhive/addons/epoch_server_core.pbo differ diff --git a/Server_Install_Pack/@epochhive/addons/epoch_server_settings.pbo b/Server_Install_Pack/@epochhive/addons/epoch_server_settings.pbo index 1d10989b..dcab713f 100644 Binary files a/Server_Install_Pack/@epochhive/addons/epoch_server_settings.pbo and b/Server_Install_Pack/@epochhive/addons/epoch_server_settings.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Altis.pbo b/Server_Install_Pack/mpmissions/epoch.Altis.pbo index eee1d2ee..f464f24e 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Altis.pbo and b/Server_Install_Pack/mpmissions/epoch.Altis.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Australia.pbo b/Server_Install_Pack/mpmissions/epoch.Australia.pbo index 5eed3b51..cbf543d2 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Australia.pbo and b/Server_Install_Pack/mpmissions/epoch.Australia.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Bootcamp_ACR.pbo b/Server_Install_Pack/mpmissions/epoch.Bootcamp_ACR.pbo index 82735813..f1bdd697 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Bootcamp_ACR.pbo and b/Server_Install_Pack/mpmissions/epoch.Bootcamp_ACR.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Bornholm.pbo b/Server_Install_Pack/mpmissions/epoch.Bornholm.pbo index bb599ebe..27e9170e 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Bornholm.pbo and b/Server_Install_Pack/mpmissions/epoch.Bornholm.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Chernarus.pbo b/Server_Install_Pack/mpmissions/epoch.Chernarus.pbo index 926b7624..5a506441 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Chernarus.pbo and b/Server_Install_Pack/mpmissions/epoch.Chernarus.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Chernarus_Summer.pbo b/Server_Install_Pack/mpmissions/epoch.Chernarus_Summer.pbo index 25e02a97..eede5bac 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Chernarus_Summer.pbo and b/Server_Install_Pack/mpmissions/epoch.Chernarus_Summer.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Desert_E.pbo b/Server_Install_Pack/mpmissions/epoch.Desert_E.pbo index eef57243..cf901fa7 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Desert_E.pbo and b/Server_Install_Pack/mpmissions/epoch.Desert_E.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Esseker.pbo b/Server_Install_Pack/mpmissions/epoch.Esseker.pbo index bc03f00e..af3838ef 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Esseker.pbo and b/Server_Install_Pack/mpmissions/epoch.Esseker.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Mountains_ACR.pbo b/Server_Install_Pack/mpmissions/epoch.Mountains_ACR.pbo index d2f5a83d..94cb0376 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Mountains_ACR.pbo and b/Server_Install_Pack/mpmissions/epoch.Mountains_ACR.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Napf.pbo b/Server_Install_Pack/mpmissions/epoch.Napf.pbo index 7933aa48..169a32d0 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Napf.pbo and b/Server_Install_Pack/mpmissions/epoch.Napf.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Porto.pbo b/Server_Install_Pack/mpmissions/epoch.Porto.pbo index 4e2854c3..a760d271 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Porto.pbo and b/Server_Install_Pack/mpmissions/epoch.Porto.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.ProvingGrounds_PMC.pbo b/Server_Install_Pack/mpmissions/epoch.ProvingGrounds_PMC.pbo index fe6a2209..e84f8f06 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.ProvingGrounds_PMC.pbo and b/Server_Install_Pack/mpmissions/epoch.ProvingGrounds_PMC.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Sara.pbo b/Server_Install_Pack/mpmissions/epoch.Sara.pbo index 2912d305..1209c298 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Sara.pbo and b/Server_Install_Pack/mpmissions/epoch.Sara.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.SaraLite.pbo b/Server_Install_Pack/mpmissions/epoch.SaraLite.pbo index c3361bac..745585a1 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.SaraLite.pbo and b/Server_Install_Pack/mpmissions/epoch.SaraLite.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Sara_dbe1.pbo b/Server_Install_Pack/mpmissions/epoch.Sara_dbe1.pbo index 66afa2bb..eed6f0c8 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Sara_dbe1.pbo and b/Server_Install_Pack/mpmissions/epoch.Sara_dbe1.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Shapur_BAF.pbo b/Server_Install_Pack/mpmissions/epoch.Shapur_BAF.pbo index 2c4f95f5..98a1ed75 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Shapur_BAF.pbo and b/Server_Install_Pack/mpmissions/epoch.Shapur_BAF.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Stratis.pbo b/Server_Install_Pack/mpmissions/epoch.Stratis.pbo index 69b371d1..fbfa69d6 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Stratis.pbo and b/Server_Install_Pack/mpmissions/epoch.Stratis.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Takistan.pbo b/Server_Install_Pack/mpmissions/epoch.Takistan.pbo index 4e8ede7a..21674c46 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Takistan.pbo and b/Server_Install_Pack/mpmissions/epoch.Takistan.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Tanoa.pbo b/Server_Install_Pack/mpmissions/epoch.Tanoa.pbo index 5e6257d1..c7ac9321 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Tanoa.pbo and b/Server_Install_Pack/mpmissions/epoch.Tanoa.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.VR.pbo b/Server_Install_Pack/mpmissions/epoch.VR.pbo index ec37cdd6..5e5670b6 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.VR.pbo and b/Server_Install_Pack/mpmissions/epoch.VR.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Woodland_ACR.pbo b/Server_Install_Pack/mpmissions/epoch.Woodland_ACR.pbo index 23353ffe..130fecd4 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Woodland_ACR.pbo and b/Server_Install_Pack/mpmissions/epoch.Woodland_ACR.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Zargabad.pbo b/Server_Install_Pack/mpmissions/epoch.Zargabad.pbo index 90a44c19..5f227eef 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Zargabad.pbo and b/Server_Install_Pack/mpmissions/epoch.Zargabad.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.utes.pbo b/Server_Install_Pack/mpmissions/epoch.utes.pbo index 6c23c116..2a829102 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.utes.pbo and b/Server_Install_Pack/mpmissions/epoch.utes.pbo differ diff --git a/Sources/epoch_code/compile/EPOCH_LootIT.sqf b/Sources/epoch_code/compile/EPOCH_LootIT.sqf index 438fa9b7..a8c79b43 100644 --- a/Sources/epoch_code/compile/EPOCH_LootIT.sqf +++ b/Sources/epoch_code/compile/EPOCH_LootIT.sqf @@ -4,7 +4,7 @@ Contributors: Description: - Request loot event and setup mirror + Request loot event Licence: Arma Public License Share Alike (APL-SA) - https://www.bistudio.com/community/licenses/arma-public-license-share-alike @@ -14,29 +14,4 @@ */ if (!isNull _this) then { [_this,player,Epoch_personalToken] remoteExec ["EPOCH_server_lootContainer",2]; - - if (typeof _this == "wardrobe_EPOCH") then { - if !(_this getVariable["MIRROR_SETUP", false]) then { - _this spawn { - _this setVariable ["MIRROR_SETUP", true]; - _cam = "camera" camCreate (_this modelToWorld [0,0.25,1.5]); - _cam camSetTarget (_this modelToWorld [0,-30,1]); - _cam camSetFov 0.3; - _cam camCommit 0; - "rendertargetwardrobe0" setPiPEffect [0]; - _cam cameraEffect ["Internal", "FRONT","rendertargetwardrobe0"]; - _this setObjectTexture [0,"#(argb,512,512,1)r2t(rendertargetwardrobe0,1.0)"]; - - waitUntil { - uiSleep 5; - (isNull _this) || ((_this distance player) > 20) - }; - - _cam cameraEffect ["terminate","back"]; - camDestroy _cam; - _this setVariable["MIRROR_SETUP", nil]; - _this setObjectTexture [0,""]; - }; - }; - }; }; diff --git a/Sources/epoch_code/compile/both/EPOCH_compiler.sqf b/Sources/epoch_code/compile/both/EPOCH_compiler.sqf index eb30dc50..857273bd 100644 --- a/Sources/epoch_code/compile/both/EPOCH_compiler.sqf +++ b/Sources/epoch_code/compile/both/EPOCH_compiler.sqf @@ -24,53 +24,52 @@ BOOL */ //[[[cog import generate_private_arrays ]]] -private ["_cat","_config","_file","_file_raw","_file_tag","_fnc_path","_itemCompile","_return","_returnConfig","_tag","_var_name","_version"]; +private ["_config","_config_name","_file","_file_raw","_file_tag","_fnc_path","_missionConfig","_tag","_var_name","_version"]; //[[[end]]] params [["_configName","",[""] ] ]; -_returnConfig = { - private["_return", "_config"]; - _return = (configfile >> _this); - _config = (getMissionConfig _this); - if (isClass _config) then{ - _return = _config; - }; - _return +_config = (configfile >> _configName); +_missionConfig = (getMissionConfig _configName); +if (isClass _missionConfig) then{ + _config = _missionConfig; }; - -_config = _configName call _returnConfig; _version = getNumber(_config >> "version"); -if (_version == 1) then { +if (_version >= 1) then { { if (isClass(_x)) then { _tag = getText(_x >> "tag"); _file = getText(_x >> "file"); _file_tag = _file; - _cat = ""; { if (isClass(_x)) then { _file = _file_tag; _file_raw = getText(_x >> "file"); if (_file_raw == "") then { - _cat = configName _x; - _file = _file + "\" + _cat; + _file = format["%1\%2", _file, configName _x]; } else { _file = _file_raw; }; { - _var_name = _tag + "_" + configName _x; - _fnc_path = _file + "\" + _var_name + ".sqf"; + _config_name = configName _x; + //version 2 More like BI standard fnc / fn_ + _var_name = format["%1_fnc_%2", _tag, _config_name]; + _fnc_path = format["%1\fn_%2.sqf", _file, _config_name]; + if (_version == 1) then { + //version 1 TAG + _ + configName + _var_name = format["%1_%2", _tag, _config_name]; + _fnc_path = format["%1\%2.sqf", _file, _var_name]; + }; _file_raw = getText(_x >> "file"); if (_file_raw != "") then { _fnc_path = _file_raw; }; - _itemCompile = compileFinal preprocessFileLineNumbers _fnc_path; - missionNamespace setvariable [_var_name,_itemCompile]; - } forEach ("isclass _x" configClasses (_x)); + missionNamespace setvariable [_var_name,compileFinal preprocessFileLineNumbers _fnc_path]; + if (getNumber(_x >> "preInit") == 1) then { + call (missionNamespace getvariable _var_name); + }; + } forEach (configProperties [_x, "isClass _x", true]); } - } forEach ("isclass _x" configClasses (_x)); + } forEach (configProperties [_x, "isClass _x", true]); }; - } forEach ("isclass _x" configClasses (_config)); -} else { - diag_log format["Epoch: Error Compiler format for %1 is out of date.",_configName]; + } forEach (configProperties [_config, "isClass _x", true]); }; diff --git a/Sources/epoch_code/gui/scripts/post_process/EPOCH_postprocessAdjust.sqf b/Sources/epoch_code/gui/scripts/post_process/EPOCH_postprocessAdjust.sqf index 5aa397b6..3f84fd72 100644 --- a/Sources/epoch_code/gui/scripts/post_process/EPOCH_postprocessAdjust.sqf +++ b/Sources/epoch_code/gui/scripts/post_process/EPOCH_postprocessAdjust.sqf @@ -33,7 +33,6 @@ if ((_handle isEqualTo 666) || (_animSpeed isEqualTo 666) || (_effect isEqualTo // fix any strings to bool if (_fixBool) then { _effect = _effect call EPOCH_fnc_arrayStringToBool; - diag_log str(_handle, _animSpeed, _effect]); }; _handle ppEffectEnable true; diff --git a/Sources/epoch_code/init/fn_init.sqf b/Sources/epoch_code/init/fn_init.sqf index aca96c92..c1000eee 100644 --- a/Sources/epoch_code/init/fn_init.sqf +++ b/Sources/epoch_code/init/fn_init.sqf @@ -12,11 +12,30 @@ Github: https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/init/fn_init.sqf */ -if !(isNil "Epoch_CStart") exitWith { false }; -Epoch_CStart = true; -if (!isDedicated && hasInterface) then { +if !(isNil "Epoch_Survival_Started") exitWith { false }; +Epoch_Survival_Started = true; + +_selectedFunction = "CfgClientFunctions"; +if (isDedicated) then { + // dedicated server + _selectedFunction = "CfgServerFunctions"; call compile preprocessFileLineNumbers "epoch_code\init\both_init.sqf"; - // Epoch Client Only function compiler - "CfgClientFunctions" call EPOCH_fnc_compiler; +} else { + if (hasInterface) then { + // all players + call compile preprocessFileLineNumbers "epoch_code\init\both_init.sqf"; + if (isServer) then { + // listen server host + _selectedFunction = "CfgEpochListenServerFunctions"; + } else { + // all players + _selectedFunction = "CfgClientFunctions"; + }; + } else { + // Headless Clients + _selectedFunction = "CfgEpochClientHCFunctions"; + }; }; +diag_log format["Loading Functions: %1",_selectedFunction]; +_selectedFunction call EPOCH_fnc_compiler; true diff --git a/Sources/epoch_code/init/fn_postinit.sqf b/Sources/epoch_code/init/fn_postinit.sqf index e4f53125..d0f1bb6e 100644 --- a/Sources/epoch_code/init/fn_postinit.sqf +++ b/Sources/epoch_code/init/fn_postinit.sqf @@ -12,7 +12,28 @@ Github: https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/init/fn_postinit.sqf */ -if (!isDedicated && isMultiplayer && hasInterface) then { - call compile preprocessFileLineNumbers "epoch_code\init\client_init.sqf"; +if (isDedicated) then { + // dedicated server + call compile preprocessFileLineNumbers "\epoch_server\init\server_init.sqf"; +} else { + if (hasInterface) then { + + if (isMultiplayer) then { + // start multiplayer game + call compile preprocessFileLineNumbers "epoch_code\init\client_init.sqf"; + }; + + if (isServer) then { + // listen server host + + } else { + // all players + + + }; + } else { + // Headless Clients + + }; }; true diff --git a/Sources/epoch_config/build.hpp b/Sources/epoch_config/build.hpp index e4037d1a..1e7c91f2 100644 --- a/Sources/epoch_config/build.hpp +++ b/Sources/epoch_config/build.hpp @@ -1 +1 @@ -build=597; +build=602; diff --git a/Sources/epoch_server/build.hpp b/Sources/epoch_server/build.hpp index e4037d1a..1e7c91f2 100644 --- a/Sources/epoch_server/build.hpp +++ b/Sources/epoch_server/build.hpp @@ -1 +1 @@ -build=597; +build=602; diff --git a/Sources/epoch_server/config.cpp b/Sources/epoch_server/config.cpp index 8fae2aa0..d0c2d00f 100644 --- a/Sources/epoch_server/config.cpp +++ b/Sources/epoch_server/config.cpp @@ -13,25 +13,6 @@ class CfgPatches { #include "build.hpp" }; }; -class cfgFunctions -{ - class A3E - { - tag = "EPOCH"; - class Epoch_Server - { - file = "\epoch_server\init"; - class init - { - preInit = 1; - }; - class postinit - { - postInit = 1; - }; - }; - }; -}; class CfgServerFunctions { version = 1; diff --git a/Sources/epoch_server/init/fn_init.sqf b/Sources/epoch_server/init/fn_init.sqf deleted file mode 100644 index ebbe484e..00000000 --- a/Sources/epoch_server/init/fn_init.sqf +++ /dev/null @@ -1,19 +0,0 @@ -/* - Author: Aaron Clark - EpochMod.com - - Contributors: - - Description: - Starts epoch function compiler Server side - - Licence: - Arma Public License Share Alike (APL-SA) - https://www.bistudio.com/community/licenses/arma-public-license-share-alike - - Github: - https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/init/fn_init.sqf -*/ -if !(isNil "Epoch_SStart1") exitWith { false }; -Epoch_SStart1 = true; -diag_log "Epoch: Init Server Compiler"; -"CfgServerFunctions" call EPOCH_fnc_compiler; -true diff --git a/Sources/epoch_server/init/fn_postinit.sqf b/Sources/epoch_server/init/fn_postinit.sqf deleted file mode 100644 index 6090b436..00000000 --- a/Sources/epoch_server/init/fn_postinit.sqf +++ /dev/null @@ -1,23 +0,0 @@ -/* - Author: Aaron Clark - EpochMod.com - - Contributors: - - Description: - Initalizes variables and starts functions - - Licence: - Arma Public License Share Alike (APL-SA) - https://www.bistudio.com/community/licenses/arma-public-license-share-alike - - Github: - https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/init/fn_postinit.sqf -*/ -if (isNil "Epoch_SStart") then { - Epoch_SStart = true; - [] spawn { - call compile preprocessFileLineNumbers "epoch_code\init\both_init.sqf"; - call compile preprocessFileLineNumbers "\epoch_server\init\server_init.sqf"; - }; -}; - -true diff --git a/Sources/epoch_server/treeView.txt b/Sources/epoch_server/treeView.txt index 4af06ca1..5e7df6a0 100644 Binary files a/Sources/epoch_server/treeView.txt and b/Sources/epoch_server/treeView.txt differ diff --git a/Sources/epoch_server_core/build.hpp b/Sources/epoch_server_core/build.hpp index e4037d1a..1e7c91f2 100644 --- a/Sources/epoch_server_core/build.hpp +++ b/Sources/epoch_server_core/build.hpp @@ -1 +1 @@ -build=597; +build=602; diff --git a/Sources/epoch_server_settings/build.hpp b/Sources/epoch_server_settings/build.hpp index e4037d1a..1e7c91f2 100644 --- a/Sources/epoch_server_settings/build.hpp +++ b/Sources/epoch_server_settings/build.hpp @@ -1 +1 @@ -build=597; +build=602; diff --git a/build.txt b/build.txt index 15ab6616..180a1cf0 100644 --- a/build.txt +++ b/build.txt @@ -1 +1 @@ -597 +602