2015-12-07 16:24:52 +00:00
|
|
|
/*
|
|
|
|
Author: Aaron Clark - EpochMod.com
|
|
|
|
|
|
|
|
Contributors:
|
|
|
|
|
|
|
|
Description:
|
|
|
|
Initalize both init and run custom client function compiler
|
|
|
|
|
|
|
|
Licence:
|
|
|
|
Arma Public License Share Alike (APL-SA) - https://www.bistudio.com/community/licenses/arma-public-license-share-alike
|
|
|
|
|
|
|
|
Github:
|
2016-06-13 16:54:19 +00:00
|
|
|
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/init/fn_init.sqf
|
2015-12-07 16:24:52 +00:00
|
|
|
*/
|
2016-09-08 17:09:58 +00:00
|
|
|
if !(isNil "Epoch_Survival_Started") exitWith { false };
|
|
|
|
Epoch_Survival_Started = true;
|
|
|
|
|
2017-05-02 13:28:52 +00:00
|
|
|
private _selectedFunction = "CfgClientFunctions";
|
2016-09-08 17:09:58 +00:00
|
|
|
if (isDedicated) then {
|
|
|
|
// dedicated server
|
|
|
|
_selectedFunction = "CfgServerFunctions";
|
2016-04-08 20:21:46 +00:00
|
|
|
call compile preprocessFileLineNumbers "epoch_code\init\both_init.sqf";
|
2016-09-08 17:09:58 +00:00
|
|
|
} 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";
|
|
|
|
};
|
2015-09-14 20:55:36 +00:00
|
|
|
};
|
2016-09-08 17:09:58 +00:00
|
|
|
diag_log format["Loading Functions: %1",_selectedFunction];
|
|
|
|
_selectedFunction call EPOCH_fnc_compiler;
|
2015-09-14 20:55:36 +00:00
|
|
|
true
|