2015-12-07 16:24:52 +00:00
/*
Author: Aaron Clark - EpochMod.com
Contributors:
Description:
Initalize variables used client side and start login FSM
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/client_init.sqf
2015-12-07 16:24:52 +00:00
*/
2015-09-28 22:04:43 +00:00
EPOCH_CraftingItem = "";
2015-09-14 20:55:36 +00:00
EPOCH_ESP_TARGETS = [];
EPOCH_ESPMAP_TARGETS = [];
EPOCH_ESPGROUPS = [];
EPOCH_ESPGROUPCOLORS = [];
EPOCH_ESP_PLAYER = false;
EPOCH_ESP_VEHICLES = false;
EPOCH_ESP_VEHICLEPLAYER = [];
2016-04-28 16:59:12 +00:00
EPOCH_group_level_img = ["x\addons\a3_epoch_code\data\owner.paa", "x\addons\a3_epoch_code\data\mod.paa", "x\addons\a3_epoch_code\data\member.paa"];
2015-09-14 20:55:36 +00:00
if (isNil 'EPOCH_diag_fps') then {
EPOCH_diag_fps = 0;
};
2015-11-08 15:26:38 +00:00
EPOCH_playerIsSwimming = false;
2015-09-14 20:55:36 +00:00
EPOCH_lastTrash = diag_tickTime;
EPOCH_tradeDone = false;
EPOCH_bankBalance = 0;
EPOCH_antiWallCount = 0;
EPOCH_lastTargetTime = diag_tickTime;
EPOCH_lastSave = diag_tickTime;
EPOCH_arr_countdown = [];
EP_light = objNull;
EPOCH_p2ptradeTarget = objNull;
EPOCH_lastPlayerPos = getPosATL player;
EPOCH_Holstered = "";
Epoch_invited_GroupUID = "";
Epoch_invited_GroupName = "";
Epoch_invited_GroupUIDs = [];
Epoch_invited_GroupUIDsPrev = [];
2016-04-08 20:21:46 +00:00
Epoch_my_Group = [];
2015-09-14 20:55:36 +00:00
EPOCH_lastPlayerPos = [0,0,0];
EPOCH_prevOffer = [];
EPOCH_drawIcon3d = false;
EPOCH_velTransform = false;
EPOCH_stabilityTarget = objNull;
EPOCH_currentTarget = objNull;
2016-05-05 16:06:12 +00:00
EPOCH_currentTargetMode = 0;
2015-09-14 20:55:36 +00:00
EPOCH_LootedBlds = [];
2016-04-08 20:21:46 +00:00
EPOCH_lootObjects = [];
2015-09-14 20:55:36 +00:00
EPOCH_soundLevel = 1;
EPOCH_arr_interactedObjs = [];
EPOCH_buildOption = 0;
EPOCH_nearestLocations = [];
2016-05-18 16:48:48 +00:00
EPOCH_lastFiredLocation = [];
2016-08-08 19:45:39 +00:00
2016-06-29 22:32:57 +00:00
rmx_var_drag_MouseDown = false;
2016-08-08 19:45:39 +00:00
rmx_var_dynamicHUD_groups = [];
rmx_var_dynamicHUD_groupCTRL = [];
2016-04-08 20:21:46 +00:00
2017-08-01 02:00:28 +00:00
//Favorites bar
rmx_var_favBar_Item = "";
EPOCH_modKeys = [false,false,false];
//If disabled, players will not be able to use favorite bar
EPOCH_fav_enableFavoriteBar = true;
//If enabled, same slot weapons from favorites bar are equipped instantly, otherwise reload action is played (recommended for immersion)
EPOCH_fav_FastWeaponSwitching = false;
//If enabled and inventory full, equipped weapon will be dropped on ground in favor for the new selected weapon, otherwise action will fail with message and weapon will not be equipped
EPOCH_fav_DropIfOverflow = false;
2016-04-08 20:21:46 +00:00
["EPOCH_onEachFrame", "onEachFrame", EPOCH_onEachFrame] call BIS_fnc_addStackedEventHandler;
2015-09-14 20:55:36 +00:00
// Custom Keys
2015-10-28 15:16:00 +00:00
EPOCH_keysActionPressed = false; //prevents EH spam
2015-10-05 18:40:04 +00:00
0 call EPOCH_clientKeyMap;
2015-09-14 20:55:36 +00:00
2017-07-12 14:53:53 +00:00
// load some frequently used configs to variables
private _CfgEpochClient = 'CfgEpochClient' call EPOCH_returnConfig;
2017-07-12 14:53:39 +00:00
EPOCH_maxBuildingHeight = getNumber(_CfgEpochClient >> "maxBuildingHeight");
2015-09-14 20:55:36 +00:00
//ON INIT and RESPAWN
call EPOCH_clientInit;
2016-04-08 20:21:46 +00:00
[] execFSM "epoch_code\system\SPVEH.fsm";
[] execFSM "epoch_code\system\player_login.fsm";
2015-09-14 20:55:36 +00:00
2017-08-01 02:00:28 +00:00
//Start processing right after Loading screen is done and game has started
[] spawn {
waitUntil {!isNull (findDisplay 46) && (!isNil "EPOCH_loadingScreenDone")};
'load' call epoch_favBar_draw;
};
2015-09-14 20:55:36 +00:00
true