mirror of
https://github.com/EpochModTeam/Epoch.git
synced 2024-08-30 18:22:13 +00:00
0.4 b602
new compiler with optional v2 format more like BI's added expanded startup init logic moved mirror setup to own function inside epoch core moved server init code to main gamemode init logic.
This commit is contained in:
parent
e817f1e2e5
commit
6cdb9633d4
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -4,7 +4,7 @@
|
|||||||
Contributors:
|
Contributors:
|
||||||
|
|
||||||
Description:
|
Description:
|
||||||
Request loot event and setup mirror
|
Request loot event
|
||||||
|
|
||||||
Licence:
|
Licence:
|
||||||
Arma Public License Share Alike (APL-SA) - https://www.bistudio.com/community/licenses/arma-public-license-share-alike
|
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 {
|
if (!isNull _this) then {
|
||||||
[_this,player,Epoch_personalToken] remoteExec ["EPOCH_server_lootContainer",2];
|
[_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,""];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
@ -24,53 +24,52 @@
|
|||||||
BOOL
|
BOOL
|
||||||
*/
|
*/
|
||||||
//[[[cog import generate_private_arrays ]]]
|
//[[[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]]]
|
//[[[end]]]
|
||||||
params [["_configName","",[""] ] ];
|
params [["_configName","",[""] ] ];
|
||||||
|
|
||||||
_returnConfig = {
|
_config = (configfile >> _configName);
|
||||||
private["_return", "_config"];
|
_missionConfig = (getMissionConfig _configName);
|
||||||
_return = (configfile >> _this);
|
if (isClass _missionConfig) then{
|
||||||
_config = (getMissionConfig _this);
|
_config = _missionConfig;
|
||||||
if (isClass _config) then{
|
|
||||||
_return = _config;
|
|
||||||
};
|
|
||||||
_return
|
|
||||||
};
|
};
|
||||||
|
|
||||||
_config = _configName call _returnConfig;
|
|
||||||
_version = getNumber(_config >> "version");
|
_version = getNumber(_config >> "version");
|
||||||
if (_version == 1) then {
|
if (_version >= 1) then {
|
||||||
{
|
{
|
||||||
if (isClass(_x)) then {
|
if (isClass(_x)) then {
|
||||||
_tag = getText(_x >> "tag");
|
_tag = getText(_x >> "tag");
|
||||||
_file = getText(_x >> "file");
|
_file = getText(_x >> "file");
|
||||||
_file_tag = _file;
|
_file_tag = _file;
|
||||||
_cat = "";
|
|
||||||
{
|
{
|
||||||
if (isClass(_x)) then {
|
if (isClass(_x)) then {
|
||||||
_file = _file_tag;
|
_file = _file_tag;
|
||||||
_file_raw = getText(_x >> "file");
|
_file_raw = getText(_x >> "file");
|
||||||
if (_file_raw == "") then {
|
if (_file_raw == "") then {
|
||||||
_cat = configName _x;
|
_file = format["%1\%2", _file, configName _x];
|
||||||
_file = _file + "\" + _cat;
|
|
||||||
} else {
|
} else {
|
||||||
_file = _file_raw;
|
_file = _file_raw;
|
||||||
};
|
};
|
||||||
{
|
{
|
||||||
_var_name = _tag + "_" + configName _x;
|
_config_name = configName _x;
|
||||||
_fnc_path = _file + "\" + _var_name + ".sqf";
|
//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");
|
_file_raw = getText(_x >> "file");
|
||||||
if (_file_raw != "") then {
|
if (_file_raw != "") then {
|
||||||
_fnc_path = _file_raw;
|
_fnc_path = _file_raw;
|
||||||
};
|
};
|
||||||
_itemCompile = compileFinal preprocessFileLineNumbers _fnc_path;
|
missionNamespace setvariable [_var_name,compileFinal preprocessFileLineNumbers _fnc_path];
|
||||||
missionNamespace setvariable [_var_name,_itemCompile];
|
if (getNumber(_x >> "preInit") == 1) then {
|
||||||
} forEach ("isclass _x" configClasses (_x));
|
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));
|
} forEach (configProperties [_config, "isClass _x", true]);
|
||||||
} else {
|
|
||||||
diag_log format["Epoch: Error Compiler format for %1 is out of date.",_configName];
|
|
||||||
};
|
};
|
||||||
|
@ -33,7 +33,6 @@ if ((_handle isEqualTo 666) || (_animSpeed isEqualTo 666) || (_effect isEqualTo
|
|||||||
// fix any strings to bool
|
// fix any strings to bool
|
||||||
if (_fixBool) then {
|
if (_fixBool) then {
|
||||||
_effect = _effect call EPOCH_fnc_arrayStringToBool;
|
_effect = _effect call EPOCH_fnc_arrayStringToBool;
|
||||||
diag_log str(_handle, _animSpeed, _effect]);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
_handle ppEffectEnable true;
|
_handle ppEffectEnable true;
|
||||||
|
@ -12,11 +12,30 @@
|
|||||||
Github:
|
Github:
|
||||||
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/init/fn_init.sqf
|
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/init/fn_init.sqf
|
||||||
*/
|
*/
|
||||||
if !(isNil "Epoch_CStart") exitWith { false };
|
if !(isNil "Epoch_Survival_Started") exitWith { false };
|
||||||
Epoch_CStart = true;
|
Epoch_Survival_Started = true;
|
||||||
if (!isDedicated && hasInterface) then {
|
|
||||||
|
_selectedFunction = "CfgClientFunctions";
|
||||||
|
if (isDedicated) then {
|
||||||
|
// dedicated server
|
||||||
|
_selectedFunction = "CfgServerFunctions";
|
||||||
call compile preprocessFileLineNumbers "epoch_code\init\both_init.sqf";
|
call compile preprocessFileLineNumbers "epoch_code\init\both_init.sqf";
|
||||||
// Epoch Client Only function compiler
|
} else {
|
||||||
"CfgClientFunctions" call EPOCH_fnc_compiler;
|
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
|
true
|
||||||
|
@ -12,7 +12,28 @@
|
|||||||
Github:
|
Github:
|
||||||
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/init/fn_postinit.sqf
|
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/init/fn_postinit.sqf
|
||||||
*/
|
*/
|
||||||
if (!isDedicated && isMultiplayer && hasInterface) then {
|
if (isDedicated) then {
|
||||||
call compile preprocessFileLineNumbers "epoch_code\init\client_init.sqf";
|
// 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
|
true
|
||||||
|
@ -1 +1 @@
|
|||||||
build=597;
|
build=602;
|
||||||
|
@ -1 +1 @@
|
|||||||
build=597;
|
build=602;
|
||||||
|
@ -13,25 +13,6 @@ class CfgPatches {
|
|||||||
#include "build.hpp"
|
#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
|
class CfgServerFunctions
|
||||||
{
|
{
|
||||||
version = 1;
|
version = 1;
|
||||||
|
@ -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
|
|
@ -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
|
|
Binary file not shown.
@ -1 +1 @@
|
|||||||
build=597;
|
build=602;
|
||||||
|
@ -1 +1 @@
|
|||||||
build=597;
|
build=602;
|
||||||
|
Loading…
Reference in New Issue
Block a user