diff --git a/Server_Install_Pack/@epochhive/addons/a3_epoch_server.pbo b/Server_Install_Pack/@epochhive/addons/a3_epoch_server.pbo index f83c2abf..587319a8 100644 Binary files a/Server_Install_Pack/@epochhive/addons/a3_epoch_server.pbo and b/Server_Install_Pack/@epochhive/addons/a3_epoch_server.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Altis.pbo b/Server_Install_Pack/mpmissions/epoch.Altis.pbo index d8d329cc..64632717 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 f5acc6eb..d4e81220 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 f5b18e13..daf44dd0 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 b2dd08be..ebb98382 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 f11b8a5c..c7319bd5 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 7cf73d84..c21257b3 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 3fa3094d..a335a4de 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 4fca7d94..3727f69e 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 94a77356..cccc85b9 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.Porto.pbo b/Server_Install_Pack/mpmissions/epoch.Porto.pbo index ccc72668..393274d9 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 1b2e4730..515aa5bc 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 573ccb2b..5eb026bc 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 a24b6862..d48afd09 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 1559c708..c1b200d4 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 eab6da3f..d12b58f1 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 a7a2cc96..72ff6501 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 59bdad99..b864d060 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.VR.pbo b/Server_Install_Pack/mpmissions/epoch.VR.pbo index c96c6431..6951bce8 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 476e9f44..88eeeaf9 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 1fb33d28..8910631d 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 08941d49..1d52e6af 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/System/player_login.fsm b/Sources/epoch_code/System/player_login.fsm index dd8c87e1..4df94957 100644 --- a/Sources/epoch_code/System/player_login.fsm +++ b/Sources/epoch_code/System/player_login.fsm @@ -28,7 +28,7 @@ item23[] = {"Wrong_Server_Ver",4,218,125.000000,475.000000,225.000000,525.000000 item24[] = {"true",8,218,-150.000000,1125.000000,-50.000000,1175.000000,0.000000,"true"}; item25[] = {"ERROR_Wrong_Server",2,250,275.000000,475.000000,375.000000,525.000000,0.000000,"ERROR" \n "Wrong" \n "Server Version"}; item26[] = {"Display_Message",4,218,600.000000,1150.000000,700.000000,1200.000000,0.000000,"" \n "Display Message" \n "Wait..."}; -item27[] = {"Setup_Player_Obj",2,4346,-25.000000,975.000000,75.000000,1025.000000,0.000000,"Setup Player" \n "Object"}; +item27[] = {"Setup_Player_Obj",2,250,-25.000000,975.000000,75.000000,1025.000000,0.000000,"Setup Player" \n "Object"}; item28[] = {"Check_if_Player",4,218,750.000000,1225.000000,850.000000,1275.000000,0.000000,"Check if" \n "Player got Kicked"}; item29[] = {"Preload_done",8,218,-150.000000,1425.000000,-50.000000,1475.000000,0.000000,"Preload" \n "done"}; item30[] = {"",7,210,471.000000,796.000000,479.000000,804.000000,0.000000,""}; @@ -62,7 +62,7 @@ item57[] = {"Select_Weapon",2,250,150.000000,1300.000000,250.000000,1350.000000, item58[] = {"true",8,218,225.000000,1375.000000,325.000000,1425.000000,0.000000,"true"}; item59[] = {"Do_nothing",2,250,300.000000,1300.000000,400.000000,1350.000000,0.000000,"Do nothing"}; item60[] = {"Check_New_Player",2,250,-25.000000,875.000000,75.000000,925.000000,0.000000,"Check" \n "New Player" \n "Setup"}; -item61[] = {"check_new__player",4,218,-150.000000,925.000000,-50.000000,975.000000,0.000000,"check new " \n "player not null"}; +item61[] = {"check_new__player",4,4314,-150.000000,925.000000,-50.000000,975.000000,0.000000,"check new " \n "player not null"}; item62[] = {"true",8,218,-150.000000,-325.000000,-50.000000,-275.000000,0.000000,"true"}; item63[] = {"Process_1",2,250,-25.000000,-275.000000,75.000000,-225.000000,0.000000,"Process"}; item64[] = {"Wait_ArmA_Loading",4,218,-150.000000,-225.000000,-50.000000,-175.000000,0.000000,"Wait ArmA" \n "Loading Screen" \n "Done"}; @@ -190,8 +190,8 @@ link97[] = {85,79}; link98[] = {86,16}; link99[] = {86,22}; link100[] = {87,31}; -globals[] = {0.000000,0,0,0,0,640,480,1,244,6316128,1,-207.564026,582.257507,1595.816406,409.736633,586,880,1}; -window[] = {2,-1,-1,-1,-1,890,78,1370,78,3,604}; +globals[] = {0.000000,0,0,0,0,640,480,1,244,6316128,1,-207.564026,582.257507,1746.772461,560.692383,586,880,1}; +window[] = {2,-1,-1,-1,-1,994,182,1474,182,3,604}; *//*%FSM*/ class FSM { @@ -1037,7 +1037,7 @@ class FSM priority = 0.000000; to="Setup_Player_Obj"; precondition = /*%FSM*/""/*%FSM*/; - condition=/*%FSM*/"!(isNull _playerObject)"/*%FSM*/; + condition=/*%FSM*/"!(isNull _playerObject) && {_playerObject getVariable [""SETUP"",false]}"/*%FSM*/; action=/*%FSM*/""/*%FSM*/; }; /*%FSM*/ diff --git a/Sources/epoch_server/compile/epoch_player/EPOCH_server_loadPlayer.sqf b/Sources/epoch_server/compile/epoch_player/EPOCH_server_loadPlayer.sqf index 69694ef7..8de17f0e 100644 --- a/Sources/epoch_server/compile/epoch_player/EPOCH_server_loadPlayer.sqf +++ b/Sources/epoch_server/compile/epoch_player/EPOCH_server_loadPlayer.sqf @@ -305,9 +305,8 @@ if (typename _this == "ARRAY") then { diag_log format["DEBUG (Load Player) Set Group: %1", _plyrGroup]; }; - _newPlyr setVariable["SETUP", true]; - _newPlyr setVariable["PUID", _plyrUID]; + _newPlyr setVariable["PUID", _plyrUID]; if !(_vars isEqualTo[]) then { _newPlyr setVariable["VARS", _vars]; @@ -321,6 +320,8 @@ if (typename _this == "ARRAY") then { _newPlyr setVariable["REVIVE", _canBeRevived] }; [_plyrNetID, _plyrUID, [_newPlyr, _vars, _currWeap, count(magazines _newPlyr), _plyrGroup, _canBeRevived, _newPlyr call EPOCH_server_setPToken]] call EPOCH_server_pushPlayer; + + _newPlyr setVariable["SETUP", true, true]; }; } else { diag_log format["LOGIN FAILED UNIT NULL: %1 [%2|%3]", _plyr, _group, count allgroups]; diff --git a/Sources/mpmissions/epoch.Altis/System/player_login.fsm b/Sources/mpmissions/epoch.Altis/System/player_login.fsm new file mode 100644 index 00000000..9426567f --- /dev/null +++ b/Sources/mpmissions/epoch.Altis/System/player_login.fsm @@ -0,0 +1,1398 @@ +/*%FSM*/ +/*%FSM*/ +/* +item0[] = {"INIT",0,250,-25.000000,-375.000000,75.000000,-325.000000,0.000000,"INIT"}; +item1[] = {"FINISH",1,4346,-25.000000,1475.000000,75.000000,1525.000000,0.000000,"FINISH"}; +item2[] = {"true",8,218,-150.000000,-125.000000,-50.000000,-75.000000,0.000000,"true"}; +item3[] = {"Version_Check",2,250,-25.000000,-75.000000,75.000000,-25.000000,0.000000,"Version Check"}; +item4[] = {"Player_Object_Re",4,218,-150.000000,75.000000,-50.000000,125.000000,0.000000,"Player" \n "Object Ready"}; +item5[] = {"Check_Player_UID",2,250,-25.000000,125.000000,75.000000,175.000000,0.000000,"Check Player UID"}; +item6[] = {"PlayerUID_Okay",4,218,-150.000000,175.000000,-50.000000,225.000000,10.000000,"PlayerUID" \n "Okay"}; +item7[] = {"Wrong_Version",4,218,125.000000,-75.000000,225.000000,-25.000000,10.000000,"Wrong" \n "Version"}; +item8[] = {"",7,210,471.000061,-54.000099,478.999939,-45.999901,0.000000,""}; +item9[] = {"ERROR_Wrong_Version",2,250,275.000000,-75.000000,375.000000,-25.000000,0.000000,"ERROR" \n "Wrong Version" \n "Epoch"}; +item10[] = {"Disconnect",2,250,600.000000,1225.000000,700.000000,1275.000000,0.000000,"Disconnect"}; +item11[] = {"Server_Okay",4,218,-125.000000,425.000000,-25.000000,475.000000,0.000000,"Server" \n "Okay"}; +item12[] = {"Empty_PlayerUID",4,218,125.000000,125.000000,225.000000,175.000000,0.000000,"Empty" \n "PlayerUID"}; +item13[] = {"ERROR_PlayerUID",2,250,275.000000,125.000000,375.000000,175.000000,0.000000,"ERROR" \n "PlayerUID Empty"}; +item14[] = {"",7,210,471.000061,145.999908,478.999939,154.000092,0.000000,""}; +item15[] = {"Timeout_No_Respo",4,218,125.000000,875.000000,225.000000,925.000000,0.000000,"Timeout" \n "No Response"}; +item16[] = {"Response",4,218,-150.000000,825.000000,-50.000000,875.000000,0.000000,"Response"}; +item17[] = {"Setup_Player_Var",2,250,-25.000000,1075.000000,75.000000,1125.000000,0.000000,"Setup Player" \n "Variables"}; +item18[] = {"Request_Hive",2,250,-25.000000,575.000000,75.000000,625.000000,0.000000,"Request Hive"}; +item19[] = {"Timeout_No_Respo",4,218,125.000000,575.000000,225.000000,625.000000,0.000000,"Timeout" \n "No Response"}; +item20[] = {"ERROR_Server_not",2,250,275.000000,875.000000,375.000000,925.000000,0.000000,"ERROR" \n "Server not" \n "Response"}; +item21[] = {"",7,210,471.000000,895.999939,479.000000,904.000061,0.000000,""}; +item22[] = {"Timeout_No_Respo",4,218,125.000000,775.000000,225.000000,825.000000,0.000000,"Timeout" \n "No Response"}; +item23[] = {"Wrong_Server_Ver",4,218,125.000000,475.000000,225.000000,525.000000,10.000000,"Wrong" \n "Server Version"}; +item24[] = {"true",8,218,-150.000000,1125.000000,-50.000000,1175.000000,0.000000,"true"}; +item25[] = {"ERROR_Wrong_Server",2,250,275.000000,475.000000,375.000000,525.000000,0.000000,"ERROR" \n "Wrong" \n "Server Version"}; +item26[] = {"Display_Message",4,218,600.000000,1150.000000,700.000000,1200.000000,0.000000,"" \n "Display Message" \n "Wait..."}; +item27[] = {"Setup_Player_Obj",2,250,-25.000000,975.000000,75.000000,1025.000000,0.000000,"Setup Player" \n "Object"}; +item28[] = {"Check_if_Player",4,218,750.000000,1225.000000,850.000000,1275.000000,0.000000,"Check if" \n "Player got Kicked"}; +item29[] = {"Preload_done",8,218,-150.000000,1425.000000,-50.000000,1475.000000,0.000000,"Preload" \n "done"}; +item30[] = {"",7,210,471.000000,796.000000,479.000000,804.000000,0.000000,""}; +item31[] = {"",7,210,471.000000,796.000000,479.000000,804.000000,0.000000,""}; +item32[] = {"true",8,218,425.000000,1075.000000,525.000000,1125.000000,0.000000,"true"}; +item33[] = {"Display_Message",2,250,600.000000,1075.000000,700.000000,1125.000000,0.000000,"Display" \n "Message"}; +item34[] = {"Server_Ready",4,218,-25.000000,300.000000,75.000000,350.000000,0.000000,"Server" \n "Ready"}; +item35[] = {"Check_Server",2,250,-25.000000,375.000000,75.000000,425.000000,0.000000,"Check Server"}; +item36[] = {"Server_not_worki",4,218,125.000000,375.000000,225.000000,425.000000,10.000000,"Server" \n "not working"}; +item37[] = {"ERROR_Server_not_1",2,250,275.000000,375.000000,375.000000,425.000000,0.000000,"ERROR" \n "Server not Ready"}; +item38[] = {"",7,210,471.000000,396.000000,479.000000,404.000000,0.000000,""}; +item39[] = {"Check_Server_1",2,250,-25.000000,225.000000,75.000000,275.000000,0.000000,"Check Server"}; +item40[] = {"Timeout_No_Respo",4,218,125.000000,225.000000,225.000000,275.000000,0.000000,"Timeout" \n "No Response"}; +item41[] = {"ERROR_Server_not_2",2,250,275.000000,225.000000,375.000000,275.000000,0.000000,"ERROR" \n "Server not Ready"}; +item42[] = {"",7,210,471.000000,246.000031,479.000000,253.999969,0.000000,""}; +item43[] = {"Reject_without_B",1,250,900.000000,1225.000000,1000.000000,1275.000000,0.000000,"Reject without" \n "BattlEye"}; +item44[] = {"true",8,218,-150.000000,-25.000000,-50.000000,25.000000,0.000000,"true"}; +item45[] = {"Arma_Version_Che",2,250,-25.000000,25.000000,75.000000,75.000000,0.000000,"Arma Version" \n "Check"}; +item46[] = {"Outdated_Version",4,218,125.000000,25.000000,225.000000,75.000000,10.000000,"Outdated" \n "Version"}; +item47[] = {"ERROR_Wrong_Version_1",2,250,275.000000,25.000000,375.000000,75.000000,0.000000,"ERROR" \n "Wrong Version" \n "ArmA"}; +item48[] = {"",7,210,471.000061,45.999908,478.999939,54.000092,0.000000,""}; +item49[] = {"new_player_____p",4,218,-150.000000,1025.000000,-50.000000,1075.000000,0.000000,"new player == " \n "player"}; +item50[] = {"Setup_EH_s_and_H",2,250,-25.000000,1175.000000,75.000000,1225.000000,0.000000,"Setup EH's" \n "and" \n "HitPoints"}; +item51[] = {"no_weapons",4,218,-25.000000,1275.000000,75.000000,1325.000000,0.000000,"no weapons"}; +item52[] = {"Process",2,250,-25.000000,1375.000000,75.000000,1425.000000,0.000000,"Process"}; +item53[] = {"Has_Current_Weap",4,218,100.000000,1175.000000,200.000000,1225.000000,10.000000,"Has" \n "Current" \n "Weapon"}; +item54[] = {"Find_Active_Weap",2,250,225.000000,1175.000000,325.000000,1225.000000,0.000000,"Find" \n "Active" \n "Weapon"}; +item55[] = {"Current_Weapon_Not",4,218,150.000000,1225.000000,250.000000,1275.000000,0.000000,"Current" \n "Weapon" \n "Not Selected"}; +item56[] = {"Current_Weapon_S",4,218,300.000000,1225.000000,400.000000,1275.000000,0.000000,"Current" \n "Weapon" \n "Selected"}; +item57[] = {"Select_Weapon",2,250,150.000000,1300.000000,250.000000,1350.000000,0.000000,"Select" \n "Weapon"}; +item58[] = {"true",8,218,225.000000,1375.000000,325.000000,1425.000000,0.000000,"true"}; +item59[] = {"Do_nothing",2,250,300.000000,1300.000000,400.000000,1350.000000,0.000000,"Do nothing"}; +item60[] = {"Check_New_Player",2,250,-25.000000,875.000000,75.000000,925.000000,0.000000,"Check" \n "New Player" \n "Setup"}; +item61[] = {"check_new__player",4,218,-150.000000,925.000000,-50.000000,975.000000,0.000000,"check new " \n "player not null"}; +item62[] = {"true",8,218,-150.000000,-325.000000,-50.000000,-275.000000,0.000000,"true"}; +item63[] = {"Process_1",2,250,-25.000000,-275.000000,75.000000,-225.000000,0.000000,"Process"}; +item64[] = {"Wait_ArmA_Loading",4,218,-150.000000,-225.000000,-50.000000,-175.000000,0.000000,"Wait ArmA" \n "Loading Screen" \n "Done"}; +item65[] = {"Start_Loading_Sc",2,250,-25.000000,-175.000000,75.000000,-125.000000,0.000000,"Start Loading" \n "Screen"}; +item66[] = {"freshServer",4,218,-325.000000,225.000000,-225.000000,275.000000,0.000000,"freshServer"}; +item67[] = {"Update_Loadingscreen",2,250,-325.000000,300.000000,-225.000000,350.000000,0.000000,"Update" \n "Loadingscreen" \n "Message"}; +item68[] = {"true",8,218,-150.000000,300.000000,-50.000000,350.000000,0.000000,"true"}; +item69[] = {"Timeout_",4,218,125.000000,975.000000,225.000000,1025.000000,0.000000,"" \n "Timeout" \n ""}; +item70[] = {"ERROR_Player_Setup",2,250,275.000000,975.000000,375.000000,1025.000000,0.000000,"ERROR" \n "Player Setup" \n "Invalid"}; +item71[] = {"",7,210,471.000000,996.000000,479.000000,1004.000000,0.000000,""}; +item72[] = {"Server_Version_C",2,250,-25.000000,475.000000,75.000000,525.000000,0.000000,"Server Version" \n "Check"}; +item73[] = {"Version_Okay",4,218,-125.000000,525.000000,-25.000000,575.000000,0.000000,"Version" \n "Okay"}; +item74[] = {"",7,210,471.000000,496.000000,479.000000,504.000000,0.000000,""}; +item75[] = {"ERROR_Server_not_3",2,250,275.000000,575.000000,375.000000,625.000000,0.000000,"ERROR" \n "Server not" \n "Response"}; +item76[] = {"",7,210,471.000000,596.000000,479.000000,604.000000,0.000000,""}; +item77[] = {"new_character",4,218,-250.000000,675.000000,-150.000000,725.000000,10.000000,"new" \n "character"}; +item78[] = {"Hive_Response",4,218,-125.000000,625.000000,-25.000000,675.000000,0.000000,"Hive" \n "Response"}; +item79[] = {"load_old_charact",4,218,-125.000000,725.000000,-25.000000,775.000000,0.000000,"load old" \n "character"}; +item80[] = {"Process_2",2,250,-25.000000,675.000000,75.000000,725.000000,0.000000,"Process"}; +item81[] = {"Open_Gender_Selection",2,250,-400.000000,675.000000,-300.000000,725.000000,0.000000,"Open Gender" \n "Selection Dialog"}; +item82[] = {"Reopen_when_client",4,218,-400.000000,600.000000,-300.000000,650.000000,0.000000,"Reopen" \n "when client hit" \n "escape"}; +item83[] = {"Gender_Selected",4,218,-450.000000,750.000000,-350.000000,800.000000,10.000000,"Gender" \n "Selected"}; +item84[] = {"Timeout",4,218,-350.000000,750.000000,-250.000000,800.000000,0.000000,"Timeout"}; +item85[] = {"Send_character_s",2,250,-400.000000,825.000000,-300.000000,875.000000,0.000000,"Send" \n "character" \n "selection"}; +item86[] = {"Process_3",2,250,-25.000000,775.000000,75.000000,825.000000,0.000000,"Process"}; +item87[] = {"ERROR_Server_not_4",2,250,275.000000,775.000000,375.000000,825.000000,0.000000,"ERROR" \n "Server not" \n "Response"}; +link0[] = {0,62}; +link1[] = {2,3}; +link2[] = {3,7}; +link3[] = {3,44}; +link4[] = {4,5}; +link5[] = {5,6}; +link6[] = {5,12}; +link7[] = {6,39}; +link8[] = {7,9}; +link9[] = {8,48}; +link10[] = {9,8}; +link11[] = {10,28}; +link12[] = {11,72}; +link13[] = {12,13}; +link14[] = {13,14}; +link15[] = {14,42}; +link16[] = {15,20}; +link17[] = {16,60}; +link18[] = {17,24}; +link19[] = {18,19}; +link20[] = {18,78}; +link21[] = {19,75}; +link22[] = {20,21}; +link23[] = {21,71}; +link24[] = {22,87}; +link25[] = {23,25}; +link26[] = {24,50}; +link27[] = {25,74}; +link28[] = {26,10}; +link29[] = {27,49}; +link30[] = {27,69}; +link31[] = {28,43}; +link32[] = {29,1}; +link33[] = {31,21}; +link34[] = {32,33}; +link35[] = {33,26}; +link36[] = {34,35}; +link37[] = {35,11}; +link38[] = {35,36}; +link39[] = {36,37}; +link40[] = {37,38}; +link41[] = {38,74}; +link42[] = {39,34}; +link43[] = {39,40}; +link44[] = {39,66}; +link45[] = {40,41}; +link46[] = {41,42}; +link47[] = {42,38}; +link48[] = {44,45}; +link49[] = {45,4}; +link50[] = {45,46}; +link51[] = {46,47}; +link52[] = {47,48}; +link53[] = {48,14}; +link54[] = {49,17}; +link55[] = {50,51}; +link56[] = {50,53}; +link57[] = {51,52}; +link58[] = {52,29}; +link59[] = {53,54}; +link60[] = {54,55}; +link61[] = {54,56}; +link62[] = {55,57}; +link63[] = {56,59}; +link64[] = {57,58}; +link65[] = {58,52}; +link66[] = {59,58}; +link67[] = {60,15}; +link68[] = {60,61}; +link69[] = {61,27}; +link70[] = {62,63}; +link71[] = {63,64}; +link72[] = {64,65}; +link73[] = {65,2}; +link74[] = {66,67}; +link75[] = {67,68}; +link76[] = {68,39}; +link77[] = {69,70}; +link78[] = {70,71}; +link79[] = {71,32}; +link80[] = {72,23}; +link81[] = {72,73}; +link82[] = {73,18}; +link83[] = {74,76}; +link84[] = {75,76}; +link85[] = {76,31}; +link86[] = {77,81}; +link87[] = {78,80}; +link88[] = {79,86}; +link89[] = {80,77}; +link90[] = {80,79}; +link91[] = {81,82}; +link92[] = {81,83}; +link93[] = {81,84}; +link94[] = {82,81}; +link95[] = {83,85}; +link96[] = {84,85}; +link97[] = {85,79}; +link98[] = {86,16}; +link99[] = {86,22}; +link100[] = {87,31}; +globals[] = {0.000000,0,0,0,0,640,480,1,244,6316128,1,-207.564026,582.257507,1932.771484,781.734619,586,854,1}; +window[] = {2,-1,-1,-1,-1,838,1706,2998,26,3,604}; +*//*%FSM*/ +class FSM +{ + fsmName = "Epoch Login"; + class States + { + /*%FSM*/ + class INIT + { + name = "INIT"; + init = /*%FSM*/"titleCut ["""", ""BLACK FADED"", 1337];" \n + "0 fadeSound 0;" \n + "player enableSimulation false;" \n + "" \n + "_debug = true;" \n + "_myTime = diag_tickTime;" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Init"";" \n + "};" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Process_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class FINISH + { + name = "FINISH"; + init = /*%FSM*/"[] spawn {" \n + " disableSerialization;" \n + " waitUntil{!isNull (findDisplay 46)};" \n + " _display = findDisplay 46;" \n + " {" \n + " _display displayAddEventHandler [_x,([""CfgEpochClient"", _x, """"] call EPOCH_fnc_returnConfigEntryV2)];" \n + " } forEach ([""CfgEpochClient"", ""displayAddEventHandler"", []] call EPOCH_fnc_returnConfigEntryV2);" \n + " " \n + " player switchMove """";" \n + "};" \n + "" \n + "3 fadeSound 1;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Finish!"";" \n + "};" \n + "" \n + "" \n + "" \n + "player enableSimulation true;" \n + "" \n + "titleCut ["""", ""BLACK IN"", 1];" \n + "1338 cutText ["""",""PLAIN"",0]; " \n + "" \n + "progressLoadingScreen 1.0;" \n + "" \n + "endLoadingScreen;" \n + "EPOCH_loadingScreenDone = true;" \n + "" \n + "hintSilent ""Worked"" "/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + }; + }; + /*%FSM*/ + /*%FSM*/ + class Version_Check + { + name = "Version_Check"; + init = /*%FSM*/"if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Version Check"";" \n + "};" \n + "" \n + "// SHOULD BE:" \n + "_epoch_assets0 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_assets"");" \n + "_epoch_assets1 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_assets_1"");" \n + "_epoch_assets2 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""epoch_objects"");" \n + "_epoch_assets3 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_assets_3"");" \n + "_epoch_config = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_config"");" \n + "_epoch_language = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_language"");" \n + "_epoch_underground = getText(configFile >> ""Epoch"" >> ""Version"" >> ""Underground_Epoch"");" \n + "_epoch_vehicles = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_vehicles"");" \n + "_epoch_weapons = getText(configFile >> ""Epoch"" >> ""Version"" >> ""a3_epoch_weapons"");" \n + "" \n + "" \n + "// IS:" \n + "_my_epoch_assets0 = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_assets"" >> ""epochVersion"");" \n + "_my_epoch_assets1 = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_assets_1"" >> ""epochVersion"");" \n + "_my_epoch_assets2 = getText(configFile >> ""CfgPatches"" >> ""epoch_objects"" >> ""epochVersion"");" \n + "_my_epoch_assets3 = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_assets_3"" >> ""epochVersion"");" \n + "_my_epoch_config = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_config"" >> ""epochVersion"");" \n + "_my_epoch_language = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_language"" >> ""epochVersion"");" \n + "_my_epoch_underground = getText(configFile >> ""CfgPatches"" >> ""Underground_Epoch"" >> ""epochVersion"");" \n + "_my_epoch_vehicles = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_vehicles"" >> ""epochVersion"");" \n + "_my_epoch_weapons = getText(configFile >> ""CfgPatches"" >> ""a3_epoch_weapons"" >> ""epochVersion"");" \n + "" \n + "progressLoadingScreen 0.1;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Wrong_Version + { + priority = 10.000000; + to="ERROR_Wrong_Version"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_epoch_assets0 != _epoch_assets0 ||" \n + "_my_epoch_assets1 != _epoch_assets1 ||" \n + "_my_epoch_assets2 != _epoch_assets2 ||" \n + "_my_epoch_assets3 != _epoch_assets3 ||" \n + "_my_epoch_config != _epoch_config ||" \n + "_my_epoch_language != _epoch_language ||" \n + "_my_epoch_underground != _epoch_underground ||" \n + "_my_epoch_vehicles != _epoch_vehicles ||" \n + "_my_epoch_weapons != _epoch_weapons"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class true + { + priority = 0.000000; + to="Arma_Version_Che"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_Player_UID + { + name = "Check_Player_UID"; + init = /*%FSM*/"if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Check PlayerUID"";" \n + "};" \n + "" \n + "_playerUID = getPlayerUID player;" \n + "" \n + "progressLoadingScreen 0.2;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class PlayerUID_Okay + { + priority = 10.000000; + to="Check_Server_1"; + precondition = /*%FSM*/"!isNil ""_playerUID"""/*%FSM*/; + condition=/*%FSM*/"_playerUID != """""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Empty_PlayerUID + { + priority = 0.000000; + to="ERROR_PlayerUID"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Wrong_Version + { + name = "ERROR_Wrong_Version"; + init = /*%FSM*/"_msg = ""You have an outdated version of Epoch"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_EPOCHVERSION = true;" \n + " publicVariableServer ""PLAYER_REJECT_EPOCHVERSION"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Disconnect + { + name = "Disconnect"; + init = /*%FSM*/"endLoadingScreen;" \n + "1338 cutText [_msg,""PLAIN"",0]; " \n + "deleteVehicle player;" \n + "call _rejectPlayer;" \n + "diag_log format [""(%1) %2"",diag_tickTime,_msg];" \n + "_myTime = diag_tickTime;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Check_if_Player + { + priority = 0.000000; + to="Reject_without_B"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 2"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_PlayerUID + { + name = "ERROR_PlayerUID"; + init = /*%FSM*/"_msg = ""Can not setup Player Object! (Error 01)"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_UID = true;" \n + " publicVariableServer ""PLAYER_REJECT_UID"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Setup_Player_Var + { + name = "Setup_Player_Var"; + init = /*%FSM*/"diag_log format[""DEBUG TIME WAITED: %1"", (diag_tickTime - _myTime)];" \n + "{" \n + " missionNamespace setVariable[(format[""EPOCH_player%1"", EPOCH_customVars select _forEachIndex]), _x];" \n + "} forEach _playerVariables;" \n + "" \n + """Loading Player Variables... Please wait!"" call Epoch_updateLoadingScreen;" \n + "" \n + "EPOCH_lastPlayerPos = getPosATL vehicle player;" \n + "" \n + "progressLoadingScreen 0.7;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Setup Player Variables"";" \n + "};" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Setup_EH_s_and_H"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Request_Hive + { + name = "Request_Hive"; + init = /*%FSM*/"_myTime = diag_tickTime;" \n + "" \n + "Epoch_my_Group = [];" \n + "" \n + "player remoteExec [""EPOCH_server_checkPlayer"",2];" \n + "" \n + "" \n + """Loading Player Data... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.5;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Hive_Response + { + priority = 0.000000; + to="Process_2"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_checkPlayer_PVC"""/*%FSM*/; + action=/*%FSM*/"_newChar = EPOCH_checkPlayer_PVC;" \n + "EPOCH_checkPlayer_PVC = nil;"/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not_3"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 120"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not + { + name = "ERROR_Server_not"; + init = /*%FSM*/"_msg = ""Authentication Failed, Disconnect and try again"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_NoResponse2 = true;" \n + " publicVariableServer ""PLAYER_REJECT_NoResponse2"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Wrong_Server + { + name = "ERROR_Wrong_Server"; + init = /*%FSM*/"_msg = format[""Server and Client running with different Version! (You: %1 // Server: %2)"",getText(configFile >> ""CfgMods"" >> ""Epoch"" >> ""version""),_serverVersion];" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_ServerVersion = true;" \n + " publicVariableServer ""PLAYER_REJECT_ServerVersion"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Setup_Player_Obj + { + name = "Setup_Player_Obj"; + init = /*%FSM*/"_ply = player;" \n + "_group = group player;" \n + "" \n + "player reveal _playerObject;" \n + "_playerPos = getposATL _playerObject;" \n + "" \n + "selectPlayer _playerObject;" \n + "" \n + "deleteVehicle _ply;" \n + "deleteGroup _group;" \n + "" \n + """Loading Player Body... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.8;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Setup Player Object"";" \n + "};" \n + "" \n + "_myTime = diag_tickTime;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Timeout_ + { + priority = 0.000000; + to="ERROR_Player_Setup"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 60"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class new_player_____p + { + priority = 0.000000; + to="Setup_Player_Var"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_playerObject == player"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Display_Message + { + name = "Display_Message"; + init = /*%FSM*/"[] spawn {" \n + " waitUntil{!isNull (findDisplay 46)};" \n + " (findDisplay 46) displayAddEventHandler [""KeyDown"",""true""];" \n + " (findDisplay 46) displayAddEventHandler [""KeyUp"",""true""];" \n + "};" \n + "diag_log format [""(%1) %2"",diag_tickTime,_msg];" \n + "_myTime = diag_tickTime;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Display_Message + { + priority = 0.000000; + to="Disconnect"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 10"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_Server + { + name = "Check_Server"; + init = /*%FSM*/"_myTime = diag_tickTime;" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Check Server"";" \n + "};" \n + """Checking Server... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.4;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Server_not_worki + { + priority = 10.000000; + to="ERROR_Server_not_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_BADHIVE""" \n + ""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Server_Okay + { + priority = 0.000000; + to="Server_Version_C"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""Epoch_ServerVersion"""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_1 + { + name = "ERROR_Server_not_1"; + init = /*%FSM*/"_msg = ""Server not Ready (Error 03)"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_NotReady2 = true;" \n + " publicVariableServer ""PLAYER_REJECT_NotReady2"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_Server_1 + { + name = "Check_Server_1"; + init = /*%FSM*/"progressLoadingScreen 0.3;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not_2"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 180"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class freshServer + { + priority = 0.000000; + to="Update_Loadingscreen"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"uiNamespace getVariable ['Epoch_freshServer', false]"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Server_Ready + { + priority = 0.000000; + to="Check_Server"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_SERVER"""/*%FSM*/; + action=/*%FSM*/"_serverUptime = EPOCH_SERVER;" \n + "EPOCH_SERVER = nil;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_2 + { + name = "ERROR_Server_not_2"; + init = /*%FSM*/"_msg = ""Server not Ready (Error 02)"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_NotReady1 = true;" \n + " publicVariableServer ""PLAYER_REJECT_NotReady1"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Reject_without_B + { + name = "Reject_without_B"; + init = /*%FSM*/"[] spawn {" \n + " waitUntil{!isNull (findDisplay 46)};" \n + " waitUntil {" \n + " (findDisplay 46) closeDisplay 0;" \n + " isNull (findDisplay 46)" \n + " };" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + }; + }; + /*%FSM*/ + /*%FSM*/ + class Arma_Version_Che + { + name = "Arma_Version_Che"; + init = /*%FSM*/"progressLoadingScreen 0.15;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Outdated_Version + { + priority = 10.000000; + to="ERROR_Wrong_Version_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"productVersion select 2 < getNumber(configFile >> ""CfgMods"" >> ""Epoch"" >> ""ArmAVersion"")"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Player_Object_Re + { + priority = 0.000000; + to="Check_Player_UID"; + precondition = /*%FSM*/"!isNull player"/*%FSM*/; + condition=/*%FSM*/"player == player"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Wrong_Version_1 + { + name = "ERROR_Wrong_Version_1"; + init = /*%FSM*/"_msg = ""You have an outdated version of ArmA 3"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_ARMAVERSION = true;" \n + " publicVariableServer ""PLAYER_REJECT_ARMAVERSION"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Setup_EH_s_and_H + { + name = "Setup_EH_s_and_H"; + init = /*%FSM*/"{" \n + " player addEventHandler [_x,([""CfgEpochClient"", _x, """"] call EPOCH_fnc_returnConfigEntryV2)];" \n + "} forEach ([""CfgEpochClient"", ""addEventHandler"", []] call EPOCH_fnc_returnConfigEntryV2);" \n + "" \n + "if (count EPOCH_playerHitPoints isEqualTo count ((getAllHitPointsDamage player) param [0,[]])) then {" \n + " {" \n + " player setHitIndex [_forEachIndex, _x];" \n + " }forEach EPOCH_playerHitPoints;" \n + "};" \n + "" \n + "[] spawn EPOCH_masterLoop;" \n + "true call EPOCH_fnc_Weather;" \n + "[5,100] spawn EPOCH_niteLight;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Setup EH's"";" \n + "};" \n + "" \n + """Loading... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.9;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Has_Current_Weap + { + priority = 10.000000; + to="Find_Active_Weap"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_currentWeapon != """""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class no_weapons + { + priority = 0.000000; + to="Process"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_currentWeapon == """""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process + { + name = "Process"; + init = /*%FSM*/"progressLoadingScreen 0.975;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Preload_done + { + priority = 0.000000; + to="FINISH"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"preloadCamera _playerPos"/*%FSM*/; + action=/*%FSM*/"call compile _playerGroupOnline;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Find_Active_Weap + { + name = "Find_Active_Weap"; + init = /*%FSM*/"_activeWeapon = currentWeapon player;" \n + "progressLoadingScreen 0.95;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Current_Weapon_S + { + priority = 0.000000; + to="Do_nothing"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_activeWeapon == _currentWeapon"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Current_Weapon_Not + { + priority = 0.000000; + to="Select_Weapon"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_activeWeapon != _currentWeapon"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Select_Weapon + { + name = "Select_Weapon"; + init = /*%FSM*/"_currentWeapon spawn {" \n + " uiSleep 1; " \n + " player selectWeapon _this;" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Process"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Do_nothing + { + name = "Do_nothing"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Process"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_New_Player + { + name = "Check_New_Player"; + init = /*%FSM*/"_myTime = diag_tickTime;" \n + "" \n + """Loading Player Inventory... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.6;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class check_new__player + { + priority = 0.000000; + to="Setup_Player_Obj"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!(isNull _playerObject) && {_playerObject getVariable [""SETUP"",false]}"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 120"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process_1 + { + name = "Process_1"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Wait_ArmA_Loading + { + priority = 0.000000; + to="Start_Loading_Sc"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"{!isnull _x} count ((uinamespace getvariable ""loading_displays"") - [finddisplay 18]) == 0"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Start_Loading_Sc + { + name = "Start_Loading_Sc"; + init = /*%FSM*/"startLoadingScreen ["""",""EpochLoadingScreen""];" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Start Loadingscreen"";" \n + "};" \n + """Starting Epoch... Please wait!"" call Epoch_updateLoadingScreen;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Version_Check"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Update_Loadingscreen + { + name = "Update_Loadingscreen"; + init = /*%FSM*/"uiNamespace setVariable ['Epoch_freshServer', false];" \n + "" \n + """Server initializing... Please wait!"" call Epoch_updateLoadingScreen;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Check_Server_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Player_Setup + { + name = "ERROR_Player_Setup"; + init = /*%FSM*/"_msg = ""Problem setting up player"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_InvaildSetup = true;" \n + " publicVariableServer ""PLAYER_REJECT_InvaildSetup"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Server_Version_C + { + name = "Server_Version_C"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Wrong_Server_Ver + { + priority = 10.000000; + to="ERROR_Wrong_Server"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"Epoch_ServerVersion != getText(configFile >> ""CfgMods"" >> ""Epoch"" >> ""version"")"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Version_Okay + { + priority = 0.000000; + to="Request_Hive"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_3 + { + name = "ERROR_Server_not_3"; + init = /*%FSM*/"_msg = ""Authentication Failed, Disconnect and try again"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_HiveNotResponse = true;" \n + " publicVariableServer ""PLAYER_REJECT_HiveNotResponse"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process_2 + { + name = "Process_2"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class new_character + { + priority = 10.000000; + to="Open_Gender_Selection"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_newChar"/*%FSM*/; + action=/*%FSM*/"endLoadingScreen;" \n + "_myGenderTime = diag_tickTime;"/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class load_old_charact + { + priority = 0.000000; + to="Process_3"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/"_myTime = diag_tickTime;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Open_Gender_Selection + { + name = "Open_Gender_Selection"; + init = /*%FSM*/"createdialog ""SelectGender"";"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Gender_Selected + { + priority = 10.000000; + to="Send_character_s"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_PlayerIsMale"""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Timeout + { + priority = 0.000000; + to="Send_character_s"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"((diag_tickTime - _myGenderTime) > 30)"/*%FSM*/; + action=/*%FSM*/"EPOCH_PlayerIsMale = true;" \n + "closeDialog 0;"/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Reopen_when_client + { + priority = 0.000000; + to="Open_Gender_Selection"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!dialog && isNil ""EPOCH_PlayerIsMale"""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Send_character_s + { + name = "Send_character_s"; + init = /*%FSM*/"startLoadingScreen ["""",""EpochLoadingScreen""];" \n + """Gender Selected... Please wait!"" call Epoch_updateLoadingScreen;" \n + "" \n + "[player,EPOCH_PlayerIsMale] remoteExec [""EPOCH_server_loadPlayer"",2];" \n + "EPOCH_PlayerIsMale = nil;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class load_old_charact + { + priority = 0.000000; + to="Process_3"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/"_myTime = diag_tickTime;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process_3 + { + name = "Process_3"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not_4"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 120"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Response + { + priority = 0.000000; + to="Check_New_Player"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_C_SET"""/*%FSM*/; + action=/*%FSM*/"_array = EPOCH_C_SET;" \n + "EPOCH_C_SET = nil;" \n + "_playerObject = _array deleteAt 0;" \n + "_playerVariables = _array deleteAt 0;" \n + "_currentWeapon = _array deleteAt 0;" \n + "_magCount = _array deleteAt 0;" \n + "Epoch_my_GroupUID = _array deleteAt 0;" \n + "Epoch_canBeRevived = _array deleteAt 0;" \n + "Epoch_personalToken = _array deleteAt 0;" \n + "reverse _serverUptime;" \n + "_serverUptime pushBack (_array deleteAt 0);" \n + "reverse _serverUptime;" \n + "_serverUptime call EPOCH_client_publicEH;" \n + "_playerGroupOnline = _array deleteAt 0;" \n + "" \n + ""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_4 + { + name = "ERROR_Server_not_4"; + init = /*%FSM*/"_msg = ""Authentication Failed, Disconnect and try again"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_HiveLoadChar = true;" \n + " publicVariableServer ""PLAYER_REJECT_HiveLoadChar"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + }; + initState="INIT"; + finalStates[] = + { + "FINISH", + "Reject_without_B", + }; +}; +/*%FSM*/ \ No newline at end of file diff --git a/Sources/mpmissions/epoch.Altis/description.ext b/Sources/mpmissions/epoch.Altis/description.ext index cfe65cba..8783e3aa 100644 --- a/Sources/mpmissions/epoch.Altis/description.ext +++ b/Sources/mpmissions/epoch.Altis/description.ext @@ -50,6 +50,7 @@ class cfgFunctions }; class postinit { + file = "init\fn_postinit.sqf"; postInit = 1; }; }; diff --git a/Sources/mpmissions/epoch.Altis/init/client_init.sqf b/Sources/mpmissions/epoch.Altis/init/client_init.sqf new file mode 100644 index 00000000..4a32e342 --- /dev/null +++ b/Sources/mpmissions/epoch.Altis/init/client_init.sqf @@ -0,0 +1,76 @@ +/* + 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: + https://github.com/EpochModTeam/Epoch/tree/master/Sources/epoch_code/init/client_init.sqf +*/ +//Variables +EPOCH_CraftingItem = ""; +EPOCH_ESP_TARGETS = []; +EPOCH_ESPMAP_TARGETS = []; +EPOCH_ESPGROUPS = []; +EPOCH_ESPGROUPCOLORS = []; +EPOCH_ESP_PLAYER = false; +EPOCH_ESP_VEHICLES = false; +EPOCH_ESP_VEHICLEPLAYER = []; +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"]; +if (isNil 'EPOCH_diag_fps') then { + EPOCH_diag_fps = 0; +}; +EPOCH_playerIsSwimming = false; +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 = []; +EPOCH_lastPlayerPos = [0,0,0]; +EPOCH_prevOffer = []; +EPOCH_drawIcon3d = false; +EPOCH_velTransform = false; +EPOCH_stabilityTarget = objNull; +EPOCH_currentVehicle = objNull; +EPOCH_currentTarget = objNull; +EPOCH_LootedBlds = []; +EPOCH_soundLevel = 1; +EPOCH_arr_interactedObjs = []; +EPOCH_buildOption = 0; +EPOCH_nearestLocations = []; +onEachFrame EPOCH_onEachFrame; + +EPOCH_LastAirDrop = time; +EPOCH_AirDropCheck = getNumber(missionConfigFile >> "CfgEpochAirDrop" >> "AirDropFreq"); +if(EPOCH_AirDropCheck < 120)then{EPOCH_AirDropCheck = 120;}; +EPOCH_AirDropChance = getNumber(missionConfigFile >> "CfgEpochAirDrop" >> "AirDropChance"); +if(EPOCH_AirDropChance < 0)then{EPOCH_AirDropChance = 101;EPOCH_AirDropCheck = 99999;}; + +EPOCH_droneRndChance = 100; + +// Custom Keys +EPOCH_keysActionPressed = false; //prevents EH spam +0 call EPOCH_clientKeyMap; + +//ON INIT and RESPAWN +call EPOCH_clientInit; + +[] execFSM "\x\addons\a3_epoch_code\system\SPVEH.fsm"; +[] execFSM "system\player_login.fsm"; + +true diff --git a/Sources/mpmissions/epoch.Altis/init/fn_postinit.sqf b/Sources/mpmissions/epoch.Altis/init/fn_postinit.sqf new file mode 100644 index 00000000..8be5aa09 --- /dev/null +++ b/Sources/mpmissions/epoch.Altis/init/fn_postinit.sqf @@ -0,0 +1,18 @@ +/* + Author: Aaron Clark - EpochMod.com + + Contributors: + + Description: + Initalize Player + + 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/master/Sources/epoch_code/init/fn_postinit.sqf +*/ +if (!isDedicated && isMultiplayer && hasInterface) then { + call compile preprocessFileLineNumbers "init\client_init.sqf"; +}; +true diff --git a/Sources/mpmissions/epoch.Australia/System/player_login.fsm b/Sources/mpmissions/epoch.Australia/System/player_login.fsm new file mode 100644 index 00000000..9426567f --- /dev/null +++ b/Sources/mpmissions/epoch.Australia/System/player_login.fsm @@ -0,0 +1,1398 @@ +/*%FSM*/ +/*%FSM*/ +/* +item0[] = {"INIT",0,250,-25.000000,-375.000000,75.000000,-325.000000,0.000000,"INIT"}; +item1[] = {"FINISH",1,4346,-25.000000,1475.000000,75.000000,1525.000000,0.000000,"FINISH"}; +item2[] = {"true",8,218,-150.000000,-125.000000,-50.000000,-75.000000,0.000000,"true"}; +item3[] = {"Version_Check",2,250,-25.000000,-75.000000,75.000000,-25.000000,0.000000,"Version Check"}; +item4[] = {"Player_Object_Re",4,218,-150.000000,75.000000,-50.000000,125.000000,0.000000,"Player" \n "Object Ready"}; +item5[] = {"Check_Player_UID",2,250,-25.000000,125.000000,75.000000,175.000000,0.000000,"Check Player UID"}; +item6[] = {"PlayerUID_Okay",4,218,-150.000000,175.000000,-50.000000,225.000000,10.000000,"PlayerUID" \n "Okay"}; +item7[] = {"Wrong_Version",4,218,125.000000,-75.000000,225.000000,-25.000000,10.000000,"Wrong" \n "Version"}; +item8[] = {"",7,210,471.000061,-54.000099,478.999939,-45.999901,0.000000,""}; +item9[] = {"ERROR_Wrong_Version",2,250,275.000000,-75.000000,375.000000,-25.000000,0.000000,"ERROR" \n "Wrong Version" \n "Epoch"}; +item10[] = {"Disconnect",2,250,600.000000,1225.000000,700.000000,1275.000000,0.000000,"Disconnect"}; +item11[] = {"Server_Okay",4,218,-125.000000,425.000000,-25.000000,475.000000,0.000000,"Server" \n "Okay"}; +item12[] = {"Empty_PlayerUID",4,218,125.000000,125.000000,225.000000,175.000000,0.000000,"Empty" \n "PlayerUID"}; +item13[] = {"ERROR_PlayerUID",2,250,275.000000,125.000000,375.000000,175.000000,0.000000,"ERROR" \n "PlayerUID Empty"}; +item14[] = {"",7,210,471.000061,145.999908,478.999939,154.000092,0.000000,""}; +item15[] = {"Timeout_No_Respo",4,218,125.000000,875.000000,225.000000,925.000000,0.000000,"Timeout" \n "No Response"}; +item16[] = {"Response",4,218,-150.000000,825.000000,-50.000000,875.000000,0.000000,"Response"}; +item17[] = {"Setup_Player_Var",2,250,-25.000000,1075.000000,75.000000,1125.000000,0.000000,"Setup Player" \n "Variables"}; +item18[] = {"Request_Hive",2,250,-25.000000,575.000000,75.000000,625.000000,0.000000,"Request Hive"}; +item19[] = {"Timeout_No_Respo",4,218,125.000000,575.000000,225.000000,625.000000,0.000000,"Timeout" \n "No Response"}; +item20[] = {"ERROR_Server_not",2,250,275.000000,875.000000,375.000000,925.000000,0.000000,"ERROR" \n "Server not" \n "Response"}; +item21[] = {"",7,210,471.000000,895.999939,479.000000,904.000061,0.000000,""}; +item22[] = {"Timeout_No_Respo",4,218,125.000000,775.000000,225.000000,825.000000,0.000000,"Timeout" \n "No Response"}; +item23[] = {"Wrong_Server_Ver",4,218,125.000000,475.000000,225.000000,525.000000,10.000000,"Wrong" \n "Server Version"}; +item24[] = {"true",8,218,-150.000000,1125.000000,-50.000000,1175.000000,0.000000,"true"}; +item25[] = {"ERROR_Wrong_Server",2,250,275.000000,475.000000,375.000000,525.000000,0.000000,"ERROR" \n "Wrong" \n "Server Version"}; +item26[] = {"Display_Message",4,218,600.000000,1150.000000,700.000000,1200.000000,0.000000,"" \n "Display Message" \n "Wait..."}; +item27[] = {"Setup_Player_Obj",2,250,-25.000000,975.000000,75.000000,1025.000000,0.000000,"Setup Player" \n "Object"}; +item28[] = {"Check_if_Player",4,218,750.000000,1225.000000,850.000000,1275.000000,0.000000,"Check if" \n "Player got Kicked"}; +item29[] = {"Preload_done",8,218,-150.000000,1425.000000,-50.000000,1475.000000,0.000000,"Preload" \n "done"}; +item30[] = {"",7,210,471.000000,796.000000,479.000000,804.000000,0.000000,""}; +item31[] = {"",7,210,471.000000,796.000000,479.000000,804.000000,0.000000,""}; +item32[] = {"true",8,218,425.000000,1075.000000,525.000000,1125.000000,0.000000,"true"}; +item33[] = {"Display_Message",2,250,600.000000,1075.000000,700.000000,1125.000000,0.000000,"Display" \n "Message"}; +item34[] = {"Server_Ready",4,218,-25.000000,300.000000,75.000000,350.000000,0.000000,"Server" \n "Ready"}; +item35[] = {"Check_Server",2,250,-25.000000,375.000000,75.000000,425.000000,0.000000,"Check Server"}; +item36[] = {"Server_not_worki",4,218,125.000000,375.000000,225.000000,425.000000,10.000000,"Server" \n "not working"}; +item37[] = {"ERROR_Server_not_1",2,250,275.000000,375.000000,375.000000,425.000000,0.000000,"ERROR" \n "Server not Ready"}; +item38[] = {"",7,210,471.000000,396.000000,479.000000,404.000000,0.000000,""}; +item39[] = {"Check_Server_1",2,250,-25.000000,225.000000,75.000000,275.000000,0.000000,"Check Server"}; +item40[] = {"Timeout_No_Respo",4,218,125.000000,225.000000,225.000000,275.000000,0.000000,"Timeout" \n "No Response"}; +item41[] = {"ERROR_Server_not_2",2,250,275.000000,225.000000,375.000000,275.000000,0.000000,"ERROR" \n "Server not Ready"}; +item42[] = {"",7,210,471.000000,246.000031,479.000000,253.999969,0.000000,""}; +item43[] = {"Reject_without_B",1,250,900.000000,1225.000000,1000.000000,1275.000000,0.000000,"Reject without" \n "BattlEye"}; +item44[] = {"true",8,218,-150.000000,-25.000000,-50.000000,25.000000,0.000000,"true"}; +item45[] = {"Arma_Version_Che",2,250,-25.000000,25.000000,75.000000,75.000000,0.000000,"Arma Version" \n "Check"}; +item46[] = {"Outdated_Version",4,218,125.000000,25.000000,225.000000,75.000000,10.000000,"Outdated" \n "Version"}; +item47[] = {"ERROR_Wrong_Version_1",2,250,275.000000,25.000000,375.000000,75.000000,0.000000,"ERROR" \n "Wrong Version" \n "ArmA"}; +item48[] = {"",7,210,471.000061,45.999908,478.999939,54.000092,0.000000,""}; +item49[] = {"new_player_____p",4,218,-150.000000,1025.000000,-50.000000,1075.000000,0.000000,"new player == " \n "player"}; +item50[] = {"Setup_EH_s_and_H",2,250,-25.000000,1175.000000,75.000000,1225.000000,0.000000,"Setup EH's" \n "and" \n "HitPoints"}; +item51[] = {"no_weapons",4,218,-25.000000,1275.000000,75.000000,1325.000000,0.000000,"no weapons"}; +item52[] = {"Process",2,250,-25.000000,1375.000000,75.000000,1425.000000,0.000000,"Process"}; +item53[] = {"Has_Current_Weap",4,218,100.000000,1175.000000,200.000000,1225.000000,10.000000,"Has" \n "Current" \n "Weapon"}; +item54[] = {"Find_Active_Weap",2,250,225.000000,1175.000000,325.000000,1225.000000,0.000000,"Find" \n "Active" \n "Weapon"}; +item55[] = {"Current_Weapon_Not",4,218,150.000000,1225.000000,250.000000,1275.000000,0.000000,"Current" \n "Weapon" \n "Not Selected"}; +item56[] = {"Current_Weapon_S",4,218,300.000000,1225.000000,400.000000,1275.000000,0.000000,"Current" \n "Weapon" \n "Selected"}; +item57[] = {"Select_Weapon",2,250,150.000000,1300.000000,250.000000,1350.000000,0.000000,"Select" \n "Weapon"}; +item58[] = {"true",8,218,225.000000,1375.000000,325.000000,1425.000000,0.000000,"true"}; +item59[] = {"Do_nothing",2,250,300.000000,1300.000000,400.000000,1350.000000,0.000000,"Do nothing"}; +item60[] = {"Check_New_Player",2,250,-25.000000,875.000000,75.000000,925.000000,0.000000,"Check" \n "New Player" \n "Setup"}; +item61[] = {"check_new__player",4,218,-150.000000,925.000000,-50.000000,975.000000,0.000000,"check new " \n "player not null"}; +item62[] = {"true",8,218,-150.000000,-325.000000,-50.000000,-275.000000,0.000000,"true"}; +item63[] = {"Process_1",2,250,-25.000000,-275.000000,75.000000,-225.000000,0.000000,"Process"}; +item64[] = {"Wait_ArmA_Loading",4,218,-150.000000,-225.000000,-50.000000,-175.000000,0.000000,"Wait ArmA" \n "Loading Screen" \n "Done"}; +item65[] = {"Start_Loading_Sc",2,250,-25.000000,-175.000000,75.000000,-125.000000,0.000000,"Start Loading" \n "Screen"}; +item66[] = {"freshServer",4,218,-325.000000,225.000000,-225.000000,275.000000,0.000000,"freshServer"}; +item67[] = {"Update_Loadingscreen",2,250,-325.000000,300.000000,-225.000000,350.000000,0.000000,"Update" \n "Loadingscreen" \n "Message"}; +item68[] = {"true",8,218,-150.000000,300.000000,-50.000000,350.000000,0.000000,"true"}; +item69[] = {"Timeout_",4,218,125.000000,975.000000,225.000000,1025.000000,0.000000,"" \n "Timeout" \n ""}; +item70[] = {"ERROR_Player_Setup",2,250,275.000000,975.000000,375.000000,1025.000000,0.000000,"ERROR" \n "Player Setup" \n "Invalid"}; +item71[] = {"",7,210,471.000000,996.000000,479.000000,1004.000000,0.000000,""}; +item72[] = {"Server_Version_C",2,250,-25.000000,475.000000,75.000000,525.000000,0.000000,"Server Version" \n "Check"}; +item73[] = {"Version_Okay",4,218,-125.000000,525.000000,-25.000000,575.000000,0.000000,"Version" \n "Okay"}; +item74[] = {"",7,210,471.000000,496.000000,479.000000,504.000000,0.000000,""}; +item75[] = {"ERROR_Server_not_3",2,250,275.000000,575.000000,375.000000,625.000000,0.000000,"ERROR" \n "Server not" \n "Response"}; +item76[] = {"",7,210,471.000000,596.000000,479.000000,604.000000,0.000000,""}; +item77[] = {"new_character",4,218,-250.000000,675.000000,-150.000000,725.000000,10.000000,"new" \n "character"}; +item78[] = {"Hive_Response",4,218,-125.000000,625.000000,-25.000000,675.000000,0.000000,"Hive" \n "Response"}; +item79[] = {"load_old_charact",4,218,-125.000000,725.000000,-25.000000,775.000000,0.000000,"load old" \n "character"}; +item80[] = {"Process_2",2,250,-25.000000,675.000000,75.000000,725.000000,0.000000,"Process"}; +item81[] = {"Open_Gender_Selection",2,250,-400.000000,675.000000,-300.000000,725.000000,0.000000,"Open Gender" \n "Selection Dialog"}; +item82[] = {"Reopen_when_client",4,218,-400.000000,600.000000,-300.000000,650.000000,0.000000,"Reopen" \n "when client hit" \n "escape"}; +item83[] = {"Gender_Selected",4,218,-450.000000,750.000000,-350.000000,800.000000,10.000000,"Gender" \n "Selected"}; +item84[] = {"Timeout",4,218,-350.000000,750.000000,-250.000000,800.000000,0.000000,"Timeout"}; +item85[] = {"Send_character_s",2,250,-400.000000,825.000000,-300.000000,875.000000,0.000000,"Send" \n "character" \n "selection"}; +item86[] = {"Process_3",2,250,-25.000000,775.000000,75.000000,825.000000,0.000000,"Process"}; +item87[] = {"ERROR_Server_not_4",2,250,275.000000,775.000000,375.000000,825.000000,0.000000,"ERROR" \n "Server not" \n "Response"}; +link0[] = {0,62}; +link1[] = {2,3}; +link2[] = {3,7}; +link3[] = {3,44}; +link4[] = {4,5}; +link5[] = {5,6}; +link6[] = {5,12}; +link7[] = {6,39}; +link8[] = {7,9}; +link9[] = {8,48}; +link10[] = {9,8}; +link11[] = {10,28}; +link12[] = {11,72}; +link13[] = {12,13}; +link14[] = {13,14}; +link15[] = {14,42}; +link16[] = {15,20}; +link17[] = {16,60}; +link18[] = {17,24}; +link19[] = {18,19}; +link20[] = {18,78}; +link21[] = {19,75}; +link22[] = {20,21}; +link23[] = {21,71}; +link24[] = {22,87}; +link25[] = {23,25}; +link26[] = {24,50}; +link27[] = {25,74}; +link28[] = {26,10}; +link29[] = {27,49}; +link30[] = {27,69}; +link31[] = {28,43}; +link32[] = {29,1}; +link33[] = {31,21}; +link34[] = {32,33}; +link35[] = {33,26}; +link36[] = {34,35}; +link37[] = {35,11}; +link38[] = {35,36}; +link39[] = {36,37}; +link40[] = {37,38}; +link41[] = {38,74}; +link42[] = {39,34}; +link43[] = {39,40}; +link44[] = {39,66}; +link45[] = {40,41}; +link46[] = {41,42}; +link47[] = {42,38}; +link48[] = {44,45}; +link49[] = {45,4}; +link50[] = {45,46}; +link51[] = {46,47}; +link52[] = {47,48}; +link53[] = {48,14}; +link54[] = {49,17}; +link55[] = {50,51}; +link56[] = {50,53}; +link57[] = {51,52}; +link58[] = {52,29}; +link59[] = {53,54}; +link60[] = {54,55}; +link61[] = {54,56}; +link62[] = {55,57}; +link63[] = {56,59}; +link64[] = {57,58}; +link65[] = {58,52}; +link66[] = {59,58}; +link67[] = {60,15}; +link68[] = {60,61}; +link69[] = {61,27}; +link70[] = {62,63}; +link71[] = {63,64}; +link72[] = {64,65}; +link73[] = {65,2}; +link74[] = {66,67}; +link75[] = {67,68}; +link76[] = {68,39}; +link77[] = {69,70}; +link78[] = {70,71}; +link79[] = {71,32}; +link80[] = {72,23}; +link81[] = {72,73}; +link82[] = {73,18}; +link83[] = {74,76}; +link84[] = {75,76}; +link85[] = {76,31}; +link86[] = {77,81}; +link87[] = {78,80}; +link88[] = {79,86}; +link89[] = {80,77}; +link90[] = {80,79}; +link91[] = {81,82}; +link92[] = {81,83}; +link93[] = {81,84}; +link94[] = {82,81}; +link95[] = {83,85}; +link96[] = {84,85}; +link97[] = {85,79}; +link98[] = {86,16}; +link99[] = {86,22}; +link100[] = {87,31}; +globals[] = {0.000000,0,0,0,0,640,480,1,244,6316128,1,-207.564026,582.257507,1932.771484,781.734619,586,854,1}; +window[] = {2,-1,-1,-1,-1,838,1706,2998,26,3,604}; +*//*%FSM*/ +class FSM +{ + fsmName = "Epoch Login"; + class States + { + /*%FSM*/ + class INIT + { + name = "INIT"; + init = /*%FSM*/"titleCut ["""", ""BLACK FADED"", 1337];" \n + "0 fadeSound 0;" \n + "player enableSimulation false;" \n + "" \n + "_debug = true;" \n + "_myTime = diag_tickTime;" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Init"";" \n + "};" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Process_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class FINISH + { + name = "FINISH"; + init = /*%FSM*/"[] spawn {" \n + " disableSerialization;" \n + " waitUntil{!isNull (findDisplay 46)};" \n + " _display = findDisplay 46;" \n + " {" \n + " _display displayAddEventHandler [_x,([""CfgEpochClient"", _x, """"] call EPOCH_fnc_returnConfigEntryV2)];" \n + " } forEach ([""CfgEpochClient"", ""displayAddEventHandler"", []] call EPOCH_fnc_returnConfigEntryV2);" \n + " " \n + " player switchMove """";" \n + "};" \n + "" \n + "3 fadeSound 1;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Finish!"";" \n + "};" \n + "" \n + "" \n + "" \n + "player enableSimulation true;" \n + "" \n + "titleCut ["""", ""BLACK IN"", 1];" \n + "1338 cutText ["""",""PLAIN"",0]; " \n + "" \n + "progressLoadingScreen 1.0;" \n + "" \n + "endLoadingScreen;" \n + "EPOCH_loadingScreenDone = true;" \n + "" \n + "hintSilent ""Worked"" "/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + }; + }; + /*%FSM*/ + /*%FSM*/ + class Version_Check + { + name = "Version_Check"; + init = /*%FSM*/"if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Version Check"";" \n + "};" \n + "" \n + "// SHOULD BE:" \n + "_epoch_assets0 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_assets"");" \n + "_epoch_assets1 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_assets_1"");" \n + "_epoch_assets2 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""epoch_objects"");" \n + "_epoch_assets3 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_assets_3"");" \n + "_epoch_config = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_config"");" \n + "_epoch_language = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_language"");" \n + "_epoch_underground = getText(configFile >> ""Epoch"" >> ""Version"" >> ""Underground_Epoch"");" \n + "_epoch_vehicles = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_vehicles"");" \n + "_epoch_weapons = getText(configFile >> ""Epoch"" >> ""Version"" >> ""a3_epoch_weapons"");" \n + "" \n + "" \n + "// IS:" \n + "_my_epoch_assets0 = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_assets"" >> ""epochVersion"");" \n + "_my_epoch_assets1 = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_assets_1"" >> ""epochVersion"");" \n + "_my_epoch_assets2 = getText(configFile >> ""CfgPatches"" >> ""epoch_objects"" >> ""epochVersion"");" \n + "_my_epoch_assets3 = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_assets_3"" >> ""epochVersion"");" \n + "_my_epoch_config = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_config"" >> ""epochVersion"");" \n + "_my_epoch_language = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_language"" >> ""epochVersion"");" \n + "_my_epoch_underground = getText(configFile >> ""CfgPatches"" >> ""Underground_Epoch"" >> ""epochVersion"");" \n + "_my_epoch_vehicles = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_vehicles"" >> ""epochVersion"");" \n + "_my_epoch_weapons = getText(configFile >> ""CfgPatches"" >> ""a3_epoch_weapons"" >> ""epochVersion"");" \n + "" \n + "progressLoadingScreen 0.1;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Wrong_Version + { + priority = 10.000000; + to="ERROR_Wrong_Version"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_epoch_assets0 != _epoch_assets0 ||" \n + "_my_epoch_assets1 != _epoch_assets1 ||" \n + "_my_epoch_assets2 != _epoch_assets2 ||" \n + "_my_epoch_assets3 != _epoch_assets3 ||" \n + "_my_epoch_config != _epoch_config ||" \n + "_my_epoch_language != _epoch_language ||" \n + "_my_epoch_underground != _epoch_underground ||" \n + "_my_epoch_vehicles != _epoch_vehicles ||" \n + "_my_epoch_weapons != _epoch_weapons"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class true + { + priority = 0.000000; + to="Arma_Version_Che"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_Player_UID + { + name = "Check_Player_UID"; + init = /*%FSM*/"if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Check PlayerUID"";" \n + "};" \n + "" \n + "_playerUID = getPlayerUID player;" \n + "" \n + "progressLoadingScreen 0.2;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class PlayerUID_Okay + { + priority = 10.000000; + to="Check_Server_1"; + precondition = /*%FSM*/"!isNil ""_playerUID"""/*%FSM*/; + condition=/*%FSM*/"_playerUID != """""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Empty_PlayerUID + { + priority = 0.000000; + to="ERROR_PlayerUID"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Wrong_Version + { + name = "ERROR_Wrong_Version"; + init = /*%FSM*/"_msg = ""You have an outdated version of Epoch"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_EPOCHVERSION = true;" \n + " publicVariableServer ""PLAYER_REJECT_EPOCHVERSION"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Disconnect + { + name = "Disconnect"; + init = /*%FSM*/"endLoadingScreen;" \n + "1338 cutText [_msg,""PLAIN"",0]; " \n + "deleteVehicle player;" \n + "call _rejectPlayer;" \n + "diag_log format [""(%1) %2"",diag_tickTime,_msg];" \n + "_myTime = diag_tickTime;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Check_if_Player + { + priority = 0.000000; + to="Reject_without_B"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 2"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_PlayerUID + { + name = "ERROR_PlayerUID"; + init = /*%FSM*/"_msg = ""Can not setup Player Object! (Error 01)"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_UID = true;" \n + " publicVariableServer ""PLAYER_REJECT_UID"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Setup_Player_Var + { + name = "Setup_Player_Var"; + init = /*%FSM*/"diag_log format[""DEBUG TIME WAITED: %1"", (diag_tickTime - _myTime)];" \n + "{" \n + " missionNamespace setVariable[(format[""EPOCH_player%1"", EPOCH_customVars select _forEachIndex]), _x];" \n + "} forEach _playerVariables;" \n + "" \n + """Loading Player Variables... Please wait!"" call Epoch_updateLoadingScreen;" \n + "" \n + "EPOCH_lastPlayerPos = getPosATL vehicle player;" \n + "" \n + "progressLoadingScreen 0.7;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Setup Player Variables"";" \n + "};" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Setup_EH_s_and_H"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Request_Hive + { + name = "Request_Hive"; + init = /*%FSM*/"_myTime = diag_tickTime;" \n + "" \n + "Epoch_my_Group = [];" \n + "" \n + "player remoteExec [""EPOCH_server_checkPlayer"",2];" \n + "" \n + "" \n + """Loading Player Data... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.5;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Hive_Response + { + priority = 0.000000; + to="Process_2"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_checkPlayer_PVC"""/*%FSM*/; + action=/*%FSM*/"_newChar = EPOCH_checkPlayer_PVC;" \n + "EPOCH_checkPlayer_PVC = nil;"/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not_3"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 120"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not + { + name = "ERROR_Server_not"; + init = /*%FSM*/"_msg = ""Authentication Failed, Disconnect and try again"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_NoResponse2 = true;" \n + " publicVariableServer ""PLAYER_REJECT_NoResponse2"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Wrong_Server + { + name = "ERROR_Wrong_Server"; + init = /*%FSM*/"_msg = format[""Server and Client running with different Version! (You: %1 // Server: %2)"",getText(configFile >> ""CfgMods"" >> ""Epoch"" >> ""version""),_serverVersion];" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_ServerVersion = true;" \n + " publicVariableServer ""PLAYER_REJECT_ServerVersion"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Setup_Player_Obj + { + name = "Setup_Player_Obj"; + init = /*%FSM*/"_ply = player;" \n + "_group = group player;" \n + "" \n + "player reveal _playerObject;" \n + "_playerPos = getposATL _playerObject;" \n + "" \n + "selectPlayer _playerObject;" \n + "" \n + "deleteVehicle _ply;" \n + "deleteGroup _group;" \n + "" \n + """Loading Player Body... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.8;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Setup Player Object"";" \n + "};" \n + "" \n + "_myTime = diag_tickTime;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Timeout_ + { + priority = 0.000000; + to="ERROR_Player_Setup"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 60"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class new_player_____p + { + priority = 0.000000; + to="Setup_Player_Var"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_playerObject == player"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Display_Message + { + name = "Display_Message"; + init = /*%FSM*/"[] spawn {" \n + " waitUntil{!isNull (findDisplay 46)};" \n + " (findDisplay 46) displayAddEventHandler [""KeyDown"",""true""];" \n + " (findDisplay 46) displayAddEventHandler [""KeyUp"",""true""];" \n + "};" \n + "diag_log format [""(%1) %2"",diag_tickTime,_msg];" \n + "_myTime = diag_tickTime;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Display_Message + { + priority = 0.000000; + to="Disconnect"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 10"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_Server + { + name = "Check_Server"; + init = /*%FSM*/"_myTime = diag_tickTime;" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Check Server"";" \n + "};" \n + """Checking Server... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.4;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Server_not_worki + { + priority = 10.000000; + to="ERROR_Server_not_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_BADHIVE""" \n + ""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Server_Okay + { + priority = 0.000000; + to="Server_Version_C"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""Epoch_ServerVersion"""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_1 + { + name = "ERROR_Server_not_1"; + init = /*%FSM*/"_msg = ""Server not Ready (Error 03)"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_NotReady2 = true;" \n + " publicVariableServer ""PLAYER_REJECT_NotReady2"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_Server_1 + { + name = "Check_Server_1"; + init = /*%FSM*/"progressLoadingScreen 0.3;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not_2"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 180"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class freshServer + { + priority = 0.000000; + to="Update_Loadingscreen"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"uiNamespace getVariable ['Epoch_freshServer', false]"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Server_Ready + { + priority = 0.000000; + to="Check_Server"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_SERVER"""/*%FSM*/; + action=/*%FSM*/"_serverUptime = EPOCH_SERVER;" \n + "EPOCH_SERVER = nil;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_2 + { + name = "ERROR_Server_not_2"; + init = /*%FSM*/"_msg = ""Server not Ready (Error 02)"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_NotReady1 = true;" \n + " publicVariableServer ""PLAYER_REJECT_NotReady1"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Reject_without_B + { + name = "Reject_without_B"; + init = /*%FSM*/"[] spawn {" \n + " waitUntil{!isNull (findDisplay 46)};" \n + " waitUntil {" \n + " (findDisplay 46) closeDisplay 0;" \n + " isNull (findDisplay 46)" \n + " };" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + }; + }; + /*%FSM*/ + /*%FSM*/ + class Arma_Version_Che + { + name = "Arma_Version_Che"; + init = /*%FSM*/"progressLoadingScreen 0.15;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Outdated_Version + { + priority = 10.000000; + to="ERROR_Wrong_Version_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"productVersion select 2 < getNumber(configFile >> ""CfgMods"" >> ""Epoch"" >> ""ArmAVersion"")"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Player_Object_Re + { + priority = 0.000000; + to="Check_Player_UID"; + precondition = /*%FSM*/"!isNull player"/*%FSM*/; + condition=/*%FSM*/"player == player"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Wrong_Version_1 + { + name = "ERROR_Wrong_Version_1"; + init = /*%FSM*/"_msg = ""You have an outdated version of ArmA 3"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_ARMAVERSION = true;" \n + " publicVariableServer ""PLAYER_REJECT_ARMAVERSION"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Setup_EH_s_and_H + { + name = "Setup_EH_s_and_H"; + init = /*%FSM*/"{" \n + " player addEventHandler [_x,([""CfgEpochClient"", _x, """"] call EPOCH_fnc_returnConfigEntryV2)];" \n + "} forEach ([""CfgEpochClient"", ""addEventHandler"", []] call EPOCH_fnc_returnConfigEntryV2);" \n + "" \n + "if (count EPOCH_playerHitPoints isEqualTo count ((getAllHitPointsDamage player) param [0,[]])) then {" \n + " {" \n + " player setHitIndex [_forEachIndex, _x];" \n + " }forEach EPOCH_playerHitPoints;" \n + "};" \n + "" \n + "[] spawn EPOCH_masterLoop;" \n + "true call EPOCH_fnc_Weather;" \n + "[5,100] spawn EPOCH_niteLight;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Setup EH's"";" \n + "};" \n + "" \n + """Loading... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.9;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Has_Current_Weap + { + priority = 10.000000; + to="Find_Active_Weap"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_currentWeapon != """""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class no_weapons + { + priority = 0.000000; + to="Process"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_currentWeapon == """""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process + { + name = "Process"; + init = /*%FSM*/"progressLoadingScreen 0.975;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Preload_done + { + priority = 0.000000; + to="FINISH"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"preloadCamera _playerPos"/*%FSM*/; + action=/*%FSM*/"call compile _playerGroupOnline;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Find_Active_Weap + { + name = "Find_Active_Weap"; + init = /*%FSM*/"_activeWeapon = currentWeapon player;" \n + "progressLoadingScreen 0.95;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Current_Weapon_S + { + priority = 0.000000; + to="Do_nothing"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_activeWeapon == _currentWeapon"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Current_Weapon_Not + { + priority = 0.000000; + to="Select_Weapon"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_activeWeapon != _currentWeapon"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Select_Weapon + { + name = "Select_Weapon"; + init = /*%FSM*/"_currentWeapon spawn {" \n + " uiSleep 1; " \n + " player selectWeapon _this;" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Process"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Do_nothing + { + name = "Do_nothing"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Process"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_New_Player + { + name = "Check_New_Player"; + init = /*%FSM*/"_myTime = diag_tickTime;" \n + "" \n + """Loading Player Inventory... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.6;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class check_new__player + { + priority = 0.000000; + to="Setup_Player_Obj"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!(isNull _playerObject) && {_playerObject getVariable [""SETUP"",false]}"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 120"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process_1 + { + name = "Process_1"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Wait_ArmA_Loading + { + priority = 0.000000; + to="Start_Loading_Sc"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"{!isnull _x} count ((uinamespace getvariable ""loading_displays"") - [finddisplay 18]) == 0"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Start_Loading_Sc + { + name = "Start_Loading_Sc"; + init = /*%FSM*/"startLoadingScreen ["""",""EpochLoadingScreen""];" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Start Loadingscreen"";" \n + "};" \n + """Starting Epoch... Please wait!"" call Epoch_updateLoadingScreen;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Version_Check"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Update_Loadingscreen + { + name = "Update_Loadingscreen"; + init = /*%FSM*/"uiNamespace setVariable ['Epoch_freshServer', false];" \n + "" \n + """Server initializing... Please wait!"" call Epoch_updateLoadingScreen;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Check_Server_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Player_Setup + { + name = "ERROR_Player_Setup"; + init = /*%FSM*/"_msg = ""Problem setting up player"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_InvaildSetup = true;" \n + " publicVariableServer ""PLAYER_REJECT_InvaildSetup"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Server_Version_C + { + name = "Server_Version_C"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Wrong_Server_Ver + { + priority = 10.000000; + to="ERROR_Wrong_Server"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"Epoch_ServerVersion != getText(configFile >> ""CfgMods"" >> ""Epoch"" >> ""version"")"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Version_Okay + { + priority = 0.000000; + to="Request_Hive"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_3 + { + name = "ERROR_Server_not_3"; + init = /*%FSM*/"_msg = ""Authentication Failed, Disconnect and try again"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_HiveNotResponse = true;" \n + " publicVariableServer ""PLAYER_REJECT_HiveNotResponse"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process_2 + { + name = "Process_2"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class new_character + { + priority = 10.000000; + to="Open_Gender_Selection"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_newChar"/*%FSM*/; + action=/*%FSM*/"endLoadingScreen;" \n + "_myGenderTime = diag_tickTime;"/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class load_old_charact + { + priority = 0.000000; + to="Process_3"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/"_myTime = diag_tickTime;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Open_Gender_Selection + { + name = "Open_Gender_Selection"; + init = /*%FSM*/"createdialog ""SelectGender"";"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Gender_Selected + { + priority = 10.000000; + to="Send_character_s"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_PlayerIsMale"""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Timeout + { + priority = 0.000000; + to="Send_character_s"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"((diag_tickTime - _myGenderTime) > 30)"/*%FSM*/; + action=/*%FSM*/"EPOCH_PlayerIsMale = true;" \n + "closeDialog 0;"/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Reopen_when_client + { + priority = 0.000000; + to="Open_Gender_Selection"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!dialog && isNil ""EPOCH_PlayerIsMale"""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Send_character_s + { + name = "Send_character_s"; + init = /*%FSM*/"startLoadingScreen ["""",""EpochLoadingScreen""];" \n + """Gender Selected... Please wait!"" call Epoch_updateLoadingScreen;" \n + "" \n + "[player,EPOCH_PlayerIsMale] remoteExec [""EPOCH_server_loadPlayer"",2];" \n + "EPOCH_PlayerIsMale = nil;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class load_old_charact + { + priority = 0.000000; + to="Process_3"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/"_myTime = diag_tickTime;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process_3 + { + name = "Process_3"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not_4"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 120"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Response + { + priority = 0.000000; + to="Check_New_Player"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_C_SET"""/*%FSM*/; + action=/*%FSM*/"_array = EPOCH_C_SET;" \n + "EPOCH_C_SET = nil;" \n + "_playerObject = _array deleteAt 0;" \n + "_playerVariables = _array deleteAt 0;" \n + "_currentWeapon = _array deleteAt 0;" \n + "_magCount = _array deleteAt 0;" \n + "Epoch_my_GroupUID = _array deleteAt 0;" \n + "Epoch_canBeRevived = _array deleteAt 0;" \n + "Epoch_personalToken = _array deleteAt 0;" \n + "reverse _serverUptime;" \n + "_serverUptime pushBack (_array deleteAt 0);" \n + "reverse _serverUptime;" \n + "_serverUptime call EPOCH_client_publicEH;" \n + "_playerGroupOnline = _array deleteAt 0;" \n + "" \n + ""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_4 + { + name = "ERROR_Server_not_4"; + init = /*%FSM*/"_msg = ""Authentication Failed, Disconnect and try again"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_HiveLoadChar = true;" \n + " publicVariableServer ""PLAYER_REJECT_HiveLoadChar"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + }; + initState="INIT"; + finalStates[] = + { + "FINISH", + "Reject_without_B", + }; +}; +/*%FSM*/ \ No newline at end of file diff --git a/Sources/mpmissions/epoch.Australia/description.ext b/Sources/mpmissions/epoch.Australia/description.ext index cfe65cba..8783e3aa 100644 --- a/Sources/mpmissions/epoch.Australia/description.ext +++ b/Sources/mpmissions/epoch.Australia/description.ext @@ -50,6 +50,7 @@ class cfgFunctions }; class postinit { + file = "init\fn_postinit.sqf"; postInit = 1; }; }; diff --git a/Sources/mpmissions/epoch.Australia/init/client_init.sqf b/Sources/mpmissions/epoch.Australia/init/client_init.sqf new file mode 100644 index 00000000..4a32e342 --- /dev/null +++ b/Sources/mpmissions/epoch.Australia/init/client_init.sqf @@ -0,0 +1,76 @@ +/* + 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: + https://github.com/EpochModTeam/Epoch/tree/master/Sources/epoch_code/init/client_init.sqf +*/ +//Variables +EPOCH_CraftingItem = ""; +EPOCH_ESP_TARGETS = []; +EPOCH_ESPMAP_TARGETS = []; +EPOCH_ESPGROUPS = []; +EPOCH_ESPGROUPCOLORS = []; +EPOCH_ESP_PLAYER = false; +EPOCH_ESP_VEHICLES = false; +EPOCH_ESP_VEHICLEPLAYER = []; +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"]; +if (isNil 'EPOCH_diag_fps') then { + EPOCH_diag_fps = 0; +}; +EPOCH_playerIsSwimming = false; +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 = []; +EPOCH_lastPlayerPos = [0,0,0]; +EPOCH_prevOffer = []; +EPOCH_drawIcon3d = false; +EPOCH_velTransform = false; +EPOCH_stabilityTarget = objNull; +EPOCH_currentVehicle = objNull; +EPOCH_currentTarget = objNull; +EPOCH_LootedBlds = []; +EPOCH_soundLevel = 1; +EPOCH_arr_interactedObjs = []; +EPOCH_buildOption = 0; +EPOCH_nearestLocations = []; +onEachFrame EPOCH_onEachFrame; + +EPOCH_LastAirDrop = time; +EPOCH_AirDropCheck = getNumber(missionConfigFile >> "CfgEpochAirDrop" >> "AirDropFreq"); +if(EPOCH_AirDropCheck < 120)then{EPOCH_AirDropCheck = 120;}; +EPOCH_AirDropChance = getNumber(missionConfigFile >> "CfgEpochAirDrop" >> "AirDropChance"); +if(EPOCH_AirDropChance < 0)then{EPOCH_AirDropChance = 101;EPOCH_AirDropCheck = 99999;}; + +EPOCH_droneRndChance = 100; + +// Custom Keys +EPOCH_keysActionPressed = false; //prevents EH spam +0 call EPOCH_clientKeyMap; + +//ON INIT and RESPAWN +call EPOCH_clientInit; + +[] execFSM "\x\addons\a3_epoch_code\system\SPVEH.fsm"; +[] execFSM "system\player_login.fsm"; + +true diff --git a/Sources/mpmissions/epoch.Australia/init/fn_postinit.sqf b/Sources/mpmissions/epoch.Australia/init/fn_postinit.sqf new file mode 100644 index 00000000..8be5aa09 --- /dev/null +++ b/Sources/mpmissions/epoch.Australia/init/fn_postinit.sqf @@ -0,0 +1,18 @@ +/* + Author: Aaron Clark - EpochMod.com + + Contributors: + + Description: + Initalize Player + + 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/master/Sources/epoch_code/init/fn_postinit.sqf +*/ +if (!isDedicated && isMultiplayer && hasInterface) then { + call compile preprocessFileLineNumbers "init\client_init.sqf"; +}; +true diff --git a/Sources/mpmissions/epoch.Bootcamp_ACR/System/player_login.fsm b/Sources/mpmissions/epoch.Bootcamp_ACR/System/player_login.fsm new file mode 100644 index 00000000..9426567f --- /dev/null +++ b/Sources/mpmissions/epoch.Bootcamp_ACR/System/player_login.fsm @@ -0,0 +1,1398 @@ +/*%FSM*/ +/*%FSM*/ +/* +item0[] = {"INIT",0,250,-25.000000,-375.000000,75.000000,-325.000000,0.000000,"INIT"}; +item1[] = {"FINISH",1,4346,-25.000000,1475.000000,75.000000,1525.000000,0.000000,"FINISH"}; +item2[] = {"true",8,218,-150.000000,-125.000000,-50.000000,-75.000000,0.000000,"true"}; +item3[] = {"Version_Check",2,250,-25.000000,-75.000000,75.000000,-25.000000,0.000000,"Version Check"}; +item4[] = {"Player_Object_Re",4,218,-150.000000,75.000000,-50.000000,125.000000,0.000000,"Player" \n "Object Ready"}; +item5[] = {"Check_Player_UID",2,250,-25.000000,125.000000,75.000000,175.000000,0.000000,"Check Player UID"}; +item6[] = {"PlayerUID_Okay",4,218,-150.000000,175.000000,-50.000000,225.000000,10.000000,"PlayerUID" \n "Okay"}; +item7[] = {"Wrong_Version",4,218,125.000000,-75.000000,225.000000,-25.000000,10.000000,"Wrong" \n "Version"}; +item8[] = {"",7,210,471.000061,-54.000099,478.999939,-45.999901,0.000000,""}; +item9[] = {"ERROR_Wrong_Version",2,250,275.000000,-75.000000,375.000000,-25.000000,0.000000,"ERROR" \n "Wrong Version" \n "Epoch"}; +item10[] = {"Disconnect",2,250,600.000000,1225.000000,700.000000,1275.000000,0.000000,"Disconnect"}; +item11[] = {"Server_Okay",4,218,-125.000000,425.000000,-25.000000,475.000000,0.000000,"Server" \n "Okay"}; +item12[] = {"Empty_PlayerUID",4,218,125.000000,125.000000,225.000000,175.000000,0.000000,"Empty" \n "PlayerUID"}; +item13[] = {"ERROR_PlayerUID",2,250,275.000000,125.000000,375.000000,175.000000,0.000000,"ERROR" \n "PlayerUID Empty"}; +item14[] = {"",7,210,471.000061,145.999908,478.999939,154.000092,0.000000,""}; +item15[] = {"Timeout_No_Respo",4,218,125.000000,875.000000,225.000000,925.000000,0.000000,"Timeout" \n "No Response"}; +item16[] = {"Response",4,218,-150.000000,825.000000,-50.000000,875.000000,0.000000,"Response"}; +item17[] = {"Setup_Player_Var",2,250,-25.000000,1075.000000,75.000000,1125.000000,0.000000,"Setup Player" \n "Variables"}; +item18[] = {"Request_Hive",2,250,-25.000000,575.000000,75.000000,625.000000,0.000000,"Request Hive"}; +item19[] = {"Timeout_No_Respo",4,218,125.000000,575.000000,225.000000,625.000000,0.000000,"Timeout" \n "No Response"}; +item20[] = {"ERROR_Server_not",2,250,275.000000,875.000000,375.000000,925.000000,0.000000,"ERROR" \n "Server not" \n "Response"}; +item21[] = {"",7,210,471.000000,895.999939,479.000000,904.000061,0.000000,""}; +item22[] = {"Timeout_No_Respo",4,218,125.000000,775.000000,225.000000,825.000000,0.000000,"Timeout" \n "No Response"}; +item23[] = {"Wrong_Server_Ver",4,218,125.000000,475.000000,225.000000,525.000000,10.000000,"Wrong" \n "Server Version"}; +item24[] = {"true",8,218,-150.000000,1125.000000,-50.000000,1175.000000,0.000000,"true"}; +item25[] = {"ERROR_Wrong_Server",2,250,275.000000,475.000000,375.000000,525.000000,0.000000,"ERROR" \n "Wrong" \n "Server Version"}; +item26[] = {"Display_Message",4,218,600.000000,1150.000000,700.000000,1200.000000,0.000000,"" \n "Display Message" \n "Wait..."}; +item27[] = {"Setup_Player_Obj",2,250,-25.000000,975.000000,75.000000,1025.000000,0.000000,"Setup Player" \n "Object"}; +item28[] = {"Check_if_Player",4,218,750.000000,1225.000000,850.000000,1275.000000,0.000000,"Check if" \n "Player got Kicked"}; +item29[] = {"Preload_done",8,218,-150.000000,1425.000000,-50.000000,1475.000000,0.000000,"Preload" \n "done"}; +item30[] = {"",7,210,471.000000,796.000000,479.000000,804.000000,0.000000,""}; +item31[] = {"",7,210,471.000000,796.000000,479.000000,804.000000,0.000000,""}; +item32[] = {"true",8,218,425.000000,1075.000000,525.000000,1125.000000,0.000000,"true"}; +item33[] = {"Display_Message",2,250,600.000000,1075.000000,700.000000,1125.000000,0.000000,"Display" \n "Message"}; +item34[] = {"Server_Ready",4,218,-25.000000,300.000000,75.000000,350.000000,0.000000,"Server" \n "Ready"}; +item35[] = {"Check_Server",2,250,-25.000000,375.000000,75.000000,425.000000,0.000000,"Check Server"}; +item36[] = {"Server_not_worki",4,218,125.000000,375.000000,225.000000,425.000000,10.000000,"Server" \n "not working"}; +item37[] = {"ERROR_Server_not_1",2,250,275.000000,375.000000,375.000000,425.000000,0.000000,"ERROR" \n "Server not Ready"}; +item38[] = {"",7,210,471.000000,396.000000,479.000000,404.000000,0.000000,""}; +item39[] = {"Check_Server_1",2,250,-25.000000,225.000000,75.000000,275.000000,0.000000,"Check Server"}; +item40[] = {"Timeout_No_Respo",4,218,125.000000,225.000000,225.000000,275.000000,0.000000,"Timeout" \n "No Response"}; +item41[] = {"ERROR_Server_not_2",2,250,275.000000,225.000000,375.000000,275.000000,0.000000,"ERROR" \n "Server not Ready"}; +item42[] = {"",7,210,471.000000,246.000031,479.000000,253.999969,0.000000,""}; +item43[] = {"Reject_without_B",1,250,900.000000,1225.000000,1000.000000,1275.000000,0.000000,"Reject without" \n "BattlEye"}; +item44[] = {"true",8,218,-150.000000,-25.000000,-50.000000,25.000000,0.000000,"true"}; +item45[] = {"Arma_Version_Che",2,250,-25.000000,25.000000,75.000000,75.000000,0.000000,"Arma Version" \n "Check"}; +item46[] = {"Outdated_Version",4,218,125.000000,25.000000,225.000000,75.000000,10.000000,"Outdated" \n "Version"}; +item47[] = {"ERROR_Wrong_Version_1",2,250,275.000000,25.000000,375.000000,75.000000,0.000000,"ERROR" \n "Wrong Version" \n "ArmA"}; +item48[] = {"",7,210,471.000061,45.999908,478.999939,54.000092,0.000000,""}; +item49[] = {"new_player_____p",4,218,-150.000000,1025.000000,-50.000000,1075.000000,0.000000,"new player == " \n "player"}; +item50[] = {"Setup_EH_s_and_H",2,250,-25.000000,1175.000000,75.000000,1225.000000,0.000000,"Setup EH's" \n "and" \n "HitPoints"}; +item51[] = {"no_weapons",4,218,-25.000000,1275.000000,75.000000,1325.000000,0.000000,"no weapons"}; +item52[] = {"Process",2,250,-25.000000,1375.000000,75.000000,1425.000000,0.000000,"Process"}; +item53[] = {"Has_Current_Weap",4,218,100.000000,1175.000000,200.000000,1225.000000,10.000000,"Has" \n "Current" \n "Weapon"}; +item54[] = {"Find_Active_Weap",2,250,225.000000,1175.000000,325.000000,1225.000000,0.000000,"Find" \n "Active" \n "Weapon"}; +item55[] = {"Current_Weapon_Not",4,218,150.000000,1225.000000,250.000000,1275.000000,0.000000,"Current" \n "Weapon" \n "Not Selected"}; +item56[] = {"Current_Weapon_S",4,218,300.000000,1225.000000,400.000000,1275.000000,0.000000,"Current" \n "Weapon" \n "Selected"}; +item57[] = {"Select_Weapon",2,250,150.000000,1300.000000,250.000000,1350.000000,0.000000,"Select" \n "Weapon"}; +item58[] = {"true",8,218,225.000000,1375.000000,325.000000,1425.000000,0.000000,"true"}; +item59[] = {"Do_nothing",2,250,300.000000,1300.000000,400.000000,1350.000000,0.000000,"Do nothing"}; +item60[] = {"Check_New_Player",2,250,-25.000000,875.000000,75.000000,925.000000,0.000000,"Check" \n "New Player" \n "Setup"}; +item61[] = {"check_new__player",4,218,-150.000000,925.000000,-50.000000,975.000000,0.000000,"check new " \n "player not null"}; +item62[] = {"true",8,218,-150.000000,-325.000000,-50.000000,-275.000000,0.000000,"true"}; +item63[] = {"Process_1",2,250,-25.000000,-275.000000,75.000000,-225.000000,0.000000,"Process"}; +item64[] = {"Wait_ArmA_Loading",4,218,-150.000000,-225.000000,-50.000000,-175.000000,0.000000,"Wait ArmA" \n "Loading Screen" \n "Done"}; +item65[] = {"Start_Loading_Sc",2,250,-25.000000,-175.000000,75.000000,-125.000000,0.000000,"Start Loading" \n "Screen"}; +item66[] = {"freshServer",4,218,-325.000000,225.000000,-225.000000,275.000000,0.000000,"freshServer"}; +item67[] = {"Update_Loadingscreen",2,250,-325.000000,300.000000,-225.000000,350.000000,0.000000,"Update" \n "Loadingscreen" \n "Message"}; +item68[] = {"true",8,218,-150.000000,300.000000,-50.000000,350.000000,0.000000,"true"}; +item69[] = {"Timeout_",4,218,125.000000,975.000000,225.000000,1025.000000,0.000000,"" \n "Timeout" \n ""}; +item70[] = {"ERROR_Player_Setup",2,250,275.000000,975.000000,375.000000,1025.000000,0.000000,"ERROR" \n "Player Setup" \n "Invalid"}; +item71[] = {"",7,210,471.000000,996.000000,479.000000,1004.000000,0.000000,""}; +item72[] = {"Server_Version_C",2,250,-25.000000,475.000000,75.000000,525.000000,0.000000,"Server Version" \n "Check"}; +item73[] = {"Version_Okay",4,218,-125.000000,525.000000,-25.000000,575.000000,0.000000,"Version" \n "Okay"}; +item74[] = {"",7,210,471.000000,496.000000,479.000000,504.000000,0.000000,""}; +item75[] = {"ERROR_Server_not_3",2,250,275.000000,575.000000,375.000000,625.000000,0.000000,"ERROR" \n "Server not" \n "Response"}; +item76[] = {"",7,210,471.000000,596.000000,479.000000,604.000000,0.000000,""}; +item77[] = {"new_character",4,218,-250.000000,675.000000,-150.000000,725.000000,10.000000,"new" \n "character"}; +item78[] = {"Hive_Response",4,218,-125.000000,625.000000,-25.000000,675.000000,0.000000,"Hive" \n "Response"}; +item79[] = {"load_old_charact",4,218,-125.000000,725.000000,-25.000000,775.000000,0.000000,"load old" \n "character"}; +item80[] = {"Process_2",2,250,-25.000000,675.000000,75.000000,725.000000,0.000000,"Process"}; +item81[] = {"Open_Gender_Selection",2,250,-400.000000,675.000000,-300.000000,725.000000,0.000000,"Open Gender" \n "Selection Dialog"}; +item82[] = {"Reopen_when_client",4,218,-400.000000,600.000000,-300.000000,650.000000,0.000000,"Reopen" \n "when client hit" \n "escape"}; +item83[] = {"Gender_Selected",4,218,-450.000000,750.000000,-350.000000,800.000000,10.000000,"Gender" \n "Selected"}; +item84[] = {"Timeout",4,218,-350.000000,750.000000,-250.000000,800.000000,0.000000,"Timeout"}; +item85[] = {"Send_character_s",2,250,-400.000000,825.000000,-300.000000,875.000000,0.000000,"Send" \n "character" \n "selection"}; +item86[] = {"Process_3",2,250,-25.000000,775.000000,75.000000,825.000000,0.000000,"Process"}; +item87[] = {"ERROR_Server_not_4",2,250,275.000000,775.000000,375.000000,825.000000,0.000000,"ERROR" \n "Server not" \n "Response"}; +link0[] = {0,62}; +link1[] = {2,3}; +link2[] = {3,7}; +link3[] = {3,44}; +link4[] = {4,5}; +link5[] = {5,6}; +link6[] = {5,12}; +link7[] = {6,39}; +link8[] = {7,9}; +link9[] = {8,48}; +link10[] = {9,8}; +link11[] = {10,28}; +link12[] = {11,72}; +link13[] = {12,13}; +link14[] = {13,14}; +link15[] = {14,42}; +link16[] = {15,20}; +link17[] = {16,60}; +link18[] = {17,24}; +link19[] = {18,19}; +link20[] = {18,78}; +link21[] = {19,75}; +link22[] = {20,21}; +link23[] = {21,71}; +link24[] = {22,87}; +link25[] = {23,25}; +link26[] = {24,50}; +link27[] = {25,74}; +link28[] = {26,10}; +link29[] = {27,49}; +link30[] = {27,69}; +link31[] = {28,43}; +link32[] = {29,1}; +link33[] = {31,21}; +link34[] = {32,33}; +link35[] = {33,26}; +link36[] = {34,35}; +link37[] = {35,11}; +link38[] = {35,36}; +link39[] = {36,37}; +link40[] = {37,38}; +link41[] = {38,74}; +link42[] = {39,34}; +link43[] = {39,40}; +link44[] = {39,66}; +link45[] = {40,41}; +link46[] = {41,42}; +link47[] = {42,38}; +link48[] = {44,45}; +link49[] = {45,4}; +link50[] = {45,46}; +link51[] = {46,47}; +link52[] = {47,48}; +link53[] = {48,14}; +link54[] = {49,17}; +link55[] = {50,51}; +link56[] = {50,53}; +link57[] = {51,52}; +link58[] = {52,29}; +link59[] = {53,54}; +link60[] = {54,55}; +link61[] = {54,56}; +link62[] = {55,57}; +link63[] = {56,59}; +link64[] = {57,58}; +link65[] = {58,52}; +link66[] = {59,58}; +link67[] = {60,15}; +link68[] = {60,61}; +link69[] = {61,27}; +link70[] = {62,63}; +link71[] = {63,64}; +link72[] = {64,65}; +link73[] = {65,2}; +link74[] = {66,67}; +link75[] = {67,68}; +link76[] = {68,39}; +link77[] = {69,70}; +link78[] = {70,71}; +link79[] = {71,32}; +link80[] = {72,23}; +link81[] = {72,73}; +link82[] = {73,18}; +link83[] = {74,76}; +link84[] = {75,76}; +link85[] = {76,31}; +link86[] = {77,81}; +link87[] = {78,80}; +link88[] = {79,86}; +link89[] = {80,77}; +link90[] = {80,79}; +link91[] = {81,82}; +link92[] = {81,83}; +link93[] = {81,84}; +link94[] = {82,81}; +link95[] = {83,85}; +link96[] = {84,85}; +link97[] = {85,79}; +link98[] = {86,16}; +link99[] = {86,22}; +link100[] = {87,31}; +globals[] = {0.000000,0,0,0,0,640,480,1,244,6316128,1,-207.564026,582.257507,1932.771484,781.734619,586,854,1}; +window[] = {2,-1,-1,-1,-1,838,1706,2998,26,3,604}; +*//*%FSM*/ +class FSM +{ + fsmName = "Epoch Login"; + class States + { + /*%FSM*/ + class INIT + { + name = "INIT"; + init = /*%FSM*/"titleCut ["""", ""BLACK FADED"", 1337];" \n + "0 fadeSound 0;" \n + "player enableSimulation false;" \n + "" \n + "_debug = true;" \n + "_myTime = diag_tickTime;" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Init"";" \n + "};" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Process_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class FINISH + { + name = "FINISH"; + init = /*%FSM*/"[] spawn {" \n + " disableSerialization;" \n + " waitUntil{!isNull (findDisplay 46)};" \n + " _display = findDisplay 46;" \n + " {" \n + " _display displayAddEventHandler [_x,([""CfgEpochClient"", _x, """"] call EPOCH_fnc_returnConfigEntryV2)];" \n + " } forEach ([""CfgEpochClient"", ""displayAddEventHandler"", []] call EPOCH_fnc_returnConfigEntryV2);" \n + " " \n + " player switchMove """";" \n + "};" \n + "" \n + "3 fadeSound 1;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Finish!"";" \n + "};" \n + "" \n + "" \n + "" \n + "player enableSimulation true;" \n + "" \n + "titleCut ["""", ""BLACK IN"", 1];" \n + "1338 cutText ["""",""PLAIN"",0]; " \n + "" \n + "progressLoadingScreen 1.0;" \n + "" \n + "endLoadingScreen;" \n + "EPOCH_loadingScreenDone = true;" \n + "" \n + "hintSilent ""Worked"" "/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + }; + }; + /*%FSM*/ + /*%FSM*/ + class Version_Check + { + name = "Version_Check"; + init = /*%FSM*/"if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Version Check"";" \n + "};" \n + "" \n + "// SHOULD BE:" \n + "_epoch_assets0 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_assets"");" \n + "_epoch_assets1 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_assets_1"");" \n + "_epoch_assets2 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""epoch_objects"");" \n + "_epoch_assets3 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_assets_3"");" \n + "_epoch_config = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_config"");" \n + "_epoch_language = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_language"");" \n + "_epoch_underground = getText(configFile >> ""Epoch"" >> ""Version"" >> ""Underground_Epoch"");" \n + "_epoch_vehicles = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_vehicles"");" \n + "_epoch_weapons = getText(configFile >> ""Epoch"" >> ""Version"" >> ""a3_epoch_weapons"");" \n + "" \n + "" \n + "// IS:" \n + "_my_epoch_assets0 = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_assets"" >> ""epochVersion"");" \n + "_my_epoch_assets1 = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_assets_1"" >> ""epochVersion"");" \n + "_my_epoch_assets2 = getText(configFile >> ""CfgPatches"" >> ""epoch_objects"" >> ""epochVersion"");" \n + "_my_epoch_assets3 = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_assets_3"" >> ""epochVersion"");" \n + "_my_epoch_config = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_config"" >> ""epochVersion"");" \n + "_my_epoch_language = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_language"" >> ""epochVersion"");" \n + "_my_epoch_underground = getText(configFile >> ""CfgPatches"" >> ""Underground_Epoch"" >> ""epochVersion"");" \n + "_my_epoch_vehicles = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_vehicles"" >> ""epochVersion"");" \n + "_my_epoch_weapons = getText(configFile >> ""CfgPatches"" >> ""a3_epoch_weapons"" >> ""epochVersion"");" \n + "" \n + "progressLoadingScreen 0.1;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Wrong_Version + { + priority = 10.000000; + to="ERROR_Wrong_Version"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_epoch_assets0 != _epoch_assets0 ||" \n + "_my_epoch_assets1 != _epoch_assets1 ||" \n + "_my_epoch_assets2 != _epoch_assets2 ||" \n + "_my_epoch_assets3 != _epoch_assets3 ||" \n + "_my_epoch_config != _epoch_config ||" \n + "_my_epoch_language != _epoch_language ||" \n + "_my_epoch_underground != _epoch_underground ||" \n + "_my_epoch_vehicles != _epoch_vehicles ||" \n + "_my_epoch_weapons != _epoch_weapons"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class true + { + priority = 0.000000; + to="Arma_Version_Che"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_Player_UID + { + name = "Check_Player_UID"; + init = /*%FSM*/"if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Check PlayerUID"";" \n + "};" \n + "" \n + "_playerUID = getPlayerUID player;" \n + "" \n + "progressLoadingScreen 0.2;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class PlayerUID_Okay + { + priority = 10.000000; + to="Check_Server_1"; + precondition = /*%FSM*/"!isNil ""_playerUID"""/*%FSM*/; + condition=/*%FSM*/"_playerUID != """""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Empty_PlayerUID + { + priority = 0.000000; + to="ERROR_PlayerUID"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Wrong_Version + { + name = "ERROR_Wrong_Version"; + init = /*%FSM*/"_msg = ""You have an outdated version of Epoch"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_EPOCHVERSION = true;" \n + " publicVariableServer ""PLAYER_REJECT_EPOCHVERSION"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Disconnect + { + name = "Disconnect"; + init = /*%FSM*/"endLoadingScreen;" \n + "1338 cutText [_msg,""PLAIN"",0]; " \n + "deleteVehicle player;" \n + "call _rejectPlayer;" \n + "diag_log format [""(%1) %2"",diag_tickTime,_msg];" \n + "_myTime = diag_tickTime;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Check_if_Player + { + priority = 0.000000; + to="Reject_without_B"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 2"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_PlayerUID + { + name = "ERROR_PlayerUID"; + init = /*%FSM*/"_msg = ""Can not setup Player Object! (Error 01)"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_UID = true;" \n + " publicVariableServer ""PLAYER_REJECT_UID"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Setup_Player_Var + { + name = "Setup_Player_Var"; + init = /*%FSM*/"diag_log format[""DEBUG TIME WAITED: %1"", (diag_tickTime - _myTime)];" \n + "{" \n + " missionNamespace setVariable[(format[""EPOCH_player%1"", EPOCH_customVars select _forEachIndex]), _x];" \n + "} forEach _playerVariables;" \n + "" \n + """Loading Player Variables... Please wait!"" call Epoch_updateLoadingScreen;" \n + "" \n + "EPOCH_lastPlayerPos = getPosATL vehicle player;" \n + "" \n + "progressLoadingScreen 0.7;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Setup Player Variables"";" \n + "};" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Setup_EH_s_and_H"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Request_Hive + { + name = "Request_Hive"; + init = /*%FSM*/"_myTime = diag_tickTime;" \n + "" \n + "Epoch_my_Group = [];" \n + "" \n + "player remoteExec [""EPOCH_server_checkPlayer"",2];" \n + "" \n + "" \n + """Loading Player Data... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.5;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Hive_Response + { + priority = 0.000000; + to="Process_2"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_checkPlayer_PVC"""/*%FSM*/; + action=/*%FSM*/"_newChar = EPOCH_checkPlayer_PVC;" \n + "EPOCH_checkPlayer_PVC = nil;"/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not_3"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 120"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not + { + name = "ERROR_Server_not"; + init = /*%FSM*/"_msg = ""Authentication Failed, Disconnect and try again"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_NoResponse2 = true;" \n + " publicVariableServer ""PLAYER_REJECT_NoResponse2"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Wrong_Server + { + name = "ERROR_Wrong_Server"; + init = /*%FSM*/"_msg = format[""Server and Client running with different Version! (You: %1 // Server: %2)"",getText(configFile >> ""CfgMods"" >> ""Epoch"" >> ""version""),_serverVersion];" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_ServerVersion = true;" \n + " publicVariableServer ""PLAYER_REJECT_ServerVersion"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Setup_Player_Obj + { + name = "Setup_Player_Obj"; + init = /*%FSM*/"_ply = player;" \n + "_group = group player;" \n + "" \n + "player reveal _playerObject;" \n + "_playerPos = getposATL _playerObject;" \n + "" \n + "selectPlayer _playerObject;" \n + "" \n + "deleteVehicle _ply;" \n + "deleteGroup _group;" \n + "" \n + """Loading Player Body... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.8;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Setup Player Object"";" \n + "};" \n + "" \n + "_myTime = diag_tickTime;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Timeout_ + { + priority = 0.000000; + to="ERROR_Player_Setup"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 60"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class new_player_____p + { + priority = 0.000000; + to="Setup_Player_Var"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_playerObject == player"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Display_Message + { + name = "Display_Message"; + init = /*%FSM*/"[] spawn {" \n + " waitUntil{!isNull (findDisplay 46)};" \n + " (findDisplay 46) displayAddEventHandler [""KeyDown"",""true""];" \n + " (findDisplay 46) displayAddEventHandler [""KeyUp"",""true""];" \n + "};" \n + "diag_log format [""(%1) %2"",diag_tickTime,_msg];" \n + "_myTime = diag_tickTime;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Display_Message + { + priority = 0.000000; + to="Disconnect"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 10"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_Server + { + name = "Check_Server"; + init = /*%FSM*/"_myTime = diag_tickTime;" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Check Server"";" \n + "};" \n + """Checking Server... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.4;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Server_not_worki + { + priority = 10.000000; + to="ERROR_Server_not_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_BADHIVE""" \n + ""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Server_Okay + { + priority = 0.000000; + to="Server_Version_C"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""Epoch_ServerVersion"""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_1 + { + name = "ERROR_Server_not_1"; + init = /*%FSM*/"_msg = ""Server not Ready (Error 03)"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_NotReady2 = true;" \n + " publicVariableServer ""PLAYER_REJECT_NotReady2"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_Server_1 + { + name = "Check_Server_1"; + init = /*%FSM*/"progressLoadingScreen 0.3;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not_2"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 180"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class freshServer + { + priority = 0.000000; + to="Update_Loadingscreen"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"uiNamespace getVariable ['Epoch_freshServer', false]"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Server_Ready + { + priority = 0.000000; + to="Check_Server"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_SERVER"""/*%FSM*/; + action=/*%FSM*/"_serverUptime = EPOCH_SERVER;" \n + "EPOCH_SERVER = nil;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_2 + { + name = "ERROR_Server_not_2"; + init = /*%FSM*/"_msg = ""Server not Ready (Error 02)"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_NotReady1 = true;" \n + " publicVariableServer ""PLAYER_REJECT_NotReady1"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Reject_without_B + { + name = "Reject_without_B"; + init = /*%FSM*/"[] spawn {" \n + " waitUntil{!isNull (findDisplay 46)};" \n + " waitUntil {" \n + " (findDisplay 46) closeDisplay 0;" \n + " isNull (findDisplay 46)" \n + " };" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + }; + }; + /*%FSM*/ + /*%FSM*/ + class Arma_Version_Che + { + name = "Arma_Version_Che"; + init = /*%FSM*/"progressLoadingScreen 0.15;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Outdated_Version + { + priority = 10.000000; + to="ERROR_Wrong_Version_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"productVersion select 2 < getNumber(configFile >> ""CfgMods"" >> ""Epoch"" >> ""ArmAVersion"")"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Player_Object_Re + { + priority = 0.000000; + to="Check_Player_UID"; + precondition = /*%FSM*/"!isNull player"/*%FSM*/; + condition=/*%FSM*/"player == player"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Wrong_Version_1 + { + name = "ERROR_Wrong_Version_1"; + init = /*%FSM*/"_msg = ""You have an outdated version of ArmA 3"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_ARMAVERSION = true;" \n + " publicVariableServer ""PLAYER_REJECT_ARMAVERSION"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Setup_EH_s_and_H + { + name = "Setup_EH_s_and_H"; + init = /*%FSM*/"{" \n + " player addEventHandler [_x,([""CfgEpochClient"", _x, """"] call EPOCH_fnc_returnConfigEntryV2)];" \n + "} forEach ([""CfgEpochClient"", ""addEventHandler"", []] call EPOCH_fnc_returnConfigEntryV2);" \n + "" \n + "if (count EPOCH_playerHitPoints isEqualTo count ((getAllHitPointsDamage player) param [0,[]])) then {" \n + " {" \n + " player setHitIndex [_forEachIndex, _x];" \n + " }forEach EPOCH_playerHitPoints;" \n + "};" \n + "" \n + "[] spawn EPOCH_masterLoop;" \n + "true call EPOCH_fnc_Weather;" \n + "[5,100] spawn EPOCH_niteLight;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Setup EH's"";" \n + "};" \n + "" \n + """Loading... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.9;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Has_Current_Weap + { + priority = 10.000000; + to="Find_Active_Weap"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_currentWeapon != """""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class no_weapons + { + priority = 0.000000; + to="Process"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_currentWeapon == """""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process + { + name = "Process"; + init = /*%FSM*/"progressLoadingScreen 0.975;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Preload_done + { + priority = 0.000000; + to="FINISH"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"preloadCamera _playerPos"/*%FSM*/; + action=/*%FSM*/"call compile _playerGroupOnline;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Find_Active_Weap + { + name = "Find_Active_Weap"; + init = /*%FSM*/"_activeWeapon = currentWeapon player;" \n + "progressLoadingScreen 0.95;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Current_Weapon_S + { + priority = 0.000000; + to="Do_nothing"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_activeWeapon == _currentWeapon"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Current_Weapon_Not + { + priority = 0.000000; + to="Select_Weapon"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_activeWeapon != _currentWeapon"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Select_Weapon + { + name = "Select_Weapon"; + init = /*%FSM*/"_currentWeapon spawn {" \n + " uiSleep 1; " \n + " player selectWeapon _this;" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Process"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Do_nothing + { + name = "Do_nothing"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Process"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_New_Player + { + name = "Check_New_Player"; + init = /*%FSM*/"_myTime = diag_tickTime;" \n + "" \n + """Loading Player Inventory... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.6;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class check_new__player + { + priority = 0.000000; + to="Setup_Player_Obj"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!(isNull _playerObject) && {_playerObject getVariable [""SETUP"",false]}"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 120"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process_1 + { + name = "Process_1"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Wait_ArmA_Loading + { + priority = 0.000000; + to="Start_Loading_Sc"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"{!isnull _x} count ((uinamespace getvariable ""loading_displays"") - [finddisplay 18]) == 0"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Start_Loading_Sc + { + name = "Start_Loading_Sc"; + init = /*%FSM*/"startLoadingScreen ["""",""EpochLoadingScreen""];" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Start Loadingscreen"";" \n + "};" \n + """Starting Epoch... Please wait!"" call Epoch_updateLoadingScreen;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Version_Check"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Update_Loadingscreen + { + name = "Update_Loadingscreen"; + init = /*%FSM*/"uiNamespace setVariable ['Epoch_freshServer', false];" \n + "" \n + """Server initializing... Please wait!"" call Epoch_updateLoadingScreen;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Check_Server_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Player_Setup + { + name = "ERROR_Player_Setup"; + init = /*%FSM*/"_msg = ""Problem setting up player"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_InvaildSetup = true;" \n + " publicVariableServer ""PLAYER_REJECT_InvaildSetup"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Server_Version_C + { + name = "Server_Version_C"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Wrong_Server_Ver + { + priority = 10.000000; + to="ERROR_Wrong_Server"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"Epoch_ServerVersion != getText(configFile >> ""CfgMods"" >> ""Epoch"" >> ""version"")"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Version_Okay + { + priority = 0.000000; + to="Request_Hive"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_3 + { + name = "ERROR_Server_not_3"; + init = /*%FSM*/"_msg = ""Authentication Failed, Disconnect and try again"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_HiveNotResponse = true;" \n + " publicVariableServer ""PLAYER_REJECT_HiveNotResponse"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process_2 + { + name = "Process_2"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class new_character + { + priority = 10.000000; + to="Open_Gender_Selection"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_newChar"/*%FSM*/; + action=/*%FSM*/"endLoadingScreen;" \n + "_myGenderTime = diag_tickTime;"/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class load_old_charact + { + priority = 0.000000; + to="Process_3"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/"_myTime = diag_tickTime;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Open_Gender_Selection + { + name = "Open_Gender_Selection"; + init = /*%FSM*/"createdialog ""SelectGender"";"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Gender_Selected + { + priority = 10.000000; + to="Send_character_s"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_PlayerIsMale"""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Timeout + { + priority = 0.000000; + to="Send_character_s"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"((diag_tickTime - _myGenderTime) > 30)"/*%FSM*/; + action=/*%FSM*/"EPOCH_PlayerIsMale = true;" \n + "closeDialog 0;"/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Reopen_when_client + { + priority = 0.000000; + to="Open_Gender_Selection"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!dialog && isNil ""EPOCH_PlayerIsMale"""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Send_character_s + { + name = "Send_character_s"; + init = /*%FSM*/"startLoadingScreen ["""",""EpochLoadingScreen""];" \n + """Gender Selected... Please wait!"" call Epoch_updateLoadingScreen;" \n + "" \n + "[player,EPOCH_PlayerIsMale] remoteExec [""EPOCH_server_loadPlayer"",2];" \n + "EPOCH_PlayerIsMale = nil;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class load_old_charact + { + priority = 0.000000; + to="Process_3"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/"_myTime = diag_tickTime;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process_3 + { + name = "Process_3"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not_4"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 120"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Response + { + priority = 0.000000; + to="Check_New_Player"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_C_SET"""/*%FSM*/; + action=/*%FSM*/"_array = EPOCH_C_SET;" \n + "EPOCH_C_SET = nil;" \n + "_playerObject = _array deleteAt 0;" \n + "_playerVariables = _array deleteAt 0;" \n + "_currentWeapon = _array deleteAt 0;" \n + "_magCount = _array deleteAt 0;" \n + "Epoch_my_GroupUID = _array deleteAt 0;" \n + "Epoch_canBeRevived = _array deleteAt 0;" \n + "Epoch_personalToken = _array deleteAt 0;" \n + "reverse _serverUptime;" \n + "_serverUptime pushBack (_array deleteAt 0);" \n + "reverse _serverUptime;" \n + "_serverUptime call EPOCH_client_publicEH;" \n + "_playerGroupOnline = _array deleteAt 0;" \n + "" \n + ""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_4 + { + name = "ERROR_Server_not_4"; + init = /*%FSM*/"_msg = ""Authentication Failed, Disconnect and try again"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_HiveLoadChar = true;" \n + " publicVariableServer ""PLAYER_REJECT_HiveLoadChar"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + }; + initState="INIT"; + finalStates[] = + { + "FINISH", + "Reject_without_B", + }; +}; +/*%FSM*/ \ No newline at end of file diff --git a/Sources/mpmissions/epoch.Bootcamp_ACR/description.ext b/Sources/mpmissions/epoch.Bootcamp_ACR/description.ext index cfe65cba..8783e3aa 100644 --- a/Sources/mpmissions/epoch.Bootcamp_ACR/description.ext +++ b/Sources/mpmissions/epoch.Bootcamp_ACR/description.ext @@ -50,6 +50,7 @@ class cfgFunctions }; class postinit { + file = "init\fn_postinit.sqf"; postInit = 1; }; }; diff --git a/Sources/mpmissions/epoch.Bootcamp_ACR/init/client_init.sqf b/Sources/mpmissions/epoch.Bootcamp_ACR/init/client_init.sqf new file mode 100644 index 00000000..4a32e342 --- /dev/null +++ b/Sources/mpmissions/epoch.Bootcamp_ACR/init/client_init.sqf @@ -0,0 +1,76 @@ +/* + 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: + https://github.com/EpochModTeam/Epoch/tree/master/Sources/epoch_code/init/client_init.sqf +*/ +//Variables +EPOCH_CraftingItem = ""; +EPOCH_ESP_TARGETS = []; +EPOCH_ESPMAP_TARGETS = []; +EPOCH_ESPGROUPS = []; +EPOCH_ESPGROUPCOLORS = []; +EPOCH_ESP_PLAYER = false; +EPOCH_ESP_VEHICLES = false; +EPOCH_ESP_VEHICLEPLAYER = []; +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"]; +if (isNil 'EPOCH_diag_fps') then { + EPOCH_diag_fps = 0; +}; +EPOCH_playerIsSwimming = false; +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 = []; +EPOCH_lastPlayerPos = [0,0,0]; +EPOCH_prevOffer = []; +EPOCH_drawIcon3d = false; +EPOCH_velTransform = false; +EPOCH_stabilityTarget = objNull; +EPOCH_currentVehicle = objNull; +EPOCH_currentTarget = objNull; +EPOCH_LootedBlds = []; +EPOCH_soundLevel = 1; +EPOCH_arr_interactedObjs = []; +EPOCH_buildOption = 0; +EPOCH_nearestLocations = []; +onEachFrame EPOCH_onEachFrame; + +EPOCH_LastAirDrop = time; +EPOCH_AirDropCheck = getNumber(missionConfigFile >> "CfgEpochAirDrop" >> "AirDropFreq"); +if(EPOCH_AirDropCheck < 120)then{EPOCH_AirDropCheck = 120;}; +EPOCH_AirDropChance = getNumber(missionConfigFile >> "CfgEpochAirDrop" >> "AirDropChance"); +if(EPOCH_AirDropChance < 0)then{EPOCH_AirDropChance = 101;EPOCH_AirDropCheck = 99999;}; + +EPOCH_droneRndChance = 100; + +// Custom Keys +EPOCH_keysActionPressed = false; //prevents EH spam +0 call EPOCH_clientKeyMap; + +//ON INIT and RESPAWN +call EPOCH_clientInit; + +[] execFSM "\x\addons\a3_epoch_code\system\SPVEH.fsm"; +[] execFSM "system\player_login.fsm"; + +true diff --git a/Sources/mpmissions/epoch.Bootcamp_ACR/init/fn_postinit.sqf b/Sources/mpmissions/epoch.Bootcamp_ACR/init/fn_postinit.sqf new file mode 100644 index 00000000..8be5aa09 --- /dev/null +++ b/Sources/mpmissions/epoch.Bootcamp_ACR/init/fn_postinit.sqf @@ -0,0 +1,18 @@ +/* + Author: Aaron Clark - EpochMod.com + + Contributors: + + Description: + Initalize Player + + 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/master/Sources/epoch_code/init/fn_postinit.sqf +*/ +if (!isDedicated && isMultiplayer && hasInterface) then { + call compile preprocessFileLineNumbers "init\client_init.sqf"; +}; +true diff --git a/Sources/mpmissions/epoch.Bornholm/System/player_login.fsm b/Sources/mpmissions/epoch.Bornholm/System/player_login.fsm new file mode 100644 index 00000000..9426567f --- /dev/null +++ b/Sources/mpmissions/epoch.Bornholm/System/player_login.fsm @@ -0,0 +1,1398 @@ +/*%FSM*/ +/*%FSM*/ +/* +item0[] = {"INIT",0,250,-25.000000,-375.000000,75.000000,-325.000000,0.000000,"INIT"}; +item1[] = {"FINISH",1,4346,-25.000000,1475.000000,75.000000,1525.000000,0.000000,"FINISH"}; +item2[] = {"true",8,218,-150.000000,-125.000000,-50.000000,-75.000000,0.000000,"true"}; +item3[] = {"Version_Check",2,250,-25.000000,-75.000000,75.000000,-25.000000,0.000000,"Version Check"}; +item4[] = {"Player_Object_Re",4,218,-150.000000,75.000000,-50.000000,125.000000,0.000000,"Player" \n "Object Ready"}; +item5[] = {"Check_Player_UID",2,250,-25.000000,125.000000,75.000000,175.000000,0.000000,"Check Player UID"}; +item6[] = {"PlayerUID_Okay",4,218,-150.000000,175.000000,-50.000000,225.000000,10.000000,"PlayerUID" \n "Okay"}; +item7[] = {"Wrong_Version",4,218,125.000000,-75.000000,225.000000,-25.000000,10.000000,"Wrong" \n "Version"}; +item8[] = {"",7,210,471.000061,-54.000099,478.999939,-45.999901,0.000000,""}; +item9[] = {"ERROR_Wrong_Version",2,250,275.000000,-75.000000,375.000000,-25.000000,0.000000,"ERROR" \n "Wrong Version" \n "Epoch"}; +item10[] = {"Disconnect",2,250,600.000000,1225.000000,700.000000,1275.000000,0.000000,"Disconnect"}; +item11[] = {"Server_Okay",4,218,-125.000000,425.000000,-25.000000,475.000000,0.000000,"Server" \n "Okay"}; +item12[] = {"Empty_PlayerUID",4,218,125.000000,125.000000,225.000000,175.000000,0.000000,"Empty" \n "PlayerUID"}; +item13[] = {"ERROR_PlayerUID",2,250,275.000000,125.000000,375.000000,175.000000,0.000000,"ERROR" \n "PlayerUID Empty"}; +item14[] = {"",7,210,471.000061,145.999908,478.999939,154.000092,0.000000,""}; +item15[] = {"Timeout_No_Respo",4,218,125.000000,875.000000,225.000000,925.000000,0.000000,"Timeout" \n "No Response"}; +item16[] = {"Response",4,218,-150.000000,825.000000,-50.000000,875.000000,0.000000,"Response"}; +item17[] = {"Setup_Player_Var",2,250,-25.000000,1075.000000,75.000000,1125.000000,0.000000,"Setup Player" \n "Variables"}; +item18[] = {"Request_Hive",2,250,-25.000000,575.000000,75.000000,625.000000,0.000000,"Request Hive"}; +item19[] = {"Timeout_No_Respo",4,218,125.000000,575.000000,225.000000,625.000000,0.000000,"Timeout" \n "No Response"}; +item20[] = {"ERROR_Server_not",2,250,275.000000,875.000000,375.000000,925.000000,0.000000,"ERROR" \n "Server not" \n "Response"}; +item21[] = {"",7,210,471.000000,895.999939,479.000000,904.000061,0.000000,""}; +item22[] = {"Timeout_No_Respo",4,218,125.000000,775.000000,225.000000,825.000000,0.000000,"Timeout" \n "No Response"}; +item23[] = {"Wrong_Server_Ver",4,218,125.000000,475.000000,225.000000,525.000000,10.000000,"Wrong" \n "Server Version"}; +item24[] = {"true",8,218,-150.000000,1125.000000,-50.000000,1175.000000,0.000000,"true"}; +item25[] = {"ERROR_Wrong_Server",2,250,275.000000,475.000000,375.000000,525.000000,0.000000,"ERROR" \n "Wrong" \n "Server Version"}; +item26[] = {"Display_Message",4,218,600.000000,1150.000000,700.000000,1200.000000,0.000000,"" \n "Display Message" \n "Wait..."}; +item27[] = {"Setup_Player_Obj",2,250,-25.000000,975.000000,75.000000,1025.000000,0.000000,"Setup Player" \n "Object"}; +item28[] = {"Check_if_Player",4,218,750.000000,1225.000000,850.000000,1275.000000,0.000000,"Check if" \n "Player got Kicked"}; +item29[] = {"Preload_done",8,218,-150.000000,1425.000000,-50.000000,1475.000000,0.000000,"Preload" \n "done"}; +item30[] = {"",7,210,471.000000,796.000000,479.000000,804.000000,0.000000,""}; +item31[] = {"",7,210,471.000000,796.000000,479.000000,804.000000,0.000000,""}; +item32[] = {"true",8,218,425.000000,1075.000000,525.000000,1125.000000,0.000000,"true"}; +item33[] = {"Display_Message",2,250,600.000000,1075.000000,700.000000,1125.000000,0.000000,"Display" \n "Message"}; +item34[] = {"Server_Ready",4,218,-25.000000,300.000000,75.000000,350.000000,0.000000,"Server" \n "Ready"}; +item35[] = {"Check_Server",2,250,-25.000000,375.000000,75.000000,425.000000,0.000000,"Check Server"}; +item36[] = {"Server_not_worki",4,218,125.000000,375.000000,225.000000,425.000000,10.000000,"Server" \n "not working"}; +item37[] = {"ERROR_Server_not_1",2,250,275.000000,375.000000,375.000000,425.000000,0.000000,"ERROR" \n "Server not Ready"}; +item38[] = {"",7,210,471.000000,396.000000,479.000000,404.000000,0.000000,""}; +item39[] = {"Check_Server_1",2,250,-25.000000,225.000000,75.000000,275.000000,0.000000,"Check Server"}; +item40[] = {"Timeout_No_Respo",4,218,125.000000,225.000000,225.000000,275.000000,0.000000,"Timeout" \n "No Response"}; +item41[] = {"ERROR_Server_not_2",2,250,275.000000,225.000000,375.000000,275.000000,0.000000,"ERROR" \n "Server not Ready"}; +item42[] = {"",7,210,471.000000,246.000031,479.000000,253.999969,0.000000,""}; +item43[] = {"Reject_without_B",1,250,900.000000,1225.000000,1000.000000,1275.000000,0.000000,"Reject without" \n "BattlEye"}; +item44[] = {"true",8,218,-150.000000,-25.000000,-50.000000,25.000000,0.000000,"true"}; +item45[] = {"Arma_Version_Che",2,250,-25.000000,25.000000,75.000000,75.000000,0.000000,"Arma Version" \n "Check"}; +item46[] = {"Outdated_Version",4,218,125.000000,25.000000,225.000000,75.000000,10.000000,"Outdated" \n "Version"}; +item47[] = {"ERROR_Wrong_Version_1",2,250,275.000000,25.000000,375.000000,75.000000,0.000000,"ERROR" \n "Wrong Version" \n "ArmA"}; +item48[] = {"",7,210,471.000061,45.999908,478.999939,54.000092,0.000000,""}; +item49[] = {"new_player_____p",4,218,-150.000000,1025.000000,-50.000000,1075.000000,0.000000,"new player == " \n "player"}; +item50[] = {"Setup_EH_s_and_H",2,250,-25.000000,1175.000000,75.000000,1225.000000,0.000000,"Setup EH's" \n "and" \n "HitPoints"}; +item51[] = {"no_weapons",4,218,-25.000000,1275.000000,75.000000,1325.000000,0.000000,"no weapons"}; +item52[] = {"Process",2,250,-25.000000,1375.000000,75.000000,1425.000000,0.000000,"Process"}; +item53[] = {"Has_Current_Weap",4,218,100.000000,1175.000000,200.000000,1225.000000,10.000000,"Has" \n "Current" \n "Weapon"}; +item54[] = {"Find_Active_Weap",2,250,225.000000,1175.000000,325.000000,1225.000000,0.000000,"Find" \n "Active" \n "Weapon"}; +item55[] = {"Current_Weapon_Not",4,218,150.000000,1225.000000,250.000000,1275.000000,0.000000,"Current" \n "Weapon" \n "Not Selected"}; +item56[] = {"Current_Weapon_S",4,218,300.000000,1225.000000,400.000000,1275.000000,0.000000,"Current" \n "Weapon" \n "Selected"}; +item57[] = {"Select_Weapon",2,250,150.000000,1300.000000,250.000000,1350.000000,0.000000,"Select" \n "Weapon"}; +item58[] = {"true",8,218,225.000000,1375.000000,325.000000,1425.000000,0.000000,"true"}; +item59[] = {"Do_nothing",2,250,300.000000,1300.000000,400.000000,1350.000000,0.000000,"Do nothing"}; +item60[] = {"Check_New_Player",2,250,-25.000000,875.000000,75.000000,925.000000,0.000000,"Check" \n "New Player" \n "Setup"}; +item61[] = {"check_new__player",4,218,-150.000000,925.000000,-50.000000,975.000000,0.000000,"check new " \n "player not null"}; +item62[] = {"true",8,218,-150.000000,-325.000000,-50.000000,-275.000000,0.000000,"true"}; +item63[] = {"Process_1",2,250,-25.000000,-275.000000,75.000000,-225.000000,0.000000,"Process"}; +item64[] = {"Wait_ArmA_Loading",4,218,-150.000000,-225.000000,-50.000000,-175.000000,0.000000,"Wait ArmA" \n "Loading Screen" \n "Done"}; +item65[] = {"Start_Loading_Sc",2,250,-25.000000,-175.000000,75.000000,-125.000000,0.000000,"Start Loading" \n "Screen"}; +item66[] = {"freshServer",4,218,-325.000000,225.000000,-225.000000,275.000000,0.000000,"freshServer"}; +item67[] = {"Update_Loadingscreen",2,250,-325.000000,300.000000,-225.000000,350.000000,0.000000,"Update" \n "Loadingscreen" \n "Message"}; +item68[] = {"true",8,218,-150.000000,300.000000,-50.000000,350.000000,0.000000,"true"}; +item69[] = {"Timeout_",4,218,125.000000,975.000000,225.000000,1025.000000,0.000000,"" \n "Timeout" \n ""}; +item70[] = {"ERROR_Player_Setup",2,250,275.000000,975.000000,375.000000,1025.000000,0.000000,"ERROR" \n "Player Setup" \n "Invalid"}; +item71[] = {"",7,210,471.000000,996.000000,479.000000,1004.000000,0.000000,""}; +item72[] = {"Server_Version_C",2,250,-25.000000,475.000000,75.000000,525.000000,0.000000,"Server Version" \n "Check"}; +item73[] = {"Version_Okay",4,218,-125.000000,525.000000,-25.000000,575.000000,0.000000,"Version" \n "Okay"}; +item74[] = {"",7,210,471.000000,496.000000,479.000000,504.000000,0.000000,""}; +item75[] = {"ERROR_Server_not_3",2,250,275.000000,575.000000,375.000000,625.000000,0.000000,"ERROR" \n "Server not" \n "Response"}; +item76[] = {"",7,210,471.000000,596.000000,479.000000,604.000000,0.000000,""}; +item77[] = {"new_character",4,218,-250.000000,675.000000,-150.000000,725.000000,10.000000,"new" \n "character"}; +item78[] = {"Hive_Response",4,218,-125.000000,625.000000,-25.000000,675.000000,0.000000,"Hive" \n "Response"}; +item79[] = {"load_old_charact",4,218,-125.000000,725.000000,-25.000000,775.000000,0.000000,"load old" \n "character"}; +item80[] = {"Process_2",2,250,-25.000000,675.000000,75.000000,725.000000,0.000000,"Process"}; +item81[] = {"Open_Gender_Selection",2,250,-400.000000,675.000000,-300.000000,725.000000,0.000000,"Open Gender" \n "Selection Dialog"}; +item82[] = {"Reopen_when_client",4,218,-400.000000,600.000000,-300.000000,650.000000,0.000000,"Reopen" \n "when client hit" \n "escape"}; +item83[] = {"Gender_Selected",4,218,-450.000000,750.000000,-350.000000,800.000000,10.000000,"Gender" \n "Selected"}; +item84[] = {"Timeout",4,218,-350.000000,750.000000,-250.000000,800.000000,0.000000,"Timeout"}; +item85[] = {"Send_character_s",2,250,-400.000000,825.000000,-300.000000,875.000000,0.000000,"Send" \n "character" \n "selection"}; +item86[] = {"Process_3",2,250,-25.000000,775.000000,75.000000,825.000000,0.000000,"Process"}; +item87[] = {"ERROR_Server_not_4",2,250,275.000000,775.000000,375.000000,825.000000,0.000000,"ERROR" \n "Server not" \n "Response"}; +link0[] = {0,62}; +link1[] = {2,3}; +link2[] = {3,7}; +link3[] = {3,44}; +link4[] = {4,5}; +link5[] = {5,6}; +link6[] = {5,12}; +link7[] = {6,39}; +link8[] = {7,9}; +link9[] = {8,48}; +link10[] = {9,8}; +link11[] = {10,28}; +link12[] = {11,72}; +link13[] = {12,13}; +link14[] = {13,14}; +link15[] = {14,42}; +link16[] = {15,20}; +link17[] = {16,60}; +link18[] = {17,24}; +link19[] = {18,19}; +link20[] = {18,78}; +link21[] = {19,75}; +link22[] = {20,21}; +link23[] = {21,71}; +link24[] = {22,87}; +link25[] = {23,25}; +link26[] = {24,50}; +link27[] = {25,74}; +link28[] = {26,10}; +link29[] = {27,49}; +link30[] = {27,69}; +link31[] = {28,43}; +link32[] = {29,1}; +link33[] = {31,21}; +link34[] = {32,33}; +link35[] = {33,26}; +link36[] = {34,35}; +link37[] = {35,11}; +link38[] = {35,36}; +link39[] = {36,37}; +link40[] = {37,38}; +link41[] = {38,74}; +link42[] = {39,34}; +link43[] = {39,40}; +link44[] = {39,66}; +link45[] = {40,41}; +link46[] = {41,42}; +link47[] = {42,38}; +link48[] = {44,45}; +link49[] = {45,4}; +link50[] = {45,46}; +link51[] = {46,47}; +link52[] = {47,48}; +link53[] = {48,14}; +link54[] = {49,17}; +link55[] = {50,51}; +link56[] = {50,53}; +link57[] = {51,52}; +link58[] = {52,29}; +link59[] = {53,54}; +link60[] = {54,55}; +link61[] = {54,56}; +link62[] = {55,57}; +link63[] = {56,59}; +link64[] = {57,58}; +link65[] = {58,52}; +link66[] = {59,58}; +link67[] = {60,15}; +link68[] = {60,61}; +link69[] = {61,27}; +link70[] = {62,63}; +link71[] = {63,64}; +link72[] = {64,65}; +link73[] = {65,2}; +link74[] = {66,67}; +link75[] = {67,68}; +link76[] = {68,39}; +link77[] = {69,70}; +link78[] = {70,71}; +link79[] = {71,32}; +link80[] = {72,23}; +link81[] = {72,73}; +link82[] = {73,18}; +link83[] = {74,76}; +link84[] = {75,76}; +link85[] = {76,31}; +link86[] = {77,81}; +link87[] = {78,80}; +link88[] = {79,86}; +link89[] = {80,77}; +link90[] = {80,79}; +link91[] = {81,82}; +link92[] = {81,83}; +link93[] = {81,84}; +link94[] = {82,81}; +link95[] = {83,85}; +link96[] = {84,85}; +link97[] = {85,79}; +link98[] = {86,16}; +link99[] = {86,22}; +link100[] = {87,31}; +globals[] = {0.000000,0,0,0,0,640,480,1,244,6316128,1,-207.564026,582.257507,1932.771484,781.734619,586,854,1}; +window[] = {2,-1,-1,-1,-1,838,1706,2998,26,3,604}; +*//*%FSM*/ +class FSM +{ + fsmName = "Epoch Login"; + class States + { + /*%FSM*/ + class INIT + { + name = "INIT"; + init = /*%FSM*/"titleCut ["""", ""BLACK FADED"", 1337];" \n + "0 fadeSound 0;" \n + "player enableSimulation false;" \n + "" \n + "_debug = true;" \n + "_myTime = diag_tickTime;" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Init"";" \n + "};" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Process_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class FINISH + { + name = "FINISH"; + init = /*%FSM*/"[] spawn {" \n + " disableSerialization;" \n + " waitUntil{!isNull (findDisplay 46)};" \n + " _display = findDisplay 46;" \n + " {" \n + " _display displayAddEventHandler [_x,([""CfgEpochClient"", _x, """"] call EPOCH_fnc_returnConfigEntryV2)];" \n + " } forEach ([""CfgEpochClient"", ""displayAddEventHandler"", []] call EPOCH_fnc_returnConfigEntryV2);" \n + " " \n + " player switchMove """";" \n + "};" \n + "" \n + "3 fadeSound 1;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Finish!"";" \n + "};" \n + "" \n + "" \n + "" \n + "player enableSimulation true;" \n + "" \n + "titleCut ["""", ""BLACK IN"", 1];" \n + "1338 cutText ["""",""PLAIN"",0]; " \n + "" \n + "progressLoadingScreen 1.0;" \n + "" \n + "endLoadingScreen;" \n + "EPOCH_loadingScreenDone = true;" \n + "" \n + "hintSilent ""Worked"" "/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + }; + }; + /*%FSM*/ + /*%FSM*/ + class Version_Check + { + name = "Version_Check"; + init = /*%FSM*/"if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Version Check"";" \n + "};" \n + "" \n + "// SHOULD BE:" \n + "_epoch_assets0 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_assets"");" \n + "_epoch_assets1 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_assets_1"");" \n + "_epoch_assets2 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""epoch_objects"");" \n + "_epoch_assets3 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_assets_3"");" \n + "_epoch_config = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_config"");" \n + "_epoch_language = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_language"");" \n + "_epoch_underground = getText(configFile >> ""Epoch"" >> ""Version"" >> ""Underground_Epoch"");" \n + "_epoch_vehicles = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_vehicles"");" \n + "_epoch_weapons = getText(configFile >> ""Epoch"" >> ""Version"" >> ""a3_epoch_weapons"");" \n + "" \n + "" \n + "// IS:" \n + "_my_epoch_assets0 = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_assets"" >> ""epochVersion"");" \n + "_my_epoch_assets1 = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_assets_1"" >> ""epochVersion"");" \n + "_my_epoch_assets2 = getText(configFile >> ""CfgPatches"" >> ""epoch_objects"" >> ""epochVersion"");" \n + "_my_epoch_assets3 = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_assets_3"" >> ""epochVersion"");" \n + "_my_epoch_config = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_config"" >> ""epochVersion"");" \n + "_my_epoch_language = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_language"" >> ""epochVersion"");" \n + "_my_epoch_underground = getText(configFile >> ""CfgPatches"" >> ""Underground_Epoch"" >> ""epochVersion"");" \n + "_my_epoch_vehicles = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_vehicles"" >> ""epochVersion"");" \n + "_my_epoch_weapons = getText(configFile >> ""CfgPatches"" >> ""a3_epoch_weapons"" >> ""epochVersion"");" \n + "" \n + "progressLoadingScreen 0.1;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Wrong_Version + { + priority = 10.000000; + to="ERROR_Wrong_Version"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_epoch_assets0 != _epoch_assets0 ||" \n + "_my_epoch_assets1 != _epoch_assets1 ||" \n + "_my_epoch_assets2 != _epoch_assets2 ||" \n + "_my_epoch_assets3 != _epoch_assets3 ||" \n + "_my_epoch_config != _epoch_config ||" \n + "_my_epoch_language != _epoch_language ||" \n + "_my_epoch_underground != _epoch_underground ||" \n + "_my_epoch_vehicles != _epoch_vehicles ||" \n + "_my_epoch_weapons != _epoch_weapons"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class true + { + priority = 0.000000; + to="Arma_Version_Che"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_Player_UID + { + name = "Check_Player_UID"; + init = /*%FSM*/"if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Check PlayerUID"";" \n + "};" \n + "" \n + "_playerUID = getPlayerUID player;" \n + "" \n + "progressLoadingScreen 0.2;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class PlayerUID_Okay + { + priority = 10.000000; + to="Check_Server_1"; + precondition = /*%FSM*/"!isNil ""_playerUID"""/*%FSM*/; + condition=/*%FSM*/"_playerUID != """""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Empty_PlayerUID + { + priority = 0.000000; + to="ERROR_PlayerUID"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Wrong_Version + { + name = "ERROR_Wrong_Version"; + init = /*%FSM*/"_msg = ""You have an outdated version of Epoch"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_EPOCHVERSION = true;" \n + " publicVariableServer ""PLAYER_REJECT_EPOCHVERSION"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Disconnect + { + name = "Disconnect"; + init = /*%FSM*/"endLoadingScreen;" \n + "1338 cutText [_msg,""PLAIN"",0]; " \n + "deleteVehicle player;" \n + "call _rejectPlayer;" \n + "diag_log format [""(%1) %2"",diag_tickTime,_msg];" \n + "_myTime = diag_tickTime;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Check_if_Player + { + priority = 0.000000; + to="Reject_without_B"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 2"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_PlayerUID + { + name = "ERROR_PlayerUID"; + init = /*%FSM*/"_msg = ""Can not setup Player Object! (Error 01)"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_UID = true;" \n + " publicVariableServer ""PLAYER_REJECT_UID"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Setup_Player_Var + { + name = "Setup_Player_Var"; + init = /*%FSM*/"diag_log format[""DEBUG TIME WAITED: %1"", (diag_tickTime - _myTime)];" \n + "{" \n + " missionNamespace setVariable[(format[""EPOCH_player%1"", EPOCH_customVars select _forEachIndex]), _x];" \n + "} forEach _playerVariables;" \n + "" \n + """Loading Player Variables... Please wait!"" call Epoch_updateLoadingScreen;" \n + "" \n + "EPOCH_lastPlayerPos = getPosATL vehicle player;" \n + "" \n + "progressLoadingScreen 0.7;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Setup Player Variables"";" \n + "};" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Setup_EH_s_and_H"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Request_Hive + { + name = "Request_Hive"; + init = /*%FSM*/"_myTime = diag_tickTime;" \n + "" \n + "Epoch_my_Group = [];" \n + "" \n + "player remoteExec [""EPOCH_server_checkPlayer"",2];" \n + "" \n + "" \n + """Loading Player Data... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.5;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Hive_Response + { + priority = 0.000000; + to="Process_2"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_checkPlayer_PVC"""/*%FSM*/; + action=/*%FSM*/"_newChar = EPOCH_checkPlayer_PVC;" \n + "EPOCH_checkPlayer_PVC = nil;"/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not_3"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 120"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not + { + name = "ERROR_Server_not"; + init = /*%FSM*/"_msg = ""Authentication Failed, Disconnect and try again"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_NoResponse2 = true;" \n + " publicVariableServer ""PLAYER_REJECT_NoResponse2"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Wrong_Server + { + name = "ERROR_Wrong_Server"; + init = /*%FSM*/"_msg = format[""Server and Client running with different Version! (You: %1 // Server: %2)"",getText(configFile >> ""CfgMods"" >> ""Epoch"" >> ""version""),_serverVersion];" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_ServerVersion = true;" \n + " publicVariableServer ""PLAYER_REJECT_ServerVersion"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Setup_Player_Obj + { + name = "Setup_Player_Obj"; + init = /*%FSM*/"_ply = player;" \n + "_group = group player;" \n + "" \n + "player reveal _playerObject;" \n + "_playerPos = getposATL _playerObject;" \n + "" \n + "selectPlayer _playerObject;" \n + "" \n + "deleteVehicle _ply;" \n + "deleteGroup _group;" \n + "" \n + """Loading Player Body... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.8;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Setup Player Object"";" \n + "};" \n + "" \n + "_myTime = diag_tickTime;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Timeout_ + { + priority = 0.000000; + to="ERROR_Player_Setup"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 60"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class new_player_____p + { + priority = 0.000000; + to="Setup_Player_Var"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_playerObject == player"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Display_Message + { + name = "Display_Message"; + init = /*%FSM*/"[] spawn {" \n + " waitUntil{!isNull (findDisplay 46)};" \n + " (findDisplay 46) displayAddEventHandler [""KeyDown"",""true""];" \n + " (findDisplay 46) displayAddEventHandler [""KeyUp"",""true""];" \n + "};" \n + "diag_log format [""(%1) %2"",diag_tickTime,_msg];" \n + "_myTime = diag_tickTime;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Display_Message + { + priority = 0.000000; + to="Disconnect"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 10"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_Server + { + name = "Check_Server"; + init = /*%FSM*/"_myTime = diag_tickTime;" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Check Server"";" \n + "};" \n + """Checking Server... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.4;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Server_not_worki + { + priority = 10.000000; + to="ERROR_Server_not_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_BADHIVE""" \n + ""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Server_Okay + { + priority = 0.000000; + to="Server_Version_C"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""Epoch_ServerVersion"""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_1 + { + name = "ERROR_Server_not_1"; + init = /*%FSM*/"_msg = ""Server not Ready (Error 03)"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_NotReady2 = true;" \n + " publicVariableServer ""PLAYER_REJECT_NotReady2"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_Server_1 + { + name = "Check_Server_1"; + init = /*%FSM*/"progressLoadingScreen 0.3;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not_2"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 180"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class freshServer + { + priority = 0.000000; + to="Update_Loadingscreen"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"uiNamespace getVariable ['Epoch_freshServer', false]"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Server_Ready + { + priority = 0.000000; + to="Check_Server"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_SERVER"""/*%FSM*/; + action=/*%FSM*/"_serverUptime = EPOCH_SERVER;" \n + "EPOCH_SERVER = nil;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_2 + { + name = "ERROR_Server_not_2"; + init = /*%FSM*/"_msg = ""Server not Ready (Error 02)"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_NotReady1 = true;" \n + " publicVariableServer ""PLAYER_REJECT_NotReady1"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Reject_without_B + { + name = "Reject_without_B"; + init = /*%FSM*/"[] spawn {" \n + " waitUntil{!isNull (findDisplay 46)};" \n + " waitUntil {" \n + " (findDisplay 46) closeDisplay 0;" \n + " isNull (findDisplay 46)" \n + " };" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + }; + }; + /*%FSM*/ + /*%FSM*/ + class Arma_Version_Che + { + name = "Arma_Version_Che"; + init = /*%FSM*/"progressLoadingScreen 0.15;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Outdated_Version + { + priority = 10.000000; + to="ERROR_Wrong_Version_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"productVersion select 2 < getNumber(configFile >> ""CfgMods"" >> ""Epoch"" >> ""ArmAVersion"")"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Player_Object_Re + { + priority = 0.000000; + to="Check_Player_UID"; + precondition = /*%FSM*/"!isNull player"/*%FSM*/; + condition=/*%FSM*/"player == player"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Wrong_Version_1 + { + name = "ERROR_Wrong_Version_1"; + init = /*%FSM*/"_msg = ""You have an outdated version of ArmA 3"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_ARMAVERSION = true;" \n + " publicVariableServer ""PLAYER_REJECT_ARMAVERSION"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Setup_EH_s_and_H + { + name = "Setup_EH_s_and_H"; + init = /*%FSM*/"{" \n + " player addEventHandler [_x,([""CfgEpochClient"", _x, """"] call EPOCH_fnc_returnConfigEntryV2)];" \n + "} forEach ([""CfgEpochClient"", ""addEventHandler"", []] call EPOCH_fnc_returnConfigEntryV2);" \n + "" \n + "if (count EPOCH_playerHitPoints isEqualTo count ((getAllHitPointsDamage player) param [0,[]])) then {" \n + " {" \n + " player setHitIndex [_forEachIndex, _x];" \n + " }forEach EPOCH_playerHitPoints;" \n + "};" \n + "" \n + "[] spawn EPOCH_masterLoop;" \n + "true call EPOCH_fnc_Weather;" \n + "[5,100] spawn EPOCH_niteLight;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Setup EH's"";" \n + "};" \n + "" \n + """Loading... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.9;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Has_Current_Weap + { + priority = 10.000000; + to="Find_Active_Weap"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_currentWeapon != """""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class no_weapons + { + priority = 0.000000; + to="Process"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_currentWeapon == """""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process + { + name = "Process"; + init = /*%FSM*/"progressLoadingScreen 0.975;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Preload_done + { + priority = 0.000000; + to="FINISH"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"preloadCamera _playerPos"/*%FSM*/; + action=/*%FSM*/"call compile _playerGroupOnline;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Find_Active_Weap + { + name = "Find_Active_Weap"; + init = /*%FSM*/"_activeWeapon = currentWeapon player;" \n + "progressLoadingScreen 0.95;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Current_Weapon_S + { + priority = 0.000000; + to="Do_nothing"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_activeWeapon == _currentWeapon"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Current_Weapon_Not + { + priority = 0.000000; + to="Select_Weapon"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_activeWeapon != _currentWeapon"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Select_Weapon + { + name = "Select_Weapon"; + init = /*%FSM*/"_currentWeapon spawn {" \n + " uiSleep 1; " \n + " player selectWeapon _this;" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Process"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Do_nothing + { + name = "Do_nothing"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Process"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_New_Player + { + name = "Check_New_Player"; + init = /*%FSM*/"_myTime = diag_tickTime;" \n + "" \n + """Loading Player Inventory... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.6;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class check_new__player + { + priority = 0.000000; + to="Setup_Player_Obj"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!(isNull _playerObject) && {_playerObject getVariable [""SETUP"",false]}"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 120"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process_1 + { + name = "Process_1"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Wait_ArmA_Loading + { + priority = 0.000000; + to="Start_Loading_Sc"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"{!isnull _x} count ((uinamespace getvariable ""loading_displays"") - [finddisplay 18]) == 0"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Start_Loading_Sc + { + name = "Start_Loading_Sc"; + init = /*%FSM*/"startLoadingScreen ["""",""EpochLoadingScreen""];" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Start Loadingscreen"";" \n + "};" \n + """Starting Epoch... Please wait!"" call Epoch_updateLoadingScreen;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Version_Check"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Update_Loadingscreen + { + name = "Update_Loadingscreen"; + init = /*%FSM*/"uiNamespace setVariable ['Epoch_freshServer', false];" \n + "" \n + """Server initializing... Please wait!"" call Epoch_updateLoadingScreen;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Check_Server_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Player_Setup + { + name = "ERROR_Player_Setup"; + init = /*%FSM*/"_msg = ""Problem setting up player"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_InvaildSetup = true;" \n + " publicVariableServer ""PLAYER_REJECT_InvaildSetup"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Server_Version_C + { + name = "Server_Version_C"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Wrong_Server_Ver + { + priority = 10.000000; + to="ERROR_Wrong_Server"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"Epoch_ServerVersion != getText(configFile >> ""CfgMods"" >> ""Epoch"" >> ""version"")"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Version_Okay + { + priority = 0.000000; + to="Request_Hive"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_3 + { + name = "ERROR_Server_not_3"; + init = /*%FSM*/"_msg = ""Authentication Failed, Disconnect and try again"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_HiveNotResponse = true;" \n + " publicVariableServer ""PLAYER_REJECT_HiveNotResponse"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process_2 + { + name = "Process_2"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class new_character + { + priority = 10.000000; + to="Open_Gender_Selection"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_newChar"/*%FSM*/; + action=/*%FSM*/"endLoadingScreen;" \n + "_myGenderTime = diag_tickTime;"/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class load_old_charact + { + priority = 0.000000; + to="Process_3"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/"_myTime = diag_tickTime;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Open_Gender_Selection + { + name = "Open_Gender_Selection"; + init = /*%FSM*/"createdialog ""SelectGender"";"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Gender_Selected + { + priority = 10.000000; + to="Send_character_s"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_PlayerIsMale"""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Timeout + { + priority = 0.000000; + to="Send_character_s"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"((diag_tickTime - _myGenderTime) > 30)"/*%FSM*/; + action=/*%FSM*/"EPOCH_PlayerIsMale = true;" \n + "closeDialog 0;"/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Reopen_when_client + { + priority = 0.000000; + to="Open_Gender_Selection"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!dialog && isNil ""EPOCH_PlayerIsMale"""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Send_character_s + { + name = "Send_character_s"; + init = /*%FSM*/"startLoadingScreen ["""",""EpochLoadingScreen""];" \n + """Gender Selected... Please wait!"" call Epoch_updateLoadingScreen;" \n + "" \n + "[player,EPOCH_PlayerIsMale] remoteExec [""EPOCH_server_loadPlayer"",2];" \n + "EPOCH_PlayerIsMale = nil;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class load_old_charact + { + priority = 0.000000; + to="Process_3"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/"_myTime = diag_tickTime;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process_3 + { + name = "Process_3"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not_4"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 120"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Response + { + priority = 0.000000; + to="Check_New_Player"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_C_SET"""/*%FSM*/; + action=/*%FSM*/"_array = EPOCH_C_SET;" \n + "EPOCH_C_SET = nil;" \n + "_playerObject = _array deleteAt 0;" \n + "_playerVariables = _array deleteAt 0;" \n + "_currentWeapon = _array deleteAt 0;" \n + "_magCount = _array deleteAt 0;" \n + "Epoch_my_GroupUID = _array deleteAt 0;" \n + "Epoch_canBeRevived = _array deleteAt 0;" \n + "Epoch_personalToken = _array deleteAt 0;" \n + "reverse _serverUptime;" \n + "_serverUptime pushBack (_array deleteAt 0);" \n + "reverse _serverUptime;" \n + "_serverUptime call EPOCH_client_publicEH;" \n + "_playerGroupOnline = _array deleteAt 0;" \n + "" \n + ""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_4 + { + name = "ERROR_Server_not_4"; + init = /*%FSM*/"_msg = ""Authentication Failed, Disconnect and try again"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_HiveLoadChar = true;" \n + " publicVariableServer ""PLAYER_REJECT_HiveLoadChar"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + }; + initState="INIT"; + finalStates[] = + { + "FINISH", + "Reject_without_B", + }; +}; +/*%FSM*/ \ No newline at end of file diff --git a/Sources/mpmissions/epoch.Bornholm/description.ext b/Sources/mpmissions/epoch.Bornholm/description.ext index cfe65cba..8783e3aa 100644 --- a/Sources/mpmissions/epoch.Bornholm/description.ext +++ b/Sources/mpmissions/epoch.Bornholm/description.ext @@ -50,6 +50,7 @@ class cfgFunctions }; class postinit { + file = "init\fn_postinit.sqf"; postInit = 1; }; }; diff --git a/Sources/mpmissions/epoch.Bornholm/init/client_init.sqf b/Sources/mpmissions/epoch.Bornholm/init/client_init.sqf new file mode 100644 index 00000000..4a32e342 --- /dev/null +++ b/Sources/mpmissions/epoch.Bornholm/init/client_init.sqf @@ -0,0 +1,76 @@ +/* + 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: + https://github.com/EpochModTeam/Epoch/tree/master/Sources/epoch_code/init/client_init.sqf +*/ +//Variables +EPOCH_CraftingItem = ""; +EPOCH_ESP_TARGETS = []; +EPOCH_ESPMAP_TARGETS = []; +EPOCH_ESPGROUPS = []; +EPOCH_ESPGROUPCOLORS = []; +EPOCH_ESP_PLAYER = false; +EPOCH_ESP_VEHICLES = false; +EPOCH_ESP_VEHICLEPLAYER = []; +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"]; +if (isNil 'EPOCH_diag_fps') then { + EPOCH_diag_fps = 0; +}; +EPOCH_playerIsSwimming = false; +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 = []; +EPOCH_lastPlayerPos = [0,0,0]; +EPOCH_prevOffer = []; +EPOCH_drawIcon3d = false; +EPOCH_velTransform = false; +EPOCH_stabilityTarget = objNull; +EPOCH_currentVehicle = objNull; +EPOCH_currentTarget = objNull; +EPOCH_LootedBlds = []; +EPOCH_soundLevel = 1; +EPOCH_arr_interactedObjs = []; +EPOCH_buildOption = 0; +EPOCH_nearestLocations = []; +onEachFrame EPOCH_onEachFrame; + +EPOCH_LastAirDrop = time; +EPOCH_AirDropCheck = getNumber(missionConfigFile >> "CfgEpochAirDrop" >> "AirDropFreq"); +if(EPOCH_AirDropCheck < 120)then{EPOCH_AirDropCheck = 120;}; +EPOCH_AirDropChance = getNumber(missionConfigFile >> "CfgEpochAirDrop" >> "AirDropChance"); +if(EPOCH_AirDropChance < 0)then{EPOCH_AirDropChance = 101;EPOCH_AirDropCheck = 99999;}; + +EPOCH_droneRndChance = 100; + +// Custom Keys +EPOCH_keysActionPressed = false; //prevents EH spam +0 call EPOCH_clientKeyMap; + +//ON INIT and RESPAWN +call EPOCH_clientInit; + +[] execFSM "\x\addons\a3_epoch_code\system\SPVEH.fsm"; +[] execFSM "system\player_login.fsm"; + +true diff --git a/Sources/mpmissions/epoch.Bornholm/init/fn_postinit.sqf b/Sources/mpmissions/epoch.Bornholm/init/fn_postinit.sqf new file mode 100644 index 00000000..8be5aa09 --- /dev/null +++ b/Sources/mpmissions/epoch.Bornholm/init/fn_postinit.sqf @@ -0,0 +1,18 @@ +/* + Author: Aaron Clark - EpochMod.com + + Contributors: + + Description: + Initalize Player + + 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/master/Sources/epoch_code/init/fn_postinit.sqf +*/ +if (!isDedicated && isMultiplayer && hasInterface) then { + call compile preprocessFileLineNumbers "init\client_init.sqf"; +}; +true diff --git a/Sources/mpmissions/epoch.Chernarus/System/player_login.fsm b/Sources/mpmissions/epoch.Chernarus/System/player_login.fsm new file mode 100644 index 00000000..9426567f --- /dev/null +++ b/Sources/mpmissions/epoch.Chernarus/System/player_login.fsm @@ -0,0 +1,1398 @@ +/*%FSM*/ +/*%FSM*/ +/* +item0[] = {"INIT",0,250,-25.000000,-375.000000,75.000000,-325.000000,0.000000,"INIT"}; +item1[] = {"FINISH",1,4346,-25.000000,1475.000000,75.000000,1525.000000,0.000000,"FINISH"}; +item2[] = {"true",8,218,-150.000000,-125.000000,-50.000000,-75.000000,0.000000,"true"}; +item3[] = {"Version_Check",2,250,-25.000000,-75.000000,75.000000,-25.000000,0.000000,"Version Check"}; +item4[] = {"Player_Object_Re",4,218,-150.000000,75.000000,-50.000000,125.000000,0.000000,"Player" \n "Object Ready"}; +item5[] = {"Check_Player_UID",2,250,-25.000000,125.000000,75.000000,175.000000,0.000000,"Check Player UID"}; +item6[] = {"PlayerUID_Okay",4,218,-150.000000,175.000000,-50.000000,225.000000,10.000000,"PlayerUID" \n "Okay"}; +item7[] = {"Wrong_Version",4,218,125.000000,-75.000000,225.000000,-25.000000,10.000000,"Wrong" \n "Version"}; +item8[] = {"",7,210,471.000061,-54.000099,478.999939,-45.999901,0.000000,""}; +item9[] = {"ERROR_Wrong_Version",2,250,275.000000,-75.000000,375.000000,-25.000000,0.000000,"ERROR" \n "Wrong Version" \n "Epoch"}; +item10[] = {"Disconnect",2,250,600.000000,1225.000000,700.000000,1275.000000,0.000000,"Disconnect"}; +item11[] = {"Server_Okay",4,218,-125.000000,425.000000,-25.000000,475.000000,0.000000,"Server" \n "Okay"}; +item12[] = {"Empty_PlayerUID",4,218,125.000000,125.000000,225.000000,175.000000,0.000000,"Empty" \n "PlayerUID"}; +item13[] = {"ERROR_PlayerUID",2,250,275.000000,125.000000,375.000000,175.000000,0.000000,"ERROR" \n "PlayerUID Empty"}; +item14[] = {"",7,210,471.000061,145.999908,478.999939,154.000092,0.000000,""}; +item15[] = {"Timeout_No_Respo",4,218,125.000000,875.000000,225.000000,925.000000,0.000000,"Timeout" \n "No Response"}; +item16[] = {"Response",4,218,-150.000000,825.000000,-50.000000,875.000000,0.000000,"Response"}; +item17[] = {"Setup_Player_Var",2,250,-25.000000,1075.000000,75.000000,1125.000000,0.000000,"Setup Player" \n "Variables"}; +item18[] = {"Request_Hive",2,250,-25.000000,575.000000,75.000000,625.000000,0.000000,"Request Hive"}; +item19[] = {"Timeout_No_Respo",4,218,125.000000,575.000000,225.000000,625.000000,0.000000,"Timeout" \n "No Response"}; +item20[] = {"ERROR_Server_not",2,250,275.000000,875.000000,375.000000,925.000000,0.000000,"ERROR" \n "Server not" \n "Response"}; +item21[] = {"",7,210,471.000000,895.999939,479.000000,904.000061,0.000000,""}; +item22[] = {"Timeout_No_Respo",4,218,125.000000,775.000000,225.000000,825.000000,0.000000,"Timeout" \n "No Response"}; +item23[] = {"Wrong_Server_Ver",4,218,125.000000,475.000000,225.000000,525.000000,10.000000,"Wrong" \n "Server Version"}; +item24[] = {"true",8,218,-150.000000,1125.000000,-50.000000,1175.000000,0.000000,"true"}; +item25[] = {"ERROR_Wrong_Server",2,250,275.000000,475.000000,375.000000,525.000000,0.000000,"ERROR" \n "Wrong" \n "Server Version"}; +item26[] = {"Display_Message",4,218,600.000000,1150.000000,700.000000,1200.000000,0.000000,"" \n "Display Message" \n "Wait..."}; +item27[] = {"Setup_Player_Obj",2,250,-25.000000,975.000000,75.000000,1025.000000,0.000000,"Setup Player" \n "Object"}; +item28[] = {"Check_if_Player",4,218,750.000000,1225.000000,850.000000,1275.000000,0.000000,"Check if" \n "Player got Kicked"}; +item29[] = {"Preload_done",8,218,-150.000000,1425.000000,-50.000000,1475.000000,0.000000,"Preload" \n "done"}; +item30[] = {"",7,210,471.000000,796.000000,479.000000,804.000000,0.000000,""}; +item31[] = {"",7,210,471.000000,796.000000,479.000000,804.000000,0.000000,""}; +item32[] = {"true",8,218,425.000000,1075.000000,525.000000,1125.000000,0.000000,"true"}; +item33[] = {"Display_Message",2,250,600.000000,1075.000000,700.000000,1125.000000,0.000000,"Display" \n "Message"}; +item34[] = {"Server_Ready",4,218,-25.000000,300.000000,75.000000,350.000000,0.000000,"Server" \n "Ready"}; +item35[] = {"Check_Server",2,250,-25.000000,375.000000,75.000000,425.000000,0.000000,"Check Server"}; +item36[] = {"Server_not_worki",4,218,125.000000,375.000000,225.000000,425.000000,10.000000,"Server" \n "not working"}; +item37[] = {"ERROR_Server_not_1",2,250,275.000000,375.000000,375.000000,425.000000,0.000000,"ERROR" \n "Server not Ready"}; +item38[] = {"",7,210,471.000000,396.000000,479.000000,404.000000,0.000000,""}; +item39[] = {"Check_Server_1",2,250,-25.000000,225.000000,75.000000,275.000000,0.000000,"Check Server"}; +item40[] = {"Timeout_No_Respo",4,218,125.000000,225.000000,225.000000,275.000000,0.000000,"Timeout" \n "No Response"}; +item41[] = {"ERROR_Server_not_2",2,250,275.000000,225.000000,375.000000,275.000000,0.000000,"ERROR" \n "Server not Ready"}; +item42[] = {"",7,210,471.000000,246.000031,479.000000,253.999969,0.000000,""}; +item43[] = {"Reject_without_B",1,250,900.000000,1225.000000,1000.000000,1275.000000,0.000000,"Reject without" \n "BattlEye"}; +item44[] = {"true",8,218,-150.000000,-25.000000,-50.000000,25.000000,0.000000,"true"}; +item45[] = {"Arma_Version_Che",2,250,-25.000000,25.000000,75.000000,75.000000,0.000000,"Arma Version" \n "Check"}; +item46[] = {"Outdated_Version",4,218,125.000000,25.000000,225.000000,75.000000,10.000000,"Outdated" \n "Version"}; +item47[] = {"ERROR_Wrong_Version_1",2,250,275.000000,25.000000,375.000000,75.000000,0.000000,"ERROR" \n "Wrong Version" \n "ArmA"}; +item48[] = {"",7,210,471.000061,45.999908,478.999939,54.000092,0.000000,""}; +item49[] = {"new_player_____p",4,218,-150.000000,1025.000000,-50.000000,1075.000000,0.000000,"new player == " \n "player"}; +item50[] = {"Setup_EH_s_and_H",2,250,-25.000000,1175.000000,75.000000,1225.000000,0.000000,"Setup EH's" \n "and" \n "HitPoints"}; +item51[] = {"no_weapons",4,218,-25.000000,1275.000000,75.000000,1325.000000,0.000000,"no weapons"}; +item52[] = {"Process",2,250,-25.000000,1375.000000,75.000000,1425.000000,0.000000,"Process"}; +item53[] = {"Has_Current_Weap",4,218,100.000000,1175.000000,200.000000,1225.000000,10.000000,"Has" \n "Current" \n "Weapon"}; +item54[] = {"Find_Active_Weap",2,250,225.000000,1175.000000,325.000000,1225.000000,0.000000,"Find" \n "Active" \n "Weapon"}; +item55[] = {"Current_Weapon_Not",4,218,150.000000,1225.000000,250.000000,1275.000000,0.000000,"Current" \n "Weapon" \n "Not Selected"}; +item56[] = {"Current_Weapon_S",4,218,300.000000,1225.000000,400.000000,1275.000000,0.000000,"Current" \n "Weapon" \n "Selected"}; +item57[] = {"Select_Weapon",2,250,150.000000,1300.000000,250.000000,1350.000000,0.000000,"Select" \n "Weapon"}; +item58[] = {"true",8,218,225.000000,1375.000000,325.000000,1425.000000,0.000000,"true"}; +item59[] = {"Do_nothing",2,250,300.000000,1300.000000,400.000000,1350.000000,0.000000,"Do nothing"}; +item60[] = {"Check_New_Player",2,250,-25.000000,875.000000,75.000000,925.000000,0.000000,"Check" \n "New Player" \n "Setup"}; +item61[] = {"check_new__player",4,218,-150.000000,925.000000,-50.000000,975.000000,0.000000,"check new " \n "player not null"}; +item62[] = {"true",8,218,-150.000000,-325.000000,-50.000000,-275.000000,0.000000,"true"}; +item63[] = {"Process_1",2,250,-25.000000,-275.000000,75.000000,-225.000000,0.000000,"Process"}; +item64[] = {"Wait_ArmA_Loading",4,218,-150.000000,-225.000000,-50.000000,-175.000000,0.000000,"Wait ArmA" \n "Loading Screen" \n "Done"}; +item65[] = {"Start_Loading_Sc",2,250,-25.000000,-175.000000,75.000000,-125.000000,0.000000,"Start Loading" \n "Screen"}; +item66[] = {"freshServer",4,218,-325.000000,225.000000,-225.000000,275.000000,0.000000,"freshServer"}; +item67[] = {"Update_Loadingscreen",2,250,-325.000000,300.000000,-225.000000,350.000000,0.000000,"Update" \n "Loadingscreen" \n "Message"}; +item68[] = {"true",8,218,-150.000000,300.000000,-50.000000,350.000000,0.000000,"true"}; +item69[] = {"Timeout_",4,218,125.000000,975.000000,225.000000,1025.000000,0.000000,"" \n "Timeout" \n ""}; +item70[] = {"ERROR_Player_Setup",2,250,275.000000,975.000000,375.000000,1025.000000,0.000000,"ERROR" \n "Player Setup" \n "Invalid"}; +item71[] = {"",7,210,471.000000,996.000000,479.000000,1004.000000,0.000000,""}; +item72[] = {"Server_Version_C",2,250,-25.000000,475.000000,75.000000,525.000000,0.000000,"Server Version" \n "Check"}; +item73[] = {"Version_Okay",4,218,-125.000000,525.000000,-25.000000,575.000000,0.000000,"Version" \n "Okay"}; +item74[] = {"",7,210,471.000000,496.000000,479.000000,504.000000,0.000000,""}; +item75[] = {"ERROR_Server_not_3",2,250,275.000000,575.000000,375.000000,625.000000,0.000000,"ERROR" \n "Server not" \n "Response"}; +item76[] = {"",7,210,471.000000,596.000000,479.000000,604.000000,0.000000,""}; +item77[] = {"new_character",4,218,-250.000000,675.000000,-150.000000,725.000000,10.000000,"new" \n "character"}; +item78[] = {"Hive_Response",4,218,-125.000000,625.000000,-25.000000,675.000000,0.000000,"Hive" \n "Response"}; +item79[] = {"load_old_charact",4,218,-125.000000,725.000000,-25.000000,775.000000,0.000000,"load old" \n "character"}; +item80[] = {"Process_2",2,250,-25.000000,675.000000,75.000000,725.000000,0.000000,"Process"}; +item81[] = {"Open_Gender_Selection",2,250,-400.000000,675.000000,-300.000000,725.000000,0.000000,"Open Gender" \n "Selection Dialog"}; +item82[] = {"Reopen_when_client",4,218,-400.000000,600.000000,-300.000000,650.000000,0.000000,"Reopen" \n "when client hit" \n "escape"}; +item83[] = {"Gender_Selected",4,218,-450.000000,750.000000,-350.000000,800.000000,10.000000,"Gender" \n "Selected"}; +item84[] = {"Timeout",4,218,-350.000000,750.000000,-250.000000,800.000000,0.000000,"Timeout"}; +item85[] = {"Send_character_s",2,250,-400.000000,825.000000,-300.000000,875.000000,0.000000,"Send" \n "character" \n "selection"}; +item86[] = {"Process_3",2,250,-25.000000,775.000000,75.000000,825.000000,0.000000,"Process"}; +item87[] = {"ERROR_Server_not_4",2,250,275.000000,775.000000,375.000000,825.000000,0.000000,"ERROR" \n "Server not" \n "Response"}; +link0[] = {0,62}; +link1[] = {2,3}; +link2[] = {3,7}; +link3[] = {3,44}; +link4[] = {4,5}; +link5[] = {5,6}; +link6[] = {5,12}; +link7[] = {6,39}; +link8[] = {7,9}; +link9[] = {8,48}; +link10[] = {9,8}; +link11[] = {10,28}; +link12[] = {11,72}; +link13[] = {12,13}; +link14[] = {13,14}; +link15[] = {14,42}; +link16[] = {15,20}; +link17[] = {16,60}; +link18[] = {17,24}; +link19[] = {18,19}; +link20[] = {18,78}; +link21[] = {19,75}; +link22[] = {20,21}; +link23[] = {21,71}; +link24[] = {22,87}; +link25[] = {23,25}; +link26[] = {24,50}; +link27[] = {25,74}; +link28[] = {26,10}; +link29[] = {27,49}; +link30[] = {27,69}; +link31[] = {28,43}; +link32[] = {29,1}; +link33[] = {31,21}; +link34[] = {32,33}; +link35[] = {33,26}; +link36[] = {34,35}; +link37[] = {35,11}; +link38[] = {35,36}; +link39[] = {36,37}; +link40[] = {37,38}; +link41[] = {38,74}; +link42[] = {39,34}; +link43[] = {39,40}; +link44[] = {39,66}; +link45[] = {40,41}; +link46[] = {41,42}; +link47[] = {42,38}; +link48[] = {44,45}; +link49[] = {45,4}; +link50[] = {45,46}; +link51[] = {46,47}; +link52[] = {47,48}; +link53[] = {48,14}; +link54[] = {49,17}; +link55[] = {50,51}; +link56[] = {50,53}; +link57[] = {51,52}; +link58[] = {52,29}; +link59[] = {53,54}; +link60[] = {54,55}; +link61[] = {54,56}; +link62[] = {55,57}; +link63[] = {56,59}; +link64[] = {57,58}; +link65[] = {58,52}; +link66[] = {59,58}; +link67[] = {60,15}; +link68[] = {60,61}; +link69[] = {61,27}; +link70[] = {62,63}; +link71[] = {63,64}; +link72[] = {64,65}; +link73[] = {65,2}; +link74[] = {66,67}; +link75[] = {67,68}; +link76[] = {68,39}; +link77[] = {69,70}; +link78[] = {70,71}; +link79[] = {71,32}; +link80[] = {72,23}; +link81[] = {72,73}; +link82[] = {73,18}; +link83[] = {74,76}; +link84[] = {75,76}; +link85[] = {76,31}; +link86[] = {77,81}; +link87[] = {78,80}; +link88[] = {79,86}; +link89[] = {80,77}; +link90[] = {80,79}; +link91[] = {81,82}; +link92[] = {81,83}; +link93[] = {81,84}; +link94[] = {82,81}; +link95[] = {83,85}; +link96[] = {84,85}; +link97[] = {85,79}; +link98[] = {86,16}; +link99[] = {86,22}; +link100[] = {87,31}; +globals[] = {0.000000,0,0,0,0,640,480,1,244,6316128,1,-207.564026,582.257507,1932.771484,781.734619,586,854,1}; +window[] = {2,-1,-1,-1,-1,838,1706,2998,26,3,604}; +*//*%FSM*/ +class FSM +{ + fsmName = "Epoch Login"; + class States + { + /*%FSM*/ + class INIT + { + name = "INIT"; + init = /*%FSM*/"titleCut ["""", ""BLACK FADED"", 1337];" \n + "0 fadeSound 0;" \n + "player enableSimulation false;" \n + "" \n + "_debug = true;" \n + "_myTime = diag_tickTime;" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Init"";" \n + "};" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Process_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class FINISH + { + name = "FINISH"; + init = /*%FSM*/"[] spawn {" \n + " disableSerialization;" \n + " waitUntil{!isNull (findDisplay 46)};" \n + " _display = findDisplay 46;" \n + " {" \n + " _display displayAddEventHandler [_x,([""CfgEpochClient"", _x, """"] call EPOCH_fnc_returnConfigEntryV2)];" \n + " } forEach ([""CfgEpochClient"", ""displayAddEventHandler"", []] call EPOCH_fnc_returnConfigEntryV2);" \n + " " \n + " player switchMove """";" \n + "};" \n + "" \n + "3 fadeSound 1;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Finish!"";" \n + "};" \n + "" \n + "" \n + "" \n + "player enableSimulation true;" \n + "" \n + "titleCut ["""", ""BLACK IN"", 1];" \n + "1338 cutText ["""",""PLAIN"",0]; " \n + "" \n + "progressLoadingScreen 1.0;" \n + "" \n + "endLoadingScreen;" \n + "EPOCH_loadingScreenDone = true;" \n + "" \n + "hintSilent ""Worked"" "/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + }; + }; + /*%FSM*/ + /*%FSM*/ + class Version_Check + { + name = "Version_Check"; + init = /*%FSM*/"if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Version Check"";" \n + "};" \n + "" \n + "// SHOULD BE:" \n + "_epoch_assets0 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_assets"");" \n + "_epoch_assets1 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_assets_1"");" \n + "_epoch_assets2 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""epoch_objects"");" \n + "_epoch_assets3 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_assets_3"");" \n + "_epoch_config = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_config"");" \n + "_epoch_language = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_language"");" \n + "_epoch_underground = getText(configFile >> ""Epoch"" >> ""Version"" >> ""Underground_Epoch"");" \n + "_epoch_vehicles = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_vehicles"");" \n + "_epoch_weapons = getText(configFile >> ""Epoch"" >> ""Version"" >> ""a3_epoch_weapons"");" \n + "" \n + "" \n + "// IS:" \n + "_my_epoch_assets0 = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_assets"" >> ""epochVersion"");" \n + "_my_epoch_assets1 = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_assets_1"" >> ""epochVersion"");" \n + "_my_epoch_assets2 = getText(configFile >> ""CfgPatches"" >> ""epoch_objects"" >> ""epochVersion"");" \n + "_my_epoch_assets3 = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_assets_3"" >> ""epochVersion"");" \n + "_my_epoch_config = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_config"" >> ""epochVersion"");" \n + "_my_epoch_language = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_language"" >> ""epochVersion"");" \n + "_my_epoch_underground = getText(configFile >> ""CfgPatches"" >> ""Underground_Epoch"" >> ""epochVersion"");" \n + "_my_epoch_vehicles = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_vehicles"" >> ""epochVersion"");" \n + "_my_epoch_weapons = getText(configFile >> ""CfgPatches"" >> ""a3_epoch_weapons"" >> ""epochVersion"");" \n + "" \n + "progressLoadingScreen 0.1;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Wrong_Version + { + priority = 10.000000; + to="ERROR_Wrong_Version"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_epoch_assets0 != _epoch_assets0 ||" \n + "_my_epoch_assets1 != _epoch_assets1 ||" \n + "_my_epoch_assets2 != _epoch_assets2 ||" \n + "_my_epoch_assets3 != _epoch_assets3 ||" \n + "_my_epoch_config != _epoch_config ||" \n + "_my_epoch_language != _epoch_language ||" \n + "_my_epoch_underground != _epoch_underground ||" \n + "_my_epoch_vehicles != _epoch_vehicles ||" \n + "_my_epoch_weapons != _epoch_weapons"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class true + { + priority = 0.000000; + to="Arma_Version_Che"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_Player_UID + { + name = "Check_Player_UID"; + init = /*%FSM*/"if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Check PlayerUID"";" \n + "};" \n + "" \n + "_playerUID = getPlayerUID player;" \n + "" \n + "progressLoadingScreen 0.2;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class PlayerUID_Okay + { + priority = 10.000000; + to="Check_Server_1"; + precondition = /*%FSM*/"!isNil ""_playerUID"""/*%FSM*/; + condition=/*%FSM*/"_playerUID != """""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Empty_PlayerUID + { + priority = 0.000000; + to="ERROR_PlayerUID"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Wrong_Version + { + name = "ERROR_Wrong_Version"; + init = /*%FSM*/"_msg = ""You have an outdated version of Epoch"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_EPOCHVERSION = true;" \n + " publicVariableServer ""PLAYER_REJECT_EPOCHVERSION"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Disconnect + { + name = "Disconnect"; + init = /*%FSM*/"endLoadingScreen;" \n + "1338 cutText [_msg,""PLAIN"",0]; " \n + "deleteVehicle player;" \n + "call _rejectPlayer;" \n + "diag_log format [""(%1) %2"",diag_tickTime,_msg];" \n + "_myTime = diag_tickTime;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Check_if_Player + { + priority = 0.000000; + to="Reject_without_B"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 2"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_PlayerUID + { + name = "ERROR_PlayerUID"; + init = /*%FSM*/"_msg = ""Can not setup Player Object! (Error 01)"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_UID = true;" \n + " publicVariableServer ""PLAYER_REJECT_UID"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Setup_Player_Var + { + name = "Setup_Player_Var"; + init = /*%FSM*/"diag_log format[""DEBUG TIME WAITED: %1"", (diag_tickTime - _myTime)];" \n + "{" \n + " missionNamespace setVariable[(format[""EPOCH_player%1"", EPOCH_customVars select _forEachIndex]), _x];" \n + "} forEach _playerVariables;" \n + "" \n + """Loading Player Variables... Please wait!"" call Epoch_updateLoadingScreen;" \n + "" \n + "EPOCH_lastPlayerPos = getPosATL vehicle player;" \n + "" \n + "progressLoadingScreen 0.7;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Setup Player Variables"";" \n + "};" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Setup_EH_s_and_H"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Request_Hive + { + name = "Request_Hive"; + init = /*%FSM*/"_myTime = diag_tickTime;" \n + "" \n + "Epoch_my_Group = [];" \n + "" \n + "player remoteExec [""EPOCH_server_checkPlayer"",2];" \n + "" \n + "" \n + """Loading Player Data... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.5;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Hive_Response + { + priority = 0.000000; + to="Process_2"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_checkPlayer_PVC"""/*%FSM*/; + action=/*%FSM*/"_newChar = EPOCH_checkPlayer_PVC;" \n + "EPOCH_checkPlayer_PVC = nil;"/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not_3"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 120"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not + { + name = "ERROR_Server_not"; + init = /*%FSM*/"_msg = ""Authentication Failed, Disconnect and try again"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_NoResponse2 = true;" \n + " publicVariableServer ""PLAYER_REJECT_NoResponse2"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Wrong_Server + { + name = "ERROR_Wrong_Server"; + init = /*%FSM*/"_msg = format[""Server and Client running with different Version! (You: %1 // Server: %2)"",getText(configFile >> ""CfgMods"" >> ""Epoch"" >> ""version""),_serverVersion];" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_ServerVersion = true;" \n + " publicVariableServer ""PLAYER_REJECT_ServerVersion"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Setup_Player_Obj + { + name = "Setup_Player_Obj"; + init = /*%FSM*/"_ply = player;" \n + "_group = group player;" \n + "" \n + "player reveal _playerObject;" \n + "_playerPos = getposATL _playerObject;" \n + "" \n + "selectPlayer _playerObject;" \n + "" \n + "deleteVehicle _ply;" \n + "deleteGroup _group;" \n + "" \n + """Loading Player Body... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.8;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Setup Player Object"";" \n + "};" \n + "" \n + "_myTime = diag_tickTime;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Timeout_ + { + priority = 0.000000; + to="ERROR_Player_Setup"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 60"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class new_player_____p + { + priority = 0.000000; + to="Setup_Player_Var"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_playerObject == player"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Display_Message + { + name = "Display_Message"; + init = /*%FSM*/"[] spawn {" \n + " waitUntil{!isNull (findDisplay 46)};" \n + " (findDisplay 46) displayAddEventHandler [""KeyDown"",""true""];" \n + " (findDisplay 46) displayAddEventHandler [""KeyUp"",""true""];" \n + "};" \n + "diag_log format [""(%1) %2"",diag_tickTime,_msg];" \n + "_myTime = diag_tickTime;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Display_Message + { + priority = 0.000000; + to="Disconnect"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 10"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_Server + { + name = "Check_Server"; + init = /*%FSM*/"_myTime = diag_tickTime;" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Check Server"";" \n + "};" \n + """Checking Server... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.4;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Server_not_worki + { + priority = 10.000000; + to="ERROR_Server_not_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_BADHIVE""" \n + ""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Server_Okay + { + priority = 0.000000; + to="Server_Version_C"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""Epoch_ServerVersion"""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_1 + { + name = "ERROR_Server_not_1"; + init = /*%FSM*/"_msg = ""Server not Ready (Error 03)"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_NotReady2 = true;" \n + " publicVariableServer ""PLAYER_REJECT_NotReady2"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_Server_1 + { + name = "Check_Server_1"; + init = /*%FSM*/"progressLoadingScreen 0.3;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not_2"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 180"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class freshServer + { + priority = 0.000000; + to="Update_Loadingscreen"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"uiNamespace getVariable ['Epoch_freshServer', false]"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Server_Ready + { + priority = 0.000000; + to="Check_Server"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_SERVER"""/*%FSM*/; + action=/*%FSM*/"_serverUptime = EPOCH_SERVER;" \n + "EPOCH_SERVER = nil;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_2 + { + name = "ERROR_Server_not_2"; + init = /*%FSM*/"_msg = ""Server not Ready (Error 02)"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_NotReady1 = true;" \n + " publicVariableServer ""PLAYER_REJECT_NotReady1"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Reject_without_B + { + name = "Reject_without_B"; + init = /*%FSM*/"[] spawn {" \n + " waitUntil{!isNull (findDisplay 46)};" \n + " waitUntil {" \n + " (findDisplay 46) closeDisplay 0;" \n + " isNull (findDisplay 46)" \n + " };" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + }; + }; + /*%FSM*/ + /*%FSM*/ + class Arma_Version_Che + { + name = "Arma_Version_Che"; + init = /*%FSM*/"progressLoadingScreen 0.15;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Outdated_Version + { + priority = 10.000000; + to="ERROR_Wrong_Version_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"productVersion select 2 < getNumber(configFile >> ""CfgMods"" >> ""Epoch"" >> ""ArmAVersion"")"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Player_Object_Re + { + priority = 0.000000; + to="Check_Player_UID"; + precondition = /*%FSM*/"!isNull player"/*%FSM*/; + condition=/*%FSM*/"player == player"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Wrong_Version_1 + { + name = "ERROR_Wrong_Version_1"; + init = /*%FSM*/"_msg = ""You have an outdated version of ArmA 3"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_ARMAVERSION = true;" \n + " publicVariableServer ""PLAYER_REJECT_ARMAVERSION"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Setup_EH_s_and_H + { + name = "Setup_EH_s_and_H"; + init = /*%FSM*/"{" \n + " player addEventHandler [_x,([""CfgEpochClient"", _x, """"] call EPOCH_fnc_returnConfigEntryV2)];" \n + "} forEach ([""CfgEpochClient"", ""addEventHandler"", []] call EPOCH_fnc_returnConfigEntryV2);" \n + "" \n + "if (count EPOCH_playerHitPoints isEqualTo count ((getAllHitPointsDamage player) param [0,[]])) then {" \n + " {" \n + " player setHitIndex [_forEachIndex, _x];" \n + " }forEach EPOCH_playerHitPoints;" \n + "};" \n + "" \n + "[] spawn EPOCH_masterLoop;" \n + "true call EPOCH_fnc_Weather;" \n + "[5,100] spawn EPOCH_niteLight;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Setup EH's"";" \n + "};" \n + "" \n + """Loading... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.9;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Has_Current_Weap + { + priority = 10.000000; + to="Find_Active_Weap"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_currentWeapon != """""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class no_weapons + { + priority = 0.000000; + to="Process"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_currentWeapon == """""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process + { + name = "Process"; + init = /*%FSM*/"progressLoadingScreen 0.975;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Preload_done + { + priority = 0.000000; + to="FINISH"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"preloadCamera _playerPos"/*%FSM*/; + action=/*%FSM*/"call compile _playerGroupOnline;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Find_Active_Weap + { + name = "Find_Active_Weap"; + init = /*%FSM*/"_activeWeapon = currentWeapon player;" \n + "progressLoadingScreen 0.95;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Current_Weapon_S + { + priority = 0.000000; + to="Do_nothing"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_activeWeapon == _currentWeapon"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Current_Weapon_Not + { + priority = 0.000000; + to="Select_Weapon"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_activeWeapon != _currentWeapon"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Select_Weapon + { + name = "Select_Weapon"; + init = /*%FSM*/"_currentWeapon spawn {" \n + " uiSleep 1; " \n + " player selectWeapon _this;" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Process"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Do_nothing + { + name = "Do_nothing"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Process"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_New_Player + { + name = "Check_New_Player"; + init = /*%FSM*/"_myTime = diag_tickTime;" \n + "" \n + """Loading Player Inventory... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.6;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class check_new__player + { + priority = 0.000000; + to="Setup_Player_Obj"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!(isNull _playerObject) && {_playerObject getVariable [""SETUP"",false]}"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 120"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process_1 + { + name = "Process_1"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Wait_ArmA_Loading + { + priority = 0.000000; + to="Start_Loading_Sc"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"{!isnull _x} count ((uinamespace getvariable ""loading_displays"") - [finddisplay 18]) == 0"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Start_Loading_Sc + { + name = "Start_Loading_Sc"; + init = /*%FSM*/"startLoadingScreen ["""",""EpochLoadingScreen""];" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Start Loadingscreen"";" \n + "};" \n + """Starting Epoch... Please wait!"" call Epoch_updateLoadingScreen;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Version_Check"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Update_Loadingscreen + { + name = "Update_Loadingscreen"; + init = /*%FSM*/"uiNamespace setVariable ['Epoch_freshServer', false];" \n + "" \n + """Server initializing... Please wait!"" call Epoch_updateLoadingScreen;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Check_Server_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Player_Setup + { + name = "ERROR_Player_Setup"; + init = /*%FSM*/"_msg = ""Problem setting up player"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_InvaildSetup = true;" \n + " publicVariableServer ""PLAYER_REJECT_InvaildSetup"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Server_Version_C + { + name = "Server_Version_C"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Wrong_Server_Ver + { + priority = 10.000000; + to="ERROR_Wrong_Server"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"Epoch_ServerVersion != getText(configFile >> ""CfgMods"" >> ""Epoch"" >> ""version"")"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Version_Okay + { + priority = 0.000000; + to="Request_Hive"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_3 + { + name = "ERROR_Server_not_3"; + init = /*%FSM*/"_msg = ""Authentication Failed, Disconnect and try again"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_HiveNotResponse = true;" \n + " publicVariableServer ""PLAYER_REJECT_HiveNotResponse"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process_2 + { + name = "Process_2"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class new_character + { + priority = 10.000000; + to="Open_Gender_Selection"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_newChar"/*%FSM*/; + action=/*%FSM*/"endLoadingScreen;" \n + "_myGenderTime = diag_tickTime;"/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class load_old_charact + { + priority = 0.000000; + to="Process_3"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/"_myTime = diag_tickTime;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Open_Gender_Selection + { + name = "Open_Gender_Selection"; + init = /*%FSM*/"createdialog ""SelectGender"";"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Gender_Selected + { + priority = 10.000000; + to="Send_character_s"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_PlayerIsMale"""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Timeout + { + priority = 0.000000; + to="Send_character_s"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"((diag_tickTime - _myGenderTime) > 30)"/*%FSM*/; + action=/*%FSM*/"EPOCH_PlayerIsMale = true;" \n + "closeDialog 0;"/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Reopen_when_client + { + priority = 0.000000; + to="Open_Gender_Selection"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!dialog && isNil ""EPOCH_PlayerIsMale"""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Send_character_s + { + name = "Send_character_s"; + init = /*%FSM*/"startLoadingScreen ["""",""EpochLoadingScreen""];" \n + """Gender Selected... Please wait!"" call Epoch_updateLoadingScreen;" \n + "" \n + "[player,EPOCH_PlayerIsMale] remoteExec [""EPOCH_server_loadPlayer"",2];" \n + "EPOCH_PlayerIsMale = nil;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class load_old_charact + { + priority = 0.000000; + to="Process_3"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/"_myTime = diag_tickTime;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process_3 + { + name = "Process_3"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not_4"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 120"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Response + { + priority = 0.000000; + to="Check_New_Player"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_C_SET"""/*%FSM*/; + action=/*%FSM*/"_array = EPOCH_C_SET;" \n + "EPOCH_C_SET = nil;" \n + "_playerObject = _array deleteAt 0;" \n + "_playerVariables = _array deleteAt 0;" \n + "_currentWeapon = _array deleteAt 0;" \n + "_magCount = _array deleteAt 0;" \n + "Epoch_my_GroupUID = _array deleteAt 0;" \n + "Epoch_canBeRevived = _array deleteAt 0;" \n + "Epoch_personalToken = _array deleteAt 0;" \n + "reverse _serverUptime;" \n + "_serverUptime pushBack (_array deleteAt 0);" \n + "reverse _serverUptime;" \n + "_serverUptime call EPOCH_client_publicEH;" \n + "_playerGroupOnline = _array deleteAt 0;" \n + "" \n + ""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_4 + { + name = "ERROR_Server_not_4"; + init = /*%FSM*/"_msg = ""Authentication Failed, Disconnect and try again"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_HiveLoadChar = true;" \n + " publicVariableServer ""PLAYER_REJECT_HiveLoadChar"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + }; + initState="INIT"; + finalStates[] = + { + "FINISH", + "Reject_without_B", + }; +}; +/*%FSM*/ \ No newline at end of file diff --git a/Sources/mpmissions/epoch.Chernarus/description.ext b/Sources/mpmissions/epoch.Chernarus/description.ext index cfe65cba..8783e3aa 100644 --- a/Sources/mpmissions/epoch.Chernarus/description.ext +++ b/Sources/mpmissions/epoch.Chernarus/description.ext @@ -50,6 +50,7 @@ class cfgFunctions }; class postinit { + file = "init\fn_postinit.sqf"; postInit = 1; }; }; diff --git a/Sources/mpmissions/epoch.Chernarus/init/client_init.sqf b/Sources/mpmissions/epoch.Chernarus/init/client_init.sqf new file mode 100644 index 00000000..4a32e342 --- /dev/null +++ b/Sources/mpmissions/epoch.Chernarus/init/client_init.sqf @@ -0,0 +1,76 @@ +/* + 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: + https://github.com/EpochModTeam/Epoch/tree/master/Sources/epoch_code/init/client_init.sqf +*/ +//Variables +EPOCH_CraftingItem = ""; +EPOCH_ESP_TARGETS = []; +EPOCH_ESPMAP_TARGETS = []; +EPOCH_ESPGROUPS = []; +EPOCH_ESPGROUPCOLORS = []; +EPOCH_ESP_PLAYER = false; +EPOCH_ESP_VEHICLES = false; +EPOCH_ESP_VEHICLEPLAYER = []; +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"]; +if (isNil 'EPOCH_diag_fps') then { + EPOCH_diag_fps = 0; +}; +EPOCH_playerIsSwimming = false; +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 = []; +EPOCH_lastPlayerPos = [0,0,0]; +EPOCH_prevOffer = []; +EPOCH_drawIcon3d = false; +EPOCH_velTransform = false; +EPOCH_stabilityTarget = objNull; +EPOCH_currentVehicle = objNull; +EPOCH_currentTarget = objNull; +EPOCH_LootedBlds = []; +EPOCH_soundLevel = 1; +EPOCH_arr_interactedObjs = []; +EPOCH_buildOption = 0; +EPOCH_nearestLocations = []; +onEachFrame EPOCH_onEachFrame; + +EPOCH_LastAirDrop = time; +EPOCH_AirDropCheck = getNumber(missionConfigFile >> "CfgEpochAirDrop" >> "AirDropFreq"); +if(EPOCH_AirDropCheck < 120)then{EPOCH_AirDropCheck = 120;}; +EPOCH_AirDropChance = getNumber(missionConfigFile >> "CfgEpochAirDrop" >> "AirDropChance"); +if(EPOCH_AirDropChance < 0)then{EPOCH_AirDropChance = 101;EPOCH_AirDropCheck = 99999;}; + +EPOCH_droneRndChance = 100; + +// Custom Keys +EPOCH_keysActionPressed = false; //prevents EH spam +0 call EPOCH_clientKeyMap; + +//ON INIT and RESPAWN +call EPOCH_clientInit; + +[] execFSM "\x\addons\a3_epoch_code\system\SPVEH.fsm"; +[] execFSM "system\player_login.fsm"; + +true diff --git a/Sources/mpmissions/epoch.Chernarus/init/fn_postinit.sqf b/Sources/mpmissions/epoch.Chernarus/init/fn_postinit.sqf new file mode 100644 index 00000000..8be5aa09 --- /dev/null +++ b/Sources/mpmissions/epoch.Chernarus/init/fn_postinit.sqf @@ -0,0 +1,18 @@ +/* + Author: Aaron Clark - EpochMod.com + + Contributors: + + Description: + Initalize Player + + 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/master/Sources/epoch_code/init/fn_postinit.sqf +*/ +if (!isDedicated && isMultiplayer && hasInterface) then { + call compile preprocessFileLineNumbers "init\client_init.sqf"; +}; +true diff --git a/Sources/mpmissions/epoch.Chernarus_Summer/System/player_login.fsm b/Sources/mpmissions/epoch.Chernarus_Summer/System/player_login.fsm new file mode 100644 index 00000000..9426567f --- /dev/null +++ b/Sources/mpmissions/epoch.Chernarus_Summer/System/player_login.fsm @@ -0,0 +1,1398 @@ +/*%FSM*/ +/*%FSM*/ +/* +item0[] = {"INIT",0,250,-25.000000,-375.000000,75.000000,-325.000000,0.000000,"INIT"}; +item1[] = {"FINISH",1,4346,-25.000000,1475.000000,75.000000,1525.000000,0.000000,"FINISH"}; +item2[] = {"true",8,218,-150.000000,-125.000000,-50.000000,-75.000000,0.000000,"true"}; +item3[] = {"Version_Check",2,250,-25.000000,-75.000000,75.000000,-25.000000,0.000000,"Version Check"}; +item4[] = {"Player_Object_Re",4,218,-150.000000,75.000000,-50.000000,125.000000,0.000000,"Player" \n "Object Ready"}; +item5[] = {"Check_Player_UID",2,250,-25.000000,125.000000,75.000000,175.000000,0.000000,"Check Player UID"}; +item6[] = {"PlayerUID_Okay",4,218,-150.000000,175.000000,-50.000000,225.000000,10.000000,"PlayerUID" \n "Okay"}; +item7[] = {"Wrong_Version",4,218,125.000000,-75.000000,225.000000,-25.000000,10.000000,"Wrong" \n "Version"}; +item8[] = {"",7,210,471.000061,-54.000099,478.999939,-45.999901,0.000000,""}; +item9[] = {"ERROR_Wrong_Version",2,250,275.000000,-75.000000,375.000000,-25.000000,0.000000,"ERROR" \n "Wrong Version" \n "Epoch"}; +item10[] = {"Disconnect",2,250,600.000000,1225.000000,700.000000,1275.000000,0.000000,"Disconnect"}; +item11[] = {"Server_Okay",4,218,-125.000000,425.000000,-25.000000,475.000000,0.000000,"Server" \n "Okay"}; +item12[] = {"Empty_PlayerUID",4,218,125.000000,125.000000,225.000000,175.000000,0.000000,"Empty" \n "PlayerUID"}; +item13[] = {"ERROR_PlayerUID",2,250,275.000000,125.000000,375.000000,175.000000,0.000000,"ERROR" \n "PlayerUID Empty"}; +item14[] = {"",7,210,471.000061,145.999908,478.999939,154.000092,0.000000,""}; +item15[] = {"Timeout_No_Respo",4,218,125.000000,875.000000,225.000000,925.000000,0.000000,"Timeout" \n "No Response"}; +item16[] = {"Response",4,218,-150.000000,825.000000,-50.000000,875.000000,0.000000,"Response"}; +item17[] = {"Setup_Player_Var",2,250,-25.000000,1075.000000,75.000000,1125.000000,0.000000,"Setup Player" \n "Variables"}; +item18[] = {"Request_Hive",2,250,-25.000000,575.000000,75.000000,625.000000,0.000000,"Request Hive"}; +item19[] = {"Timeout_No_Respo",4,218,125.000000,575.000000,225.000000,625.000000,0.000000,"Timeout" \n "No Response"}; +item20[] = {"ERROR_Server_not",2,250,275.000000,875.000000,375.000000,925.000000,0.000000,"ERROR" \n "Server not" \n "Response"}; +item21[] = {"",7,210,471.000000,895.999939,479.000000,904.000061,0.000000,""}; +item22[] = {"Timeout_No_Respo",4,218,125.000000,775.000000,225.000000,825.000000,0.000000,"Timeout" \n "No Response"}; +item23[] = {"Wrong_Server_Ver",4,218,125.000000,475.000000,225.000000,525.000000,10.000000,"Wrong" \n "Server Version"}; +item24[] = {"true",8,218,-150.000000,1125.000000,-50.000000,1175.000000,0.000000,"true"}; +item25[] = {"ERROR_Wrong_Server",2,250,275.000000,475.000000,375.000000,525.000000,0.000000,"ERROR" \n "Wrong" \n "Server Version"}; +item26[] = {"Display_Message",4,218,600.000000,1150.000000,700.000000,1200.000000,0.000000,"" \n "Display Message" \n "Wait..."}; +item27[] = {"Setup_Player_Obj",2,250,-25.000000,975.000000,75.000000,1025.000000,0.000000,"Setup Player" \n "Object"}; +item28[] = {"Check_if_Player",4,218,750.000000,1225.000000,850.000000,1275.000000,0.000000,"Check if" \n "Player got Kicked"}; +item29[] = {"Preload_done",8,218,-150.000000,1425.000000,-50.000000,1475.000000,0.000000,"Preload" \n "done"}; +item30[] = {"",7,210,471.000000,796.000000,479.000000,804.000000,0.000000,""}; +item31[] = {"",7,210,471.000000,796.000000,479.000000,804.000000,0.000000,""}; +item32[] = {"true",8,218,425.000000,1075.000000,525.000000,1125.000000,0.000000,"true"}; +item33[] = {"Display_Message",2,250,600.000000,1075.000000,700.000000,1125.000000,0.000000,"Display" \n "Message"}; +item34[] = {"Server_Ready",4,218,-25.000000,300.000000,75.000000,350.000000,0.000000,"Server" \n "Ready"}; +item35[] = {"Check_Server",2,250,-25.000000,375.000000,75.000000,425.000000,0.000000,"Check Server"}; +item36[] = {"Server_not_worki",4,218,125.000000,375.000000,225.000000,425.000000,10.000000,"Server" \n "not working"}; +item37[] = {"ERROR_Server_not_1",2,250,275.000000,375.000000,375.000000,425.000000,0.000000,"ERROR" \n "Server not Ready"}; +item38[] = {"",7,210,471.000000,396.000000,479.000000,404.000000,0.000000,""}; +item39[] = {"Check_Server_1",2,250,-25.000000,225.000000,75.000000,275.000000,0.000000,"Check Server"}; +item40[] = {"Timeout_No_Respo",4,218,125.000000,225.000000,225.000000,275.000000,0.000000,"Timeout" \n "No Response"}; +item41[] = {"ERROR_Server_not_2",2,250,275.000000,225.000000,375.000000,275.000000,0.000000,"ERROR" \n "Server not Ready"}; +item42[] = {"",7,210,471.000000,246.000031,479.000000,253.999969,0.000000,""}; +item43[] = {"Reject_without_B",1,250,900.000000,1225.000000,1000.000000,1275.000000,0.000000,"Reject without" \n "BattlEye"}; +item44[] = {"true",8,218,-150.000000,-25.000000,-50.000000,25.000000,0.000000,"true"}; +item45[] = {"Arma_Version_Che",2,250,-25.000000,25.000000,75.000000,75.000000,0.000000,"Arma Version" \n "Check"}; +item46[] = {"Outdated_Version",4,218,125.000000,25.000000,225.000000,75.000000,10.000000,"Outdated" \n "Version"}; +item47[] = {"ERROR_Wrong_Version_1",2,250,275.000000,25.000000,375.000000,75.000000,0.000000,"ERROR" \n "Wrong Version" \n "ArmA"}; +item48[] = {"",7,210,471.000061,45.999908,478.999939,54.000092,0.000000,""}; +item49[] = {"new_player_____p",4,218,-150.000000,1025.000000,-50.000000,1075.000000,0.000000,"new player == " \n "player"}; +item50[] = {"Setup_EH_s_and_H",2,250,-25.000000,1175.000000,75.000000,1225.000000,0.000000,"Setup EH's" \n "and" \n "HitPoints"}; +item51[] = {"no_weapons",4,218,-25.000000,1275.000000,75.000000,1325.000000,0.000000,"no weapons"}; +item52[] = {"Process",2,250,-25.000000,1375.000000,75.000000,1425.000000,0.000000,"Process"}; +item53[] = {"Has_Current_Weap",4,218,100.000000,1175.000000,200.000000,1225.000000,10.000000,"Has" \n "Current" \n "Weapon"}; +item54[] = {"Find_Active_Weap",2,250,225.000000,1175.000000,325.000000,1225.000000,0.000000,"Find" \n "Active" \n "Weapon"}; +item55[] = {"Current_Weapon_Not",4,218,150.000000,1225.000000,250.000000,1275.000000,0.000000,"Current" \n "Weapon" \n "Not Selected"}; +item56[] = {"Current_Weapon_S",4,218,300.000000,1225.000000,400.000000,1275.000000,0.000000,"Current" \n "Weapon" \n "Selected"}; +item57[] = {"Select_Weapon",2,250,150.000000,1300.000000,250.000000,1350.000000,0.000000,"Select" \n "Weapon"}; +item58[] = {"true",8,218,225.000000,1375.000000,325.000000,1425.000000,0.000000,"true"}; +item59[] = {"Do_nothing",2,250,300.000000,1300.000000,400.000000,1350.000000,0.000000,"Do nothing"}; +item60[] = {"Check_New_Player",2,250,-25.000000,875.000000,75.000000,925.000000,0.000000,"Check" \n "New Player" \n "Setup"}; +item61[] = {"check_new__player",4,218,-150.000000,925.000000,-50.000000,975.000000,0.000000,"check new " \n "player not null"}; +item62[] = {"true",8,218,-150.000000,-325.000000,-50.000000,-275.000000,0.000000,"true"}; +item63[] = {"Process_1",2,250,-25.000000,-275.000000,75.000000,-225.000000,0.000000,"Process"}; +item64[] = {"Wait_ArmA_Loading",4,218,-150.000000,-225.000000,-50.000000,-175.000000,0.000000,"Wait ArmA" \n "Loading Screen" \n "Done"}; +item65[] = {"Start_Loading_Sc",2,250,-25.000000,-175.000000,75.000000,-125.000000,0.000000,"Start Loading" \n "Screen"}; +item66[] = {"freshServer",4,218,-325.000000,225.000000,-225.000000,275.000000,0.000000,"freshServer"}; +item67[] = {"Update_Loadingscreen",2,250,-325.000000,300.000000,-225.000000,350.000000,0.000000,"Update" \n "Loadingscreen" \n "Message"}; +item68[] = {"true",8,218,-150.000000,300.000000,-50.000000,350.000000,0.000000,"true"}; +item69[] = {"Timeout_",4,218,125.000000,975.000000,225.000000,1025.000000,0.000000,"" \n "Timeout" \n ""}; +item70[] = {"ERROR_Player_Setup",2,250,275.000000,975.000000,375.000000,1025.000000,0.000000,"ERROR" \n "Player Setup" \n "Invalid"}; +item71[] = {"",7,210,471.000000,996.000000,479.000000,1004.000000,0.000000,""}; +item72[] = {"Server_Version_C",2,250,-25.000000,475.000000,75.000000,525.000000,0.000000,"Server Version" \n "Check"}; +item73[] = {"Version_Okay",4,218,-125.000000,525.000000,-25.000000,575.000000,0.000000,"Version" \n "Okay"}; +item74[] = {"",7,210,471.000000,496.000000,479.000000,504.000000,0.000000,""}; +item75[] = {"ERROR_Server_not_3",2,250,275.000000,575.000000,375.000000,625.000000,0.000000,"ERROR" \n "Server not" \n "Response"}; +item76[] = {"",7,210,471.000000,596.000000,479.000000,604.000000,0.000000,""}; +item77[] = {"new_character",4,218,-250.000000,675.000000,-150.000000,725.000000,10.000000,"new" \n "character"}; +item78[] = {"Hive_Response",4,218,-125.000000,625.000000,-25.000000,675.000000,0.000000,"Hive" \n "Response"}; +item79[] = {"load_old_charact",4,218,-125.000000,725.000000,-25.000000,775.000000,0.000000,"load old" \n "character"}; +item80[] = {"Process_2",2,250,-25.000000,675.000000,75.000000,725.000000,0.000000,"Process"}; +item81[] = {"Open_Gender_Selection",2,250,-400.000000,675.000000,-300.000000,725.000000,0.000000,"Open Gender" \n "Selection Dialog"}; +item82[] = {"Reopen_when_client",4,218,-400.000000,600.000000,-300.000000,650.000000,0.000000,"Reopen" \n "when client hit" \n "escape"}; +item83[] = {"Gender_Selected",4,218,-450.000000,750.000000,-350.000000,800.000000,10.000000,"Gender" \n "Selected"}; +item84[] = {"Timeout",4,218,-350.000000,750.000000,-250.000000,800.000000,0.000000,"Timeout"}; +item85[] = {"Send_character_s",2,250,-400.000000,825.000000,-300.000000,875.000000,0.000000,"Send" \n "character" \n "selection"}; +item86[] = {"Process_3",2,250,-25.000000,775.000000,75.000000,825.000000,0.000000,"Process"}; +item87[] = {"ERROR_Server_not_4",2,250,275.000000,775.000000,375.000000,825.000000,0.000000,"ERROR" \n "Server not" \n "Response"}; +link0[] = {0,62}; +link1[] = {2,3}; +link2[] = {3,7}; +link3[] = {3,44}; +link4[] = {4,5}; +link5[] = {5,6}; +link6[] = {5,12}; +link7[] = {6,39}; +link8[] = {7,9}; +link9[] = {8,48}; +link10[] = {9,8}; +link11[] = {10,28}; +link12[] = {11,72}; +link13[] = {12,13}; +link14[] = {13,14}; +link15[] = {14,42}; +link16[] = {15,20}; +link17[] = {16,60}; +link18[] = {17,24}; +link19[] = {18,19}; +link20[] = {18,78}; +link21[] = {19,75}; +link22[] = {20,21}; +link23[] = {21,71}; +link24[] = {22,87}; +link25[] = {23,25}; +link26[] = {24,50}; +link27[] = {25,74}; +link28[] = {26,10}; +link29[] = {27,49}; +link30[] = {27,69}; +link31[] = {28,43}; +link32[] = {29,1}; +link33[] = {31,21}; +link34[] = {32,33}; +link35[] = {33,26}; +link36[] = {34,35}; +link37[] = {35,11}; +link38[] = {35,36}; +link39[] = {36,37}; +link40[] = {37,38}; +link41[] = {38,74}; +link42[] = {39,34}; +link43[] = {39,40}; +link44[] = {39,66}; +link45[] = {40,41}; +link46[] = {41,42}; +link47[] = {42,38}; +link48[] = {44,45}; +link49[] = {45,4}; +link50[] = {45,46}; +link51[] = {46,47}; +link52[] = {47,48}; +link53[] = {48,14}; +link54[] = {49,17}; +link55[] = {50,51}; +link56[] = {50,53}; +link57[] = {51,52}; +link58[] = {52,29}; +link59[] = {53,54}; +link60[] = {54,55}; +link61[] = {54,56}; +link62[] = {55,57}; +link63[] = {56,59}; +link64[] = {57,58}; +link65[] = {58,52}; +link66[] = {59,58}; +link67[] = {60,15}; +link68[] = {60,61}; +link69[] = {61,27}; +link70[] = {62,63}; +link71[] = {63,64}; +link72[] = {64,65}; +link73[] = {65,2}; +link74[] = {66,67}; +link75[] = {67,68}; +link76[] = {68,39}; +link77[] = {69,70}; +link78[] = {70,71}; +link79[] = {71,32}; +link80[] = {72,23}; +link81[] = {72,73}; +link82[] = {73,18}; +link83[] = {74,76}; +link84[] = {75,76}; +link85[] = {76,31}; +link86[] = {77,81}; +link87[] = {78,80}; +link88[] = {79,86}; +link89[] = {80,77}; +link90[] = {80,79}; +link91[] = {81,82}; +link92[] = {81,83}; +link93[] = {81,84}; +link94[] = {82,81}; +link95[] = {83,85}; +link96[] = {84,85}; +link97[] = {85,79}; +link98[] = {86,16}; +link99[] = {86,22}; +link100[] = {87,31}; +globals[] = {0.000000,0,0,0,0,640,480,1,244,6316128,1,-207.564026,582.257507,1932.771484,781.734619,586,854,1}; +window[] = {2,-1,-1,-1,-1,838,1706,2998,26,3,604}; +*//*%FSM*/ +class FSM +{ + fsmName = "Epoch Login"; + class States + { + /*%FSM*/ + class INIT + { + name = "INIT"; + init = /*%FSM*/"titleCut ["""", ""BLACK FADED"", 1337];" \n + "0 fadeSound 0;" \n + "player enableSimulation false;" \n + "" \n + "_debug = true;" \n + "_myTime = diag_tickTime;" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Init"";" \n + "};" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Process_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class FINISH + { + name = "FINISH"; + init = /*%FSM*/"[] spawn {" \n + " disableSerialization;" \n + " waitUntil{!isNull (findDisplay 46)};" \n + " _display = findDisplay 46;" \n + " {" \n + " _display displayAddEventHandler [_x,([""CfgEpochClient"", _x, """"] call EPOCH_fnc_returnConfigEntryV2)];" \n + " } forEach ([""CfgEpochClient"", ""displayAddEventHandler"", []] call EPOCH_fnc_returnConfigEntryV2);" \n + " " \n + " player switchMove """";" \n + "};" \n + "" \n + "3 fadeSound 1;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Finish!"";" \n + "};" \n + "" \n + "" \n + "" \n + "player enableSimulation true;" \n + "" \n + "titleCut ["""", ""BLACK IN"", 1];" \n + "1338 cutText ["""",""PLAIN"",0]; " \n + "" \n + "progressLoadingScreen 1.0;" \n + "" \n + "endLoadingScreen;" \n + "EPOCH_loadingScreenDone = true;" \n + "" \n + "hintSilent ""Worked"" "/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + }; + }; + /*%FSM*/ + /*%FSM*/ + class Version_Check + { + name = "Version_Check"; + init = /*%FSM*/"if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Version Check"";" \n + "};" \n + "" \n + "// SHOULD BE:" \n + "_epoch_assets0 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_assets"");" \n + "_epoch_assets1 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_assets_1"");" \n + "_epoch_assets2 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""epoch_objects"");" \n + "_epoch_assets3 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_assets_3"");" \n + "_epoch_config = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_config"");" \n + "_epoch_language = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_language"");" \n + "_epoch_underground = getText(configFile >> ""Epoch"" >> ""Version"" >> ""Underground_Epoch"");" \n + "_epoch_vehicles = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_vehicles"");" \n + "_epoch_weapons = getText(configFile >> ""Epoch"" >> ""Version"" >> ""a3_epoch_weapons"");" \n + "" \n + "" \n + "// IS:" \n + "_my_epoch_assets0 = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_assets"" >> ""epochVersion"");" \n + "_my_epoch_assets1 = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_assets_1"" >> ""epochVersion"");" \n + "_my_epoch_assets2 = getText(configFile >> ""CfgPatches"" >> ""epoch_objects"" >> ""epochVersion"");" \n + "_my_epoch_assets3 = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_assets_3"" >> ""epochVersion"");" \n + "_my_epoch_config = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_config"" >> ""epochVersion"");" \n + "_my_epoch_language = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_language"" >> ""epochVersion"");" \n + "_my_epoch_underground = getText(configFile >> ""CfgPatches"" >> ""Underground_Epoch"" >> ""epochVersion"");" \n + "_my_epoch_vehicles = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_vehicles"" >> ""epochVersion"");" \n + "_my_epoch_weapons = getText(configFile >> ""CfgPatches"" >> ""a3_epoch_weapons"" >> ""epochVersion"");" \n + "" \n + "progressLoadingScreen 0.1;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Wrong_Version + { + priority = 10.000000; + to="ERROR_Wrong_Version"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_epoch_assets0 != _epoch_assets0 ||" \n + "_my_epoch_assets1 != _epoch_assets1 ||" \n + "_my_epoch_assets2 != _epoch_assets2 ||" \n + "_my_epoch_assets3 != _epoch_assets3 ||" \n + "_my_epoch_config != _epoch_config ||" \n + "_my_epoch_language != _epoch_language ||" \n + "_my_epoch_underground != _epoch_underground ||" \n + "_my_epoch_vehicles != _epoch_vehicles ||" \n + "_my_epoch_weapons != _epoch_weapons"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class true + { + priority = 0.000000; + to="Arma_Version_Che"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_Player_UID + { + name = "Check_Player_UID"; + init = /*%FSM*/"if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Check PlayerUID"";" \n + "};" \n + "" \n + "_playerUID = getPlayerUID player;" \n + "" \n + "progressLoadingScreen 0.2;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class PlayerUID_Okay + { + priority = 10.000000; + to="Check_Server_1"; + precondition = /*%FSM*/"!isNil ""_playerUID"""/*%FSM*/; + condition=/*%FSM*/"_playerUID != """""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Empty_PlayerUID + { + priority = 0.000000; + to="ERROR_PlayerUID"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Wrong_Version + { + name = "ERROR_Wrong_Version"; + init = /*%FSM*/"_msg = ""You have an outdated version of Epoch"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_EPOCHVERSION = true;" \n + " publicVariableServer ""PLAYER_REJECT_EPOCHVERSION"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Disconnect + { + name = "Disconnect"; + init = /*%FSM*/"endLoadingScreen;" \n + "1338 cutText [_msg,""PLAIN"",0]; " \n + "deleteVehicle player;" \n + "call _rejectPlayer;" \n + "diag_log format [""(%1) %2"",diag_tickTime,_msg];" \n + "_myTime = diag_tickTime;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Check_if_Player + { + priority = 0.000000; + to="Reject_without_B"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 2"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_PlayerUID + { + name = "ERROR_PlayerUID"; + init = /*%FSM*/"_msg = ""Can not setup Player Object! (Error 01)"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_UID = true;" \n + " publicVariableServer ""PLAYER_REJECT_UID"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Setup_Player_Var + { + name = "Setup_Player_Var"; + init = /*%FSM*/"diag_log format[""DEBUG TIME WAITED: %1"", (diag_tickTime - _myTime)];" \n + "{" \n + " missionNamespace setVariable[(format[""EPOCH_player%1"", EPOCH_customVars select _forEachIndex]), _x];" \n + "} forEach _playerVariables;" \n + "" \n + """Loading Player Variables... Please wait!"" call Epoch_updateLoadingScreen;" \n + "" \n + "EPOCH_lastPlayerPos = getPosATL vehicle player;" \n + "" \n + "progressLoadingScreen 0.7;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Setup Player Variables"";" \n + "};" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Setup_EH_s_and_H"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Request_Hive + { + name = "Request_Hive"; + init = /*%FSM*/"_myTime = diag_tickTime;" \n + "" \n + "Epoch_my_Group = [];" \n + "" \n + "player remoteExec [""EPOCH_server_checkPlayer"",2];" \n + "" \n + "" \n + """Loading Player Data... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.5;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Hive_Response + { + priority = 0.000000; + to="Process_2"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_checkPlayer_PVC"""/*%FSM*/; + action=/*%FSM*/"_newChar = EPOCH_checkPlayer_PVC;" \n + "EPOCH_checkPlayer_PVC = nil;"/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not_3"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 120"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not + { + name = "ERROR_Server_not"; + init = /*%FSM*/"_msg = ""Authentication Failed, Disconnect and try again"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_NoResponse2 = true;" \n + " publicVariableServer ""PLAYER_REJECT_NoResponse2"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Wrong_Server + { + name = "ERROR_Wrong_Server"; + init = /*%FSM*/"_msg = format[""Server and Client running with different Version! (You: %1 // Server: %2)"",getText(configFile >> ""CfgMods"" >> ""Epoch"" >> ""version""),_serverVersion];" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_ServerVersion = true;" \n + " publicVariableServer ""PLAYER_REJECT_ServerVersion"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Setup_Player_Obj + { + name = "Setup_Player_Obj"; + init = /*%FSM*/"_ply = player;" \n + "_group = group player;" \n + "" \n + "player reveal _playerObject;" \n + "_playerPos = getposATL _playerObject;" \n + "" \n + "selectPlayer _playerObject;" \n + "" \n + "deleteVehicle _ply;" \n + "deleteGroup _group;" \n + "" \n + """Loading Player Body... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.8;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Setup Player Object"";" \n + "};" \n + "" \n + "_myTime = diag_tickTime;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Timeout_ + { + priority = 0.000000; + to="ERROR_Player_Setup"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 60"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class new_player_____p + { + priority = 0.000000; + to="Setup_Player_Var"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_playerObject == player"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Display_Message + { + name = "Display_Message"; + init = /*%FSM*/"[] spawn {" \n + " waitUntil{!isNull (findDisplay 46)};" \n + " (findDisplay 46) displayAddEventHandler [""KeyDown"",""true""];" \n + " (findDisplay 46) displayAddEventHandler [""KeyUp"",""true""];" \n + "};" \n + "diag_log format [""(%1) %2"",diag_tickTime,_msg];" \n + "_myTime = diag_tickTime;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Display_Message + { + priority = 0.000000; + to="Disconnect"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 10"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_Server + { + name = "Check_Server"; + init = /*%FSM*/"_myTime = diag_tickTime;" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Check Server"";" \n + "};" \n + """Checking Server... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.4;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Server_not_worki + { + priority = 10.000000; + to="ERROR_Server_not_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_BADHIVE""" \n + ""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Server_Okay + { + priority = 0.000000; + to="Server_Version_C"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""Epoch_ServerVersion"""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_1 + { + name = "ERROR_Server_not_1"; + init = /*%FSM*/"_msg = ""Server not Ready (Error 03)"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_NotReady2 = true;" \n + " publicVariableServer ""PLAYER_REJECT_NotReady2"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_Server_1 + { + name = "Check_Server_1"; + init = /*%FSM*/"progressLoadingScreen 0.3;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not_2"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 180"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class freshServer + { + priority = 0.000000; + to="Update_Loadingscreen"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"uiNamespace getVariable ['Epoch_freshServer', false]"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Server_Ready + { + priority = 0.000000; + to="Check_Server"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_SERVER"""/*%FSM*/; + action=/*%FSM*/"_serverUptime = EPOCH_SERVER;" \n + "EPOCH_SERVER = nil;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_2 + { + name = "ERROR_Server_not_2"; + init = /*%FSM*/"_msg = ""Server not Ready (Error 02)"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_NotReady1 = true;" \n + " publicVariableServer ""PLAYER_REJECT_NotReady1"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Reject_without_B + { + name = "Reject_without_B"; + init = /*%FSM*/"[] spawn {" \n + " waitUntil{!isNull (findDisplay 46)};" \n + " waitUntil {" \n + " (findDisplay 46) closeDisplay 0;" \n + " isNull (findDisplay 46)" \n + " };" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + }; + }; + /*%FSM*/ + /*%FSM*/ + class Arma_Version_Che + { + name = "Arma_Version_Che"; + init = /*%FSM*/"progressLoadingScreen 0.15;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Outdated_Version + { + priority = 10.000000; + to="ERROR_Wrong_Version_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"productVersion select 2 < getNumber(configFile >> ""CfgMods"" >> ""Epoch"" >> ""ArmAVersion"")"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Player_Object_Re + { + priority = 0.000000; + to="Check_Player_UID"; + precondition = /*%FSM*/"!isNull player"/*%FSM*/; + condition=/*%FSM*/"player == player"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Wrong_Version_1 + { + name = "ERROR_Wrong_Version_1"; + init = /*%FSM*/"_msg = ""You have an outdated version of ArmA 3"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_ARMAVERSION = true;" \n + " publicVariableServer ""PLAYER_REJECT_ARMAVERSION"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Setup_EH_s_and_H + { + name = "Setup_EH_s_and_H"; + init = /*%FSM*/"{" \n + " player addEventHandler [_x,([""CfgEpochClient"", _x, """"] call EPOCH_fnc_returnConfigEntryV2)];" \n + "} forEach ([""CfgEpochClient"", ""addEventHandler"", []] call EPOCH_fnc_returnConfigEntryV2);" \n + "" \n + "if (count EPOCH_playerHitPoints isEqualTo count ((getAllHitPointsDamage player) param [0,[]])) then {" \n + " {" \n + " player setHitIndex [_forEachIndex, _x];" \n + " }forEach EPOCH_playerHitPoints;" \n + "};" \n + "" \n + "[] spawn EPOCH_masterLoop;" \n + "true call EPOCH_fnc_Weather;" \n + "[5,100] spawn EPOCH_niteLight;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Setup EH's"";" \n + "};" \n + "" \n + """Loading... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.9;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Has_Current_Weap + { + priority = 10.000000; + to="Find_Active_Weap"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_currentWeapon != """""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class no_weapons + { + priority = 0.000000; + to="Process"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_currentWeapon == """""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process + { + name = "Process"; + init = /*%FSM*/"progressLoadingScreen 0.975;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Preload_done + { + priority = 0.000000; + to="FINISH"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"preloadCamera _playerPos"/*%FSM*/; + action=/*%FSM*/"call compile _playerGroupOnline;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Find_Active_Weap + { + name = "Find_Active_Weap"; + init = /*%FSM*/"_activeWeapon = currentWeapon player;" \n + "progressLoadingScreen 0.95;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Current_Weapon_S + { + priority = 0.000000; + to="Do_nothing"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_activeWeapon == _currentWeapon"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Current_Weapon_Not + { + priority = 0.000000; + to="Select_Weapon"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_activeWeapon != _currentWeapon"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Select_Weapon + { + name = "Select_Weapon"; + init = /*%FSM*/"_currentWeapon spawn {" \n + " uiSleep 1; " \n + " player selectWeapon _this;" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Process"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Do_nothing + { + name = "Do_nothing"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Process"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_New_Player + { + name = "Check_New_Player"; + init = /*%FSM*/"_myTime = diag_tickTime;" \n + "" \n + """Loading Player Inventory... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.6;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class check_new__player + { + priority = 0.000000; + to="Setup_Player_Obj"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!(isNull _playerObject) && {_playerObject getVariable [""SETUP"",false]}"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 120"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process_1 + { + name = "Process_1"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Wait_ArmA_Loading + { + priority = 0.000000; + to="Start_Loading_Sc"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"{!isnull _x} count ((uinamespace getvariable ""loading_displays"") - [finddisplay 18]) == 0"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Start_Loading_Sc + { + name = "Start_Loading_Sc"; + init = /*%FSM*/"startLoadingScreen ["""",""EpochLoadingScreen""];" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Start Loadingscreen"";" \n + "};" \n + """Starting Epoch... Please wait!"" call Epoch_updateLoadingScreen;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Version_Check"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Update_Loadingscreen + { + name = "Update_Loadingscreen"; + init = /*%FSM*/"uiNamespace setVariable ['Epoch_freshServer', false];" \n + "" \n + """Server initializing... Please wait!"" call Epoch_updateLoadingScreen;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Check_Server_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Player_Setup + { + name = "ERROR_Player_Setup"; + init = /*%FSM*/"_msg = ""Problem setting up player"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_InvaildSetup = true;" \n + " publicVariableServer ""PLAYER_REJECT_InvaildSetup"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Server_Version_C + { + name = "Server_Version_C"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Wrong_Server_Ver + { + priority = 10.000000; + to="ERROR_Wrong_Server"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"Epoch_ServerVersion != getText(configFile >> ""CfgMods"" >> ""Epoch"" >> ""version"")"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Version_Okay + { + priority = 0.000000; + to="Request_Hive"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_3 + { + name = "ERROR_Server_not_3"; + init = /*%FSM*/"_msg = ""Authentication Failed, Disconnect and try again"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_HiveNotResponse = true;" \n + " publicVariableServer ""PLAYER_REJECT_HiveNotResponse"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process_2 + { + name = "Process_2"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class new_character + { + priority = 10.000000; + to="Open_Gender_Selection"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_newChar"/*%FSM*/; + action=/*%FSM*/"endLoadingScreen;" \n + "_myGenderTime = diag_tickTime;"/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class load_old_charact + { + priority = 0.000000; + to="Process_3"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/"_myTime = diag_tickTime;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Open_Gender_Selection + { + name = "Open_Gender_Selection"; + init = /*%FSM*/"createdialog ""SelectGender"";"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Gender_Selected + { + priority = 10.000000; + to="Send_character_s"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_PlayerIsMale"""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Timeout + { + priority = 0.000000; + to="Send_character_s"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"((diag_tickTime - _myGenderTime) > 30)"/*%FSM*/; + action=/*%FSM*/"EPOCH_PlayerIsMale = true;" \n + "closeDialog 0;"/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Reopen_when_client + { + priority = 0.000000; + to="Open_Gender_Selection"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!dialog && isNil ""EPOCH_PlayerIsMale"""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Send_character_s + { + name = "Send_character_s"; + init = /*%FSM*/"startLoadingScreen ["""",""EpochLoadingScreen""];" \n + """Gender Selected... Please wait!"" call Epoch_updateLoadingScreen;" \n + "" \n + "[player,EPOCH_PlayerIsMale] remoteExec [""EPOCH_server_loadPlayer"",2];" \n + "EPOCH_PlayerIsMale = nil;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class load_old_charact + { + priority = 0.000000; + to="Process_3"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/"_myTime = diag_tickTime;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process_3 + { + name = "Process_3"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not_4"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 120"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Response + { + priority = 0.000000; + to="Check_New_Player"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_C_SET"""/*%FSM*/; + action=/*%FSM*/"_array = EPOCH_C_SET;" \n + "EPOCH_C_SET = nil;" \n + "_playerObject = _array deleteAt 0;" \n + "_playerVariables = _array deleteAt 0;" \n + "_currentWeapon = _array deleteAt 0;" \n + "_magCount = _array deleteAt 0;" \n + "Epoch_my_GroupUID = _array deleteAt 0;" \n + "Epoch_canBeRevived = _array deleteAt 0;" \n + "Epoch_personalToken = _array deleteAt 0;" \n + "reverse _serverUptime;" \n + "_serverUptime pushBack (_array deleteAt 0);" \n + "reverse _serverUptime;" \n + "_serverUptime call EPOCH_client_publicEH;" \n + "_playerGroupOnline = _array deleteAt 0;" \n + "" \n + ""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_4 + { + name = "ERROR_Server_not_4"; + init = /*%FSM*/"_msg = ""Authentication Failed, Disconnect and try again"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_HiveLoadChar = true;" \n + " publicVariableServer ""PLAYER_REJECT_HiveLoadChar"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + }; + initState="INIT"; + finalStates[] = + { + "FINISH", + "Reject_without_B", + }; +}; +/*%FSM*/ \ No newline at end of file diff --git a/Sources/mpmissions/epoch.Chernarus_Summer/description.ext b/Sources/mpmissions/epoch.Chernarus_Summer/description.ext index cfe65cba..8783e3aa 100644 --- a/Sources/mpmissions/epoch.Chernarus_Summer/description.ext +++ b/Sources/mpmissions/epoch.Chernarus_Summer/description.ext @@ -50,6 +50,7 @@ class cfgFunctions }; class postinit { + file = "init\fn_postinit.sqf"; postInit = 1; }; }; diff --git a/Sources/mpmissions/epoch.Chernarus_Summer/init/client_init.sqf b/Sources/mpmissions/epoch.Chernarus_Summer/init/client_init.sqf new file mode 100644 index 00000000..4a32e342 --- /dev/null +++ b/Sources/mpmissions/epoch.Chernarus_Summer/init/client_init.sqf @@ -0,0 +1,76 @@ +/* + 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: + https://github.com/EpochModTeam/Epoch/tree/master/Sources/epoch_code/init/client_init.sqf +*/ +//Variables +EPOCH_CraftingItem = ""; +EPOCH_ESP_TARGETS = []; +EPOCH_ESPMAP_TARGETS = []; +EPOCH_ESPGROUPS = []; +EPOCH_ESPGROUPCOLORS = []; +EPOCH_ESP_PLAYER = false; +EPOCH_ESP_VEHICLES = false; +EPOCH_ESP_VEHICLEPLAYER = []; +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"]; +if (isNil 'EPOCH_diag_fps') then { + EPOCH_diag_fps = 0; +}; +EPOCH_playerIsSwimming = false; +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 = []; +EPOCH_lastPlayerPos = [0,0,0]; +EPOCH_prevOffer = []; +EPOCH_drawIcon3d = false; +EPOCH_velTransform = false; +EPOCH_stabilityTarget = objNull; +EPOCH_currentVehicle = objNull; +EPOCH_currentTarget = objNull; +EPOCH_LootedBlds = []; +EPOCH_soundLevel = 1; +EPOCH_arr_interactedObjs = []; +EPOCH_buildOption = 0; +EPOCH_nearestLocations = []; +onEachFrame EPOCH_onEachFrame; + +EPOCH_LastAirDrop = time; +EPOCH_AirDropCheck = getNumber(missionConfigFile >> "CfgEpochAirDrop" >> "AirDropFreq"); +if(EPOCH_AirDropCheck < 120)then{EPOCH_AirDropCheck = 120;}; +EPOCH_AirDropChance = getNumber(missionConfigFile >> "CfgEpochAirDrop" >> "AirDropChance"); +if(EPOCH_AirDropChance < 0)then{EPOCH_AirDropChance = 101;EPOCH_AirDropCheck = 99999;}; + +EPOCH_droneRndChance = 100; + +// Custom Keys +EPOCH_keysActionPressed = false; //prevents EH spam +0 call EPOCH_clientKeyMap; + +//ON INIT and RESPAWN +call EPOCH_clientInit; + +[] execFSM "\x\addons\a3_epoch_code\system\SPVEH.fsm"; +[] execFSM "system\player_login.fsm"; + +true diff --git a/Sources/mpmissions/epoch.Chernarus_Summer/init/fn_postinit.sqf b/Sources/mpmissions/epoch.Chernarus_Summer/init/fn_postinit.sqf new file mode 100644 index 00000000..8be5aa09 --- /dev/null +++ b/Sources/mpmissions/epoch.Chernarus_Summer/init/fn_postinit.sqf @@ -0,0 +1,18 @@ +/* + Author: Aaron Clark - EpochMod.com + + Contributors: + + Description: + Initalize Player + + 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/master/Sources/epoch_code/init/fn_postinit.sqf +*/ +if (!isDedicated && isMultiplayer && hasInterface) then { + call compile preprocessFileLineNumbers "init\client_init.sqf"; +}; +true diff --git a/Sources/mpmissions/epoch.Desert_E/System/player_login.fsm b/Sources/mpmissions/epoch.Desert_E/System/player_login.fsm new file mode 100644 index 00000000..9426567f --- /dev/null +++ b/Sources/mpmissions/epoch.Desert_E/System/player_login.fsm @@ -0,0 +1,1398 @@ +/*%FSM*/ +/*%FSM*/ +/* +item0[] = {"INIT",0,250,-25.000000,-375.000000,75.000000,-325.000000,0.000000,"INIT"}; +item1[] = {"FINISH",1,4346,-25.000000,1475.000000,75.000000,1525.000000,0.000000,"FINISH"}; +item2[] = {"true",8,218,-150.000000,-125.000000,-50.000000,-75.000000,0.000000,"true"}; +item3[] = {"Version_Check",2,250,-25.000000,-75.000000,75.000000,-25.000000,0.000000,"Version Check"}; +item4[] = {"Player_Object_Re",4,218,-150.000000,75.000000,-50.000000,125.000000,0.000000,"Player" \n "Object Ready"}; +item5[] = {"Check_Player_UID",2,250,-25.000000,125.000000,75.000000,175.000000,0.000000,"Check Player UID"}; +item6[] = {"PlayerUID_Okay",4,218,-150.000000,175.000000,-50.000000,225.000000,10.000000,"PlayerUID" \n "Okay"}; +item7[] = {"Wrong_Version",4,218,125.000000,-75.000000,225.000000,-25.000000,10.000000,"Wrong" \n "Version"}; +item8[] = {"",7,210,471.000061,-54.000099,478.999939,-45.999901,0.000000,""}; +item9[] = {"ERROR_Wrong_Version",2,250,275.000000,-75.000000,375.000000,-25.000000,0.000000,"ERROR" \n "Wrong Version" \n "Epoch"}; +item10[] = {"Disconnect",2,250,600.000000,1225.000000,700.000000,1275.000000,0.000000,"Disconnect"}; +item11[] = {"Server_Okay",4,218,-125.000000,425.000000,-25.000000,475.000000,0.000000,"Server" \n "Okay"}; +item12[] = {"Empty_PlayerUID",4,218,125.000000,125.000000,225.000000,175.000000,0.000000,"Empty" \n "PlayerUID"}; +item13[] = {"ERROR_PlayerUID",2,250,275.000000,125.000000,375.000000,175.000000,0.000000,"ERROR" \n "PlayerUID Empty"}; +item14[] = {"",7,210,471.000061,145.999908,478.999939,154.000092,0.000000,""}; +item15[] = {"Timeout_No_Respo",4,218,125.000000,875.000000,225.000000,925.000000,0.000000,"Timeout" \n "No Response"}; +item16[] = {"Response",4,218,-150.000000,825.000000,-50.000000,875.000000,0.000000,"Response"}; +item17[] = {"Setup_Player_Var",2,250,-25.000000,1075.000000,75.000000,1125.000000,0.000000,"Setup Player" \n "Variables"}; +item18[] = {"Request_Hive",2,250,-25.000000,575.000000,75.000000,625.000000,0.000000,"Request Hive"}; +item19[] = {"Timeout_No_Respo",4,218,125.000000,575.000000,225.000000,625.000000,0.000000,"Timeout" \n "No Response"}; +item20[] = {"ERROR_Server_not",2,250,275.000000,875.000000,375.000000,925.000000,0.000000,"ERROR" \n "Server not" \n "Response"}; +item21[] = {"",7,210,471.000000,895.999939,479.000000,904.000061,0.000000,""}; +item22[] = {"Timeout_No_Respo",4,218,125.000000,775.000000,225.000000,825.000000,0.000000,"Timeout" \n "No Response"}; +item23[] = {"Wrong_Server_Ver",4,218,125.000000,475.000000,225.000000,525.000000,10.000000,"Wrong" \n "Server Version"}; +item24[] = {"true",8,218,-150.000000,1125.000000,-50.000000,1175.000000,0.000000,"true"}; +item25[] = {"ERROR_Wrong_Server",2,250,275.000000,475.000000,375.000000,525.000000,0.000000,"ERROR" \n "Wrong" \n "Server Version"}; +item26[] = {"Display_Message",4,218,600.000000,1150.000000,700.000000,1200.000000,0.000000,"" \n "Display Message" \n "Wait..."}; +item27[] = {"Setup_Player_Obj",2,250,-25.000000,975.000000,75.000000,1025.000000,0.000000,"Setup Player" \n "Object"}; +item28[] = {"Check_if_Player",4,218,750.000000,1225.000000,850.000000,1275.000000,0.000000,"Check if" \n "Player got Kicked"}; +item29[] = {"Preload_done",8,218,-150.000000,1425.000000,-50.000000,1475.000000,0.000000,"Preload" \n "done"}; +item30[] = {"",7,210,471.000000,796.000000,479.000000,804.000000,0.000000,""}; +item31[] = {"",7,210,471.000000,796.000000,479.000000,804.000000,0.000000,""}; +item32[] = {"true",8,218,425.000000,1075.000000,525.000000,1125.000000,0.000000,"true"}; +item33[] = {"Display_Message",2,250,600.000000,1075.000000,700.000000,1125.000000,0.000000,"Display" \n "Message"}; +item34[] = {"Server_Ready",4,218,-25.000000,300.000000,75.000000,350.000000,0.000000,"Server" \n "Ready"}; +item35[] = {"Check_Server",2,250,-25.000000,375.000000,75.000000,425.000000,0.000000,"Check Server"}; +item36[] = {"Server_not_worki",4,218,125.000000,375.000000,225.000000,425.000000,10.000000,"Server" \n "not working"}; +item37[] = {"ERROR_Server_not_1",2,250,275.000000,375.000000,375.000000,425.000000,0.000000,"ERROR" \n "Server not Ready"}; +item38[] = {"",7,210,471.000000,396.000000,479.000000,404.000000,0.000000,""}; +item39[] = {"Check_Server_1",2,250,-25.000000,225.000000,75.000000,275.000000,0.000000,"Check Server"}; +item40[] = {"Timeout_No_Respo",4,218,125.000000,225.000000,225.000000,275.000000,0.000000,"Timeout" \n "No Response"}; +item41[] = {"ERROR_Server_not_2",2,250,275.000000,225.000000,375.000000,275.000000,0.000000,"ERROR" \n "Server not Ready"}; +item42[] = {"",7,210,471.000000,246.000031,479.000000,253.999969,0.000000,""}; +item43[] = {"Reject_without_B",1,250,900.000000,1225.000000,1000.000000,1275.000000,0.000000,"Reject without" \n "BattlEye"}; +item44[] = {"true",8,218,-150.000000,-25.000000,-50.000000,25.000000,0.000000,"true"}; +item45[] = {"Arma_Version_Che",2,250,-25.000000,25.000000,75.000000,75.000000,0.000000,"Arma Version" \n "Check"}; +item46[] = {"Outdated_Version",4,218,125.000000,25.000000,225.000000,75.000000,10.000000,"Outdated" \n "Version"}; +item47[] = {"ERROR_Wrong_Version_1",2,250,275.000000,25.000000,375.000000,75.000000,0.000000,"ERROR" \n "Wrong Version" \n "ArmA"}; +item48[] = {"",7,210,471.000061,45.999908,478.999939,54.000092,0.000000,""}; +item49[] = {"new_player_____p",4,218,-150.000000,1025.000000,-50.000000,1075.000000,0.000000,"new player == " \n "player"}; +item50[] = {"Setup_EH_s_and_H",2,250,-25.000000,1175.000000,75.000000,1225.000000,0.000000,"Setup EH's" \n "and" \n "HitPoints"}; +item51[] = {"no_weapons",4,218,-25.000000,1275.000000,75.000000,1325.000000,0.000000,"no weapons"}; +item52[] = {"Process",2,250,-25.000000,1375.000000,75.000000,1425.000000,0.000000,"Process"}; +item53[] = {"Has_Current_Weap",4,218,100.000000,1175.000000,200.000000,1225.000000,10.000000,"Has" \n "Current" \n "Weapon"}; +item54[] = {"Find_Active_Weap",2,250,225.000000,1175.000000,325.000000,1225.000000,0.000000,"Find" \n "Active" \n "Weapon"}; +item55[] = {"Current_Weapon_Not",4,218,150.000000,1225.000000,250.000000,1275.000000,0.000000,"Current" \n "Weapon" \n "Not Selected"}; +item56[] = {"Current_Weapon_S",4,218,300.000000,1225.000000,400.000000,1275.000000,0.000000,"Current" \n "Weapon" \n "Selected"}; +item57[] = {"Select_Weapon",2,250,150.000000,1300.000000,250.000000,1350.000000,0.000000,"Select" \n "Weapon"}; +item58[] = {"true",8,218,225.000000,1375.000000,325.000000,1425.000000,0.000000,"true"}; +item59[] = {"Do_nothing",2,250,300.000000,1300.000000,400.000000,1350.000000,0.000000,"Do nothing"}; +item60[] = {"Check_New_Player",2,250,-25.000000,875.000000,75.000000,925.000000,0.000000,"Check" \n "New Player" \n "Setup"}; +item61[] = {"check_new__player",4,218,-150.000000,925.000000,-50.000000,975.000000,0.000000,"check new " \n "player not null"}; +item62[] = {"true",8,218,-150.000000,-325.000000,-50.000000,-275.000000,0.000000,"true"}; +item63[] = {"Process_1",2,250,-25.000000,-275.000000,75.000000,-225.000000,0.000000,"Process"}; +item64[] = {"Wait_ArmA_Loading",4,218,-150.000000,-225.000000,-50.000000,-175.000000,0.000000,"Wait ArmA" \n "Loading Screen" \n "Done"}; +item65[] = {"Start_Loading_Sc",2,250,-25.000000,-175.000000,75.000000,-125.000000,0.000000,"Start Loading" \n "Screen"}; +item66[] = {"freshServer",4,218,-325.000000,225.000000,-225.000000,275.000000,0.000000,"freshServer"}; +item67[] = {"Update_Loadingscreen",2,250,-325.000000,300.000000,-225.000000,350.000000,0.000000,"Update" \n "Loadingscreen" \n "Message"}; +item68[] = {"true",8,218,-150.000000,300.000000,-50.000000,350.000000,0.000000,"true"}; +item69[] = {"Timeout_",4,218,125.000000,975.000000,225.000000,1025.000000,0.000000,"" \n "Timeout" \n ""}; +item70[] = {"ERROR_Player_Setup",2,250,275.000000,975.000000,375.000000,1025.000000,0.000000,"ERROR" \n "Player Setup" \n "Invalid"}; +item71[] = {"",7,210,471.000000,996.000000,479.000000,1004.000000,0.000000,""}; +item72[] = {"Server_Version_C",2,250,-25.000000,475.000000,75.000000,525.000000,0.000000,"Server Version" \n "Check"}; +item73[] = {"Version_Okay",4,218,-125.000000,525.000000,-25.000000,575.000000,0.000000,"Version" \n "Okay"}; +item74[] = {"",7,210,471.000000,496.000000,479.000000,504.000000,0.000000,""}; +item75[] = {"ERROR_Server_not_3",2,250,275.000000,575.000000,375.000000,625.000000,0.000000,"ERROR" \n "Server not" \n "Response"}; +item76[] = {"",7,210,471.000000,596.000000,479.000000,604.000000,0.000000,""}; +item77[] = {"new_character",4,218,-250.000000,675.000000,-150.000000,725.000000,10.000000,"new" \n "character"}; +item78[] = {"Hive_Response",4,218,-125.000000,625.000000,-25.000000,675.000000,0.000000,"Hive" \n "Response"}; +item79[] = {"load_old_charact",4,218,-125.000000,725.000000,-25.000000,775.000000,0.000000,"load old" \n "character"}; +item80[] = {"Process_2",2,250,-25.000000,675.000000,75.000000,725.000000,0.000000,"Process"}; +item81[] = {"Open_Gender_Selection",2,250,-400.000000,675.000000,-300.000000,725.000000,0.000000,"Open Gender" \n "Selection Dialog"}; +item82[] = {"Reopen_when_client",4,218,-400.000000,600.000000,-300.000000,650.000000,0.000000,"Reopen" \n "when client hit" \n "escape"}; +item83[] = {"Gender_Selected",4,218,-450.000000,750.000000,-350.000000,800.000000,10.000000,"Gender" \n "Selected"}; +item84[] = {"Timeout",4,218,-350.000000,750.000000,-250.000000,800.000000,0.000000,"Timeout"}; +item85[] = {"Send_character_s",2,250,-400.000000,825.000000,-300.000000,875.000000,0.000000,"Send" \n "character" \n "selection"}; +item86[] = {"Process_3",2,250,-25.000000,775.000000,75.000000,825.000000,0.000000,"Process"}; +item87[] = {"ERROR_Server_not_4",2,250,275.000000,775.000000,375.000000,825.000000,0.000000,"ERROR" \n "Server not" \n "Response"}; +link0[] = {0,62}; +link1[] = {2,3}; +link2[] = {3,7}; +link3[] = {3,44}; +link4[] = {4,5}; +link5[] = {5,6}; +link6[] = {5,12}; +link7[] = {6,39}; +link8[] = {7,9}; +link9[] = {8,48}; +link10[] = {9,8}; +link11[] = {10,28}; +link12[] = {11,72}; +link13[] = {12,13}; +link14[] = {13,14}; +link15[] = {14,42}; +link16[] = {15,20}; +link17[] = {16,60}; +link18[] = {17,24}; +link19[] = {18,19}; +link20[] = {18,78}; +link21[] = {19,75}; +link22[] = {20,21}; +link23[] = {21,71}; +link24[] = {22,87}; +link25[] = {23,25}; +link26[] = {24,50}; +link27[] = {25,74}; +link28[] = {26,10}; +link29[] = {27,49}; +link30[] = {27,69}; +link31[] = {28,43}; +link32[] = {29,1}; +link33[] = {31,21}; +link34[] = {32,33}; +link35[] = {33,26}; +link36[] = {34,35}; +link37[] = {35,11}; +link38[] = {35,36}; +link39[] = {36,37}; +link40[] = {37,38}; +link41[] = {38,74}; +link42[] = {39,34}; +link43[] = {39,40}; +link44[] = {39,66}; +link45[] = {40,41}; +link46[] = {41,42}; +link47[] = {42,38}; +link48[] = {44,45}; +link49[] = {45,4}; +link50[] = {45,46}; +link51[] = {46,47}; +link52[] = {47,48}; +link53[] = {48,14}; +link54[] = {49,17}; +link55[] = {50,51}; +link56[] = {50,53}; +link57[] = {51,52}; +link58[] = {52,29}; +link59[] = {53,54}; +link60[] = {54,55}; +link61[] = {54,56}; +link62[] = {55,57}; +link63[] = {56,59}; +link64[] = {57,58}; +link65[] = {58,52}; +link66[] = {59,58}; +link67[] = {60,15}; +link68[] = {60,61}; +link69[] = {61,27}; +link70[] = {62,63}; +link71[] = {63,64}; +link72[] = {64,65}; +link73[] = {65,2}; +link74[] = {66,67}; +link75[] = {67,68}; +link76[] = {68,39}; +link77[] = {69,70}; +link78[] = {70,71}; +link79[] = {71,32}; +link80[] = {72,23}; +link81[] = {72,73}; +link82[] = {73,18}; +link83[] = {74,76}; +link84[] = {75,76}; +link85[] = {76,31}; +link86[] = {77,81}; +link87[] = {78,80}; +link88[] = {79,86}; +link89[] = {80,77}; +link90[] = {80,79}; +link91[] = {81,82}; +link92[] = {81,83}; +link93[] = {81,84}; +link94[] = {82,81}; +link95[] = {83,85}; +link96[] = {84,85}; +link97[] = {85,79}; +link98[] = {86,16}; +link99[] = {86,22}; +link100[] = {87,31}; +globals[] = {0.000000,0,0,0,0,640,480,1,244,6316128,1,-207.564026,582.257507,1932.771484,781.734619,586,854,1}; +window[] = {2,-1,-1,-1,-1,838,1706,2998,26,3,604}; +*//*%FSM*/ +class FSM +{ + fsmName = "Epoch Login"; + class States + { + /*%FSM*/ + class INIT + { + name = "INIT"; + init = /*%FSM*/"titleCut ["""", ""BLACK FADED"", 1337];" \n + "0 fadeSound 0;" \n + "player enableSimulation false;" \n + "" \n + "_debug = true;" \n + "_myTime = diag_tickTime;" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Init"";" \n + "};" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Process_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class FINISH + { + name = "FINISH"; + init = /*%FSM*/"[] spawn {" \n + " disableSerialization;" \n + " waitUntil{!isNull (findDisplay 46)};" \n + " _display = findDisplay 46;" \n + " {" \n + " _display displayAddEventHandler [_x,([""CfgEpochClient"", _x, """"] call EPOCH_fnc_returnConfigEntryV2)];" \n + " } forEach ([""CfgEpochClient"", ""displayAddEventHandler"", []] call EPOCH_fnc_returnConfigEntryV2);" \n + " " \n + " player switchMove """";" \n + "};" \n + "" \n + "3 fadeSound 1;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Finish!"";" \n + "};" \n + "" \n + "" \n + "" \n + "player enableSimulation true;" \n + "" \n + "titleCut ["""", ""BLACK IN"", 1];" \n + "1338 cutText ["""",""PLAIN"",0]; " \n + "" \n + "progressLoadingScreen 1.0;" \n + "" \n + "endLoadingScreen;" \n + "EPOCH_loadingScreenDone = true;" \n + "" \n + "hintSilent ""Worked"" "/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + }; + }; + /*%FSM*/ + /*%FSM*/ + class Version_Check + { + name = "Version_Check"; + init = /*%FSM*/"if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Version Check"";" \n + "};" \n + "" \n + "// SHOULD BE:" \n + "_epoch_assets0 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_assets"");" \n + "_epoch_assets1 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_assets_1"");" \n + "_epoch_assets2 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""epoch_objects"");" \n + "_epoch_assets3 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_assets_3"");" \n + "_epoch_config = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_config"");" \n + "_epoch_language = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_language"");" \n + "_epoch_underground = getText(configFile >> ""Epoch"" >> ""Version"" >> ""Underground_Epoch"");" \n + "_epoch_vehicles = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_vehicles"");" \n + "_epoch_weapons = getText(configFile >> ""Epoch"" >> ""Version"" >> ""a3_epoch_weapons"");" \n + "" \n + "" \n + "// IS:" \n + "_my_epoch_assets0 = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_assets"" >> ""epochVersion"");" \n + "_my_epoch_assets1 = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_assets_1"" >> ""epochVersion"");" \n + "_my_epoch_assets2 = getText(configFile >> ""CfgPatches"" >> ""epoch_objects"" >> ""epochVersion"");" \n + "_my_epoch_assets3 = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_assets_3"" >> ""epochVersion"");" \n + "_my_epoch_config = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_config"" >> ""epochVersion"");" \n + "_my_epoch_language = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_language"" >> ""epochVersion"");" \n + "_my_epoch_underground = getText(configFile >> ""CfgPatches"" >> ""Underground_Epoch"" >> ""epochVersion"");" \n + "_my_epoch_vehicles = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_vehicles"" >> ""epochVersion"");" \n + "_my_epoch_weapons = getText(configFile >> ""CfgPatches"" >> ""a3_epoch_weapons"" >> ""epochVersion"");" \n + "" \n + "progressLoadingScreen 0.1;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Wrong_Version + { + priority = 10.000000; + to="ERROR_Wrong_Version"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_epoch_assets0 != _epoch_assets0 ||" \n + "_my_epoch_assets1 != _epoch_assets1 ||" \n + "_my_epoch_assets2 != _epoch_assets2 ||" \n + "_my_epoch_assets3 != _epoch_assets3 ||" \n + "_my_epoch_config != _epoch_config ||" \n + "_my_epoch_language != _epoch_language ||" \n + "_my_epoch_underground != _epoch_underground ||" \n + "_my_epoch_vehicles != _epoch_vehicles ||" \n + "_my_epoch_weapons != _epoch_weapons"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class true + { + priority = 0.000000; + to="Arma_Version_Che"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_Player_UID + { + name = "Check_Player_UID"; + init = /*%FSM*/"if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Check PlayerUID"";" \n + "};" \n + "" \n + "_playerUID = getPlayerUID player;" \n + "" \n + "progressLoadingScreen 0.2;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class PlayerUID_Okay + { + priority = 10.000000; + to="Check_Server_1"; + precondition = /*%FSM*/"!isNil ""_playerUID"""/*%FSM*/; + condition=/*%FSM*/"_playerUID != """""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Empty_PlayerUID + { + priority = 0.000000; + to="ERROR_PlayerUID"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Wrong_Version + { + name = "ERROR_Wrong_Version"; + init = /*%FSM*/"_msg = ""You have an outdated version of Epoch"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_EPOCHVERSION = true;" \n + " publicVariableServer ""PLAYER_REJECT_EPOCHVERSION"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Disconnect + { + name = "Disconnect"; + init = /*%FSM*/"endLoadingScreen;" \n + "1338 cutText [_msg,""PLAIN"",0]; " \n + "deleteVehicle player;" \n + "call _rejectPlayer;" \n + "diag_log format [""(%1) %2"",diag_tickTime,_msg];" \n + "_myTime = diag_tickTime;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Check_if_Player + { + priority = 0.000000; + to="Reject_without_B"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 2"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_PlayerUID + { + name = "ERROR_PlayerUID"; + init = /*%FSM*/"_msg = ""Can not setup Player Object! (Error 01)"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_UID = true;" \n + " publicVariableServer ""PLAYER_REJECT_UID"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Setup_Player_Var + { + name = "Setup_Player_Var"; + init = /*%FSM*/"diag_log format[""DEBUG TIME WAITED: %1"", (diag_tickTime - _myTime)];" \n + "{" \n + " missionNamespace setVariable[(format[""EPOCH_player%1"", EPOCH_customVars select _forEachIndex]), _x];" \n + "} forEach _playerVariables;" \n + "" \n + """Loading Player Variables... Please wait!"" call Epoch_updateLoadingScreen;" \n + "" \n + "EPOCH_lastPlayerPos = getPosATL vehicle player;" \n + "" \n + "progressLoadingScreen 0.7;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Setup Player Variables"";" \n + "};" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Setup_EH_s_and_H"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Request_Hive + { + name = "Request_Hive"; + init = /*%FSM*/"_myTime = diag_tickTime;" \n + "" \n + "Epoch_my_Group = [];" \n + "" \n + "player remoteExec [""EPOCH_server_checkPlayer"",2];" \n + "" \n + "" \n + """Loading Player Data... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.5;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Hive_Response + { + priority = 0.000000; + to="Process_2"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_checkPlayer_PVC"""/*%FSM*/; + action=/*%FSM*/"_newChar = EPOCH_checkPlayer_PVC;" \n + "EPOCH_checkPlayer_PVC = nil;"/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not_3"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 120"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not + { + name = "ERROR_Server_not"; + init = /*%FSM*/"_msg = ""Authentication Failed, Disconnect and try again"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_NoResponse2 = true;" \n + " publicVariableServer ""PLAYER_REJECT_NoResponse2"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Wrong_Server + { + name = "ERROR_Wrong_Server"; + init = /*%FSM*/"_msg = format[""Server and Client running with different Version! (You: %1 // Server: %2)"",getText(configFile >> ""CfgMods"" >> ""Epoch"" >> ""version""),_serverVersion];" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_ServerVersion = true;" \n + " publicVariableServer ""PLAYER_REJECT_ServerVersion"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Setup_Player_Obj + { + name = "Setup_Player_Obj"; + init = /*%FSM*/"_ply = player;" \n + "_group = group player;" \n + "" \n + "player reveal _playerObject;" \n + "_playerPos = getposATL _playerObject;" \n + "" \n + "selectPlayer _playerObject;" \n + "" \n + "deleteVehicle _ply;" \n + "deleteGroup _group;" \n + "" \n + """Loading Player Body... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.8;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Setup Player Object"";" \n + "};" \n + "" \n + "_myTime = diag_tickTime;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Timeout_ + { + priority = 0.000000; + to="ERROR_Player_Setup"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 60"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class new_player_____p + { + priority = 0.000000; + to="Setup_Player_Var"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_playerObject == player"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Display_Message + { + name = "Display_Message"; + init = /*%FSM*/"[] spawn {" \n + " waitUntil{!isNull (findDisplay 46)};" \n + " (findDisplay 46) displayAddEventHandler [""KeyDown"",""true""];" \n + " (findDisplay 46) displayAddEventHandler [""KeyUp"",""true""];" \n + "};" \n + "diag_log format [""(%1) %2"",diag_tickTime,_msg];" \n + "_myTime = diag_tickTime;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Display_Message + { + priority = 0.000000; + to="Disconnect"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 10"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_Server + { + name = "Check_Server"; + init = /*%FSM*/"_myTime = diag_tickTime;" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Check Server"";" \n + "};" \n + """Checking Server... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.4;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Server_not_worki + { + priority = 10.000000; + to="ERROR_Server_not_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_BADHIVE""" \n + ""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Server_Okay + { + priority = 0.000000; + to="Server_Version_C"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""Epoch_ServerVersion"""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_1 + { + name = "ERROR_Server_not_1"; + init = /*%FSM*/"_msg = ""Server not Ready (Error 03)"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_NotReady2 = true;" \n + " publicVariableServer ""PLAYER_REJECT_NotReady2"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_Server_1 + { + name = "Check_Server_1"; + init = /*%FSM*/"progressLoadingScreen 0.3;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not_2"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 180"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class freshServer + { + priority = 0.000000; + to="Update_Loadingscreen"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"uiNamespace getVariable ['Epoch_freshServer', false]"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Server_Ready + { + priority = 0.000000; + to="Check_Server"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_SERVER"""/*%FSM*/; + action=/*%FSM*/"_serverUptime = EPOCH_SERVER;" \n + "EPOCH_SERVER = nil;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_2 + { + name = "ERROR_Server_not_2"; + init = /*%FSM*/"_msg = ""Server not Ready (Error 02)"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_NotReady1 = true;" \n + " publicVariableServer ""PLAYER_REJECT_NotReady1"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Reject_without_B + { + name = "Reject_without_B"; + init = /*%FSM*/"[] spawn {" \n + " waitUntil{!isNull (findDisplay 46)};" \n + " waitUntil {" \n + " (findDisplay 46) closeDisplay 0;" \n + " isNull (findDisplay 46)" \n + " };" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + }; + }; + /*%FSM*/ + /*%FSM*/ + class Arma_Version_Che + { + name = "Arma_Version_Che"; + init = /*%FSM*/"progressLoadingScreen 0.15;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Outdated_Version + { + priority = 10.000000; + to="ERROR_Wrong_Version_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"productVersion select 2 < getNumber(configFile >> ""CfgMods"" >> ""Epoch"" >> ""ArmAVersion"")"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Player_Object_Re + { + priority = 0.000000; + to="Check_Player_UID"; + precondition = /*%FSM*/"!isNull player"/*%FSM*/; + condition=/*%FSM*/"player == player"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Wrong_Version_1 + { + name = "ERROR_Wrong_Version_1"; + init = /*%FSM*/"_msg = ""You have an outdated version of ArmA 3"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_ARMAVERSION = true;" \n + " publicVariableServer ""PLAYER_REJECT_ARMAVERSION"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Setup_EH_s_and_H + { + name = "Setup_EH_s_and_H"; + init = /*%FSM*/"{" \n + " player addEventHandler [_x,([""CfgEpochClient"", _x, """"] call EPOCH_fnc_returnConfigEntryV2)];" \n + "} forEach ([""CfgEpochClient"", ""addEventHandler"", []] call EPOCH_fnc_returnConfigEntryV2);" \n + "" \n + "if (count EPOCH_playerHitPoints isEqualTo count ((getAllHitPointsDamage player) param [0,[]])) then {" \n + " {" \n + " player setHitIndex [_forEachIndex, _x];" \n + " }forEach EPOCH_playerHitPoints;" \n + "};" \n + "" \n + "[] spawn EPOCH_masterLoop;" \n + "true call EPOCH_fnc_Weather;" \n + "[5,100] spawn EPOCH_niteLight;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Setup EH's"";" \n + "};" \n + "" \n + """Loading... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.9;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Has_Current_Weap + { + priority = 10.000000; + to="Find_Active_Weap"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_currentWeapon != """""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class no_weapons + { + priority = 0.000000; + to="Process"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_currentWeapon == """""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process + { + name = "Process"; + init = /*%FSM*/"progressLoadingScreen 0.975;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Preload_done + { + priority = 0.000000; + to="FINISH"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"preloadCamera _playerPos"/*%FSM*/; + action=/*%FSM*/"call compile _playerGroupOnline;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Find_Active_Weap + { + name = "Find_Active_Weap"; + init = /*%FSM*/"_activeWeapon = currentWeapon player;" \n + "progressLoadingScreen 0.95;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Current_Weapon_S + { + priority = 0.000000; + to="Do_nothing"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_activeWeapon == _currentWeapon"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Current_Weapon_Not + { + priority = 0.000000; + to="Select_Weapon"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_activeWeapon != _currentWeapon"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Select_Weapon + { + name = "Select_Weapon"; + init = /*%FSM*/"_currentWeapon spawn {" \n + " uiSleep 1; " \n + " player selectWeapon _this;" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Process"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Do_nothing + { + name = "Do_nothing"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Process"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_New_Player + { + name = "Check_New_Player"; + init = /*%FSM*/"_myTime = diag_tickTime;" \n + "" \n + """Loading Player Inventory... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.6;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class check_new__player + { + priority = 0.000000; + to="Setup_Player_Obj"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!(isNull _playerObject) && {_playerObject getVariable [""SETUP"",false]}"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 120"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process_1 + { + name = "Process_1"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Wait_ArmA_Loading + { + priority = 0.000000; + to="Start_Loading_Sc"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"{!isnull _x} count ((uinamespace getvariable ""loading_displays"") - [finddisplay 18]) == 0"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Start_Loading_Sc + { + name = "Start_Loading_Sc"; + init = /*%FSM*/"startLoadingScreen ["""",""EpochLoadingScreen""];" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Start Loadingscreen"";" \n + "};" \n + """Starting Epoch... Please wait!"" call Epoch_updateLoadingScreen;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Version_Check"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Update_Loadingscreen + { + name = "Update_Loadingscreen"; + init = /*%FSM*/"uiNamespace setVariable ['Epoch_freshServer', false];" \n + "" \n + """Server initializing... Please wait!"" call Epoch_updateLoadingScreen;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Check_Server_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Player_Setup + { + name = "ERROR_Player_Setup"; + init = /*%FSM*/"_msg = ""Problem setting up player"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_InvaildSetup = true;" \n + " publicVariableServer ""PLAYER_REJECT_InvaildSetup"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Server_Version_C + { + name = "Server_Version_C"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Wrong_Server_Ver + { + priority = 10.000000; + to="ERROR_Wrong_Server"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"Epoch_ServerVersion != getText(configFile >> ""CfgMods"" >> ""Epoch"" >> ""version"")"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Version_Okay + { + priority = 0.000000; + to="Request_Hive"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_3 + { + name = "ERROR_Server_not_3"; + init = /*%FSM*/"_msg = ""Authentication Failed, Disconnect and try again"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_HiveNotResponse = true;" \n + " publicVariableServer ""PLAYER_REJECT_HiveNotResponse"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process_2 + { + name = "Process_2"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class new_character + { + priority = 10.000000; + to="Open_Gender_Selection"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_newChar"/*%FSM*/; + action=/*%FSM*/"endLoadingScreen;" \n + "_myGenderTime = diag_tickTime;"/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class load_old_charact + { + priority = 0.000000; + to="Process_3"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/"_myTime = diag_tickTime;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Open_Gender_Selection + { + name = "Open_Gender_Selection"; + init = /*%FSM*/"createdialog ""SelectGender"";"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Gender_Selected + { + priority = 10.000000; + to="Send_character_s"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_PlayerIsMale"""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Timeout + { + priority = 0.000000; + to="Send_character_s"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"((diag_tickTime - _myGenderTime) > 30)"/*%FSM*/; + action=/*%FSM*/"EPOCH_PlayerIsMale = true;" \n + "closeDialog 0;"/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Reopen_when_client + { + priority = 0.000000; + to="Open_Gender_Selection"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!dialog && isNil ""EPOCH_PlayerIsMale"""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Send_character_s + { + name = "Send_character_s"; + init = /*%FSM*/"startLoadingScreen ["""",""EpochLoadingScreen""];" \n + """Gender Selected... Please wait!"" call Epoch_updateLoadingScreen;" \n + "" \n + "[player,EPOCH_PlayerIsMale] remoteExec [""EPOCH_server_loadPlayer"",2];" \n + "EPOCH_PlayerIsMale = nil;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class load_old_charact + { + priority = 0.000000; + to="Process_3"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/"_myTime = diag_tickTime;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process_3 + { + name = "Process_3"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not_4"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 120"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Response + { + priority = 0.000000; + to="Check_New_Player"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_C_SET"""/*%FSM*/; + action=/*%FSM*/"_array = EPOCH_C_SET;" \n + "EPOCH_C_SET = nil;" \n + "_playerObject = _array deleteAt 0;" \n + "_playerVariables = _array deleteAt 0;" \n + "_currentWeapon = _array deleteAt 0;" \n + "_magCount = _array deleteAt 0;" \n + "Epoch_my_GroupUID = _array deleteAt 0;" \n + "Epoch_canBeRevived = _array deleteAt 0;" \n + "Epoch_personalToken = _array deleteAt 0;" \n + "reverse _serverUptime;" \n + "_serverUptime pushBack (_array deleteAt 0);" \n + "reverse _serverUptime;" \n + "_serverUptime call EPOCH_client_publicEH;" \n + "_playerGroupOnline = _array deleteAt 0;" \n + "" \n + ""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_4 + { + name = "ERROR_Server_not_4"; + init = /*%FSM*/"_msg = ""Authentication Failed, Disconnect and try again"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_HiveLoadChar = true;" \n + " publicVariableServer ""PLAYER_REJECT_HiveLoadChar"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + }; + initState="INIT"; + finalStates[] = + { + "FINISH", + "Reject_without_B", + }; +}; +/*%FSM*/ \ No newline at end of file diff --git a/Sources/mpmissions/epoch.Desert_E/description.ext b/Sources/mpmissions/epoch.Desert_E/description.ext index cfe65cba..8783e3aa 100644 --- a/Sources/mpmissions/epoch.Desert_E/description.ext +++ b/Sources/mpmissions/epoch.Desert_E/description.ext @@ -50,6 +50,7 @@ class cfgFunctions }; class postinit { + file = "init\fn_postinit.sqf"; postInit = 1; }; }; diff --git a/Sources/mpmissions/epoch.Desert_E/init/client_init.sqf b/Sources/mpmissions/epoch.Desert_E/init/client_init.sqf new file mode 100644 index 00000000..4a32e342 --- /dev/null +++ b/Sources/mpmissions/epoch.Desert_E/init/client_init.sqf @@ -0,0 +1,76 @@ +/* + 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: + https://github.com/EpochModTeam/Epoch/tree/master/Sources/epoch_code/init/client_init.sqf +*/ +//Variables +EPOCH_CraftingItem = ""; +EPOCH_ESP_TARGETS = []; +EPOCH_ESPMAP_TARGETS = []; +EPOCH_ESPGROUPS = []; +EPOCH_ESPGROUPCOLORS = []; +EPOCH_ESP_PLAYER = false; +EPOCH_ESP_VEHICLES = false; +EPOCH_ESP_VEHICLEPLAYER = []; +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"]; +if (isNil 'EPOCH_diag_fps') then { + EPOCH_diag_fps = 0; +}; +EPOCH_playerIsSwimming = false; +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 = []; +EPOCH_lastPlayerPos = [0,0,0]; +EPOCH_prevOffer = []; +EPOCH_drawIcon3d = false; +EPOCH_velTransform = false; +EPOCH_stabilityTarget = objNull; +EPOCH_currentVehicle = objNull; +EPOCH_currentTarget = objNull; +EPOCH_LootedBlds = []; +EPOCH_soundLevel = 1; +EPOCH_arr_interactedObjs = []; +EPOCH_buildOption = 0; +EPOCH_nearestLocations = []; +onEachFrame EPOCH_onEachFrame; + +EPOCH_LastAirDrop = time; +EPOCH_AirDropCheck = getNumber(missionConfigFile >> "CfgEpochAirDrop" >> "AirDropFreq"); +if(EPOCH_AirDropCheck < 120)then{EPOCH_AirDropCheck = 120;}; +EPOCH_AirDropChance = getNumber(missionConfigFile >> "CfgEpochAirDrop" >> "AirDropChance"); +if(EPOCH_AirDropChance < 0)then{EPOCH_AirDropChance = 101;EPOCH_AirDropCheck = 99999;}; + +EPOCH_droneRndChance = 100; + +// Custom Keys +EPOCH_keysActionPressed = false; //prevents EH spam +0 call EPOCH_clientKeyMap; + +//ON INIT and RESPAWN +call EPOCH_clientInit; + +[] execFSM "\x\addons\a3_epoch_code\system\SPVEH.fsm"; +[] execFSM "system\player_login.fsm"; + +true diff --git a/Sources/mpmissions/epoch.Desert_E/init/fn_postinit.sqf b/Sources/mpmissions/epoch.Desert_E/init/fn_postinit.sqf new file mode 100644 index 00000000..8be5aa09 --- /dev/null +++ b/Sources/mpmissions/epoch.Desert_E/init/fn_postinit.sqf @@ -0,0 +1,18 @@ +/* + Author: Aaron Clark - EpochMod.com + + Contributors: + + Description: + Initalize Player + + 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/master/Sources/epoch_code/init/fn_postinit.sqf +*/ +if (!isDedicated && isMultiplayer && hasInterface) then { + call compile preprocessFileLineNumbers "init\client_init.sqf"; +}; +true diff --git a/Sources/mpmissions/epoch.Esseker/System/player_login.fsm b/Sources/mpmissions/epoch.Esseker/System/player_login.fsm new file mode 100644 index 00000000..9426567f --- /dev/null +++ b/Sources/mpmissions/epoch.Esseker/System/player_login.fsm @@ -0,0 +1,1398 @@ +/*%FSM*/ +/*%FSM*/ +/* +item0[] = {"INIT",0,250,-25.000000,-375.000000,75.000000,-325.000000,0.000000,"INIT"}; +item1[] = {"FINISH",1,4346,-25.000000,1475.000000,75.000000,1525.000000,0.000000,"FINISH"}; +item2[] = {"true",8,218,-150.000000,-125.000000,-50.000000,-75.000000,0.000000,"true"}; +item3[] = {"Version_Check",2,250,-25.000000,-75.000000,75.000000,-25.000000,0.000000,"Version Check"}; +item4[] = {"Player_Object_Re",4,218,-150.000000,75.000000,-50.000000,125.000000,0.000000,"Player" \n "Object Ready"}; +item5[] = {"Check_Player_UID",2,250,-25.000000,125.000000,75.000000,175.000000,0.000000,"Check Player UID"}; +item6[] = {"PlayerUID_Okay",4,218,-150.000000,175.000000,-50.000000,225.000000,10.000000,"PlayerUID" \n "Okay"}; +item7[] = {"Wrong_Version",4,218,125.000000,-75.000000,225.000000,-25.000000,10.000000,"Wrong" \n "Version"}; +item8[] = {"",7,210,471.000061,-54.000099,478.999939,-45.999901,0.000000,""}; +item9[] = {"ERROR_Wrong_Version",2,250,275.000000,-75.000000,375.000000,-25.000000,0.000000,"ERROR" \n "Wrong Version" \n "Epoch"}; +item10[] = {"Disconnect",2,250,600.000000,1225.000000,700.000000,1275.000000,0.000000,"Disconnect"}; +item11[] = {"Server_Okay",4,218,-125.000000,425.000000,-25.000000,475.000000,0.000000,"Server" \n "Okay"}; +item12[] = {"Empty_PlayerUID",4,218,125.000000,125.000000,225.000000,175.000000,0.000000,"Empty" \n "PlayerUID"}; +item13[] = {"ERROR_PlayerUID",2,250,275.000000,125.000000,375.000000,175.000000,0.000000,"ERROR" \n "PlayerUID Empty"}; +item14[] = {"",7,210,471.000061,145.999908,478.999939,154.000092,0.000000,""}; +item15[] = {"Timeout_No_Respo",4,218,125.000000,875.000000,225.000000,925.000000,0.000000,"Timeout" \n "No Response"}; +item16[] = {"Response",4,218,-150.000000,825.000000,-50.000000,875.000000,0.000000,"Response"}; +item17[] = {"Setup_Player_Var",2,250,-25.000000,1075.000000,75.000000,1125.000000,0.000000,"Setup Player" \n "Variables"}; +item18[] = {"Request_Hive",2,250,-25.000000,575.000000,75.000000,625.000000,0.000000,"Request Hive"}; +item19[] = {"Timeout_No_Respo",4,218,125.000000,575.000000,225.000000,625.000000,0.000000,"Timeout" \n "No Response"}; +item20[] = {"ERROR_Server_not",2,250,275.000000,875.000000,375.000000,925.000000,0.000000,"ERROR" \n "Server not" \n "Response"}; +item21[] = {"",7,210,471.000000,895.999939,479.000000,904.000061,0.000000,""}; +item22[] = {"Timeout_No_Respo",4,218,125.000000,775.000000,225.000000,825.000000,0.000000,"Timeout" \n "No Response"}; +item23[] = {"Wrong_Server_Ver",4,218,125.000000,475.000000,225.000000,525.000000,10.000000,"Wrong" \n "Server Version"}; +item24[] = {"true",8,218,-150.000000,1125.000000,-50.000000,1175.000000,0.000000,"true"}; +item25[] = {"ERROR_Wrong_Server",2,250,275.000000,475.000000,375.000000,525.000000,0.000000,"ERROR" \n "Wrong" \n "Server Version"}; +item26[] = {"Display_Message",4,218,600.000000,1150.000000,700.000000,1200.000000,0.000000,"" \n "Display Message" \n "Wait..."}; +item27[] = {"Setup_Player_Obj",2,250,-25.000000,975.000000,75.000000,1025.000000,0.000000,"Setup Player" \n "Object"}; +item28[] = {"Check_if_Player",4,218,750.000000,1225.000000,850.000000,1275.000000,0.000000,"Check if" \n "Player got Kicked"}; +item29[] = {"Preload_done",8,218,-150.000000,1425.000000,-50.000000,1475.000000,0.000000,"Preload" \n "done"}; +item30[] = {"",7,210,471.000000,796.000000,479.000000,804.000000,0.000000,""}; +item31[] = {"",7,210,471.000000,796.000000,479.000000,804.000000,0.000000,""}; +item32[] = {"true",8,218,425.000000,1075.000000,525.000000,1125.000000,0.000000,"true"}; +item33[] = {"Display_Message",2,250,600.000000,1075.000000,700.000000,1125.000000,0.000000,"Display" \n "Message"}; +item34[] = {"Server_Ready",4,218,-25.000000,300.000000,75.000000,350.000000,0.000000,"Server" \n "Ready"}; +item35[] = {"Check_Server",2,250,-25.000000,375.000000,75.000000,425.000000,0.000000,"Check Server"}; +item36[] = {"Server_not_worki",4,218,125.000000,375.000000,225.000000,425.000000,10.000000,"Server" \n "not working"}; +item37[] = {"ERROR_Server_not_1",2,250,275.000000,375.000000,375.000000,425.000000,0.000000,"ERROR" \n "Server not Ready"}; +item38[] = {"",7,210,471.000000,396.000000,479.000000,404.000000,0.000000,""}; +item39[] = {"Check_Server_1",2,250,-25.000000,225.000000,75.000000,275.000000,0.000000,"Check Server"}; +item40[] = {"Timeout_No_Respo",4,218,125.000000,225.000000,225.000000,275.000000,0.000000,"Timeout" \n "No Response"}; +item41[] = {"ERROR_Server_not_2",2,250,275.000000,225.000000,375.000000,275.000000,0.000000,"ERROR" \n "Server not Ready"}; +item42[] = {"",7,210,471.000000,246.000031,479.000000,253.999969,0.000000,""}; +item43[] = {"Reject_without_B",1,250,900.000000,1225.000000,1000.000000,1275.000000,0.000000,"Reject without" \n "BattlEye"}; +item44[] = {"true",8,218,-150.000000,-25.000000,-50.000000,25.000000,0.000000,"true"}; +item45[] = {"Arma_Version_Che",2,250,-25.000000,25.000000,75.000000,75.000000,0.000000,"Arma Version" \n "Check"}; +item46[] = {"Outdated_Version",4,218,125.000000,25.000000,225.000000,75.000000,10.000000,"Outdated" \n "Version"}; +item47[] = {"ERROR_Wrong_Version_1",2,250,275.000000,25.000000,375.000000,75.000000,0.000000,"ERROR" \n "Wrong Version" \n "ArmA"}; +item48[] = {"",7,210,471.000061,45.999908,478.999939,54.000092,0.000000,""}; +item49[] = {"new_player_____p",4,218,-150.000000,1025.000000,-50.000000,1075.000000,0.000000,"new player == " \n "player"}; +item50[] = {"Setup_EH_s_and_H",2,250,-25.000000,1175.000000,75.000000,1225.000000,0.000000,"Setup EH's" \n "and" \n "HitPoints"}; +item51[] = {"no_weapons",4,218,-25.000000,1275.000000,75.000000,1325.000000,0.000000,"no weapons"}; +item52[] = {"Process",2,250,-25.000000,1375.000000,75.000000,1425.000000,0.000000,"Process"}; +item53[] = {"Has_Current_Weap",4,218,100.000000,1175.000000,200.000000,1225.000000,10.000000,"Has" \n "Current" \n "Weapon"}; +item54[] = {"Find_Active_Weap",2,250,225.000000,1175.000000,325.000000,1225.000000,0.000000,"Find" \n "Active" \n "Weapon"}; +item55[] = {"Current_Weapon_Not",4,218,150.000000,1225.000000,250.000000,1275.000000,0.000000,"Current" \n "Weapon" \n "Not Selected"}; +item56[] = {"Current_Weapon_S",4,218,300.000000,1225.000000,400.000000,1275.000000,0.000000,"Current" \n "Weapon" \n "Selected"}; +item57[] = {"Select_Weapon",2,250,150.000000,1300.000000,250.000000,1350.000000,0.000000,"Select" \n "Weapon"}; +item58[] = {"true",8,218,225.000000,1375.000000,325.000000,1425.000000,0.000000,"true"}; +item59[] = {"Do_nothing",2,250,300.000000,1300.000000,400.000000,1350.000000,0.000000,"Do nothing"}; +item60[] = {"Check_New_Player",2,250,-25.000000,875.000000,75.000000,925.000000,0.000000,"Check" \n "New Player" \n "Setup"}; +item61[] = {"check_new__player",4,218,-150.000000,925.000000,-50.000000,975.000000,0.000000,"check new " \n "player not null"}; +item62[] = {"true",8,218,-150.000000,-325.000000,-50.000000,-275.000000,0.000000,"true"}; +item63[] = {"Process_1",2,250,-25.000000,-275.000000,75.000000,-225.000000,0.000000,"Process"}; +item64[] = {"Wait_ArmA_Loading",4,218,-150.000000,-225.000000,-50.000000,-175.000000,0.000000,"Wait ArmA" \n "Loading Screen" \n "Done"}; +item65[] = {"Start_Loading_Sc",2,250,-25.000000,-175.000000,75.000000,-125.000000,0.000000,"Start Loading" \n "Screen"}; +item66[] = {"freshServer",4,218,-325.000000,225.000000,-225.000000,275.000000,0.000000,"freshServer"}; +item67[] = {"Update_Loadingscreen",2,250,-325.000000,300.000000,-225.000000,350.000000,0.000000,"Update" \n "Loadingscreen" \n "Message"}; +item68[] = {"true",8,218,-150.000000,300.000000,-50.000000,350.000000,0.000000,"true"}; +item69[] = {"Timeout_",4,218,125.000000,975.000000,225.000000,1025.000000,0.000000,"" \n "Timeout" \n ""}; +item70[] = {"ERROR_Player_Setup",2,250,275.000000,975.000000,375.000000,1025.000000,0.000000,"ERROR" \n "Player Setup" \n "Invalid"}; +item71[] = {"",7,210,471.000000,996.000000,479.000000,1004.000000,0.000000,""}; +item72[] = {"Server_Version_C",2,250,-25.000000,475.000000,75.000000,525.000000,0.000000,"Server Version" \n "Check"}; +item73[] = {"Version_Okay",4,218,-125.000000,525.000000,-25.000000,575.000000,0.000000,"Version" \n "Okay"}; +item74[] = {"",7,210,471.000000,496.000000,479.000000,504.000000,0.000000,""}; +item75[] = {"ERROR_Server_not_3",2,250,275.000000,575.000000,375.000000,625.000000,0.000000,"ERROR" \n "Server not" \n "Response"}; +item76[] = {"",7,210,471.000000,596.000000,479.000000,604.000000,0.000000,""}; +item77[] = {"new_character",4,218,-250.000000,675.000000,-150.000000,725.000000,10.000000,"new" \n "character"}; +item78[] = {"Hive_Response",4,218,-125.000000,625.000000,-25.000000,675.000000,0.000000,"Hive" \n "Response"}; +item79[] = {"load_old_charact",4,218,-125.000000,725.000000,-25.000000,775.000000,0.000000,"load old" \n "character"}; +item80[] = {"Process_2",2,250,-25.000000,675.000000,75.000000,725.000000,0.000000,"Process"}; +item81[] = {"Open_Gender_Selection",2,250,-400.000000,675.000000,-300.000000,725.000000,0.000000,"Open Gender" \n "Selection Dialog"}; +item82[] = {"Reopen_when_client",4,218,-400.000000,600.000000,-300.000000,650.000000,0.000000,"Reopen" \n "when client hit" \n "escape"}; +item83[] = {"Gender_Selected",4,218,-450.000000,750.000000,-350.000000,800.000000,10.000000,"Gender" \n "Selected"}; +item84[] = {"Timeout",4,218,-350.000000,750.000000,-250.000000,800.000000,0.000000,"Timeout"}; +item85[] = {"Send_character_s",2,250,-400.000000,825.000000,-300.000000,875.000000,0.000000,"Send" \n "character" \n "selection"}; +item86[] = {"Process_3",2,250,-25.000000,775.000000,75.000000,825.000000,0.000000,"Process"}; +item87[] = {"ERROR_Server_not_4",2,250,275.000000,775.000000,375.000000,825.000000,0.000000,"ERROR" \n "Server not" \n "Response"}; +link0[] = {0,62}; +link1[] = {2,3}; +link2[] = {3,7}; +link3[] = {3,44}; +link4[] = {4,5}; +link5[] = {5,6}; +link6[] = {5,12}; +link7[] = {6,39}; +link8[] = {7,9}; +link9[] = {8,48}; +link10[] = {9,8}; +link11[] = {10,28}; +link12[] = {11,72}; +link13[] = {12,13}; +link14[] = {13,14}; +link15[] = {14,42}; +link16[] = {15,20}; +link17[] = {16,60}; +link18[] = {17,24}; +link19[] = {18,19}; +link20[] = {18,78}; +link21[] = {19,75}; +link22[] = {20,21}; +link23[] = {21,71}; +link24[] = {22,87}; +link25[] = {23,25}; +link26[] = {24,50}; +link27[] = {25,74}; +link28[] = {26,10}; +link29[] = {27,49}; +link30[] = {27,69}; +link31[] = {28,43}; +link32[] = {29,1}; +link33[] = {31,21}; +link34[] = {32,33}; +link35[] = {33,26}; +link36[] = {34,35}; +link37[] = {35,11}; +link38[] = {35,36}; +link39[] = {36,37}; +link40[] = {37,38}; +link41[] = {38,74}; +link42[] = {39,34}; +link43[] = {39,40}; +link44[] = {39,66}; +link45[] = {40,41}; +link46[] = {41,42}; +link47[] = {42,38}; +link48[] = {44,45}; +link49[] = {45,4}; +link50[] = {45,46}; +link51[] = {46,47}; +link52[] = {47,48}; +link53[] = {48,14}; +link54[] = {49,17}; +link55[] = {50,51}; +link56[] = {50,53}; +link57[] = {51,52}; +link58[] = {52,29}; +link59[] = {53,54}; +link60[] = {54,55}; +link61[] = {54,56}; +link62[] = {55,57}; +link63[] = {56,59}; +link64[] = {57,58}; +link65[] = {58,52}; +link66[] = {59,58}; +link67[] = {60,15}; +link68[] = {60,61}; +link69[] = {61,27}; +link70[] = {62,63}; +link71[] = {63,64}; +link72[] = {64,65}; +link73[] = {65,2}; +link74[] = {66,67}; +link75[] = {67,68}; +link76[] = {68,39}; +link77[] = {69,70}; +link78[] = {70,71}; +link79[] = {71,32}; +link80[] = {72,23}; +link81[] = {72,73}; +link82[] = {73,18}; +link83[] = {74,76}; +link84[] = {75,76}; +link85[] = {76,31}; +link86[] = {77,81}; +link87[] = {78,80}; +link88[] = {79,86}; +link89[] = {80,77}; +link90[] = {80,79}; +link91[] = {81,82}; +link92[] = {81,83}; +link93[] = {81,84}; +link94[] = {82,81}; +link95[] = {83,85}; +link96[] = {84,85}; +link97[] = {85,79}; +link98[] = {86,16}; +link99[] = {86,22}; +link100[] = {87,31}; +globals[] = {0.000000,0,0,0,0,640,480,1,244,6316128,1,-207.564026,582.257507,1932.771484,781.734619,586,854,1}; +window[] = {2,-1,-1,-1,-1,838,1706,2998,26,3,604}; +*//*%FSM*/ +class FSM +{ + fsmName = "Epoch Login"; + class States + { + /*%FSM*/ + class INIT + { + name = "INIT"; + init = /*%FSM*/"titleCut ["""", ""BLACK FADED"", 1337];" \n + "0 fadeSound 0;" \n + "player enableSimulation false;" \n + "" \n + "_debug = true;" \n + "_myTime = diag_tickTime;" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Init"";" \n + "};" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Process_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class FINISH + { + name = "FINISH"; + init = /*%FSM*/"[] spawn {" \n + " disableSerialization;" \n + " waitUntil{!isNull (findDisplay 46)};" \n + " _display = findDisplay 46;" \n + " {" \n + " _display displayAddEventHandler [_x,([""CfgEpochClient"", _x, """"] call EPOCH_fnc_returnConfigEntryV2)];" \n + " } forEach ([""CfgEpochClient"", ""displayAddEventHandler"", []] call EPOCH_fnc_returnConfigEntryV2);" \n + " " \n + " player switchMove """";" \n + "};" \n + "" \n + "3 fadeSound 1;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Finish!"";" \n + "};" \n + "" \n + "" \n + "" \n + "player enableSimulation true;" \n + "" \n + "titleCut ["""", ""BLACK IN"", 1];" \n + "1338 cutText ["""",""PLAIN"",0]; " \n + "" \n + "progressLoadingScreen 1.0;" \n + "" \n + "endLoadingScreen;" \n + "EPOCH_loadingScreenDone = true;" \n + "" \n + "hintSilent ""Worked"" "/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + }; + }; + /*%FSM*/ + /*%FSM*/ + class Version_Check + { + name = "Version_Check"; + init = /*%FSM*/"if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Version Check"";" \n + "};" \n + "" \n + "// SHOULD BE:" \n + "_epoch_assets0 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_assets"");" \n + "_epoch_assets1 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_assets_1"");" \n + "_epoch_assets2 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""epoch_objects"");" \n + "_epoch_assets3 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_assets_3"");" \n + "_epoch_config = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_config"");" \n + "_epoch_language = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_language"");" \n + "_epoch_underground = getText(configFile >> ""Epoch"" >> ""Version"" >> ""Underground_Epoch"");" \n + "_epoch_vehicles = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_vehicles"");" \n + "_epoch_weapons = getText(configFile >> ""Epoch"" >> ""Version"" >> ""a3_epoch_weapons"");" \n + "" \n + "" \n + "// IS:" \n + "_my_epoch_assets0 = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_assets"" >> ""epochVersion"");" \n + "_my_epoch_assets1 = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_assets_1"" >> ""epochVersion"");" \n + "_my_epoch_assets2 = getText(configFile >> ""CfgPatches"" >> ""epoch_objects"" >> ""epochVersion"");" \n + "_my_epoch_assets3 = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_assets_3"" >> ""epochVersion"");" \n + "_my_epoch_config = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_config"" >> ""epochVersion"");" \n + "_my_epoch_language = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_language"" >> ""epochVersion"");" \n + "_my_epoch_underground = getText(configFile >> ""CfgPatches"" >> ""Underground_Epoch"" >> ""epochVersion"");" \n + "_my_epoch_vehicles = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_vehicles"" >> ""epochVersion"");" \n + "_my_epoch_weapons = getText(configFile >> ""CfgPatches"" >> ""a3_epoch_weapons"" >> ""epochVersion"");" \n + "" \n + "progressLoadingScreen 0.1;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Wrong_Version + { + priority = 10.000000; + to="ERROR_Wrong_Version"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_epoch_assets0 != _epoch_assets0 ||" \n + "_my_epoch_assets1 != _epoch_assets1 ||" \n + "_my_epoch_assets2 != _epoch_assets2 ||" \n + "_my_epoch_assets3 != _epoch_assets3 ||" \n + "_my_epoch_config != _epoch_config ||" \n + "_my_epoch_language != _epoch_language ||" \n + "_my_epoch_underground != _epoch_underground ||" \n + "_my_epoch_vehicles != _epoch_vehicles ||" \n + "_my_epoch_weapons != _epoch_weapons"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class true + { + priority = 0.000000; + to="Arma_Version_Che"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_Player_UID + { + name = "Check_Player_UID"; + init = /*%FSM*/"if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Check PlayerUID"";" \n + "};" \n + "" \n + "_playerUID = getPlayerUID player;" \n + "" \n + "progressLoadingScreen 0.2;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class PlayerUID_Okay + { + priority = 10.000000; + to="Check_Server_1"; + precondition = /*%FSM*/"!isNil ""_playerUID"""/*%FSM*/; + condition=/*%FSM*/"_playerUID != """""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Empty_PlayerUID + { + priority = 0.000000; + to="ERROR_PlayerUID"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Wrong_Version + { + name = "ERROR_Wrong_Version"; + init = /*%FSM*/"_msg = ""You have an outdated version of Epoch"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_EPOCHVERSION = true;" \n + " publicVariableServer ""PLAYER_REJECT_EPOCHVERSION"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Disconnect + { + name = "Disconnect"; + init = /*%FSM*/"endLoadingScreen;" \n + "1338 cutText [_msg,""PLAIN"",0]; " \n + "deleteVehicle player;" \n + "call _rejectPlayer;" \n + "diag_log format [""(%1) %2"",diag_tickTime,_msg];" \n + "_myTime = diag_tickTime;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Check_if_Player + { + priority = 0.000000; + to="Reject_without_B"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 2"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_PlayerUID + { + name = "ERROR_PlayerUID"; + init = /*%FSM*/"_msg = ""Can not setup Player Object! (Error 01)"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_UID = true;" \n + " publicVariableServer ""PLAYER_REJECT_UID"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Setup_Player_Var + { + name = "Setup_Player_Var"; + init = /*%FSM*/"diag_log format[""DEBUG TIME WAITED: %1"", (diag_tickTime - _myTime)];" \n + "{" \n + " missionNamespace setVariable[(format[""EPOCH_player%1"", EPOCH_customVars select _forEachIndex]), _x];" \n + "} forEach _playerVariables;" \n + "" \n + """Loading Player Variables... Please wait!"" call Epoch_updateLoadingScreen;" \n + "" \n + "EPOCH_lastPlayerPos = getPosATL vehicle player;" \n + "" \n + "progressLoadingScreen 0.7;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Setup Player Variables"";" \n + "};" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Setup_EH_s_and_H"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Request_Hive + { + name = "Request_Hive"; + init = /*%FSM*/"_myTime = diag_tickTime;" \n + "" \n + "Epoch_my_Group = [];" \n + "" \n + "player remoteExec [""EPOCH_server_checkPlayer"",2];" \n + "" \n + "" \n + """Loading Player Data... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.5;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Hive_Response + { + priority = 0.000000; + to="Process_2"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_checkPlayer_PVC"""/*%FSM*/; + action=/*%FSM*/"_newChar = EPOCH_checkPlayer_PVC;" \n + "EPOCH_checkPlayer_PVC = nil;"/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not_3"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 120"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not + { + name = "ERROR_Server_not"; + init = /*%FSM*/"_msg = ""Authentication Failed, Disconnect and try again"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_NoResponse2 = true;" \n + " publicVariableServer ""PLAYER_REJECT_NoResponse2"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Wrong_Server + { + name = "ERROR_Wrong_Server"; + init = /*%FSM*/"_msg = format[""Server and Client running with different Version! (You: %1 // Server: %2)"",getText(configFile >> ""CfgMods"" >> ""Epoch"" >> ""version""),_serverVersion];" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_ServerVersion = true;" \n + " publicVariableServer ""PLAYER_REJECT_ServerVersion"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Setup_Player_Obj + { + name = "Setup_Player_Obj"; + init = /*%FSM*/"_ply = player;" \n + "_group = group player;" \n + "" \n + "player reveal _playerObject;" \n + "_playerPos = getposATL _playerObject;" \n + "" \n + "selectPlayer _playerObject;" \n + "" \n + "deleteVehicle _ply;" \n + "deleteGroup _group;" \n + "" \n + """Loading Player Body... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.8;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Setup Player Object"";" \n + "};" \n + "" \n + "_myTime = diag_tickTime;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Timeout_ + { + priority = 0.000000; + to="ERROR_Player_Setup"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 60"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class new_player_____p + { + priority = 0.000000; + to="Setup_Player_Var"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_playerObject == player"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Display_Message + { + name = "Display_Message"; + init = /*%FSM*/"[] spawn {" \n + " waitUntil{!isNull (findDisplay 46)};" \n + " (findDisplay 46) displayAddEventHandler [""KeyDown"",""true""];" \n + " (findDisplay 46) displayAddEventHandler [""KeyUp"",""true""];" \n + "};" \n + "diag_log format [""(%1) %2"",diag_tickTime,_msg];" \n + "_myTime = diag_tickTime;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Display_Message + { + priority = 0.000000; + to="Disconnect"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 10"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_Server + { + name = "Check_Server"; + init = /*%FSM*/"_myTime = diag_tickTime;" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Check Server"";" \n + "};" \n + """Checking Server... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.4;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Server_not_worki + { + priority = 10.000000; + to="ERROR_Server_not_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_BADHIVE""" \n + ""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Server_Okay + { + priority = 0.000000; + to="Server_Version_C"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""Epoch_ServerVersion"""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_1 + { + name = "ERROR_Server_not_1"; + init = /*%FSM*/"_msg = ""Server not Ready (Error 03)"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_NotReady2 = true;" \n + " publicVariableServer ""PLAYER_REJECT_NotReady2"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_Server_1 + { + name = "Check_Server_1"; + init = /*%FSM*/"progressLoadingScreen 0.3;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not_2"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 180"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class freshServer + { + priority = 0.000000; + to="Update_Loadingscreen"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"uiNamespace getVariable ['Epoch_freshServer', false]"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Server_Ready + { + priority = 0.000000; + to="Check_Server"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_SERVER"""/*%FSM*/; + action=/*%FSM*/"_serverUptime = EPOCH_SERVER;" \n + "EPOCH_SERVER = nil;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_2 + { + name = "ERROR_Server_not_2"; + init = /*%FSM*/"_msg = ""Server not Ready (Error 02)"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_NotReady1 = true;" \n + " publicVariableServer ""PLAYER_REJECT_NotReady1"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Reject_without_B + { + name = "Reject_without_B"; + init = /*%FSM*/"[] spawn {" \n + " waitUntil{!isNull (findDisplay 46)};" \n + " waitUntil {" \n + " (findDisplay 46) closeDisplay 0;" \n + " isNull (findDisplay 46)" \n + " };" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + }; + }; + /*%FSM*/ + /*%FSM*/ + class Arma_Version_Che + { + name = "Arma_Version_Che"; + init = /*%FSM*/"progressLoadingScreen 0.15;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Outdated_Version + { + priority = 10.000000; + to="ERROR_Wrong_Version_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"productVersion select 2 < getNumber(configFile >> ""CfgMods"" >> ""Epoch"" >> ""ArmAVersion"")"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Player_Object_Re + { + priority = 0.000000; + to="Check_Player_UID"; + precondition = /*%FSM*/"!isNull player"/*%FSM*/; + condition=/*%FSM*/"player == player"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Wrong_Version_1 + { + name = "ERROR_Wrong_Version_1"; + init = /*%FSM*/"_msg = ""You have an outdated version of ArmA 3"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_ARMAVERSION = true;" \n + " publicVariableServer ""PLAYER_REJECT_ARMAVERSION"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Setup_EH_s_and_H + { + name = "Setup_EH_s_and_H"; + init = /*%FSM*/"{" \n + " player addEventHandler [_x,([""CfgEpochClient"", _x, """"] call EPOCH_fnc_returnConfigEntryV2)];" \n + "} forEach ([""CfgEpochClient"", ""addEventHandler"", []] call EPOCH_fnc_returnConfigEntryV2);" \n + "" \n + "if (count EPOCH_playerHitPoints isEqualTo count ((getAllHitPointsDamage player) param [0,[]])) then {" \n + " {" \n + " player setHitIndex [_forEachIndex, _x];" \n + " }forEach EPOCH_playerHitPoints;" \n + "};" \n + "" \n + "[] spawn EPOCH_masterLoop;" \n + "true call EPOCH_fnc_Weather;" \n + "[5,100] spawn EPOCH_niteLight;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Setup EH's"";" \n + "};" \n + "" \n + """Loading... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.9;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Has_Current_Weap + { + priority = 10.000000; + to="Find_Active_Weap"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_currentWeapon != """""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class no_weapons + { + priority = 0.000000; + to="Process"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_currentWeapon == """""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process + { + name = "Process"; + init = /*%FSM*/"progressLoadingScreen 0.975;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Preload_done + { + priority = 0.000000; + to="FINISH"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"preloadCamera _playerPos"/*%FSM*/; + action=/*%FSM*/"call compile _playerGroupOnline;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Find_Active_Weap + { + name = "Find_Active_Weap"; + init = /*%FSM*/"_activeWeapon = currentWeapon player;" \n + "progressLoadingScreen 0.95;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Current_Weapon_S + { + priority = 0.000000; + to="Do_nothing"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_activeWeapon == _currentWeapon"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Current_Weapon_Not + { + priority = 0.000000; + to="Select_Weapon"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_activeWeapon != _currentWeapon"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Select_Weapon + { + name = "Select_Weapon"; + init = /*%FSM*/"_currentWeapon spawn {" \n + " uiSleep 1; " \n + " player selectWeapon _this;" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Process"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Do_nothing + { + name = "Do_nothing"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Process"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_New_Player + { + name = "Check_New_Player"; + init = /*%FSM*/"_myTime = diag_tickTime;" \n + "" \n + """Loading Player Inventory... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.6;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class check_new__player + { + priority = 0.000000; + to="Setup_Player_Obj"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!(isNull _playerObject) && {_playerObject getVariable [""SETUP"",false]}"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 120"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process_1 + { + name = "Process_1"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Wait_ArmA_Loading + { + priority = 0.000000; + to="Start_Loading_Sc"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"{!isnull _x} count ((uinamespace getvariable ""loading_displays"") - [finddisplay 18]) == 0"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Start_Loading_Sc + { + name = "Start_Loading_Sc"; + init = /*%FSM*/"startLoadingScreen ["""",""EpochLoadingScreen""];" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Start Loadingscreen"";" \n + "};" \n + """Starting Epoch... Please wait!"" call Epoch_updateLoadingScreen;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Version_Check"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Update_Loadingscreen + { + name = "Update_Loadingscreen"; + init = /*%FSM*/"uiNamespace setVariable ['Epoch_freshServer', false];" \n + "" \n + """Server initializing... Please wait!"" call Epoch_updateLoadingScreen;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Check_Server_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Player_Setup + { + name = "ERROR_Player_Setup"; + init = /*%FSM*/"_msg = ""Problem setting up player"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_InvaildSetup = true;" \n + " publicVariableServer ""PLAYER_REJECT_InvaildSetup"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Server_Version_C + { + name = "Server_Version_C"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Wrong_Server_Ver + { + priority = 10.000000; + to="ERROR_Wrong_Server"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"Epoch_ServerVersion != getText(configFile >> ""CfgMods"" >> ""Epoch"" >> ""version"")"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Version_Okay + { + priority = 0.000000; + to="Request_Hive"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_3 + { + name = "ERROR_Server_not_3"; + init = /*%FSM*/"_msg = ""Authentication Failed, Disconnect and try again"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_HiveNotResponse = true;" \n + " publicVariableServer ""PLAYER_REJECT_HiveNotResponse"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process_2 + { + name = "Process_2"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class new_character + { + priority = 10.000000; + to="Open_Gender_Selection"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_newChar"/*%FSM*/; + action=/*%FSM*/"endLoadingScreen;" \n + "_myGenderTime = diag_tickTime;"/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class load_old_charact + { + priority = 0.000000; + to="Process_3"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/"_myTime = diag_tickTime;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Open_Gender_Selection + { + name = "Open_Gender_Selection"; + init = /*%FSM*/"createdialog ""SelectGender"";"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Gender_Selected + { + priority = 10.000000; + to="Send_character_s"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_PlayerIsMale"""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Timeout + { + priority = 0.000000; + to="Send_character_s"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"((diag_tickTime - _myGenderTime) > 30)"/*%FSM*/; + action=/*%FSM*/"EPOCH_PlayerIsMale = true;" \n + "closeDialog 0;"/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Reopen_when_client + { + priority = 0.000000; + to="Open_Gender_Selection"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!dialog && isNil ""EPOCH_PlayerIsMale"""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Send_character_s + { + name = "Send_character_s"; + init = /*%FSM*/"startLoadingScreen ["""",""EpochLoadingScreen""];" \n + """Gender Selected... Please wait!"" call Epoch_updateLoadingScreen;" \n + "" \n + "[player,EPOCH_PlayerIsMale] remoteExec [""EPOCH_server_loadPlayer"",2];" \n + "EPOCH_PlayerIsMale = nil;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class load_old_charact + { + priority = 0.000000; + to="Process_3"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/"_myTime = diag_tickTime;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process_3 + { + name = "Process_3"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not_4"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 120"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Response + { + priority = 0.000000; + to="Check_New_Player"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_C_SET"""/*%FSM*/; + action=/*%FSM*/"_array = EPOCH_C_SET;" \n + "EPOCH_C_SET = nil;" \n + "_playerObject = _array deleteAt 0;" \n + "_playerVariables = _array deleteAt 0;" \n + "_currentWeapon = _array deleteAt 0;" \n + "_magCount = _array deleteAt 0;" \n + "Epoch_my_GroupUID = _array deleteAt 0;" \n + "Epoch_canBeRevived = _array deleteAt 0;" \n + "Epoch_personalToken = _array deleteAt 0;" \n + "reverse _serverUptime;" \n + "_serverUptime pushBack (_array deleteAt 0);" \n + "reverse _serverUptime;" \n + "_serverUptime call EPOCH_client_publicEH;" \n + "_playerGroupOnline = _array deleteAt 0;" \n + "" \n + ""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_4 + { + name = "ERROR_Server_not_4"; + init = /*%FSM*/"_msg = ""Authentication Failed, Disconnect and try again"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_HiveLoadChar = true;" \n + " publicVariableServer ""PLAYER_REJECT_HiveLoadChar"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + }; + initState="INIT"; + finalStates[] = + { + "FINISH", + "Reject_without_B", + }; +}; +/*%FSM*/ \ No newline at end of file diff --git a/Sources/mpmissions/epoch.Esseker/description.ext b/Sources/mpmissions/epoch.Esseker/description.ext index 20b1bdac..8783e3aa 100644 --- a/Sources/mpmissions/epoch.Esseker/description.ext +++ b/Sources/mpmissions/epoch.Esseker/description.ext @@ -24,7 +24,7 @@ debriefing = 0; enableDebugConsole = 0; joinUnassigned = 0; respawnOnStart = 0; -forceRotorLibSimulation = 0; +forceRotorLibSimulation = 1; corpseManagerMode = 1; corpseLimit = 10; @@ -50,6 +50,7 @@ class cfgFunctions }; class postinit { + file = "init\fn_postinit.sqf"; postInit = 1; }; }; diff --git a/Sources/mpmissions/epoch.Esseker/init/client_init.sqf b/Sources/mpmissions/epoch.Esseker/init/client_init.sqf new file mode 100644 index 00000000..4a32e342 --- /dev/null +++ b/Sources/mpmissions/epoch.Esseker/init/client_init.sqf @@ -0,0 +1,76 @@ +/* + 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: + https://github.com/EpochModTeam/Epoch/tree/master/Sources/epoch_code/init/client_init.sqf +*/ +//Variables +EPOCH_CraftingItem = ""; +EPOCH_ESP_TARGETS = []; +EPOCH_ESPMAP_TARGETS = []; +EPOCH_ESPGROUPS = []; +EPOCH_ESPGROUPCOLORS = []; +EPOCH_ESP_PLAYER = false; +EPOCH_ESP_VEHICLES = false; +EPOCH_ESP_VEHICLEPLAYER = []; +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"]; +if (isNil 'EPOCH_diag_fps') then { + EPOCH_diag_fps = 0; +}; +EPOCH_playerIsSwimming = false; +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 = []; +EPOCH_lastPlayerPos = [0,0,0]; +EPOCH_prevOffer = []; +EPOCH_drawIcon3d = false; +EPOCH_velTransform = false; +EPOCH_stabilityTarget = objNull; +EPOCH_currentVehicle = objNull; +EPOCH_currentTarget = objNull; +EPOCH_LootedBlds = []; +EPOCH_soundLevel = 1; +EPOCH_arr_interactedObjs = []; +EPOCH_buildOption = 0; +EPOCH_nearestLocations = []; +onEachFrame EPOCH_onEachFrame; + +EPOCH_LastAirDrop = time; +EPOCH_AirDropCheck = getNumber(missionConfigFile >> "CfgEpochAirDrop" >> "AirDropFreq"); +if(EPOCH_AirDropCheck < 120)then{EPOCH_AirDropCheck = 120;}; +EPOCH_AirDropChance = getNumber(missionConfigFile >> "CfgEpochAirDrop" >> "AirDropChance"); +if(EPOCH_AirDropChance < 0)then{EPOCH_AirDropChance = 101;EPOCH_AirDropCheck = 99999;}; + +EPOCH_droneRndChance = 100; + +// Custom Keys +EPOCH_keysActionPressed = false; //prevents EH spam +0 call EPOCH_clientKeyMap; + +//ON INIT and RESPAWN +call EPOCH_clientInit; + +[] execFSM "\x\addons\a3_epoch_code\system\SPVEH.fsm"; +[] execFSM "system\player_login.fsm"; + +true diff --git a/Sources/mpmissions/epoch.Esseker/init/fn_postinit.sqf b/Sources/mpmissions/epoch.Esseker/init/fn_postinit.sqf new file mode 100644 index 00000000..8be5aa09 --- /dev/null +++ b/Sources/mpmissions/epoch.Esseker/init/fn_postinit.sqf @@ -0,0 +1,18 @@ +/* + Author: Aaron Clark - EpochMod.com + + Contributors: + + Description: + Initalize Player + + 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/master/Sources/epoch_code/init/fn_postinit.sqf +*/ +if (!isDedicated && isMultiplayer && hasInterface) then { + call compile preprocessFileLineNumbers "init\client_init.sqf"; +}; +true diff --git a/Sources/mpmissions/epoch.Mountains_ACR/System/player_login.fsm b/Sources/mpmissions/epoch.Mountains_ACR/System/player_login.fsm new file mode 100644 index 00000000..9426567f --- /dev/null +++ b/Sources/mpmissions/epoch.Mountains_ACR/System/player_login.fsm @@ -0,0 +1,1398 @@ +/*%FSM*/ +/*%FSM*/ +/* +item0[] = {"INIT",0,250,-25.000000,-375.000000,75.000000,-325.000000,0.000000,"INIT"}; +item1[] = {"FINISH",1,4346,-25.000000,1475.000000,75.000000,1525.000000,0.000000,"FINISH"}; +item2[] = {"true",8,218,-150.000000,-125.000000,-50.000000,-75.000000,0.000000,"true"}; +item3[] = {"Version_Check",2,250,-25.000000,-75.000000,75.000000,-25.000000,0.000000,"Version Check"}; +item4[] = {"Player_Object_Re",4,218,-150.000000,75.000000,-50.000000,125.000000,0.000000,"Player" \n "Object Ready"}; +item5[] = {"Check_Player_UID",2,250,-25.000000,125.000000,75.000000,175.000000,0.000000,"Check Player UID"}; +item6[] = {"PlayerUID_Okay",4,218,-150.000000,175.000000,-50.000000,225.000000,10.000000,"PlayerUID" \n "Okay"}; +item7[] = {"Wrong_Version",4,218,125.000000,-75.000000,225.000000,-25.000000,10.000000,"Wrong" \n "Version"}; +item8[] = {"",7,210,471.000061,-54.000099,478.999939,-45.999901,0.000000,""}; +item9[] = {"ERROR_Wrong_Version",2,250,275.000000,-75.000000,375.000000,-25.000000,0.000000,"ERROR" \n "Wrong Version" \n "Epoch"}; +item10[] = {"Disconnect",2,250,600.000000,1225.000000,700.000000,1275.000000,0.000000,"Disconnect"}; +item11[] = {"Server_Okay",4,218,-125.000000,425.000000,-25.000000,475.000000,0.000000,"Server" \n "Okay"}; +item12[] = {"Empty_PlayerUID",4,218,125.000000,125.000000,225.000000,175.000000,0.000000,"Empty" \n "PlayerUID"}; +item13[] = {"ERROR_PlayerUID",2,250,275.000000,125.000000,375.000000,175.000000,0.000000,"ERROR" \n "PlayerUID Empty"}; +item14[] = {"",7,210,471.000061,145.999908,478.999939,154.000092,0.000000,""}; +item15[] = {"Timeout_No_Respo",4,218,125.000000,875.000000,225.000000,925.000000,0.000000,"Timeout" \n "No Response"}; +item16[] = {"Response",4,218,-150.000000,825.000000,-50.000000,875.000000,0.000000,"Response"}; +item17[] = {"Setup_Player_Var",2,250,-25.000000,1075.000000,75.000000,1125.000000,0.000000,"Setup Player" \n "Variables"}; +item18[] = {"Request_Hive",2,250,-25.000000,575.000000,75.000000,625.000000,0.000000,"Request Hive"}; +item19[] = {"Timeout_No_Respo",4,218,125.000000,575.000000,225.000000,625.000000,0.000000,"Timeout" \n "No Response"}; +item20[] = {"ERROR_Server_not",2,250,275.000000,875.000000,375.000000,925.000000,0.000000,"ERROR" \n "Server not" \n "Response"}; +item21[] = {"",7,210,471.000000,895.999939,479.000000,904.000061,0.000000,""}; +item22[] = {"Timeout_No_Respo",4,218,125.000000,775.000000,225.000000,825.000000,0.000000,"Timeout" \n "No Response"}; +item23[] = {"Wrong_Server_Ver",4,218,125.000000,475.000000,225.000000,525.000000,10.000000,"Wrong" \n "Server Version"}; +item24[] = {"true",8,218,-150.000000,1125.000000,-50.000000,1175.000000,0.000000,"true"}; +item25[] = {"ERROR_Wrong_Server",2,250,275.000000,475.000000,375.000000,525.000000,0.000000,"ERROR" \n "Wrong" \n "Server Version"}; +item26[] = {"Display_Message",4,218,600.000000,1150.000000,700.000000,1200.000000,0.000000,"" \n "Display Message" \n "Wait..."}; +item27[] = {"Setup_Player_Obj",2,250,-25.000000,975.000000,75.000000,1025.000000,0.000000,"Setup Player" \n "Object"}; +item28[] = {"Check_if_Player",4,218,750.000000,1225.000000,850.000000,1275.000000,0.000000,"Check if" \n "Player got Kicked"}; +item29[] = {"Preload_done",8,218,-150.000000,1425.000000,-50.000000,1475.000000,0.000000,"Preload" \n "done"}; +item30[] = {"",7,210,471.000000,796.000000,479.000000,804.000000,0.000000,""}; +item31[] = {"",7,210,471.000000,796.000000,479.000000,804.000000,0.000000,""}; +item32[] = {"true",8,218,425.000000,1075.000000,525.000000,1125.000000,0.000000,"true"}; +item33[] = {"Display_Message",2,250,600.000000,1075.000000,700.000000,1125.000000,0.000000,"Display" \n "Message"}; +item34[] = {"Server_Ready",4,218,-25.000000,300.000000,75.000000,350.000000,0.000000,"Server" \n "Ready"}; +item35[] = {"Check_Server",2,250,-25.000000,375.000000,75.000000,425.000000,0.000000,"Check Server"}; +item36[] = {"Server_not_worki",4,218,125.000000,375.000000,225.000000,425.000000,10.000000,"Server" \n "not working"}; +item37[] = {"ERROR_Server_not_1",2,250,275.000000,375.000000,375.000000,425.000000,0.000000,"ERROR" \n "Server not Ready"}; +item38[] = {"",7,210,471.000000,396.000000,479.000000,404.000000,0.000000,""}; +item39[] = {"Check_Server_1",2,250,-25.000000,225.000000,75.000000,275.000000,0.000000,"Check Server"}; +item40[] = {"Timeout_No_Respo",4,218,125.000000,225.000000,225.000000,275.000000,0.000000,"Timeout" \n "No Response"}; +item41[] = {"ERROR_Server_not_2",2,250,275.000000,225.000000,375.000000,275.000000,0.000000,"ERROR" \n "Server not Ready"}; +item42[] = {"",7,210,471.000000,246.000031,479.000000,253.999969,0.000000,""}; +item43[] = {"Reject_without_B",1,250,900.000000,1225.000000,1000.000000,1275.000000,0.000000,"Reject without" \n "BattlEye"}; +item44[] = {"true",8,218,-150.000000,-25.000000,-50.000000,25.000000,0.000000,"true"}; +item45[] = {"Arma_Version_Che",2,250,-25.000000,25.000000,75.000000,75.000000,0.000000,"Arma Version" \n "Check"}; +item46[] = {"Outdated_Version",4,218,125.000000,25.000000,225.000000,75.000000,10.000000,"Outdated" \n "Version"}; +item47[] = {"ERROR_Wrong_Version_1",2,250,275.000000,25.000000,375.000000,75.000000,0.000000,"ERROR" \n "Wrong Version" \n "ArmA"}; +item48[] = {"",7,210,471.000061,45.999908,478.999939,54.000092,0.000000,""}; +item49[] = {"new_player_____p",4,218,-150.000000,1025.000000,-50.000000,1075.000000,0.000000,"new player == " \n "player"}; +item50[] = {"Setup_EH_s_and_H",2,250,-25.000000,1175.000000,75.000000,1225.000000,0.000000,"Setup EH's" \n "and" \n "HitPoints"}; +item51[] = {"no_weapons",4,218,-25.000000,1275.000000,75.000000,1325.000000,0.000000,"no weapons"}; +item52[] = {"Process",2,250,-25.000000,1375.000000,75.000000,1425.000000,0.000000,"Process"}; +item53[] = {"Has_Current_Weap",4,218,100.000000,1175.000000,200.000000,1225.000000,10.000000,"Has" \n "Current" \n "Weapon"}; +item54[] = {"Find_Active_Weap",2,250,225.000000,1175.000000,325.000000,1225.000000,0.000000,"Find" \n "Active" \n "Weapon"}; +item55[] = {"Current_Weapon_Not",4,218,150.000000,1225.000000,250.000000,1275.000000,0.000000,"Current" \n "Weapon" \n "Not Selected"}; +item56[] = {"Current_Weapon_S",4,218,300.000000,1225.000000,400.000000,1275.000000,0.000000,"Current" \n "Weapon" \n "Selected"}; +item57[] = {"Select_Weapon",2,250,150.000000,1300.000000,250.000000,1350.000000,0.000000,"Select" \n "Weapon"}; +item58[] = {"true",8,218,225.000000,1375.000000,325.000000,1425.000000,0.000000,"true"}; +item59[] = {"Do_nothing",2,250,300.000000,1300.000000,400.000000,1350.000000,0.000000,"Do nothing"}; +item60[] = {"Check_New_Player",2,250,-25.000000,875.000000,75.000000,925.000000,0.000000,"Check" \n "New Player" \n "Setup"}; +item61[] = {"check_new__player",4,218,-150.000000,925.000000,-50.000000,975.000000,0.000000,"check new " \n "player not null"}; +item62[] = {"true",8,218,-150.000000,-325.000000,-50.000000,-275.000000,0.000000,"true"}; +item63[] = {"Process_1",2,250,-25.000000,-275.000000,75.000000,-225.000000,0.000000,"Process"}; +item64[] = {"Wait_ArmA_Loading",4,218,-150.000000,-225.000000,-50.000000,-175.000000,0.000000,"Wait ArmA" \n "Loading Screen" \n "Done"}; +item65[] = {"Start_Loading_Sc",2,250,-25.000000,-175.000000,75.000000,-125.000000,0.000000,"Start Loading" \n "Screen"}; +item66[] = {"freshServer",4,218,-325.000000,225.000000,-225.000000,275.000000,0.000000,"freshServer"}; +item67[] = {"Update_Loadingscreen",2,250,-325.000000,300.000000,-225.000000,350.000000,0.000000,"Update" \n "Loadingscreen" \n "Message"}; +item68[] = {"true",8,218,-150.000000,300.000000,-50.000000,350.000000,0.000000,"true"}; +item69[] = {"Timeout_",4,218,125.000000,975.000000,225.000000,1025.000000,0.000000,"" \n "Timeout" \n ""}; +item70[] = {"ERROR_Player_Setup",2,250,275.000000,975.000000,375.000000,1025.000000,0.000000,"ERROR" \n "Player Setup" \n "Invalid"}; +item71[] = {"",7,210,471.000000,996.000000,479.000000,1004.000000,0.000000,""}; +item72[] = {"Server_Version_C",2,250,-25.000000,475.000000,75.000000,525.000000,0.000000,"Server Version" \n "Check"}; +item73[] = {"Version_Okay",4,218,-125.000000,525.000000,-25.000000,575.000000,0.000000,"Version" \n "Okay"}; +item74[] = {"",7,210,471.000000,496.000000,479.000000,504.000000,0.000000,""}; +item75[] = {"ERROR_Server_not_3",2,250,275.000000,575.000000,375.000000,625.000000,0.000000,"ERROR" \n "Server not" \n "Response"}; +item76[] = {"",7,210,471.000000,596.000000,479.000000,604.000000,0.000000,""}; +item77[] = {"new_character",4,218,-250.000000,675.000000,-150.000000,725.000000,10.000000,"new" \n "character"}; +item78[] = {"Hive_Response",4,218,-125.000000,625.000000,-25.000000,675.000000,0.000000,"Hive" \n "Response"}; +item79[] = {"load_old_charact",4,218,-125.000000,725.000000,-25.000000,775.000000,0.000000,"load old" \n "character"}; +item80[] = {"Process_2",2,250,-25.000000,675.000000,75.000000,725.000000,0.000000,"Process"}; +item81[] = {"Open_Gender_Selection",2,250,-400.000000,675.000000,-300.000000,725.000000,0.000000,"Open Gender" \n "Selection Dialog"}; +item82[] = {"Reopen_when_client",4,218,-400.000000,600.000000,-300.000000,650.000000,0.000000,"Reopen" \n "when client hit" \n "escape"}; +item83[] = {"Gender_Selected",4,218,-450.000000,750.000000,-350.000000,800.000000,10.000000,"Gender" \n "Selected"}; +item84[] = {"Timeout",4,218,-350.000000,750.000000,-250.000000,800.000000,0.000000,"Timeout"}; +item85[] = {"Send_character_s",2,250,-400.000000,825.000000,-300.000000,875.000000,0.000000,"Send" \n "character" \n "selection"}; +item86[] = {"Process_3",2,250,-25.000000,775.000000,75.000000,825.000000,0.000000,"Process"}; +item87[] = {"ERROR_Server_not_4",2,250,275.000000,775.000000,375.000000,825.000000,0.000000,"ERROR" \n "Server not" \n "Response"}; +link0[] = {0,62}; +link1[] = {2,3}; +link2[] = {3,7}; +link3[] = {3,44}; +link4[] = {4,5}; +link5[] = {5,6}; +link6[] = {5,12}; +link7[] = {6,39}; +link8[] = {7,9}; +link9[] = {8,48}; +link10[] = {9,8}; +link11[] = {10,28}; +link12[] = {11,72}; +link13[] = {12,13}; +link14[] = {13,14}; +link15[] = {14,42}; +link16[] = {15,20}; +link17[] = {16,60}; +link18[] = {17,24}; +link19[] = {18,19}; +link20[] = {18,78}; +link21[] = {19,75}; +link22[] = {20,21}; +link23[] = {21,71}; +link24[] = {22,87}; +link25[] = {23,25}; +link26[] = {24,50}; +link27[] = {25,74}; +link28[] = {26,10}; +link29[] = {27,49}; +link30[] = {27,69}; +link31[] = {28,43}; +link32[] = {29,1}; +link33[] = {31,21}; +link34[] = {32,33}; +link35[] = {33,26}; +link36[] = {34,35}; +link37[] = {35,11}; +link38[] = {35,36}; +link39[] = {36,37}; +link40[] = {37,38}; +link41[] = {38,74}; +link42[] = {39,34}; +link43[] = {39,40}; +link44[] = {39,66}; +link45[] = {40,41}; +link46[] = {41,42}; +link47[] = {42,38}; +link48[] = {44,45}; +link49[] = {45,4}; +link50[] = {45,46}; +link51[] = {46,47}; +link52[] = {47,48}; +link53[] = {48,14}; +link54[] = {49,17}; +link55[] = {50,51}; +link56[] = {50,53}; +link57[] = {51,52}; +link58[] = {52,29}; +link59[] = {53,54}; +link60[] = {54,55}; +link61[] = {54,56}; +link62[] = {55,57}; +link63[] = {56,59}; +link64[] = {57,58}; +link65[] = {58,52}; +link66[] = {59,58}; +link67[] = {60,15}; +link68[] = {60,61}; +link69[] = {61,27}; +link70[] = {62,63}; +link71[] = {63,64}; +link72[] = {64,65}; +link73[] = {65,2}; +link74[] = {66,67}; +link75[] = {67,68}; +link76[] = {68,39}; +link77[] = {69,70}; +link78[] = {70,71}; +link79[] = {71,32}; +link80[] = {72,23}; +link81[] = {72,73}; +link82[] = {73,18}; +link83[] = {74,76}; +link84[] = {75,76}; +link85[] = {76,31}; +link86[] = {77,81}; +link87[] = {78,80}; +link88[] = {79,86}; +link89[] = {80,77}; +link90[] = {80,79}; +link91[] = {81,82}; +link92[] = {81,83}; +link93[] = {81,84}; +link94[] = {82,81}; +link95[] = {83,85}; +link96[] = {84,85}; +link97[] = {85,79}; +link98[] = {86,16}; +link99[] = {86,22}; +link100[] = {87,31}; +globals[] = {0.000000,0,0,0,0,640,480,1,244,6316128,1,-207.564026,582.257507,1932.771484,781.734619,586,854,1}; +window[] = {2,-1,-1,-1,-1,838,1706,2998,26,3,604}; +*//*%FSM*/ +class FSM +{ + fsmName = "Epoch Login"; + class States + { + /*%FSM*/ + class INIT + { + name = "INIT"; + init = /*%FSM*/"titleCut ["""", ""BLACK FADED"", 1337];" \n + "0 fadeSound 0;" \n + "player enableSimulation false;" \n + "" \n + "_debug = true;" \n + "_myTime = diag_tickTime;" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Init"";" \n + "};" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Process_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class FINISH + { + name = "FINISH"; + init = /*%FSM*/"[] spawn {" \n + " disableSerialization;" \n + " waitUntil{!isNull (findDisplay 46)};" \n + " _display = findDisplay 46;" \n + " {" \n + " _display displayAddEventHandler [_x,([""CfgEpochClient"", _x, """"] call EPOCH_fnc_returnConfigEntryV2)];" \n + " } forEach ([""CfgEpochClient"", ""displayAddEventHandler"", []] call EPOCH_fnc_returnConfigEntryV2);" \n + " " \n + " player switchMove """";" \n + "};" \n + "" \n + "3 fadeSound 1;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Finish!"";" \n + "};" \n + "" \n + "" \n + "" \n + "player enableSimulation true;" \n + "" \n + "titleCut ["""", ""BLACK IN"", 1];" \n + "1338 cutText ["""",""PLAIN"",0]; " \n + "" \n + "progressLoadingScreen 1.0;" \n + "" \n + "endLoadingScreen;" \n + "EPOCH_loadingScreenDone = true;" \n + "" \n + "hintSilent ""Worked"" "/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + }; + }; + /*%FSM*/ + /*%FSM*/ + class Version_Check + { + name = "Version_Check"; + init = /*%FSM*/"if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Version Check"";" \n + "};" \n + "" \n + "// SHOULD BE:" \n + "_epoch_assets0 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_assets"");" \n + "_epoch_assets1 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_assets_1"");" \n + "_epoch_assets2 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""epoch_objects"");" \n + "_epoch_assets3 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_assets_3"");" \n + "_epoch_config = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_config"");" \n + "_epoch_language = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_language"");" \n + "_epoch_underground = getText(configFile >> ""Epoch"" >> ""Version"" >> ""Underground_Epoch"");" \n + "_epoch_vehicles = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_vehicles"");" \n + "_epoch_weapons = getText(configFile >> ""Epoch"" >> ""Version"" >> ""a3_epoch_weapons"");" \n + "" \n + "" \n + "// IS:" \n + "_my_epoch_assets0 = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_assets"" >> ""epochVersion"");" \n + "_my_epoch_assets1 = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_assets_1"" >> ""epochVersion"");" \n + "_my_epoch_assets2 = getText(configFile >> ""CfgPatches"" >> ""epoch_objects"" >> ""epochVersion"");" \n + "_my_epoch_assets3 = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_assets_3"" >> ""epochVersion"");" \n + "_my_epoch_config = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_config"" >> ""epochVersion"");" \n + "_my_epoch_language = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_language"" >> ""epochVersion"");" \n + "_my_epoch_underground = getText(configFile >> ""CfgPatches"" >> ""Underground_Epoch"" >> ""epochVersion"");" \n + "_my_epoch_vehicles = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_vehicles"" >> ""epochVersion"");" \n + "_my_epoch_weapons = getText(configFile >> ""CfgPatches"" >> ""a3_epoch_weapons"" >> ""epochVersion"");" \n + "" \n + "progressLoadingScreen 0.1;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Wrong_Version + { + priority = 10.000000; + to="ERROR_Wrong_Version"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_epoch_assets0 != _epoch_assets0 ||" \n + "_my_epoch_assets1 != _epoch_assets1 ||" \n + "_my_epoch_assets2 != _epoch_assets2 ||" \n + "_my_epoch_assets3 != _epoch_assets3 ||" \n + "_my_epoch_config != _epoch_config ||" \n + "_my_epoch_language != _epoch_language ||" \n + "_my_epoch_underground != _epoch_underground ||" \n + "_my_epoch_vehicles != _epoch_vehicles ||" \n + "_my_epoch_weapons != _epoch_weapons"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class true + { + priority = 0.000000; + to="Arma_Version_Che"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_Player_UID + { + name = "Check_Player_UID"; + init = /*%FSM*/"if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Check PlayerUID"";" \n + "};" \n + "" \n + "_playerUID = getPlayerUID player;" \n + "" \n + "progressLoadingScreen 0.2;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class PlayerUID_Okay + { + priority = 10.000000; + to="Check_Server_1"; + precondition = /*%FSM*/"!isNil ""_playerUID"""/*%FSM*/; + condition=/*%FSM*/"_playerUID != """""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Empty_PlayerUID + { + priority = 0.000000; + to="ERROR_PlayerUID"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Wrong_Version + { + name = "ERROR_Wrong_Version"; + init = /*%FSM*/"_msg = ""You have an outdated version of Epoch"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_EPOCHVERSION = true;" \n + " publicVariableServer ""PLAYER_REJECT_EPOCHVERSION"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Disconnect + { + name = "Disconnect"; + init = /*%FSM*/"endLoadingScreen;" \n + "1338 cutText [_msg,""PLAIN"",0]; " \n + "deleteVehicle player;" \n + "call _rejectPlayer;" \n + "diag_log format [""(%1) %2"",diag_tickTime,_msg];" \n + "_myTime = diag_tickTime;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Check_if_Player + { + priority = 0.000000; + to="Reject_without_B"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 2"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_PlayerUID + { + name = "ERROR_PlayerUID"; + init = /*%FSM*/"_msg = ""Can not setup Player Object! (Error 01)"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_UID = true;" \n + " publicVariableServer ""PLAYER_REJECT_UID"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Setup_Player_Var + { + name = "Setup_Player_Var"; + init = /*%FSM*/"diag_log format[""DEBUG TIME WAITED: %1"", (diag_tickTime - _myTime)];" \n + "{" \n + " missionNamespace setVariable[(format[""EPOCH_player%1"", EPOCH_customVars select _forEachIndex]), _x];" \n + "} forEach _playerVariables;" \n + "" \n + """Loading Player Variables... Please wait!"" call Epoch_updateLoadingScreen;" \n + "" \n + "EPOCH_lastPlayerPos = getPosATL vehicle player;" \n + "" \n + "progressLoadingScreen 0.7;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Setup Player Variables"";" \n + "};" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Setup_EH_s_and_H"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Request_Hive + { + name = "Request_Hive"; + init = /*%FSM*/"_myTime = diag_tickTime;" \n + "" \n + "Epoch_my_Group = [];" \n + "" \n + "player remoteExec [""EPOCH_server_checkPlayer"",2];" \n + "" \n + "" \n + """Loading Player Data... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.5;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Hive_Response + { + priority = 0.000000; + to="Process_2"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_checkPlayer_PVC"""/*%FSM*/; + action=/*%FSM*/"_newChar = EPOCH_checkPlayer_PVC;" \n + "EPOCH_checkPlayer_PVC = nil;"/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not_3"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 120"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not + { + name = "ERROR_Server_not"; + init = /*%FSM*/"_msg = ""Authentication Failed, Disconnect and try again"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_NoResponse2 = true;" \n + " publicVariableServer ""PLAYER_REJECT_NoResponse2"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Wrong_Server + { + name = "ERROR_Wrong_Server"; + init = /*%FSM*/"_msg = format[""Server and Client running with different Version! (You: %1 // Server: %2)"",getText(configFile >> ""CfgMods"" >> ""Epoch"" >> ""version""),_serverVersion];" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_ServerVersion = true;" \n + " publicVariableServer ""PLAYER_REJECT_ServerVersion"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Setup_Player_Obj + { + name = "Setup_Player_Obj"; + init = /*%FSM*/"_ply = player;" \n + "_group = group player;" \n + "" \n + "player reveal _playerObject;" \n + "_playerPos = getposATL _playerObject;" \n + "" \n + "selectPlayer _playerObject;" \n + "" \n + "deleteVehicle _ply;" \n + "deleteGroup _group;" \n + "" \n + """Loading Player Body... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.8;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Setup Player Object"";" \n + "};" \n + "" \n + "_myTime = diag_tickTime;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Timeout_ + { + priority = 0.000000; + to="ERROR_Player_Setup"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 60"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class new_player_____p + { + priority = 0.000000; + to="Setup_Player_Var"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_playerObject == player"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Display_Message + { + name = "Display_Message"; + init = /*%FSM*/"[] spawn {" \n + " waitUntil{!isNull (findDisplay 46)};" \n + " (findDisplay 46) displayAddEventHandler [""KeyDown"",""true""];" \n + " (findDisplay 46) displayAddEventHandler [""KeyUp"",""true""];" \n + "};" \n + "diag_log format [""(%1) %2"",diag_tickTime,_msg];" \n + "_myTime = diag_tickTime;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Display_Message + { + priority = 0.000000; + to="Disconnect"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 10"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_Server + { + name = "Check_Server"; + init = /*%FSM*/"_myTime = diag_tickTime;" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Check Server"";" \n + "};" \n + """Checking Server... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.4;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Server_not_worki + { + priority = 10.000000; + to="ERROR_Server_not_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_BADHIVE""" \n + ""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Server_Okay + { + priority = 0.000000; + to="Server_Version_C"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""Epoch_ServerVersion"""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_1 + { + name = "ERROR_Server_not_1"; + init = /*%FSM*/"_msg = ""Server not Ready (Error 03)"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_NotReady2 = true;" \n + " publicVariableServer ""PLAYER_REJECT_NotReady2"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_Server_1 + { + name = "Check_Server_1"; + init = /*%FSM*/"progressLoadingScreen 0.3;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not_2"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 180"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class freshServer + { + priority = 0.000000; + to="Update_Loadingscreen"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"uiNamespace getVariable ['Epoch_freshServer', false]"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Server_Ready + { + priority = 0.000000; + to="Check_Server"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_SERVER"""/*%FSM*/; + action=/*%FSM*/"_serverUptime = EPOCH_SERVER;" \n + "EPOCH_SERVER = nil;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_2 + { + name = "ERROR_Server_not_2"; + init = /*%FSM*/"_msg = ""Server not Ready (Error 02)"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_NotReady1 = true;" \n + " publicVariableServer ""PLAYER_REJECT_NotReady1"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Reject_without_B + { + name = "Reject_without_B"; + init = /*%FSM*/"[] spawn {" \n + " waitUntil{!isNull (findDisplay 46)};" \n + " waitUntil {" \n + " (findDisplay 46) closeDisplay 0;" \n + " isNull (findDisplay 46)" \n + " };" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + }; + }; + /*%FSM*/ + /*%FSM*/ + class Arma_Version_Che + { + name = "Arma_Version_Che"; + init = /*%FSM*/"progressLoadingScreen 0.15;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Outdated_Version + { + priority = 10.000000; + to="ERROR_Wrong_Version_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"productVersion select 2 < getNumber(configFile >> ""CfgMods"" >> ""Epoch"" >> ""ArmAVersion"")"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Player_Object_Re + { + priority = 0.000000; + to="Check_Player_UID"; + precondition = /*%FSM*/"!isNull player"/*%FSM*/; + condition=/*%FSM*/"player == player"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Wrong_Version_1 + { + name = "ERROR_Wrong_Version_1"; + init = /*%FSM*/"_msg = ""You have an outdated version of ArmA 3"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_ARMAVERSION = true;" \n + " publicVariableServer ""PLAYER_REJECT_ARMAVERSION"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Setup_EH_s_and_H + { + name = "Setup_EH_s_and_H"; + init = /*%FSM*/"{" \n + " player addEventHandler [_x,([""CfgEpochClient"", _x, """"] call EPOCH_fnc_returnConfigEntryV2)];" \n + "} forEach ([""CfgEpochClient"", ""addEventHandler"", []] call EPOCH_fnc_returnConfigEntryV2);" \n + "" \n + "if (count EPOCH_playerHitPoints isEqualTo count ((getAllHitPointsDamage player) param [0,[]])) then {" \n + " {" \n + " player setHitIndex [_forEachIndex, _x];" \n + " }forEach EPOCH_playerHitPoints;" \n + "};" \n + "" \n + "[] spawn EPOCH_masterLoop;" \n + "true call EPOCH_fnc_Weather;" \n + "[5,100] spawn EPOCH_niteLight;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Setup EH's"";" \n + "};" \n + "" \n + """Loading... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.9;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Has_Current_Weap + { + priority = 10.000000; + to="Find_Active_Weap"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_currentWeapon != """""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class no_weapons + { + priority = 0.000000; + to="Process"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_currentWeapon == """""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process + { + name = "Process"; + init = /*%FSM*/"progressLoadingScreen 0.975;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Preload_done + { + priority = 0.000000; + to="FINISH"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"preloadCamera _playerPos"/*%FSM*/; + action=/*%FSM*/"call compile _playerGroupOnline;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Find_Active_Weap + { + name = "Find_Active_Weap"; + init = /*%FSM*/"_activeWeapon = currentWeapon player;" \n + "progressLoadingScreen 0.95;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Current_Weapon_S + { + priority = 0.000000; + to="Do_nothing"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_activeWeapon == _currentWeapon"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Current_Weapon_Not + { + priority = 0.000000; + to="Select_Weapon"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_activeWeapon != _currentWeapon"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Select_Weapon + { + name = "Select_Weapon"; + init = /*%FSM*/"_currentWeapon spawn {" \n + " uiSleep 1; " \n + " player selectWeapon _this;" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Process"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Do_nothing + { + name = "Do_nothing"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Process"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_New_Player + { + name = "Check_New_Player"; + init = /*%FSM*/"_myTime = diag_tickTime;" \n + "" \n + """Loading Player Inventory... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.6;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class check_new__player + { + priority = 0.000000; + to="Setup_Player_Obj"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!(isNull _playerObject) && {_playerObject getVariable [""SETUP"",false]}"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 120"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process_1 + { + name = "Process_1"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Wait_ArmA_Loading + { + priority = 0.000000; + to="Start_Loading_Sc"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"{!isnull _x} count ((uinamespace getvariable ""loading_displays"") - [finddisplay 18]) == 0"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Start_Loading_Sc + { + name = "Start_Loading_Sc"; + init = /*%FSM*/"startLoadingScreen ["""",""EpochLoadingScreen""];" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Start Loadingscreen"";" \n + "};" \n + """Starting Epoch... Please wait!"" call Epoch_updateLoadingScreen;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Version_Check"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Update_Loadingscreen + { + name = "Update_Loadingscreen"; + init = /*%FSM*/"uiNamespace setVariable ['Epoch_freshServer', false];" \n + "" \n + """Server initializing... Please wait!"" call Epoch_updateLoadingScreen;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Check_Server_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Player_Setup + { + name = "ERROR_Player_Setup"; + init = /*%FSM*/"_msg = ""Problem setting up player"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_InvaildSetup = true;" \n + " publicVariableServer ""PLAYER_REJECT_InvaildSetup"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Server_Version_C + { + name = "Server_Version_C"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Wrong_Server_Ver + { + priority = 10.000000; + to="ERROR_Wrong_Server"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"Epoch_ServerVersion != getText(configFile >> ""CfgMods"" >> ""Epoch"" >> ""version"")"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Version_Okay + { + priority = 0.000000; + to="Request_Hive"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_3 + { + name = "ERROR_Server_not_3"; + init = /*%FSM*/"_msg = ""Authentication Failed, Disconnect and try again"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_HiveNotResponse = true;" \n + " publicVariableServer ""PLAYER_REJECT_HiveNotResponse"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process_2 + { + name = "Process_2"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class new_character + { + priority = 10.000000; + to="Open_Gender_Selection"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_newChar"/*%FSM*/; + action=/*%FSM*/"endLoadingScreen;" \n + "_myGenderTime = diag_tickTime;"/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class load_old_charact + { + priority = 0.000000; + to="Process_3"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/"_myTime = diag_tickTime;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Open_Gender_Selection + { + name = "Open_Gender_Selection"; + init = /*%FSM*/"createdialog ""SelectGender"";"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Gender_Selected + { + priority = 10.000000; + to="Send_character_s"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_PlayerIsMale"""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Timeout + { + priority = 0.000000; + to="Send_character_s"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"((diag_tickTime - _myGenderTime) > 30)"/*%FSM*/; + action=/*%FSM*/"EPOCH_PlayerIsMale = true;" \n + "closeDialog 0;"/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Reopen_when_client + { + priority = 0.000000; + to="Open_Gender_Selection"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!dialog && isNil ""EPOCH_PlayerIsMale"""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Send_character_s + { + name = "Send_character_s"; + init = /*%FSM*/"startLoadingScreen ["""",""EpochLoadingScreen""];" \n + """Gender Selected... Please wait!"" call Epoch_updateLoadingScreen;" \n + "" \n + "[player,EPOCH_PlayerIsMale] remoteExec [""EPOCH_server_loadPlayer"",2];" \n + "EPOCH_PlayerIsMale = nil;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class load_old_charact + { + priority = 0.000000; + to="Process_3"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/"_myTime = diag_tickTime;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process_3 + { + name = "Process_3"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not_4"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 120"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Response + { + priority = 0.000000; + to="Check_New_Player"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_C_SET"""/*%FSM*/; + action=/*%FSM*/"_array = EPOCH_C_SET;" \n + "EPOCH_C_SET = nil;" \n + "_playerObject = _array deleteAt 0;" \n + "_playerVariables = _array deleteAt 0;" \n + "_currentWeapon = _array deleteAt 0;" \n + "_magCount = _array deleteAt 0;" \n + "Epoch_my_GroupUID = _array deleteAt 0;" \n + "Epoch_canBeRevived = _array deleteAt 0;" \n + "Epoch_personalToken = _array deleteAt 0;" \n + "reverse _serverUptime;" \n + "_serverUptime pushBack (_array deleteAt 0);" \n + "reverse _serverUptime;" \n + "_serverUptime call EPOCH_client_publicEH;" \n + "_playerGroupOnline = _array deleteAt 0;" \n + "" \n + ""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_4 + { + name = "ERROR_Server_not_4"; + init = /*%FSM*/"_msg = ""Authentication Failed, Disconnect and try again"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_HiveLoadChar = true;" \n + " publicVariableServer ""PLAYER_REJECT_HiveLoadChar"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + }; + initState="INIT"; + finalStates[] = + { + "FINISH", + "Reject_without_B", + }; +}; +/*%FSM*/ \ No newline at end of file diff --git a/Sources/mpmissions/epoch.Mountains_ACR/description.ext b/Sources/mpmissions/epoch.Mountains_ACR/description.ext index cfe65cba..8783e3aa 100644 --- a/Sources/mpmissions/epoch.Mountains_ACR/description.ext +++ b/Sources/mpmissions/epoch.Mountains_ACR/description.ext @@ -50,6 +50,7 @@ class cfgFunctions }; class postinit { + file = "init\fn_postinit.sqf"; postInit = 1; }; }; diff --git a/Sources/mpmissions/epoch.Mountains_ACR/init/client_init.sqf b/Sources/mpmissions/epoch.Mountains_ACR/init/client_init.sqf new file mode 100644 index 00000000..4a32e342 --- /dev/null +++ b/Sources/mpmissions/epoch.Mountains_ACR/init/client_init.sqf @@ -0,0 +1,76 @@ +/* + 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: + https://github.com/EpochModTeam/Epoch/tree/master/Sources/epoch_code/init/client_init.sqf +*/ +//Variables +EPOCH_CraftingItem = ""; +EPOCH_ESP_TARGETS = []; +EPOCH_ESPMAP_TARGETS = []; +EPOCH_ESPGROUPS = []; +EPOCH_ESPGROUPCOLORS = []; +EPOCH_ESP_PLAYER = false; +EPOCH_ESP_VEHICLES = false; +EPOCH_ESP_VEHICLEPLAYER = []; +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"]; +if (isNil 'EPOCH_diag_fps') then { + EPOCH_diag_fps = 0; +}; +EPOCH_playerIsSwimming = false; +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 = []; +EPOCH_lastPlayerPos = [0,0,0]; +EPOCH_prevOffer = []; +EPOCH_drawIcon3d = false; +EPOCH_velTransform = false; +EPOCH_stabilityTarget = objNull; +EPOCH_currentVehicle = objNull; +EPOCH_currentTarget = objNull; +EPOCH_LootedBlds = []; +EPOCH_soundLevel = 1; +EPOCH_arr_interactedObjs = []; +EPOCH_buildOption = 0; +EPOCH_nearestLocations = []; +onEachFrame EPOCH_onEachFrame; + +EPOCH_LastAirDrop = time; +EPOCH_AirDropCheck = getNumber(missionConfigFile >> "CfgEpochAirDrop" >> "AirDropFreq"); +if(EPOCH_AirDropCheck < 120)then{EPOCH_AirDropCheck = 120;}; +EPOCH_AirDropChance = getNumber(missionConfigFile >> "CfgEpochAirDrop" >> "AirDropChance"); +if(EPOCH_AirDropChance < 0)then{EPOCH_AirDropChance = 101;EPOCH_AirDropCheck = 99999;}; + +EPOCH_droneRndChance = 100; + +// Custom Keys +EPOCH_keysActionPressed = false; //prevents EH spam +0 call EPOCH_clientKeyMap; + +//ON INIT and RESPAWN +call EPOCH_clientInit; + +[] execFSM "\x\addons\a3_epoch_code\system\SPVEH.fsm"; +[] execFSM "system\player_login.fsm"; + +true diff --git a/Sources/mpmissions/epoch.Mountains_ACR/init/fn_postinit.sqf b/Sources/mpmissions/epoch.Mountains_ACR/init/fn_postinit.sqf new file mode 100644 index 00000000..8be5aa09 --- /dev/null +++ b/Sources/mpmissions/epoch.Mountains_ACR/init/fn_postinit.sqf @@ -0,0 +1,18 @@ +/* + Author: Aaron Clark - EpochMod.com + + Contributors: + + Description: + Initalize Player + + 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/master/Sources/epoch_code/init/fn_postinit.sqf +*/ +if (!isDedicated && isMultiplayer && hasInterface) then { + call compile preprocessFileLineNumbers "init\client_init.sqf"; +}; +true diff --git a/Sources/mpmissions/epoch.Porto/System/player_login.fsm b/Sources/mpmissions/epoch.Porto/System/player_login.fsm new file mode 100644 index 00000000..9426567f --- /dev/null +++ b/Sources/mpmissions/epoch.Porto/System/player_login.fsm @@ -0,0 +1,1398 @@ +/*%FSM*/ +/*%FSM*/ +/* +item0[] = {"INIT",0,250,-25.000000,-375.000000,75.000000,-325.000000,0.000000,"INIT"}; +item1[] = {"FINISH",1,4346,-25.000000,1475.000000,75.000000,1525.000000,0.000000,"FINISH"}; +item2[] = {"true",8,218,-150.000000,-125.000000,-50.000000,-75.000000,0.000000,"true"}; +item3[] = {"Version_Check",2,250,-25.000000,-75.000000,75.000000,-25.000000,0.000000,"Version Check"}; +item4[] = {"Player_Object_Re",4,218,-150.000000,75.000000,-50.000000,125.000000,0.000000,"Player" \n "Object Ready"}; +item5[] = {"Check_Player_UID",2,250,-25.000000,125.000000,75.000000,175.000000,0.000000,"Check Player UID"}; +item6[] = {"PlayerUID_Okay",4,218,-150.000000,175.000000,-50.000000,225.000000,10.000000,"PlayerUID" \n "Okay"}; +item7[] = {"Wrong_Version",4,218,125.000000,-75.000000,225.000000,-25.000000,10.000000,"Wrong" \n "Version"}; +item8[] = {"",7,210,471.000061,-54.000099,478.999939,-45.999901,0.000000,""}; +item9[] = {"ERROR_Wrong_Version",2,250,275.000000,-75.000000,375.000000,-25.000000,0.000000,"ERROR" \n "Wrong Version" \n "Epoch"}; +item10[] = {"Disconnect",2,250,600.000000,1225.000000,700.000000,1275.000000,0.000000,"Disconnect"}; +item11[] = {"Server_Okay",4,218,-125.000000,425.000000,-25.000000,475.000000,0.000000,"Server" \n "Okay"}; +item12[] = {"Empty_PlayerUID",4,218,125.000000,125.000000,225.000000,175.000000,0.000000,"Empty" \n "PlayerUID"}; +item13[] = {"ERROR_PlayerUID",2,250,275.000000,125.000000,375.000000,175.000000,0.000000,"ERROR" \n "PlayerUID Empty"}; +item14[] = {"",7,210,471.000061,145.999908,478.999939,154.000092,0.000000,""}; +item15[] = {"Timeout_No_Respo",4,218,125.000000,875.000000,225.000000,925.000000,0.000000,"Timeout" \n "No Response"}; +item16[] = {"Response",4,218,-150.000000,825.000000,-50.000000,875.000000,0.000000,"Response"}; +item17[] = {"Setup_Player_Var",2,250,-25.000000,1075.000000,75.000000,1125.000000,0.000000,"Setup Player" \n "Variables"}; +item18[] = {"Request_Hive",2,250,-25.000000,575.000000,75.000000,625.000000,0.000000,"Request Hive"}; +item19[] = {"Timeout_No_Respo",4,218,125.000000,575.000000,225.000000,625.000000,0.000000,"Timeout" \n "No Response"}; +item20[] = {"ERROR_Server_not",2,250,275.000000,875.000000,375.000000,925.000000,0.000000,"ERROR" \n "Server not" \n "Response"}; +item21[] = {"",7,210,471.000000,895.999939,479.000000,904.000061,0.000000,""}; +item22[] = {"Timeout_No_Respo",4,218,125.000000,775.000000,225.000000,825.000000,0.000000,"Timeout" \n "No Response"}; +item23[] = {"Wrong_Server_Ver",4,218,125.000000,475.000000,225.000000,525.000000,10.000000,"Wrong" \n "Server Version"}; +item24[] = {"true",8,218,-150.000000,1125.000000,-50.000000,1175.000000,0.000000,"true"}; +item25[] = {"ERROR_Wrong_Server",2,250,275.000000,475.000000,375.000000,525.000000,0.000000,"ERROR" \n "Wrong" \n "Server Version"}; +item26[] = {"Display_Message",4,218,600.000000,1150.000000,700.000000,1200.000000,0.000000,"" \n "Display Message" \n "Wait..."}; +item27[] = {"Setup_Player_Obj",2,250,-25.000000,975.000000,75.000000,1025.000000,0.000000,"Setup Player" \n "Object"}; +item28[] = {"Check_if_Player",4,218,750.000000,1225.000000,850.000000,1275.000000,0.000000,"Check if" \n "Player got Kicked"}; +item29[] = {"Preload_done",8,218,-150.000000,1425.000000,-50.000000,1475.000000,0.000000,"Preload" \n "done"}; +item30[] = {"",7,210,471.000000,796.000000,479.000000,804.000000,0.000000,""}; +item31[] = {"",7,210,471.000000,796.000000,479.000000,804.000000,0.000000,""}; +item32[] = {"true",8,218,425.000000,1075.000000,525.000000,1125.000000,0.000000,"true"}; +item33[] = {"Display_Message",2,250,600.000000,1075.000000,700.000000,1125.000000,0.000000,"Display" \n "Message"}; +item34[] = {"Server_Ready",4,218,-25.000000,300.000000,75.000000,350.000000,0.000000,"Server" \n "Ready"}; +item35[] = {"Check_Server",2,250,-25.000000,375.000000,75.000000,425.000000,0.000000,"Check Server"}; +item36[] = {"Server_not_worki",4,218,125.000000,375.000000,225.000000,425.000000,10.000000,"Server" \n "not working"}; +item37[] = {"ERROR_Server_not_1",2,250,275.000000,375.000000,375.000000,425.000000,0.000000,"ERROR" \n "Server not Ready"}; +item38[] = {"",7,210,471.000000,396.000000,479.000000,404.000000,0.000000,""}; +item39[] = {"Check_Server_1",2,250,-25.000000,225.000000,75.000000,275.000000,0.000000,"Check Server"}; +item40[] = {"Timeout_No_Respo",4,218,125.000000,225.000000,225.000000,275.000000,0.000000,"Timeout" \n "No Response"}; +item41[] = {"ERROR_Server_not_2",2,250,275.000000,225.000000,375.000000,275.000000,0.000000,"ERROR" \n "Server not Ready"}; +item42[] = {"",7,210,471.000000,246.000031,479.000000,253.999969,0.000000,""}; +item43[] = {"Reject_without_B",1,250,900.000000,1225.000000,1000.000000,1275.000000,0.000000,"Reject without" \n "BattlEye"}; +item44[] = {"true",8,218,-150.000000,-25.000000,-50.000000,25.000000,0.000000,"true"}; +item45[] = {"Arma_Version_Che",2,250,-25.000000,25.000000,75.000000,75.000000,0.000000,"Arma Version" \n "Check"}; +item46[] = {"Outdated_Version",4,218,125.000000,25.000000,225.000000,75.000000,10.000000,"Outdated" \n "Version"}; +item47[] = {"ERROR_Wrong_Version_1",2,250,275.000000,25.000000,375.000000,75.000000,0.000000,"ERROR" \n "Wrong Version" \n "ArmA"}; +item48[] = {"",7,210,471.000061,45.999908,478.999939,54.000092,0.000000,""}; +item49[] = {"new_player_____p",4,218,-150.000000,1025.000000,-50.000000,1075.000000,0.000000,"new player == " \n "player"}; +item50[] = {"Setup_EH_s_and_H",2,250,-25.000000,1175.000000,75.000000,1225.000000,0.000000,"Setup EH's" \n "and" \n "HitPoints"}; +item51[] = {"no_weapons",4,218,-25.000000,1275.000000,75.000000,1325.000000,0.000000,"no weapons"}; +item52[] = {"Process",2,250,-25.000000,1375.000000,75.000000,1425.000000,0.000000,"Process"}; +item53[] = {"Has_Current_Weap",4,218,100.000000,1175.000000,200.000000,1225.000000,10.000000,"Has" \n "Current" \n "Weapon"}; +item54[] = {"Find_Active_Weap",2,250,225.000000,1175.000000,325.000000,1225.000000,0.000000,"Find" \n "Active" \n "Weapon"}; +item55[] = {"Current_Weapon_Not",4,218,150.000000,1225.000000,250.000000,1275.000000,0.000000,"Current" \n "Weapon" \n "Not Selected"}; +item56[] = {"Current_Weapon_S",4,218,300.000000,1225.000000,400.000000,1275.000000,0.000000,"Current" \n "Weapon" \n "Selected"}; +item57[] = {"Select_Weapon",2,250,150.000000,1300.000000,250.000000,1350.000000,0.000000,"Select" \n "Weapon"}; +item58[] = {"true",8,218,225.000000,1375.000000,325.000000,1425.000000,0.000000,"true"}; +item59[] = {"Do_nothing",2,250,300.000000,1300.000000,400.000000,1350.000000,0.000000,"Do nothing"}; +item60[] = {"Check_New_Player",2,250,-25.000000,875.000000,75.000000,925.000000,0.000000,"Check" \n "New Player" \n "Setup"}; +item61[] = {"check_new__player",4,218,-150.000000,925.000000,-50.000000,975.000000,0.000000,"check new " \n "player not null"}; +item62[] = {"true",8,218,-150.000000,-325.000000,-50.000000,-275.000000,0.000000,"true"}; +item63[] = {"Process_1",2,250,-25.000000,-275.000000,75.000000,-225.000000,0.000000,"Process"}; +item64[] = {"Wait_ArmA_Loading",4,218,-150.000000,-225.000000,-50.000000,-175.000000,0.000000,"Wait ArmA" \n "Loading Screen" \n "Done"}; +item65[] = {"Start_Loading_Sc",2,250,-25.000000,-175.000000,75.000000,-125.000000,0.000000,"Start Loading" \n "Screen"}; +item66[] = {"freshServer",4,218,-325.000000,225.000000,-225.000000,275.000000,0.000000,"freshServer"}; +item67[] = {"Update_Loadingscreen",2,250,-325.000000,300.000000,-225.000000,350.000000,0.000000,"Update" \n "Loadingscreen" \n "Message"}; +item68[] = {"true",8,218,-150.000000,300.000000,-50.000000,350.000000,0.000000,"true"}; +item69[] = {"Timeout_",4,218,125.000000,975.000000,225.000000,1025.000000,0.000000,"" \n "Timeout" \n ""}; +item70[] = {"ERROR_Player_Setup",2,250,275.000000,975.000000,375.000000,1025.000000,0.000000,"ERROR" \n "Player Setup" \n "Invalid"}; +item71[] = {"",7,210,471.000000,996.000000,479.000000,1004.000000,0.000000,""}; +item72[] = {"Server_Version_C",2,250,-25.000000,475.000000,75.000000,525.000000,0.000000,"Server Version" \n "Check"}; +item73[] = {"Version_Okay",4,218,-125.000000,525.000000,-25.000000,575.000000,0.000000,"Version" \n "Okay"}; +item74[] = {"",7,210,471.000000,496.000000,479.000000,504.000000,0.000000,""}; +item75[] = {"ERROR_Server_not_3",2,250,275.000000,575.000000,375.000000,625.000000,0.000000,"ERROR" \n "Server not" \n "Response"}; +item76[] = {"",7,210,471.000000,596.000000,479.000000,604.000000,0.000000,""}; +item77[] = {"new_character",4,218,-250.000000,675.000000,-150.000000,725.000000,10.000000,"new" \n "character"}; +item78[] = {"Hive_Response",4,218,-125.000000,625.000000,-25.000000,675.000000,0.000000,"Hive" \n "Response"}; +item79[] = {"load_old_charact",4,218,-125.000000,725.000000,-25.000000,775.000000,0.000000,"load old" \n "character"}; +item80[] = {"Process_2",2,250,-25.000000,675.000000,75.000000,725.000000,0.000000,"Process"}; +item81[] = {"Open_Gender_Selection",2,250,-400.000000,675.000000,-300.000000,725.000000,0.000000,"Open Gender" \n "Selection Dialog"}; +item82[] = {"Reopen_when_client",4,218,-400.000000,600.000000,-300.000000,650.000000,0.000000,"Reopen" \n "when client hit" \n "escape"}; +item83[] = {"Gender_Selected",4,218,-450.000000,750.000000,-350.000000,800.000000,10.000000,"Gender" \n "Selected"}; +item84[] = {"Timeout",4,218,-350.000000,750.000000,-250.000000,800.000000,0.000000,"Timeout"}; +item85[] = {"Send_character_s",2,250,-400.000000,825.000000,-300.000000,875.000000,0.000000,"Send" \n "character" \n "selection"}; +item86[] = {"Process_3",2,250,-25.000000,775.000000,75.000000,825.000000,0.000000,"Process"}; +item87[] = {"ERROR_Server_not_4",2,250,275.000000,775.000000,375.000000,825.000000,0.000000,"ERROR" \n "Server not" \n "Response"}; +link0[] = {0,62}; +link1[] = {2,3}; +link2[] = {3,7}; +link3[] = {3,44}; +link4[] = {4,5}; +link5[] = {5,6}; +link6[] = {5,12}; +link7[] = {6,39}; +link8[] = {7,9}; +link9[] = {8,48}; +link10[] = {9,8}; +link11[] = {10,28}; +link12[] = {11,72}; +link13[] = {12,13}; +link14[] = {13,14}; +link15[] = {14,42}; +link16[] = {15,20}; +link17[] = {16,60}; +link18[] = {17,24}; +link19[] = {18,19}; +link20[] = {18,78}; +link21[] = {19,75}; +link22[] = {20,21}; +link23[] = {21,71}; +link24[] = {22,87}; +link25[] = {23,25}; +link26[] = {24,50}; +link27[] = {25,74}; +link28[] = {26,10}; +link29[] = {27,49}; +link30[] = {27,69}; +link31[] = {28,43}; +link32[] = {29,1}; +link33[] = {31,21}; +link34[] = {32,33}; +link35[] = {33,26}; +link36[] = {34,35}; +link37[] = {35,11}; +link38[] = {35,36}; +link39[] = {36,37}; +link40[] = {37,38}; +link41[] = {38,74}; +link42[] = {39,34}; +link43[] = {39,40}; +link44[] = {39,66}; +link45[] = {40,41}; +link46[] = {41,42}; +link47[] = {42,38}; +link48[] = {44,45}; +link49[] = {45,4}; +link50[] = {45,46}; +link51[] = {46,47}; +link52[] = {47,48}; +link53[] = {48,14}; +link54[] = {49,17}; +link55[] = {50,51}; +link56[] = {50,53}; +link57[] = {51,52}; +link58[] = {52,29}; +link59[] = {53,54}; +link60[] = {54,55}; +link61[] = {54,56}; +link62[] = {55,57}; +link63[] = {56,59}; +link64[] = {57,58}; +link65[] = {58,52}; +link66[] = {59,58}; +link67[] = {60,15}; +link68[] = {60,61}; +link69[] = {61,27}; +link70[] = {62,63}; +link71[] = {63,64}; +link72[] = {64,65}; +link73[] = {65,2}; +link74[] = {66,67}; +link75[] = {67,68}; +link76[] = {68,39}; +link77[] = {69,70}; +link78[] = {70,71}; +link79[] = {71,32}; +link80[] = {72,23}; +link81[] = {72,73}; +link82[] = {73,18}; +link83[] = {74,76}; +link84[] = {75,76}; +link85[] = {76,31}; +link86[] = {77,81}; +link87[] = {78,80}; +link88[] = {79,86}; +link89[] = {80,77}; +link90[] = {80,79}; +link91[] = {81,82}; +link92[] = {81,83}; +link93[] = {81,84}; +link94[] = {82,81}; +link95[] = {83,85}; +link96[] = {84,85}; +link97[] = {85,79}; +link98[] = {86,16}; +link99[] = {86,22}; +link100[] = {87,31}; +globals[] = {0.000000,0,0,0,0,640,480,1,244,6316128,1,-207.564026,582.257507,1932.771484,781.734619,586,854,1}; +window[] = {2,-1,-1,-1,-1,838,1706,2998,26,3,604}; +*//*%FSM*/ +class FSM +{ + fsmName = "Epoch Login"; + class States + { + /*%FSM*/ + class INIT + { + name = "INIT"; + init = /*%FSM*/"titleCut ["""", ""BLACK FADED"", 1337];" \n + "0 fadeSound 0;" \n + "player enableSimulation false;" \n + "" \n + "_debug = true;" \n + "_myTime = diag_tickTime;" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Init"";" \n + "};" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Process_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class FINISH + { + name = "FINISH"; + init = /*%FSM*/"[] spawn {" \n + " disableSerialization;" \n + " waitUntil{!isNull (findDisplay 46)};" \n + " _display = findDisplay 46;" \n + " {" \n + " _display displayAddEventHandler [_x,([""CfgEpochClient"", _x, """"] call EPOCH_fnc_returnConfigEntryV2)];" \n + " } forEach ([""CfgEpochClient"", ""displayAddEventHandler"", []] call EPOCH_fnc_returnConfigEntryV2);" \n + " " \n + " player switchMove """";" \n + "};" \n + "" \n + "3 fadeSound 1;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Finish!"";" \n + "};" \n + "" \n + "" \n + "" \n + "player enableSimulation true;" \n + "" \n + "titleCut ["""", ""BLACK IN"", 1];" \n + "1338 cutText ["""",""PLAIN"",0]; " \n + "" \n + "progressLoadingScreen 1.0;" \n + "" \n + "endLoadingScreen;" \n + "EPOCH_loadingScreenDone = true;" \n + "" \n + "hintSilent ""Worked"" "/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + }; + }; + /*%FSM*/ + /*%FSM*/ + class Version_Check + { + name = "Version_Check"; + init = /*%FSM*/"if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Version Check"";" \n + "};" \n + "" \n + "// SHOULD BE:" \n + "_epoch_assets0 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_assets"");" \n + "_epoch_assets1 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_assets_1"");" \n + "_epoch_assets2 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""epoch_objects"");" \n + "_epoch_assets3 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_assets_3"");" \n + "_epoch_config = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_config"");" \n + "_epoch_language = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_language"");" \n + "_epoch_underground = getText(configFile >> ""Epoch"" >> ""Version"" >> ""Underground_Epoch"");" \n + "_epoch_vehicles = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_vehicles"");" \n + "_epoch_weapons = getText(configFile >> ""Epoch"" >> ""Version"" >> ""a3_epoch_weapons"");" \n + "" \n + "" \n + "// IS:" \n + "_my_epoch_assets0 = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_assets"" >> ""epochVersion"");" \n + "_my_epoch_assets1 = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_assets_1"" >> ""epochVersion"");" \n + "_my_epoch_assets2 = getText(configFile >> ""CfgPatches"" >> ""epoch_objects"" >> ""epochVersion"");" \n + "_my_epoch_assets3 = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_assets_3"" >> ""epochVersion"");" \n + "_my_epoch_config = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_config"" >> ""epochVersion"");" \n + "_my_epoch_language = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_language"" >> ""epochVersion"");" \n + "_my_epoch_underground = getText(configFile >> ""CfgPatches"" >> ""Underground_Epoch"" >> ""epochVersion"");" \n + "_my_epoch_vehicles = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_vehicles"" >> ""epochVersion"");" \n + "_my_epoch_weapons = getText(configFile >> ""CfgPatches"" >> ""a3_epoch_weapons"" >> ""epochVersion"");" \n + "" \n + "progressLoadingScreen 0.1;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Wrong_Version + { + priority = 10.000000; + to="ERROR_Wrong_Version"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_epoch_assets0 != _epoch_assets0 ||" \n + "_my_epoch_assets1 != _epoch_assets1 ||" \n + "_my_epoch_assets2 != _epoch_assets2 ||" \n + "_my_epoch_assets3 != _epoch_assets3 ||" \n + "_my_epoch_config != _epoch_config ||" \n + "_my_epoch_language != _epoch_language ||" \n + "_my_epoch_underground != _epoch_underground ||" \n + "_my_epoch_vehicles != _epoch_vehicles ||" \n + "_my_epoch_weapons != _epoch_weapons"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class true + { + priority = 0.000000; + to="Arma_Version_Che"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_Player_UID + { + name = "Check_Player_UID"; + init = /*%FSM*/"if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Check PlayerUID"";" \n + "};" \n + "" \n + "_playerUID = getPlayerUID player;" \n + "" \n + "progressLoadingScreen 0.2;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class PlayerUID_Okay + { + priority = 10.000000; + to="Check_Server_1"; + precondition = /*%FSM*/"!isNil ""_playerUID"""/*%FSM*/; + condition=/*%FSM*/"_playerUID != """""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Empty_PlayerUID + { + priority = 0.000000; + to="ERROR_PlayerUID"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Wrong_Version + { + name = "ERROR_Wrong_Version"; + init = /*%FSM*/"_msg = ""You have an outdated version of Epoch"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_EPOCHVERSION = true;" \n + " publicVariableServer ""PLAYER_REJECT_EPOCHVERSION"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Disconnect + { + name = "Disconnect"; + init = /*%FSM*/"endLoadingScreen;" \n + "1338 cutText [_msg,""PLAIN"",0]; " \n + "deleteVehicle player;" \n + "call _rejectPlayer;" \n + "diag_log format [""(%1) %2"",diag_tickTime,_msg];" \n + "_myTime = diag_tickTime;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Check_if_Player + { + priority = 0.000000; + to="Reject_without_B"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 2"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_PlayerUID + { + name = "ERROR_PlayerUID"; + init = /*%FSM*/"_msg = ""Can not setup Player Object! (Error 01)"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_UID = true;" \n + " publicVariableServer ""PLAYER_REJECT_UID"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Setup_Player_Var + { + name = "Setup_Player_Var"; + init = /*%FSM*/"diag_log format[""DEBUG TIME WAITED: %1"", (diag_tickTime - _myTime)];" \n + "{" \n + " missionNamespace setVariable[(format[""EPOCH_player%1"", EPOCH_customVars select _forEachIndex]), _x];" \n + "} forEach _playerVariables;" \n + "" \n + """Loading Player Variables... Please wait!"" call Epoch_updateLoadingScreen;" \n + "" \n + "EPOCH_lastPlayerPos = getPosATL vehicle player;" \n + "" \n + "progressLoadingScreen 0.7;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Setup Player Variables"";" \n + "};" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Setup_EH_s_and_H"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Request_Hive + { + name = "Request_Hive"; + init = /*%FSM*/"_myTime = diag_tickTime;" \n + "" \n + "Epoch_my_Group = [];" \n + "" \n + "player remoteExec [""EPOCH_server_checkPlayer"",2];" \n + "" \n + "" \n + """Loading Player Data... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.5;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Hive_Response + { + priority = 0.000000; + to="Process_2"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_checkPlayer_PVC"""/*%FSM*/; + action=/*%FSM*/"_newChar = EPOCH_checkPlayer_PVC;" \n + "EPOCH_checkPlayer_PVC = nil;"/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not_3"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 120"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not + { + name = "ERROR_Server_not"; + init = /*%FSM*/"_msg = ""Authentication Failed, Disconnect and try again"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_NoResponse2 = true;" \n + " publicVariableServer ""PLAYER_REJECT_NoResponse2"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Wrong_Server + { + name = "ERROR_Wrong_Server"; + init = /*%FSM*/"_msg = format[""Server and Client running with different Version! (You: %1 // Server: %2)"",getText(configFile >> ""CfgMods"" >> ""Epoch"" >> ""version""),_serverVersion];" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_ServerVersion = true;" \n + " publicVariableServer ""PLAYER_REJECT_ServerVersion"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Setup_Player_Obj + { + name = "Setup_Player_Obj"; + init = /*%FSM*/"_ply = player;" \n + "_group = group player;" \n + "" \n + "player reveal _playerObject;" \n + "_playerPos = getposATL _playerObject;" \n + "" \n + "selectPlayer _playerObject;" \n + "" \n + "deleteVehicle _ply;" \n + "deleteGroup _group;" \n + "" \n + """Loading Player Body... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.8;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Setup Player Object"";" \n + "};" \n + "" \n + "_myTime = diag_tickTime;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Timeout_ + { + priority = 0.000000; + to="ERROR_Player_Setup"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 60"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class new_player_____p + { + priority = 0.000000; + to="Setup_Player_Var"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_playerObject == player"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Display_Message + { + name = "Display_Message"; + init = /*%FSM*/"[] spawn {" \n + " waitUntil{!isNull (findDisplay 46)};" \n + " (findDisplay 46) displayAddEventHandler [""KeyDown"",""true""];" \n + " (findDisplay 46) displayAddEventHandler [""KeyUp"",""true""];" \n + "};" \n + "diag_log format [""(%1) %2"",diag_tickTime,_msg];" \n + "_myTime = diag_tickTime;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Display_Message + { + priority = 0.000000; + to="Disconnect"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 10"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_Server + { + name = "Check_Server"; + init = /*%FSM*/"_myTime = diag_tickTime;" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Check Server"";" \n + "};" \n + """Checking Server... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.4;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Server_not_worki + { + priority = 10.000000; + to="ERROR_Server_not_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_BADHIVE""" \n + ""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Server_Okay + { + priority = 0.000000; + to="Server_Version_C"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""Epoch_ServerVersion"""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_1 + { + name = "ERROR_Server_not_1"; + init = /*%FSM*/"_msg = ""Server not Ready (Error 03)"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_NotReady2 = true;" \n + " publicVariableServer ""PLAYER_REJECT_NotReady2"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_Server_1 + { + name = "Check_Server_1"; + init = /*%FSM*/"progressLoadingScreen 0.3;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not_2"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 180"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class freshServer + { + priority = 0.000000; + to="Update_Loadingscreen"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"uiNamespace getVariable ['Epoch_freshServer', false]"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Server_Ready + { + priority = 0.000000; + to="Check_Server"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_SERVER"""/*%FSM*/; + action=/*%FSM*/"_serverUptime = EPOCH_SERVER;" \n + "EPOCH_SERVER = nil;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_2 + { + name = "ERROR_Server_not_2"; + init = /*%FSM*/"_msg = ""Server not Ready (Error 02)"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_NotReady1 = true;" \n + " publicVariableServer ""PLAYER_REJECT_NotReady1"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Reject_without_B + { + name = "Reject_without_B"; + init = /*%FSM*/"[] spawn {" \n + " waitUntil{!isNull (findDisplay 46)};" \n + " waitUntil {" \n + " (findDisplay 46) closeDisplay 0;" \n + " isNull (findDisplay 46)" \n + " };" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + }; + }; + /*%FSM*/ + /*%FSM*/ + class Arma_Version_Che + { + name = "Arma_Version_Che"; + init = /*%FSM*/"progressLoadingScreen 0.15;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Outdated_Version + { + priority = 10.000000; + to="ERROR_Wrong_Version_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"productVersion select 2 < getNumber(configFile >> ""CfgMods"" >> ""Epoch"" >> ""ArmAVersion"")"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Player_Object_Re + { + priority = 0.000000; + to="Check_Player_UID"; + precondition = /*%FSM*/"!isNull player"/*%FSM*/; + condition=/*%FSM*/"player == player"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Wrong_Version_1 + { + name = "ERROR_Wrong_Version_1"; + init = /*%FSM*/"_msg = ""You have an outdated version of ArmA 3"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_ARMAVERSION = true;" \n + " publicVariableServer ""PLAYER_REJECT_ARMAVERSION"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Setup_EH_s_and_H + { + name = "Setup_EH_s_and_H"; + init = /*%FSM*/"{" \n + " player addEventHandler [_x,([""CfgEpochClient"", _x, """"] call EPOCH_fnc_returnConfigEntryV2)];" \n + "} forEach ([""CfgEpochClient"", ""addEventHandler"", []] call EPOCH_fnc_returnConfigEntryV2);" \n + "" \n + "if (count EPOCH_playerHitPoints isEqualTo count ((getAllHitPointsDamage player) param [0,[]])) then {" \n + " {" \n + " player setHitIndex [_forEachIndex, _x];" \n + " }forEach EPOCH_playerHitPoints;" \n + "};" \n + "" \n + "[] spawn EPOCH_masterLoop;" \n + "true call EPOCH_fnc_Weather;" \n + "[5,100] spawn EPOCH_niteLight;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Setup EH's"";" \n + "};" \n + "" \n + """Loading... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.9;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Has_Current_Weap + { + priority = 10.000000; + to="Find_Active_Weap"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_currentWeapon != """""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class no_weapons + { + priority = 0.000000; + to="Process"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_currentWeapon == """""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process + { + name = "Process"; + init = /*%FSM*/"progressLoadingScreen 0.975;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Preload_done + { + priority = 0.000000; + to="FINISH"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"preloadCamera _playerPos"/*%FSM*/; + action=/*%FSM*/"call compile _playerGroupOnline;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Find_Active_Weap + { + name = "Find_Active_Weap"; + init = /*%FSM*/"_activeWeapon = currentWeapon player;" \n + "progressLoadingScreen 0.95;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Current_Weapon_S + { + priority = 0.000000; + to="Do_nothing"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_activeWeapon == _currentWeapon"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Current_Weapon_Not + { + priority = 0.000000; + to="Select_Weapon"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_activeWeapon != _currentWeapon"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Select_Weapon + { + name = "Select_Weapon"; + init = /*%FSM*/"_currentWeapon spawn {" \n + " uiSleep 1; " \n + " player selectWeapon _this;" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Process"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Do_nothing + { + name = "Do_nothing"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Process"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_New_Player + { + name = "Check_New_Player"; + init = /*%FSM*/"_myTime = diag_tickTime;" \n + "" \n + """Loading Player Inventory... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.6;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class check_new__player + { + priority = 0.000000; + to="Setup_Player_Obj"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!(isNull _playerObject) && {_playerObject getVariable [""SETUP"",false]}"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 120"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process_1 + { + name = "Process_1"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Wait_ArmA_Loading + { + priority = 0.000000; + to="Start_Loading_Sc"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"{!isnull _x} count ((uinamespace getvariable ""loading_displays"") - [finddisplay 18]) == 0"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Start_Loading_Sc + { + name = "Start_Loading_Sc"; + init = /*%FSM*/"startLoadingScreen ["""",""EpochLoadingScreen""];" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Start Loadingscreen"";" \n + "};" \n + """Starting Epoch... Please wait!"" call Epoch_updateLoadingScreen;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Version_Check"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Update_Loadingscreen + { + name = "Update_Loadingscreen"; + init = /*%FSM*/"uiNamespace setVariable ['Epoch_freshServer', false];" \n + "" \n + """Server initializing... Please wait!"" call Epoch_updateLoadingScreen;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Check_Server_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Player_Setup + { + name = "ERROR_Player_Setup"; + init = /*%FSM*/"_msg = ""Problem setting up player"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_InvaildSetup = true;" \n + " publicVariableServer ""PLAYER_REJECT_InvaildSetup"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Server_Version_C + { + name = "Server_Version_C"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Wrong_Server_Ver + { + priority = 10.000000; + to="ERROR_Wrong_Server"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"Epoch_ServerVersion != getText(configFile >> ""CfgMods"" >> ""Epoch"" >> ""version"")"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Version_Okay + { + priority = 0.000000; + to="Request_Hive"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_3 + { + name = "ERROR_Server_not_3"; + init = /*%FSM*/"_msg = ""Authentication Failed, Disconnect and try again"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_HiveNotResponse = true;" \n + " publicVariableServer ""PLAYER_REJECT_HiveNotResponse"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process_2 + { + name = "Process_2"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class new_character + { + priority = 10.000000; + to="Open_Gender_Selection"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_newChar"/*%FSM*/; + action=/*%FSM*/"endLoadingScreen;" \n + "_myGenderTime = diag_tickTime;"/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class load_old_charact + { + priority = 0.000000; + to="Process_3"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/"_myTime = diag_tickTime;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Open_Gender_Selection + { + name = "Open_Gender_Selection"; + init = /*%FSM*/"createdialog ""SelectGender"";"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Gender_Selected + { + priority = 10.000000; + to="Send_character_s"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_PlayerIsMale"""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Timeout + { + priority = 0.000000; + to="Send_character_s"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"((diag_tickTime - _myGenderTime) > 30)"/*%FSM*/; + action=/*%FSM*/"EPOCH_PlayerIsMale = true;" \n + "closeDialog 0;"/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Reopen_when_client + { + priority = 0.000000; + to="Open_Gender_Selection"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!dialog && isNil ""EPOCH_PlayerIsMale"""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Send_character_s + { + name = "Send_character_s"; + init = /*%FSM*/"startLoadingScreen ["""",""EpochLoadingScreen""];" \n + """Gender Selected... Please wait!"" call Epoch_updateLoadingScreen;" \n + "" \n + "[player,EPOCH_PlayerIsMale] remoteExec [""EPOCH_server_loadPlayer"",2];" \n + "EPOCH_PlayerIsMale = nil;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class load_old_charact + { + priority = 0.000000; + to="Process_3"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/"_myTime = diag_tickTime;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process_3 + { + name = "Process_3"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not_4"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 120"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Response + { + priority = 0.000000; + to="Check_New_Player"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_C_SET"""/*%FSM*/; + action=/*%FSM*/"_array = EPOCH_C_SET;" \n + "EPOCH_C_SET = nil;" \n + "_playerObject = _array deleteAt 0;" \n + "_playerVariables = _array deleteAt 0;" \n + "_currentWeapon = _array deleteAt 0;" \n + "_magCount = _array deleteAt 0;" \n + "Epoch_my_GroupUID = _array deleteAt 0;" \n + "Epoch_canBeRevived = _array deleteAt 0;" \n + "Epoch_personalToken = _array deleteAt 0;" \n + "reverse _serverUptime;" \n + "_serverUptime pushBack (_array deleteAt 0);" \n + "reverse _serverUptime;" \n + "_serverUptime call EPOCH_client_publicEH;" \n + "_playerGroupOnline = _array deleteAt 0;" \n + "" \n + ""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_4 + { + name = "ERROR_Server_not_4"; + init = /*%FSM*/"_msg = ""Authentication Failed, Disconnect and try again"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_HiveLoadChar = true;" \n + " publicVariableServer ""PLAYER_REJECT_HiveLoadChar"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + }; + initState="INIT"; + finalStates[] = + { + "FINISH", + "Reject_without_B", + }; +}; +/*%FSM*/ \ No newline at end of file diff --git a/Sources/mpmissions/epoch.Porto/description.ext b/Sources/mpmissions/epoch.Porto/description.ext index cfe65cba..8783e3aa 100644 --- a/Sources/mpmissions/epoch.Porto/description.ext +++ b/Sources/mpmissions/epoch.Porto/description.ext @@ -50,6 +50,7 @@ class cfgFunctions }; class postinit { + file = "init\fn_postinit.sqf"; postInit = 1; }; }; diff --git a/Sources/mpmissions/epoch.Porto/init/client_init.sqf b/Sources/mpmissions/epoch.Porto/init/client_init.sqf new file mode 100644 index 00000000..4a32e342 --- /dev/null +++ b/Sources/mpmissions/epoch.Porto/init/client_init.sqf @@ -0,0 +1,76 @@ +/* + 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: + https://github.com/EpochModTeam/Epoch/tree/master/Sources/epoch_code/init/client_init.sqf +*/ +//Variables +EPOCH_CraftingItem = ""; +EPOCH_ESP_TARGETS = []; +EPOCH_ESPMAP_TARGETS = []; +EPOCH_ESPGROUPS = []; +EPOCH_ESPGROUPCOLORS = []; +EPOCH_ESP_PLAYER = false; +EPOCH_ESP_VEHICLES = false; +EPOCH_ESP_VEHICLEPLAYER = []; +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"]; +if (isNil 'EPOCH_diag_fps') then { + EPOCH_diag_fps = 0; +}; +EPOCH_playerIsSwimming = false; +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 = []; +EPOCH_lastPlayerPos = [0,0,0]; +EPOCH_prevOffer = []; +EPOCH_drawIcon3d = false; +EPOCH_velTransform = false; +EPOCH_stabilityTarget = objNull; +EPOCH_currentVehicle = objNull; +EPOCH_currentTarget = objNull; +EPOCH_LootedBlds = []; +EPOCH_soundLevel = 1; +EPOCH_arr_interactedObjs = []; +EPOCH_buildOption = 0; +EPOCH_nearestLocations = []; +onEachFrame EPOCH_onEachFrame; + +EPOCH_LastAirDrop = time; +EPOCH_AirDropCheck = getNumber(missionConfigFile >> "CfgEpochAirDrop" >> "AirDropFreq"); +if(EPOCH_AirDropCheck < 120)then{EPOCH_AirDropCheck = 120;}; +EPOCH_AirDropChance = getNumber(missionConfigFile >> "CfgEpochAirDrop" >> "AirDropChance"); +if(EPOCH_AirDropChance < 0)then{EPOCH_AirDropChance = 101;EPOCH_AirDropCheck = 99999;}; + +EPOCH_droneRndChance = 100; + +// Custom Keys +EPOCH_keysActionPressed = false; //prevents EH spam +0 call EPOCH_clientKeyMap; + +//ON INIT and RESPAWN +call EPOCH_clientInit; + +[] execFSM "\x\addons\a3_epoch_code\system\SPVEH.fsm"; +[] execFSM "system\player_login.fsm"; + +true diff --git a/Sources/mpmissions/epoch.Porto/init/fn_postinit.sqf b/Sources/mpmissions/epoch.Porto/init/fn_postinit.sqf new file mode 100644 index 00000000..8be5aa09 --- /dev/null +++ b/Sources/mpmissions/epoch.Porto/init/fn_postinit.sqf @@ -0,0 +1,18 @@ +/* + Author: Aaron Clark - EpochMod.com + + Contributors: + + Description: + Initalize Player + + 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/master/Sources/epoch_code/init/fn_postinit.sqf +*/ +if (!isDedicated && isMultiplayer && hasInterface) then { + call compile preprocessFileLineNumbers "init\client_init.sqf"; +}; +true diff --git a/Sources/mpmissions/epoch.ProvingGrounds_PMC/System/player_login.fsm b/Sources/mpmissions/epoch.ProvingGrounds_PMC/System/player_login.fsm new file mode 100644 index 00000000..9426567f --- /dev/null +++ b/Sources/mpmissions/epoch.ProvingGrounds_PMC/System/player_login.fsm @@ -0,0 +1,1398 @@ +/*%FSM*/ +/*%FSM*/ +/* +item0[] = {"INIT",0,250,-25.000000,-375.000000,75.000000,-325.000000,0.000000,"INIT"}; +item1[] = {"FINISH",1,4346,-25.000000,1475.000000,75.000000,1525.000000,0.000000,"FINISH"}; +item2[] = {"true",8,218,-150.000000,-125.000000,-50.000000,-75.000000,0.000000,"true"}; +item3[] = {"Version_Check",2,250,-25.000000,-75.000000,75.000000,-25.000000,0.000000,"Version Check"}; +item4[] = {"Player_Object_Re",4,218,-150.000000,75.000000,-50.000000,125.000000,0.000000,"Player" \n "Object Ready"}; +item5[] = {"Check_Player_UID",2,250,-25.000000,125.000000,75.000000,175.000000,0.000000,"Check Player UID"}; +item6[] = {"PlayerUID_Okay",4,218,-150.000000,175.000000,-50.000000,225.000000,10.000000,"PlayerUID" \n "Okay"}; +item7[] = {"Wrong_Version",4,218,125.000000,-75.000000,225.000000,-25.000000,10.000000,"Wrong" \n "Version"}; +item8[] = {"",7,210,471.000061,-54.000099,478.999939,-45.999901,0.000000,""}; +item9[] = {"ERROR_Wrong_Version",2,250,275.000000,-75.000000,375.000000,-25.000000,0.000000,"ERROR" \n "Wrong Version" \n "Epoch"}; +item10[] = {"Disconnect",2,250,600.000000,1225.000000,700.000000,1275.000000,0.000000,"Disconnect"}; +item11[] = {"Server_Okay",4,218,-125.000000,425.000000,-25.000000,475.000000,0.000000,"Server" \n "Okay"}; +item12[] = {"Empty_PlayerUID",4,218,125.000000,125.000000,225.000000,175.000000,0.000000,"Empty" \n "PlayerUID"}; +item13[] = {"ERROR_PlayerUID",2,250,275.000000,125.000000,375.000000,175.000000,0.000000,"ERROR" \n "PlayerUID Empty"}; +item14[] = {"",7,210,471.000061,145.999908,478.999939,154.000092,0.000000,""}; +item15[] = {"Timeout_No_Respo",4,218,125.000000,875.000000,225.000000,925.000000,0.000000,"Timeout" \n "No Response"}; +item16[] = {"Response",4,218,-150.000000,825.000000,-50.000000,875.000000,0.000000,"Response"}; +item17[] = {"Setup_Player_Var",2,250,-25.000000,1075.000000,75.000000,1125.000000,0.000000,"Setup Player" \n "Variables"}; +item18[] = {"Request_Hive",2,250,-25.000000,575.000000,75.000000,625.000000,0.000000,"Request Hive"}; +item19[] = {"Timeout_No_Respo",4,218,125.000000,575.000000,225.000000,625.000000,0.000000,"Timeout" \n "No Response"}; +item20[] = {"ERROR_Server_not",2,250,275.000000,875.000000,375.000000,925.000000,0.000000,"ERROR" \n "Server not" \n "Response"}; +item21[] = {"",7,210,471.000000,895.999939,479.000000,904.000061,0.000000,""}; +item22[] = {"Timeout_No_Respo",4,218,125.000000,775.000000,225.000000,825.000000,0.000000,"Timeout" \n "No Response"}; +item23[] = {"Wrong_Server_Ver",4,218,125.000000,475.000000,225.000000,525.000000,10.000000,"Wrong" \n "Server Version"}; +item24[] = {"true",8,218,-150.000000,1125.000000,-50.000000,1175.000000,0.000000,"true"}; +item25[] = {"ERROR_Wrong_Server",2,250,275.000000,475.000000,375.000000,525.000000,0.000000,"ERROR" \n "Wrong" \n "Server Version"}; +item26[] = {"Display_Message",4,218,600.000000,1150.000000,700.000000,1200.000000,0.000000,"" \n "Display Message" \n "Wait..."}; +item27[] = {"Setup_Player_Obj",2,250,-25.000000,975.000000,75.000000,1025.000000,0.000000,"Setup Player" \n "Object"}; +item28[] = {"Check_if_Player",4,218,750.000000,1225.000000,850.000000,1275.000000,0.000000,"Check if" \n "Player got Kicked"}; +item29[] = {"Preload_done",8,218,-150.000000,1425.000000,-50.000000,1475.000000,0.000000,"Preload" \n "done"}; +item30[] = {"",7,210,471.000000,796.000000,479.000000,804.000000,0.000000,""}; +item31[] = {"",7,210,471.000000,796.000000,479.000000,804.000000,0.000000,""}; +item32[] = {"true",8,218,425.000000,1075.000000,525.000000,1125.000000,0.000000,"true"}; +item33[] = {"Display_Message",2,250,600.000000,1075.000000,700.000000,1125.000000,0.000000,"Display" \n "Message"}; +item34[] = {"Server_Ready",4,218,-25.000000,300.000000,75.000000,350.000000,0.000000,"Server" \n "Ready"}; +item35[] = {"Check_Server",2,250,-25.000000,375.000000,75.000000,425.000000,0.000000,"Check Server"}; +item36[] = {"Server_not_worki",4,218,125.000000,375.000000,225.000000,425.000000,10.000000,"Server" \n "not working"}; +item37[] = {"ERROR_Server_not_1",2,250,275.000000,375.000000,375.000000,425.000000,0.000000,"ERROR" \n "Server not Ready"}; +item38[] = {"",7,210,471.000000,396.000000,479.000000,404.000000,0.000000,""}; +item39[] = {"Check_Server_1",2,250,-25.000000,225.000000,75.000000,275.000000,0.000000,"Check Server"}; +item40[] = {"Timeout_No_Respo",4,218,125.000000,225.000000,225.000000,275.000000,0.000000,"Timeout" \n "No Response"}; +item41[] = {"ERROR_Server_not_2",2,250,275.000000,225.000000,375.000000,275.000000,0.000000,"ERROR" \n "Server not Ready"}; +item42[] = {"",7,210,471.000000,246.000031,479.000000,253.999969,0.000000,""}; +item43[] = {"Reject_without_B",1,250,900.000000,1225.000000,1000.000000,1275.000000,0.000000,"Reject without" \n "BattlEye"}; +item44[] = {"true",8,218,-150.000000,-25.000000,-50.000000,25.000000,0.000000,"true"}; +item45[] = {"Arma_Version_Che",2,250,-25.000000,25.000000,75.000000,75.000000,0.000000,"Arma Version" \n "Check"}; +item46[] = {"Outdated_Version",4,218,125.000000,25.000000,225.000000,75.000000,10.000000,"Outdated" \n "Version"}; +item47[] = {"ERROR_Wrong_Version_1",2,250,275.000000,25.000000,375.000000,75.000000,0.000000,"ERROR" \n "Wrong Version" \n "ArmA"}; +item48[] = {"",7,210,471.000061,45.999908,478.999939,54.000092,0.000000,""}; +item49[] = {"new_player_____p",4,218,-150.000000,1025.000000,-50.000000,1075.000000,0.000000,"new player == " \n "player"}; +item50[] = {"Setup_EH_s_and_H",2,250,-25.000000,1175.000000,75.000000,1225.000000,0.000000,"Setup EH's" \n "and" \n "HitPoints"}; +item51[] = {"no_weapons",4,218,-25.000000,1275.000000,75.000000,1325.000000,0.000000,"no weapons"}; +item52[] = {"Process",2,250,-25.000000,1375.000000,75.000000,1425.000000,0.000000,"Process"}; +item53[] = {"Has_Current_Weap",4,218,100.000000,1175.000000,200.000000,1225.000000,10.000000,"Has" \n "Current" \n "Weapon"}; +item54[] = {"Find_Active_Weap",2,250,225.000000,1175.000000,325.000000,1225.000000,0.000000,"Find" \n "Active" \n "Weapon"}; +item55[] = {"Current_Weapon_Not",4,218,150.000000,1225.000000,250.000000,1275.000000,0.000000,"Current" \n "Weapon" \n "Not Selected"}; +item56[] = {"Current_Weapon_S",4,218,300.000000,1225.000000,400.000000,1275.000000,0.000000,"Current" \n "Weapon" \n "Selected"}; +item57[] = {"Select_Weapon",2,250,150.000000,1300.000000,250.000000,1350.000000,0.000000,"Select" \n "Weapon"}; +item58[] = {"true",8,218,225.000000,1375.000000,325.000000,1425.000000,0.000000,"true"}; +item59[] = {"Do_nothing",2,250,300.000000,1300.000000,400.000000,1350.000000,0.000000,"Do nothing"}; +item60[] = {"Check_New_Player",2,250,-25.000000,875.000000,75.000000,925.000000,0.000000,"Check" \n "New Player" \n "Setup"}; +item61[] = {"check_new__player",4,218,-150.000000,925.000000,-50.000000,975.000000,0.000000,"check new " \n "player not null"}; +item62[] = {"true",8,218,-150.000000,-325.000000,-50.000000,-275.000000,0.000000,"true"}; +item63[] = {"Process_1",2,250,-25.000000,-275.000000,75.000000,-225.000000,0.000000,"Process"}; +item64[] = {"Wait_ArmA_Loading",4,218,-150.000000,-225.000000,-50.000000,-175.000000,0.000000,"Wait ArmA" \n "Loading Screen" \n "Done"}; +item65[] = {"Start_Loading_Sc",2,250,-25.000000,-175.000000,75.000000,-125.000000,0.000000,"Start Loading" \n "Screen"}; +item66[] = {"freshServer",4,218,-325.000000,225.000000,-225.000000,275.000000,0.000000,"freshServer"}; +item67[] = {"Update_Loadingscreen",2,250,-325.000000,300.000000,-225.000000,350.000000,0.000000,"Update" \n "Loadingscreen" \n "Message"}; +item68[] = {"true",8,218,-150.000000,300.000000,-50.000000,350.000000,0.000000,"true"}; +item69[] = {"Timeout_",4,218,125.000000,975.000000,225.000000,1025.000000,0.000000,"" \n "Timeout" \n ""}; +item70[] = {"ERROR_Player_Setup",2,250,275.000000,975.000000,375.000000,1025.000000,0.000000,"ERROR" \n "Player Setup" \n "Invalid"}; +item71[] = {"",7,210,471.000000,996.000000,479.000000,1004.000000,0.000000,""}; +item72[] = {"Server_Version_C",2,250,-25.000000,475.000000,75.000000,525.000000,0.000000,"Server Version" \n "Check"}; +item73[] = {"Version_Okay",4,218,-125.000000,525.000000,-25.000000,575.000000,0.000000,"Version" \n "Okay"}; +item74[] = {"",7,210,471.000000,496.000000,479.000000,504.000000,0.000000,""}; +item75[] = {"ERROR_Server_not_3",2,250,275.000000,575.000000,375.000000,625.000000,0.000000,"ERROR" \n "Server not" \n "Response"}; +item76[] = {"",7,210,471.000000,596.000000,479.000000,604.000000,0.000000,""}; +item77[] = {"new_character",4,218,-250.000000,675.000000,-150.000000,725.000000,10.000000,"new" \n "character"}; +item78[] = {"Hive_Response",4,218,-125.000000,625.000000,-25.000000,675.000000,0.000000,"Hive" \n "Response"}; +item79[] = {"load_old_charact",4,218,-125.000000,725.000000,-25.000000,775.000000,0.000000,"load old" \n "character"}; +item80[] = {"Process_2",2,250,-25.000000,675.000000,75.000000,725.000000,0.000000,"Process"}; +item81[] = {"Open_Gender_Selection",2,250,-400.000000,675.000000,-300.000000,725.000000,0.000000,"Open Gender" \n "Selection Dialog"}; +item82[] = {"Reopen_when_client",4,218,-400.000000,600.000000,-300.000000,650.000000,0.000000,"Reopen" \n "when client hit" \n "escape"}; +item83[] = {"Gender_Selected",4,218,-450.000000,750.000000,-350.000000,800.000000,10.000000,"Gender" \n "Selected"}; +item84[] = {"Timeout",4,218,-350.000000,750.000000,-250.000000,800.000000,0.000000,"Timeout"}; +item85[] = {"Send_character_s",2,250,-400.000000,825.000000,-300.000000,875.000000,0.000000,"Send" \n "character" \n "selection"}; +item86[] = {"Process_3",2,250,-25.000000,775.000000,75.000000,825.000000,0.000000,"Process"}; +item87[] = {"ERROR_Server_not_4",2,250,275.000000,775.000000,375.000000,825.000000,0.000000,"ERROR" \n "Server not" \n "Response"}; +link0[] = {0,62}; +link1[] = {2,3}; +link2[] = {3,7}; +link3[] = {3,44}; +link4[] = {4,5}; +link5[] = {5,6}; +link6[] = {5,12}; +link7[] = {6,39}; +link8[] = {7,9}; +link9[] = {8,48}; +link10[] = {9,8}; +link11[] = {10,28}; +link12[] = {11,72}; +link13[] = {12,13}; +link14[] = {13,14}; +link15[] = {14,42}; +link16[] = {15,20}; +link17[] = {16,60}; +link18[] = {17,24}; +link19[] = {18,19}; +link20[] = {18,78}; +link21[] = {19,75}; +link22[] = {20,21}; +link23[] = {21,71}; +link24[] = {22,87}; +link25[] = {23,25}; +link26[] = {24,50}; +link27[] = {25,74}; +link28[] = {26,10}; +link29[] = {27,49}; +link30[] = {27,69}; +link31[] = {28,43}; +link32[] = {29,1}; +link33[] = {31,21}; +link34[] = {32,33}; +link35[] = {33,26}; +link36[] = {34,35}; +link37[] = {35,11}; +link38[] = {35,36}; +link39[] = {36,37}; +link40[] = {37,38}; +link41[] = {38,74}; +link42[] = {39,34}; +link43[] = {39,40}; +link44[] = {39,66}; +link45[] = {40,41}; +link46[] = {41,42}; +link47[] = {42,38}; +link48[] = {44,45}; +link49[] = {45,4}; +link50[] = {45,46}; +link51[] = {46,47}; +link52[] = {47,48}; +link53[] = {48,14}; +link54[] = {49,17}; +link55[] = {50,51}; +link56[] = {50,53}; +link57[] = {51,52}; +link58[] = {52,29}; +link59[] = {53,54}; +link60[] = {54,55}; +link61[] = {54,56}; +link62[] = {55,57}; +link63[] = {56,59}; +link64[] = {57,58}; +link65[] = {58,52}; +link66[] = {59,58}; +link67[] = {60,15}; +link68[] = {60,61}; +link69[] = {61,27}; +link70[] = {62,63}; +link71[] = {63,64}; +link72[] = {64,65}; +link73[] = {65,2}; +link74[] = {66,67}; +link75[] = {67,68}; +link76[] = {68,39}; +link77[] = {69,70}; +link78[] = {70,71}; +link79[] = {71,32}; +link80[] = {72,23}; +link81[] = {72,73}; +link82[] = {73,18}; +link83[] = {74,76}; +link84[] = {75,76}; +link85[] = {76,31}; +link86[] = {77,81}; +link87[] = {78,80}; +link88[] = {79,86}; +link89[] = {80,77}; +link90[] = {80,79}; +link91[] = {81,82}; +link92[] = {81,83}; +link93[] = {81,84}; +link94[] = {82,81}; +link95[] = {83,85}; +link96[] = {84,85}; +link97[] = {85,79}; +link98[] = {86,16}; +link99[] = {86,22}; +link100[] = {87,31}; +globals[] = {0.000000,0,0,0,0,640,480,1,244,6316128,1,-207.564026,582.257507,1932.771484,781.734619,586,854,1}; +window[] = {2,-1,-1,-1,-1,838,1706,2998,26,3,604}; +*//*%FSM*/ +class FSM +{ + fsmName = "Epoch Login"; + class States + { + /*%FSM*/ + class INIT + { + name = "INIT"; + init = /*%FSM*/"titleCut ["""", ""BLACK FADED"", 1337];" \n + "0 fadeSound 0;" \n + "player enableSimulation false;" \n + "" \n + "_debug = true;" \n + "_myTime = diag_tickTime;" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Init"";" \n + "};" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Process_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class FINISH + { + name = "FINISH"; + init = /*%FSM*/"[] spawn {" \n + " disableSerialization;" \n + " waitUntil{!isNull (findDisplay 46)};" \n + " _display = findDisplay 46;" \n + " {" \n + " _display displayAddEventHandler [_x,([""CfgEpochClient"", _x, """"] call EPOCH_fnc_returnConfigEntryV2)];" \n + " } forEach ([""CfgEpochClient"", ""displayAddEventHandler"", []] call EPOCH_fnc_returnConfigEntryV2);" \n + " " \n + " player switchMove """";" \n + "};" \n + "" \n + "3 fadeSound 1;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Finish!"";" \n + "};" \n + "" \n + "" \n + "" \n + "player enableSimulation true;" \n + "" \n + "titleCut ["""", ""BLACK IN"", 1];" \n + "1338 cutText ["""",""PLAIN"",0]; " \n + "" \n + "progressLoadingScreen 1.0;" \n + "" \n + "endLoadingScreen;" \n + "EPOCH_loadingScreenDone = true;" \n + "" \n + "hintSilent ""Worked"" "/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + }; + }; + /*%FSM*/ + /*%FSM*/ + class Version_Check + { + name = "Version_Check"; + init = /*%FSM*/"if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Version Check"";" \n + "};" \n + "" \n + "// SHOULD BE:" \n + "_epoch_assets0 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_assets"");" \n + "_epoch_assets1 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_assets_1"");" \n + "_epoch_assets2 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""epoch_objects"");" \n + "_epoch_assets3 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_assets_3"");" \n + "_epoch_config = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_config"");" \n + "_epoch_language = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_language"");" \n + "_epoch_underground = getText(configFile >> ""Epoch"" >> ""Version"" >> ""Underground_Epoch"");" \n + "_epoch_vehicles = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_vehicles"");" \n + "_epoch_weapons = getText(configFile >> ""Epoch"" >> ""Version"" >> ""a3_epoch_weapons"");" \n + "" \n + "" \n + "// IS:" \n + "_my_epoch_assets0 = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_assets"" >> ""epochVersion"");" \n + "_my_epoch_assets1 = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_assets_1"" >> ""epochVersion"");" \n + "_my_epoch_assets2 = getText(configFile >> ""CfgPatches"" >> ""epoch_objects"" >> ""epochVersion"");" \n + "_my_epoch_assets3 = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_assets_3"" >> ""epochVersion"");" \n + "_my_epoch_config = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_config"" >> ""epochVersion"");" \n + "_my_epoch_language = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_language"" >> ""epochVersion"");" \n + "_my_epoch_underground = getText(configFile >> ""CfgPatches"" >> ""Underground_Epoch"" >> ""epochVersion"");" \n + "_my_epoch_vehicles = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_vehicles"" >> ""epochVersion"");" \n + "_my_epoch_weapons = getText(configFile >> ""CfgPatches"" >> ""a3_epoch_weapons"" >> ""epochVersion"");" \n + "" \n + "progressLoadingScreen 0.1;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Wrong_Version + { + priority = 10.000000; + to="ERROR_Wrong_Version"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_epoch_assets0 != _epoch_assets0 ||" \n + "_my_epoch_assets1 != _epoch_assets1 ||" \n + "_my_epoch_assets2 != _epoch_assets2 ||" \n + "_my_epoch_assets3 != _epoch_assets3 ||" \n + "_my_epoch_config != _epoch_config ||" \n + "_my_epoch_language != _epoch_language ||" \n + "_my_epoch_underground != _epoch_underground ||" \n + "_my_epoch_vehicles != _epoch_vehicles ||" \n + "_my_epoch_weapons != _epoch_weapons"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class true + { + priority = 0.000000; + to="Arma_Version_Che"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_Player_UID + { + name = "Check_Player_UID"; + init = /*%FSM*/"if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Check PlayerUID"";" \n + "};" \n + "" \n + "_playerUID = getPlayerUID player;" \n + "" \n + "progressLoadingScreen 0.2;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class PlayerUID_Okay + { + priority = 10.000000; + to="Check_Server_1"; + precondition = /*%FSM*/"!isNil ""_playerUID"""/*%FSM*/; + condition=/*%FSM*/"_playerUID != """""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Empty_PlayerUID + { + priority = 0.000000; + to="ERROR_PlayerUID"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Wrong_Version + { + name = "ERROR_Wrong_Version"; + init = /*%FSM*/"_msg = ""You have an outdated version of Epoch"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_EPOCHVERSION = true;" \n + " publicVariableServer ""PLAYER_REJECT_EPOCHVERSION"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Disconnect + { + name = "Disconnect"; + init = /*%FSM*/"endLoadingScreen;" \n + "1338 cutText [_msg,""PLAIN"",0]; " \n + "deleteVehicle player;" \n + "call _rejectPlayer;" \n + "diag_log format [""(%1) %2"",diag_tickTime,_msg];" \n + "_myTime = diag_tickTime;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Check_if_Player + { + priority = 0.000000; + to="Reject_without_B"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 2"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_PlayerUID + { + name = "ERROR_PlayerUID"; + init = /*%FSM*/"_msg = ""Can not setup Player Object! (Error 01)"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_UID = true;" \n + " publicVariableServer ""PLAYER_REJECT_UID"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Setup_Player_Var + { + name = "Setup_Player_Var"; + init = /*%FSM*/"diag_log format[""DEBUG TIME WAITED: %1"", (diag_tickTime - _myTime)];" \n + "{" \n + " missionNamespace setVariable[(format[""EPOCH_player%1"", EPOCH_customVars select _forEachIndex]), _x];" \n + "} forEach _playerVariables;" \n + "" \n + """Loading Player Variables... Please wait!"" call Epoch_updateLoadingScreen;" \n + "" \n + "EPOCH_lastPlayerPos = getPosATL vehicle player;" \n + "" \n + "progressLoadingScreen 0.7;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Setup Player Variables"";" \n + "};" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Setup_EH_s_and_H"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Request_Hive + { + name = "Request_Hive"; + init = /*%FSM*/"_myTime = diag_tickTime;" \n + "" \n + "Epoch_my_Group = [];" \n + "" \n + "player remoteExec [""EPOCH_server_checkPlayer"",2];" \n + "" \n + "" \n + """Loading Player Data... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.5;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Hive_Response + { + priority = 0.000000; + to="Process_2"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_checkPlayer_PVC"""/*%FSM*/; + action=/*%FSM*/"_newChar = EPOCH_checkPlayer_PVC;" \n + "EPOCH_checkPlayer_PVC = nil;"/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not_3"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 120"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not + { + name = "ERROR_Server_not"; + init = /*%FSM*/"_msg = ""Authentication Failed, Disconnect and try again"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_NoResponse2 = true;" \n + " publicVariableServer ""PLAYER_REJECT_NoResponse2"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Wrong_Server + { + name = "ERROR_Wrong_Server"; + init = /*%FSM*/"_msg = format[""Server and Client running with different Version! (You: %1 // Server: %2)"",getText(configFile >> ""CfgMods"" >> ""Epoch"" >> ""version""),_serverVersion];" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_ServerVersion = true;" \n + " publicVariableServer ""PLAYER_REJECT_ServerVersion"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Setup_Player_Obj + { + name = "Setup_Player_Obj"; + init = /*%FSM*/"_ply = player;" \n + "_group = group player;" \n + "" \n + "player reveal _playerObject;" \n + "_playerPos = getposATL _playerObject;" \n + "" \n + "selectPlayer _playerObject;" \n + "" \n + "deleteVehicle _ply;" \n + "deleteGroup _group;" \n + "" \n + """Loading Player Body... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.8;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Setup Player Object"";" \n + "};" \n + "" \n + "_myTime = diag_tickTime;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Timeout_ + { + priority = 0.000000; + to="ERROR_Player_Setup"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 60"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class new_player_____p + { + priority = 0.000000; + to="Setup_Player_Var"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_playerObject == player"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Display_Message + { + name = "Display_Message"; + init = /*%FSM*/"[] spawn {" \n + " waitUntil{!isNull (findDisplay 46)};" \n + " (findDisplay 46) displayAddEventHandler [""KeyDown"",""true""];" \n + " (findDisplay 46) displayAddEventHandler [""KeyUp"",""true""];" \n + "};" \n + "diag_log format [""(%1) %2"",diag_tickTime,_msg];" \n + "_myTime = diag_tickTime;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Display_Message + { + priority = 0.000000; + to="Disconnect"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 10"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_Server + { + name = "Check_Server"; + init = /*%FSM*/"_myTime = diag_tickTime;" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Check Server"";" \n + "};" \n + """Checking Server... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.4;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Server_not_worki + { + priority = 10.000000; + to="ERROR_Server_not_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_BADHIVE""" \n + ""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Server_Okay + { + priority = 0.000000; + to="Server_Version_C"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""Epoch_ServerVersion"""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_1 + { + name = "ERROR_Server_not_1"; + init = /*%FSM*/"_msg = ""Server not Ready (Error 03)"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_NotReady2 = true;" \n + " publicVariableServer ""PLAYER_REJECT_NotReady2"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_Server_1 + { + name = "Check_Server_1"; + init = /*%FSM*/"progressLoadingScreen 0.3;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not_2"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 180"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class freshServer + { + priority = 0.000000; + to="Update_Loadingscreen"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"uiNamespace getVariable ['Epoch_freshServer', false]"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Server_Ready + { + priority = 0.000000; + to="Check_Server"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_SERVER"""/*%FSM*/; + action=/*%FSM*/"_serverUptime = EPOCH_SERVER;" \n + "EPOCH_SERVER = nil;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_2 + { + name = "ERROR_Server_not_2"; + init = /*%FSM*/"_msg = ""Server not Ready (Error 02)"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_NotReady1 = true;" \n + " publicVariableServer ""PLAYER_REJECT_NotReady1"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Reject_without_B + { + name = "Reject_without_B"; + init = /*%FSM*/"[] spawn {" \n + " waitUntil{!isNull (findDisplay 46)};" \n + " waitUntil {" \n + " (findDisplay 46) closeDisplay 0;" \n + " isNull (findDisplay 46)" \n + " };" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + }; + }; + /*%FSM*/ + /*%FSM*/ + class Arma_Version_Che + { + name = "Arma_Version_Che"; + init = /*%FSM*/"progressLoadingScreen 0.15;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Outdated_Version + { + priority = 10.000000; + to="ERROR_Wrong_Version_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"productVersion select 2 < getNumber(configFile >> ""CfgMods"" >> ""Epoch"" >> ""ArmAVersion"")"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Player_Object_Re + { + priority = 0.000000; + to="Check_Player_UID"; + precondition = /*%FSM*/"!isNull player"/*%FSM*/; + condition=/*%FSM*/"player == player"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Wrong_Version_1 + { + name = "ERROR_Wrong_Version_1"; + init = /*%FSM*/"_msg = ""You have an outdated version of ArmA 3"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_ARMAVERSION = true;" \n + " publicVariableServer ""PLAYER_REJECT_ARMAVERSION"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Setup_EH_s_and_H + { + name = "Setup_EH_s_and_H"; + init = /*%FSM*/"{" \n + " player addEventHandler [_x,([""CfgEpochClient"", _x, """"] call EPOCH_fnc_returnConfigEntryV2)];" \n + "} forEach ([""CfgEpochClient"", ""addEventHandler"", []] call EPOCH_fnc_returnConfigEntryV2);" \n + "" \n + "if (count EPOCH_playerHitPoints isEqualTo count ((getAllHitPointsDamage player) param [0,[]])) then {" \n + " {" \n + " player setHitIndex [_forEachIndex, _x];" \n + " }forEach EPOCH_playerHitPoints;" \n + "};" \n + "" \n + "[] spawn EPOCH_masterLoop;" \n + "true call EPOCH_fnc_Weather;" \n + "[5,100] spawn EPOCH_niteLight;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Setup EH's"";" \n + "};" \n + "" \n + """Loading... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.9;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Has_Current_Weap + { + priority = 10.000000; + to="Find_Active_Weap"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_currentWeapon != """""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class no_weapons + { + priority = 0.000000; + to="Process"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_currentWeapon == """""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process + { + name = "Process"; + init = /*%FSM*/"progressLoadingScreen 0.975;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Preload_done + { + priority = 0.000000; + to="FINISH"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"preloadCamera _playerPos"/*%FSM*/; + action=/*%FSM*/"call compile _playerGroupOnline;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Find_Active_Weap + { + name = "Find_Active_Weap"; + init = /*%FSM*/"_activeWeapon = currentWeapon player;" \n + "progressLoadingScreen 0.95;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Current_Weapon_S + { + priority = 0.000000; + to="Do_nothing"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_activeWeapon == _currentWeapon"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Current_Weapon_Not + { + priority = 0.000000; + to="Select_Weapon"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_activeWeapon != _currentWeapon"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Select_Weapon + { + name = "Select_Weapon"; + init = /*%FSM*/"_currentWeapon spawn {" \n + " uiSleep 1; " \n + " player selectWeapon _this;" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Process"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Do_nothing + { + name = "Do_nothing"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Process"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_New_Player + { + name = "Check_New_Player"; + init = /*%FSM*/"_myTime = diag_tickTime;" \n + "" \n + """Loading Player Inventory... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.6;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class check_new__player + { + priority = 0.000000; + to="Setup_Player_Obj"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!(isNull _playerObject) && {_playerObject getVariable [""SETUP"",false]}"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 120"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process_1 + { + name = "Process_1"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Wait_ArmA_Loading + { + priority = 0.000000; + to="Start_Loading_Sc"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"{!isnull _x} count ((uinamespace getvariable ""loading_displays"") - [finddisplay 18]) == 0"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Start_Loading_Sc + { + name = "Start_Loading_Sc"; + init = /*%FSM*/"startLoadingScreen ["""",""EpochLoadingScreen""];" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Start Loadingscreen"";" \n + "};" \n + """Starting Epoch... Please wait!"" call Epoch_updateLoadingScreen;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Version_Check"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Update_Loadingscreen + { + name = "Update_Loadingscreen"; + init = /*%FSM*/"uiNamespace setVariable ['Epoch_freshServer', false];" \n + "" \n + """Server initializing... Please wait!"" call Epoch_updateLoadingScreen;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Check_Server_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Player_Setup + { + name = "ERROR_Player_Setup"; + init = /*%FSM*/"_msg = ""Problem setting up player"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_InvaildSetup = true;" \n + " publicVariableServer ""PLAYER_REJECT_InvaildSetup"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Server_Version_C + { + name = "Server_Version_C"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Wrong_Server_Ver + { + priority = 10.000000; + to="ERROR_Wrong_Server"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"Epoch_ServerVersion != getText(configFile >> ""CfgMods"" >> ""Epoch"" >> ""version"")"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Version_Okay + { + priority = 0.000000; + to="Request_Hive"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_3 + { + name = "ERROR_Server_not_3"; + init = /*%FSM*/"_msg = ""Authentication Failed, Disconnect and try again"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_HiveNotResponse = true;" \n + " publicVariableServer ""PLAYER_REJECT_HiveNotResponse"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process_2 + { + name = "Process_2"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class new_character + { + priority = 10.000000; + to="Open_Gender_Selection"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_newChar"/*%FSM*/; + action=/*%FSM*/"endLoadingScreen;" \n + "_myGenderTime = diag_tickTime;"/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class load_old_charact + { + priority = 0.000000; + to="Process_3"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/"_myTime = diag_tickTime;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Open_Gender_Selection + { + name = "Open_Gender_Selection"; + init = /*%FSM*/"createdialog ""SelectGender"";"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Gender_Selected + { + priority = 10.000000; + to="Send_character_s"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_PlayerIsMale"""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Timeout + { + priority = 0.000000; + to="Send_character_s"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"((diag_tickTime - _myGenderTime) > 30)"/*%FSM*/; + action=/*%FSM*/"EPOCH_PlayerIsMale = true;" \n + "closeDialog 0;"/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Reopen_when_client + { + priority = 0.000000; + to="Open_Gender_Selection"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!dialog && isNil ""EPOCH_PlayerIsMale"""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Send_character_s + { + name = "Send_character_s"; + init = /*%FSM*/"startLoadingScreen ["""",""EpochLoadingScreen""];" \n + """Gender Selected... Please wait!"" call Epoch_updateLoadingScreen;" \n + "" \n + "[player,EPOCH_PlayerIsMale] remoteExec [""EPOCH_server_loadPlayer"",2];" \n + "EPOCH_PlayerIsMale = nil;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class load_old_charact + { + priority = 0.000000; + to="Process_3"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/"_myTime = diag_tickTime;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process_3 + { + name = "Process_3"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not_4"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 120"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Response + { + priority = 0.000000; + to="Check_New_Player"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_C_SET"""/*%FSM*/; + action=/*%FSM*/"_array = EPOCH_C_SET;" \n + "EPOCH_C_SET = nil;" \n + "_playerObject = _array deleteAt 0;" \n + "_playerVariables = _array deleteAt 0;" \n + "_currentWeapon = _array deleteAt 0;" \n + "_magCount = _array deleteAt 0;" \n + "Epoch_my_GroupUID = _array deleteAt 0;" \n + "Epoch_canBeRevived = _array deleteAt 0;" \n + "Epoch_personalToken = _array deleteAt 0;" \n + "reverse _serverUptime;" \n + "_serverUptime pushBack (_array deleteAt 0);" \n + "reverse _serverUptime;" \n + "_serverUptime call EPOCH_client_publicEH;" \n + "_playerGroupOnline = _array deleteAt 0;" \n + "" \n + ""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_4 + { + name = "ERROR_Server_not_4"; + init = /*%FSM*/"_msg = ""Authentication Failed, Disconnect and try again"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_HiveLoadChar = true;" \n + " publicVariableServer ""PLAYER_REJECT_HiveLoadChar"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + }; + initState="INIT"; + finalStates[] = + { + "FINISH", + "Reject_without_B", + }; +}; +/*%FSM*/ \ No newline at end of file diff --git a/Sources/mpmissions/epoch.ProvingGrounds_PMC/description.ext b/Sources/mpmissions/epoch.ProvingGrounds_PMC/description.ext index cfe65cba..8783e3aa 100644 --- a/Sources/mpmissions/epoch.ProvingGrounds_PMC/description.ext +++ b/Sources/mpmissions/epoch.ProvingGrounds_PMC/description.ext @@ -50,6 +50,7 @@ class cfgFunctions }; class postinit { + file = "init\fn_postinit.sqf"; postInit = 1; }; }; diff --git a/Sources/mpmissions/epoch.ProvingGrounds_PMC/init/client_init.sqf b/Sources/mpmissions/epoch.ProvingGrounds_PMC/init/client_init.sqf new file mode 100644 index 00000000..4a32e342 --- /dev/null +++ b/Sources/mpmissions/epoch.ProvingGrounds_PMC/init/client_init.sqf @@ -0,0 +1,76 @@ +/* + 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: + https://github.com/EpochModTeam/Epoch/tree/master/Sources/epoch_code/init/client_init.sqf +*/ +//Variables +EPOCH_CraftingItem = ""; +EPOCH_ESP_TARGETS = []; +EPOCH_ESPMAP_TARGETS = []; +EPOCH_ESPGROUPS = []; +EPOCH_ESPGROUPCOLORS = []; +EPOCH_ESP_PLAYER = false; +EPOCH_ESP_VEHICLES = false; +EPOCH_ESP_VEHICLEPLAYER = []; +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"]; +if (isNil 'EPOCH_diag_fps') then { + EPOCH_diag_fps = 0; +}; +EPOCH_playerIsSwimming = false; +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 = []; +EPOCH_lastPlayerPos = [0,0,0]; +EPOCH_prevOffer = []; +EPOCH_drawIcon3d = false; +EPOCH_velTransform = false; +EPOCH_stabilityTarget = objNull; +EPOCH_currentVehicle = objNull; +EPOCH_currentTarget = objNull; +EPOCH_LootedBlds = []; +EPOCH_soundLevel = 1; +EPOCH_arr_interactedObjs = []; +EPOCH_buildOption = 0; +EPOCH_nearestLocations = []; +onEachFrame EPOCH_onEachFrame; + +EPOCH_LastAirDrop = time; +EPOCH_AirDropCheck = getNumber(missionConfigFile >> "CfgEpochAirDrop" >> "AirDropFreq"); +if(EPOCH_AirDropCheck < 120)then{EPOCH_AirDropCheck = 120;}; +EPOCH_AirDropChance = getNumber(missionConfigFile >> "CfgEpochAirDrop" >> "AirDropChance"); +if(EPOCH_AirDropChance < 0)then{EPOCH_AirDropChance = 101;EPOCH_AirDropCheck = 99999;}; + +EPOCH_droneRndChance = 100; + +// Custom Keys +EPOCH_keysActionPressed = false; //prevents EH spam +0 call EPOCH_clientKeyMap; + +//ON INIT and RESPAWN +call EPOCH_clientInit; + +[] execFSM "\x\addons\a3_epoch_code\system\SPVEH.fsm"; +[] execFSM "system\player_login.fsm"; + +true diff --git a/Sources/mpmissions/epoch.ProvingGrounds_PMC/init/fn_postinit.sqf b/Sources/mpmissions/epoch.ProvingGrounds_PMC/init/fn_postinit.sqf new file mode 100644 index 00000000..8be5aa09 --- /dev/null +++ b/Sources/mpmissions/epoch.ProvingGrounds_PMC/init/fn_postinit.sqf @@ -0,0 +1,18 @@ +/* + Author: Aaron Clark - EpochMod.com + + Contributors: + + Description: + Initalize Player + + 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/master/Sources/epoch_code/init/fn_postinit.sqf +*/ +if (!isDedicated && isMultiplayer && hasInterface) then { + call compile preprocessFileLineNumbers "init\client_init.sqf"; +}; +true diff --git a/Sources/mpmissions/epoch.Sara/System/player_login.fsm b/Sources/mpmissions/epoch.Sara/System/player_login.fsm new file mode 100644 index 00000000..9426567f --- /dev/null +++ b/Sources/mpmissions/epoch.Sara/System/player_login.fsm @@ -0,0 +1,1398 @@ +/*%FSM*/ +/*%FSM*/ +/* +item0[] = {"INIT",0,250,-25.000000,-375.000000,75.000000,-325.000000,0.000000,"INIT"}; +item1[] = {"FINISH",1,4346,-25.000000,1475.000000,75.000000,1525.000000,0.000000,"FINISH"}; +item2[] = {"true",8,218,-150.000000,-125.000000,-50.000000,-75.000000,0.000000,"true"}; +item3[] = {"Version_Check",2,250,-25.000000,-75.000000,75.000000,-25.000000,0.000000,"Version Check"}; +item4[] = {"Player_Object_Re",4,218,-150.000000,75.000000,-50.000000,125.000000,0.000000,"Player" \n "Object Ready"}; +item5[] = {"Check_Player_UID",2,250,-25.000000,125.000000,75.000000,175.000000,0.000000,"Check Player UID"}; +item6[] = {"PlayerUID_Okay",4,218,-150.000000,175.000000,-50.000000,225.000000,10.000000,"PlayerUID" \n "Okay"}; +item7[] = {"Wrong_Version",4,218,125.000000,-75.000000,225.000000,-25.000000,10.000000,"Wrong" \n "Version"}; +item8[] = {"",7,210,471.000061,-54.000099,478.999939,-45.999901,0.000000,""}; +item9[] = {"ERROR_Wrong_Version",2,250,275.000000,-75.000000,375.000000,-25.000000,0.000000,"ERROR" \n "Wrong Version" \n "Epoch"}; +item10[] = {"Disconnect",2,250,600.000000,1225.000000,700.000000,1275.000000,0.000000,"Disconnect"}; +item11[] = {"Server_Okay",4,218,-125.000000,425.000000,-25.000000,475.000000,0.000000,"Server" \n "Okay"}; +item12[] = {"Empty_PlayerUID",4,218,125.000000,125.000000,225.000000,175.000000,0.000000,"Empty" \n "PlayerUID"}; +item13[] = {"ERROR_PlayerUID",2,250,275.000000,125.000000,375.000000,175.000000,0.000000,"ERROR" \n "PlayerUID Empty"}; +item14[] = {"",7,210,471.000061,145.999908,478.999939,154.000092,0.000000,""}; +item15[] = {"Timeout_No_Respo",4,218,125.000000,875.000000,225.000000,925.000000,0.000000,"Timeout" \n "No Response"}; +item16[] = {"Response",4,218,-150.000000,825.000000,-50.000000,875.000000,0.000000,"Response"}; +item17[] = {"Setup_Player_Var",2,250,-25.000000,1075.000000,75.000000,1125.000000,0.000000,"Setup Player" \n "Variables"}; +item18[] = {"Request_Hive",2,250,-25.000000,575.000000,75.000000,625.000000,0.000000,"Request Hive"}; +item19[] = {"Timeout_No_Respo",4,218,125.000000,575.000000,225.000000,625.000000,0.000000,"Timeout" \n "No Response"}; +item20[] = {"ERROR_Server_not",2,250,275.000000,875.000000,375.000000,925.000000,0.000000,"ERROR" \n "Server not" \n "Response"}; +item21[] = {"",7,210,471.000000,895.999939,479.000000,904.000061,0.000000,""}; +item22[] = {"Timeout_No_Respo",4,218,125.000000,775.000000,225.000000,825.000000,0.000000,"Timeout" \n "No Response"}; +item23[] = {"Wrong_Server_Ver",4,218,125.000000,475.000000,225.000000,525.000000,10.000000,"Wrong" \n "Server Version"}; +item24[] = {"true",8,218,-150.000000,1125.000000,-50.000000,1175.000000,0.000000,"true"}; +item25[] = {"ERROR_Wrong_Server",2,250,275.000000,475.000000,375.000000,525.000000,0.000000,"ERROR" \n "Wrong" \n "Server Version"}; +item26[] = {"Display_Message",4,218,600.000000,1150.000000,700.000000,1200.000000,0.000000,"" \n "Display Message" \n "Wait..."}; +item27[] = {"Setup_Player_Obj",2,250,-25.000000,975.000000,75.000000,1025.000000,0.000000,"Setup Player" \n "Object"}; +item28[] = {"Check_if_Player",4,218,750.000000,1225.000000,850.000000,1275.000000,0.000000,"Check if" \n "Player got Kicked"}; +item29[] = {"Preload_done",8,218,-150.000000,1425.000000,-50.000000,1475.000000,0.000000,"Preload" \n "done"}; +item30[] = {"",7,210,471.000000,796.000000,479.000000,804.000000,0.000000,""}; +item31[] = {"",7,210,471.000000,796.000000,479.000000,804.000000,0.000000,""}; +item32[] = {"true",8,218,425.000000,1075.000000,525.000000,1125.000000,0.000000,"true"}; +item33[] = {"Display_Message",2,250,600.000000,1075.000000,700.000000,1125.000000,0.000000,"Display" \n "Message"}; +item34[] = {"Server_Ready",4,218,-25.000000,300.000000,75.000000,350.000000,0.000000,"Server" \n "Ready"}; +item35[] = {"Check_Server",2,250,-25.000000,375.000000,75.000000,425.000000,0.000000,"Check Server"}; +item36[] = {"Server_not_worki",4,218,125.000000,375.000000,225.000000,425.000000,10.000000,"Server" \n "not working"}; +item37[] = {"ERROR_Server_not_1",2,250,275.000000,375.000000,375.000000,425.000000,0.000000,"ERROR" \n "Server not Ready"}; +item38[] = {"",7,210,471.000000,396.000000,479.000000,404.000000,0.000000,""}; +item39[] = {"Check_Server_1",2,250,-25.000000,225.000000,75.000000,275.000000,0.000000,"Check Server"}; +item40[] = {"Timeout_No_Respo",4,218,125.000000,225.000000,225.000000,275.000000,0.000000,"Timeout" \n "No Response"}; +item41[] = {"ERROR_Server_not_2",2,250,275.000000,225.000000,375.000000,275.000000,0.000000,"ERROR" \n "Server not Ready"}; +item42[] = {"",7,210,471.000000,246.000031,479.000000,253.999969,0.000000,""}; +item43[] = {"Reject_without_B",1,250,900.000000,1225.000000,1000.000000,1275.000000,0.000000,"Reject without" \n "BattlEye"}; +item44[] = {"true",8,218,-150.000000,-25.000000,-50.000000,25.000000,0.000000,"true"}; +item45[] = {"Arma_Version_Che",2,250,-25.000000,25.000000,75.000000,75.000000,0.000000,"Arma Version" \n "Check"}; +item46[] = {"Outdated_Version",4,218,125.000000,25.000000,225.000000,75.000000,10.000000,"Outdated" \n "Version"}; +item47[] = {"ERROR_Wrong_Version_1",2,250,275.000000,25.000000,375.000000,75.000000,0.000000,"ERROR" \n "Wrong Version" \n "ArmA"}; +item48[] = {"",7,210,471.000061,45.999908,478.999939,54.000092,0.000000,""}; +item49[] = {"new_player_____p",4,218,-150.000000,1025.000000,-50.000000,1075.000000,0.000000,"new player == " \n "player"}; +item50[] = {"Setup_EH_s_and_H",2,250,-25.000000,1175.000000,75.000000,1225.000000,0.000000,"Setup EH's" \n "and" \n "HitPoints"}; +item51[] = {"no_weapons",4,218,-25.000000,1275.000000,75.000000,1325.000000,0.000000,"no weapons"}; +item52[] = {"Process",2,250,-25.000000,1375.000000,75.000000,1425.000000,0.000000,"Process"}; +item53[] = {"Has_Current_Weap",4,218,100.000000,1175.000000,200.000000,1225.000000,10.000000,"Has" \n "Current" \n "Weapon"}; +item54[] = {"Find_Active_Weap",2,250,225.000000,1175.000000,325.000000,1225.000000,0.000000,"Find" \n "Active" \n "Weapon"}; +item55[] = {"Current_Weapon_Not",4,218,150.000000,1225.000000,250.000000,1275.000000,0.000000,"Current" \n "Weapon" \n "Not Selected"}; +item56[] = {"Current_Weapon_S",4,218,300.000000,1225.000000,400.000000,1275.000000,0.000000,"Current" \n "Weapon" \n "Selected"}; +item57[] = {"Select_Weapon",2,250,150.000000,1300.000000,250.000000,1350.000000,0.000000,"Select" \n "Weapon"}; +item58[] = {"true",8,218,225.000000,1375.000000,325.000000,1425.000000,0.000000,"true"}; +item59[] = {"Do_nothing",2,250,300.000000,1300.000000,400.000000,1350.000000,0.000000,"Do nothing"}; +item60[] = {"Check_New_Player",2,250,-25.000000,875.000000,75.000000,925.000000,0.000000,"Check" \n "New Player" \n "Setup"}; +item61[] = {"check_new__player",4,218,-150.000000,925.000000,-50.000000,975.000000,0.000000,"check new " \n "player not null"}; +item62[] = {"true",8,218,-150.000000,-325.000000,-50.000000,-275.000000,0.000000,"true"}; +item63[] = {"Process_1",2,250,-25.000000,-275.000000,75.000000,-225.000000,0.000000,"Process"}; +item64[] = {"Wait_ArmA_Loading",4,218,-150.000000,-225.000000,-50.000000,-175.000000,0.000000,"Wait ArmA" \n "Loading Screen" \n "Done"}; +item65[] = {"Start_Loading_Sc",2,250,-25.000000,-175.000000,75.000000,-125.000000,0.000000,"Start Loading" \n "Screen"}; +item66[] = {"freshServer",4,218,-325.000000,225.000000,-225.000000,275.000000,0.000000,"freshServer"}; +item67[] = {"Update_Loadingscreen",2,250,-325.000000,300.000000,-225.000000,350.000000,0.000000,"Update" \n "Loadingscreen" \n "Message"}; +item68[] = {"true",8,218,-150.000000,300.000000,-50.000000,350.000000,0.000000,"true"}; +item69[] = {"Timeout_",4,218,125.000000,975.000000,225.000000,1025.000000,0.000000,"" \n "Timeout" \n ""}; +item70[] = {"ERROR_Player_Setup",2,250,275.000000,975.000000,375.000000,1025.000000,0.000000,"ERROR" \n "Player Setup" \n "Invalid"}; +item71[] = {"",7,210,471.000000,996.000000,479.000000,1004.000000,0.000000,""}; +item72[] = {"Server_Version_C",2,250,-25.000000,475.000000,75.000000,525.000000,0.000000,"Server Version" \n "Check"}; +item73[] = {"Version_Okay",4,218,-125.000000,525.000000,-25.000000,575.000000,0.000000,"Version" \n "Okay"}; +item74[] = {"",7,210,471.000000,496.000000,479.000000,504.000000,0.000000,""}; +item75[] = {"ERROR_Server_not_3",2,250,275.000000,575.000000,375.000000,625.000000,0.000000,"ERROR" \n "Server not" \n "Response"}; +item76[] = {"",7,210,471.000000,596.000000,479.000000,604.000000,0.000000,""}; +item77[] = {"new_character",4,218,-250.000000,675.000000,-150.000000,725.000000,10.000000,"new" \n "character"}; +item78[] = {"Hive_Response",4,218,-125.000000,625.000000,-25.000000,675.000000,0.000000,"Hive" \n "Response"}; +item79[] = {"load_old_charact",4,218,-125.000000,725.000000,-25.000000,775.000000,0.000000,"load old" \n "character"}; +item80[] = {"Process_2",2,250,-25.000000,675.000000,75.000000,725.000000,0.000000,"Process"}; +item81[] = {"Open_Gender_Selection",2,250,-400.000000,675.000000,-300.000000,725.000000,0.000000,"Open Gender" \n "Selection Dialog"}; +item82[] = {"Reopen_when_client",4,218,-400.000000,600.000000,-300.000000,650.000000,0.000000,"Reopen" \n "when client hit" \n "escape"}; +item83[] = {"Gender_Selected",4,218,-450.000000,750.000000,-350.000000,800.000000,10.000000,"Gender" \n "Selected"}; +item84[] = {"Timeout",4,218,-350.000000,750.000000,-250.000000,800.000000,0.000000,"Timeout"}; +item85[] = {"Send_character_s",2,250,-400.000000,825.000000,-300.000000,875.000000,0.000000,"Send" \n "character" \n "selection"}; +item86[] = {"Process_3",2,250,-25.000000,775.000000,75.000000,825.000000,0.000000,"Process"}; +item87[] = {"ERROR_Server_not_4",2,250,275.000000,775.000000,375.000000,825.000000,0.000000,"ERROR" \n "Server not" \n "Response"}; +link0[] = {0,62}; +link1[] = {2,3}; +link2[] = {3,7}; +link3[] = {3,44}; +link4[] = {4,5}; +link5[] = {5,6}; +link6[] = {5,12}; +link7[] = {6,39}; +link8[] = {7,9}; +link9[] = {8,48}; +link10[] = {9,8}; +link11[] = {10,28}; +link12[] = {11,72}; +link13[] = {12,13}; +link14[] = {13,14}; +link15[] = {14,42}; +link16[] = {15,20}; +link17[] = {16,60}; +link18[] = {17,24}; +link19[] = {18,19}; +link20[] = {18,78}; +link21[] = {19,75}; +link22[] = {20,21}; +link23[] = {21,71}; +link24[] = {22,87}; +link25[] = {23,25}; +link26[] = {24,50}; +link27[] = {25,74}; +link28[] = {26,10}; +link29[] = {27,49}; +link30[] = {27,69}; +link31[] = {28,43}; +link32[] = {29,1}; +link33[] = {31,21}; +link34[] = {32,33}; +link35[] = {33,26}; +link36[] = {34,35}; +link37[] = {35,11}; +link38[] = {35,36}; +link39[] = {36,37}; +link40[] = {37,38}; +link41[] = {38,74}; +link42[] = {39,34}; +link43[] = {39,40}; +link44[] = {39,66}; +link45[] = {40,41}; +link46[] = {41,42}; +link47[] = {42,38}; +link48[] = {44,45}; +link49[] = {45,4}; +link50[] = {45,46}; +link51[] = {46,47}; +link52[] = {47,48}; +link53[] = {48,14}; +link54[] = {49,17}; +link55[] = {50,51}; +link56[] = {50,53}; +link57[] = {51,52}; +link58[] = {52,29}; +link59[] = {53,54}; +link60[] = {54,55}; +link61[] = {54,56}; +link62[] = {55,57}; +link63[] = {56,59}; +link64[] = {57,58}; +link65[] = {58,52}; +link66[] = {59,58}; +link67[] = {60,15}; +link68[] = {60,61}; +link69[] = {61,27}; +link70[] = {62,63}; +link71[] = {63,64}; +link72[] = {64,65}; +link73[] = {65,2}; +link74[] = {66,67}; +link75[] = {67,68}; +link76[] = {68,39}; +link77[] = {69,70}; +link78[] = {70,71}; +link79[] = {71,32}; +link80[] = {72,23}; +link81[] = {72,73}; +link82[] = {73,18}; +link83[] = {74,76}; +link84[] = {75,76}; +link85[] = {76,31}; +link86[] = {77,81}; +link87[] = {78,80}; +link88[] = {79,86}; +link89[] = {80,77}; +link90[] = {80,79}; +link91[] = {81,82}; +link92[] = {81,83}; +link93[] = {81,84}; +link94[] = {82,81}; +link95[] = {83,85}; +link96[] = {84,85}; +link97[] = {85,79}; +link98[] = {86,16}; +link99[] = {86,22}; +link100[] = {87,31}; +globals[] = {0.000000,0,0,0,0,640,480,1,244,6316128,1,-207.564026,582.257507,1932.771484,781.734619,586,854,1}; +window[] = {2,-1,-1,-1,-1,838,1706,2998,26,3,604}; +*//*%FSM*/ +class FSM +{ + fsmName = "Epoch Login"; + class States + { + /*%FSM*/ + class INIT + { + name = "INIT"; + init = /*%FSM*/"titleCut ["""", ""BLACK FADED"", 1337];" \n + "0 fadeSound 0;" \n + "player enableSimulation false;" \n + "" \n + "_debug = true;" \n + "_myTime = diag_tickTime;" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Init"";" \n + "};" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Process_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class FINISH + { + name = "FINISH"; + init = /*%FSM*/"[] spawn {" \n + " disableSerialization;" \n + " waitUntil{!isNull (findDisplay 46)};" \n + " _display = findDisplay 46;" \n + " {" \n + " _display displayAddEventHandler [_x,([""CfgEpochClient"", _x, """"] call EPOCH_fnc_returnConfigEntryV2)];" \n + " } forEach ([""CfgEpochClient"", ""displayAddEventHandler"", []] call EPOCH_fnc_returnConfigEntryV2);" \n + " " \n + " player switchMove """";" \n + "};" \n + "" \n + "3 fadeSound 1;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Finish!"";" \n + "};" \n + "" \n + "" \n + "" \n + "player enableSimulation true;" \n + "" \n + "titleCut ["""", ""BLACK IN"", 1];" \n + "1338 cutText ["""",""PLAIN"",0]; " \n + "" \n + "progressLoadingScreen 1.0;" \n + "" \n + "endLoadingScreen;" \n + "EPOCH_loadingScreenDone = true;" \n + "" \n + "hintSilent ""Worked"" "/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + }; + }; + /*%FSM*/ + /*%FSM*/ + class Version_Check + { + name = "Version_Check"; + init = /*%FSM*/"if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Version Check"";" \n + "};" \n + "" \n + "// SHOULD BE:" \n + "_epoch_assets0 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_assets"");" \n + "_epoch_assets1 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_assets_1"");" \n + "_epoch_assets2 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""epoch_objects"");" \n + "_epoch_assets3 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_assets_3"");" \n + "_epoch_config = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_config"");" \n + "_epoch_language = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_language"");" \n + "_epoch_underground = getText(configFile >> ""Epoch"" >> ""Version"" >> ""Underground_Epoch"");" \n + "_epoch_vehicles = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_vehicles"");" \n + "_epoch_weapons = getText(configFile >> ""Epoch"" >> ""Version"" >> ""a3_epoch_weapons"");" \n + "" \n + "" \n + "// IS:" \n + "_my_epoch_assets0 = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_assets"" >> ""epochVersion"");" \n + "_my_epoch_assets1 = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_assets_1"" >> ""epochVersion"");" \n + "_my_epoch_assets2 = getText(configFile >> ""CfgPatches"" >> ""epoch_objects"" >> ""epochVersion"");" \n + "_my_epoch_assets3 = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_assets_3"" >> ""epochVersion"");" \n + "_my_epoch_config = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_config"" >> ""epochVersion"");" \n + "_my_epoch_language = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_language"" >> ""epochVersion"");" \n + "_my_epoch_underground = getText(configFile >> ""CfgPatches"" >> ""Underground_Epoch"" >> ""epochVersion"");" \n + "_my_epoch_vehicles = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_vehicles"" >> ""epochVersion"");" \n + "_my_epoch_weapons = getText(configFile >> ""CfgPatches"" >> ""a3_epoch_weapons"" >> ""epochVersion"");" \n + "" \n + "progressLoadingScreen 0.1;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Wrong_Version + { + priority = 10.000000; + to="ERROR_Wrong_Version"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_epoch_assets0 != _epoch_assets0 ||" \n + "_my_epoch_assets1 != _epoch_assets1 ||" \n + "_my_epoch_assets2 != _epoch_assets2 ||" \n + "_my_epoch_assets3 != _epoch_assets3 ||" \n + "_my_epoch_config != _epoch_config ||" \n + "_my_epoch_language != _epoch_language ||" \n + "_my_epoch_underground != _epoch_underground ||" \n + "_my_epoch_vehicles != _epoch_vehicles ||" \n + "_my_epoch_weapons != _epoch_weapons"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class true + { + priority = 0.000000; + to="Arma_Version_Che"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_Player_UID + { + name = "Check_Player_UID"; + init = /*%FSM*/"if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Check PlayerUID"";" \n + "};" \n + "" \n + "_playerUID = getPlayerUID player;" \n + "" \n + "progressLoadingScreen 0.2;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class PlayerUID_Okay + { + priority = 10.000000; + to="Check_Server_1"; + precondition = /*%FSM*/"!isNil ""_playerUID"""/*%FSM*/; + condition=/*%FSM*/"_playerUID != """""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Empty_PlayerUID + { + priority = 0.000000; + to="ERROR_PlayerUID"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Wrong_Version + { + name = "ERROR_Wrong_Version"; + init = /*%FSM*/"_msg = ""You have an outdated version of Epoch"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_EPOCHVERSION = true;" \n + " publicVariableServer ""PLAYER_REJECT_EPOCHVERSION"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Disconnect + { + name = "Disconnect"; + init = /*%FSM*/"endLoadingScreen;" \n + "1338 cutText [_msg,""PLAIN"",0]; " \n + "deleteVehicle player;" \n + "call _rejectPlayer;" \n + "diag_log format [""(%1) %2"",diag_tickTime,_msg];" \n + "_myTime = diag_tickTime;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Check_if_Player + { + priority = 0.000000; + to="Reject_without_B"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 2"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_PlayerUID + { + name = "ERROR_PlayerUID"; + init = /*%FSM*/"_msg = ""Can not setup Player Object! (Error 01)"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_UID = true;" \n + " publicVariableServer ""PLAYER_REJECT_UID"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Setup_Player_Var + { + name = "Setup_Player_Var"; + init = /*%FSM*/"diag_log format[""DEBUG TIME WAITED: %1"", (diag_tickTime - _myTime)];" \n + "{" \n + " missionNamespace setVariable[(format[""EPOCH_player%1"", EPOCH_customVars select _forEachIndex]), _x];" \n + "} forEach _playerVariables;" \n + "" \n + """Loading Player Variables... Please wait!"" call Epoch_updateLoadingScreen;" \n + "" \n + "EPOCH_lastPlayerPos = getPosATL vehicle player;" \n + "" \n + "progressLoadingScreen 0.7;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Setup Player Variables"";" \n + "};" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Setup_EH_s_and_H"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Request_Hive + { + name = "Request_Hive"; + init = /*%FSM*/"_myTime = diag_tickTime;" \n + "" \n + "Epoch_my_Group = [];" \n + "" \n + "player remoteExec [""EPOCH_server_checkPlayer"",2];" \n + "" \n + "" \n + """Loading Player Data... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.5;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Hive_Response + { + priority = 0.000000; + to="Process_2"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_checkPlayer_PVC"""/*%FSM*/; + action=/*%FSM*/"_newChar = EPOCH_checkPlayer_PVC;" \n + "EPOCH_checkPlayer_PVC = nil;"/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not_3"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 120"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not + { + name = "ERROR_Server_not"; + init = /*%FSM*/"_msg = ""Authentication Failed, Disconnect and try again"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_NoResponse2 = true;" \n + " publicVariableServer ""PLAYER_REJECT_NoResponse2"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Wrong_Server + { + name = "ERROR_Wrong_Server"; + init = /*%FSM*/"_msg = format[""Server and Client running with different Version! (You: %1 // Server: %2)"",getText(configFile >> ""CfgMods"" >> ""Epoch"" >> ""version""),_serverVersion];" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_ServerVersion = true;" \n + " publicVariableServer ""PLAYER_REJECT_ServerVersion"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Setup_Player_Obj + { + name = "Setup_Player_Obj"; + init = /*%FSM*/"_ply = player;" \n + "_group = group player;" \n + "" \n + "player reveal _playerObject;" \n + "_playerPos = getposATL _playerObject;" \n + "" \n + "selectPlayer _playerObject;" \n + "" \n + "deleteVehicle _ply;" \n + "deleteGroup _group;" \n + "" \n + """Loading Player Body... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.8;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Setup Player Object"";" \n + "};" \n + "" \n + "_myTime = diag_tickTime;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Timeout_ + { + priority = 0.000000; + to="ERROR_Player_Setup"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 60"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class new_player_____p + { + priority = 0.000000; + to="Setup_Player_Var"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_playerObject == player"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Display_Message + { + name = "Display_Message"; + init = /*%FSM*/"[] spawn {" \n + " waitUntil{!isNull (findDisplay 46)};" \n + " (findDisplay 46) displayAddEventHandler [""KeyDown"",""true""];" \n + " (findDisplay 46) displayAddEventHandler [""KeyUp"",""true""];" \n + "};" \n + "diag_log format [""(%1) %2"",diag_tickTime,_msg];" \n + "_myTime = diag_tickTime;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Display_Message + { + priority = 0.000000; + to="Disconnect"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 10"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_Server + { + name = "Check_Server"; + init = /*%FSM*/"_myTime = diag_tickTime;" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Check Server"";" \n + "};" \n + """Checking Server... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.4;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Server_not_worki + { + priority = 10.000000; + to="ERROR_Server_not_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_BADHIVE""" \n + ""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Server_Okay + { + priority = 0.000000; + to="Server_Version_C"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""Epoch_ServerVersion"""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_1 + { + name = "ERROR_Server_not_1"; + init = /*%FSM*/"_msg = ""Server not Ready (Error 03)"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_NotReady2 = true;" \n + " publicVariableServer ""PLAYER_REJECT_NotReady2"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_Server_1 + { + name = "Check_Server_1"; + init = /*%FSM*/"progressLoadingScreen 0.3;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not_2"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 180"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class freshServer + { + priority = 0.000000; + to="Update_Loadingscreen"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"uiNamespace getVariable ['Epoch_freshServer', false]"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Server_Ready + { + priority = 0.000000; + to="Check_Server"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_SERVER"""/*%FSM*/; + action=/*%FSM*/"_serverUptime = EPOCH_SERVER;" \n + "EPOCH_SERVER = nil;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_2 + { + name = "ERROR_Server_not_2"; + init = /*%FSM*/"_msg = ""Server not Ready (Error 02)"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_NotReady1 = true;" \n + " publicVariableServer ""PLAYER_REJECT_NotReady1"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Reject_without_B + { + name = "Reject_without_B"; + init = /*%FSM*/"[] spawn {" \n + " waitUntil{!isNull (findDisplay 46)};" \n + " waitUntil {" \n + " (findDisplay 46) closeDisplay 0;" \n + " isNull (findDisplay 46)" \n + " };" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + }; + }; + /*%FSM*/ + /*%FSM*/ + class Arma_Version_Che + { + name = "Arma_Version_Che"; + init = /*%FSM*/"progressLoadingScreen 0.15;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Outdated_Version + { + priority = 10.000000; + to="ERROR_Wrong_Version_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"productVersion select 2 < getNumber(configFile >> ""CfgMods"" >> ""Epoch"" >> ""ArmAVersion"")"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Player_Object_Re + { + priority = 0.000000; + to="Check_Player_UID"; + precondition = /*%FSM*/"!isNull player"/*%FSM*/; + condition=/*%FSM*/"player == player"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Wrong_Version_1 + { + name = "ERROR_Wrong_Version_1"; + init = /*%FSM*/"_msg = ""You have an outdated version of ArmA 3"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_ARMAVERSION = true;" \n + " publicVariableServer ""PLAYER_REJECT_ARMAVERSION"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Setup_EH_s_and_H + { + name = "Setup_EH_s_and_H"; + init = /*%FSM*/"{" \n + " player addEventHandler [_x,([""CfgEpochClient"", _x, """"] call EPOCH_fnc_returnConfigEntryV2)];" \n + "} forEach ([""CfgEpochClient"", ""addEventHandler"", []] call EPOCH_fnc_returnConfigEntryV2);" \n + "" \n + "if (count EPOCH_playerHitPoints isEqualTo count ((getAllHitPointsDamage player) param [0,[]])) then {" \n + " {" \n + " player setHitIndex [_forEachIndex, _x];" \n + " }forEach EPOCH_playerHitPoints;" \n + "};" \n + "" \n + "[] spawn EPOCH_masterLoop;" \n + "true call EPOCH_fnc_Weather;" \n + "[5,100] spawn EPOCH_niteLight;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Setup EH's"";" \n + "};" \n + "" \n + """Loading... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.9;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Has_Current_Weap + { + priority = 10.000000; + to="Find_Active_Weap"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_currentWeapon != """""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class no_weapons + { + priority = 0.000000; + to="Process"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_currentWeapon == """""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process + { + name = "Process"; + init = /*%FSM*/"progressLoadingScreen 0.975;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Preload_done + { + priority = 0.000000; + to="FINISH"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"preloadCamera _playerPos"/*%FSM*/; + action=/*%FSM*/"call compile _playerGroupOnline;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Find_Active_Weap + { + name = "Find_Active_Weap"; + init = /*%FSM*/"_activeWeapon = currentWeapon player;" \n + "progressLoadingScreen 0.95;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Current_Weapon_S + { + priority = 0.000000; + to="Do_nothing"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_activeWeapon == _currentWeapon"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Current_Weapon_Not + { + priority = 0.000000; + to="Select_Weapon"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_activeWeapon != _currentWeapon"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Select_Weapon + { + name = "Select_Weapon"; + init = /*%FSM*/"_currentWeapon spawn {" \n + " uiSleep 1; " \n + " player selectWeapon _this;" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Process"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Do_nothing + { + name = "Do_nothing"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Process"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_New_Player + { + name = "Check_New_Player"; + init = /*%FSM*/"_myTime = diag_tickTime;" \n + "" \n + """Loading Player Inventory... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.6;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class check_new__player + { + priority = 0.000000; + to="Setup_Player_Obj"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!(isNull _playerObject) && {_playerObject getVariable [""SETUP"",false]}"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 120"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process_1 + { + name = "Process_1"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Wait_ArmA_Loading + { + priority = 0.000000; + to="Start_Loading_Sc"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"{!isnull _x} count ((uinamespace getvariable ""loading_displays"") - [finddisplay 18]) == 0"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Start_Loading_Sc + { + name = "Start_Loading_Sc"; + init = /*%FSM*/"startLoadingScreen ["""",""EpochLoadingScreen""];" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Start Loadingscreen"";" \n + "};" \n + """Starting Epoch... Please wait!"" call Epoch_updateLoadingScreen;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Version_Check"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Update_Loadingscreen + { + name = "Update_Loadingscreen"; + init = /*%FSM*/"uiNamespace setVariable ['Epoch_freshServer', false];" \n + "" \n + """Server initializing... Please wait!"" call Epoch_updateLoadingScreen;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Check_Server_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Player_Setup + { + name = "ERROR_Player_Setup"; + init = /*%FSM*/"_msg = ""Problem setting up player"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_InvaildSetup = true;" \n + " publicVariableServer ""PLAYER_REJECT_InvaildSetup"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Server_Version_C + { + name = "Server_Version_C"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Wrong_Server_Ver + { + priority = 10.000000; + to="ERROR_Wrong_Server"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"Epoch_ServerVersion != getText(configFile >> ""CfgMods"" >> ""Epoch"" >> ""version"")"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Version_Okay + { + priority = 0.000000; + to="Request_Hive"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_3 + { + name = "ERROR_Server_not_3"; + init = /*%FSM*/"_msg = ""Authentication Failed, Disconnect and try again"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_HiveNotResponse = true;" \n + " publicVariableServer ""PLAYER_REJECT_HiveNotResponse"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process_2 + { + name = "Process_2"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class new_character + { + priority = 10.000000; + to="Open_Gender_Selection"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_newChar"/*%FSM*/; + action=/*%FSM*/"endLoadingScreen;" \n + "_myGenderTime = diag_tickTime;"/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class load_old_charact + { + priority = 0.000000; + to="Process_3"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/"_myTime = diag_tickTime;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Open_Gender_Selection + { + name = "Open_Gender_Selection"; + init = /*%FSM*/"createdialog ""SelectGender"";"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Gender_Selected + { + priority = 10.000000; + to="Send_character_s"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_PlayerIsMale"""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Timeout + { + priority = 0.000000; + to="Send_character_s"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"((diag_tickTime - _myGenderTime) > 30)"/*%FSM*/; + action=/*%FSM*/"EPOCH_PlayerIsMale = true;" \n + "closeDialog 0;"/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Reopen_when_client + { + priority = 0.000000; + to="Open_Gender_Selection"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!dialog && isNil ""EPOCH_PlayerIsMale"""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Send_character_s + { + name = "Send_character_s"; + init = /*%FSM*/"startLoadingScreen ["""",""EpochLoadingScreen""];" \n + """Gender Selected... Please wait!"" call Epoch_updateLoadingScreen;" \n + "" \n + "[player,EPOCH_PlayerIsMale] remoteExec [""EPOCH_server_loadPlayer"",2];" \n + "EPOCH_PlayerIsMale = nil;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class load_old_charact + { + priority = 0.000000; + to="Process_3"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/"_myTime = diag_tickTime;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process_3 + { + name = "Process_3"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not_4"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 120"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Response + { + priority = 0.000000; + to="Check_New_Player"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_C_SET"""/*%FSM*/; + action=/*%FSM*/"_array = EPOCH_C_SET;" \n + "EPOCH_C_SET = nil;" \n + "_playerObject = _array deleteAt 0;" \n + "_playerVariables = _array deleteAt 0;" \n + "_currentWeapon = _array deleteAt 0;" \n + "_magCount = _array deleteAt 0;" \n + "Epoch_my_GroupUID = _array deleteAt 0;" \n + "Epoch_canBeRevived = _array deleteAt 0;" \n + "Epoch_personalToken = _array deleteAt 0;" \n + "reverse _serverUptime;" \n + "_serverUptime pushBack (_array deleteAt 0);" \n + "reverse _serverUptime;" \n + "_serverUptime call EPOCH_client_publicEH;" \n + "_playerGroupOnline = _array deleteAt 0;" \n + "" \n + ""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_4 + { + name = "ERROR_Server_not_4"; + init = /*%FSM*/"_msg = ""Authentication Failed, Disconnect and try again"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_HiveLoadChar = true;" \n + " publicVariableServer ""PLAYER_REJECT_HiveLoadChar"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + }; + initState="INIT"; + finalStates[] = + { + "FINISH", + "Reject_without_B", + }; +}; +/*%FSM*/ \ No newline at end of file diff --git a/Sources/mpmissions/epoch.Sara/description.ext b/Sources/mpmissions/epoch.Sara/description.ext index cfe65cba..8783e3aa 100644 --- a/Sources/mpmissions/epoch.Sara/description.ext +++ b/Sources/mpmissions/epoch.Sara/description.ext @@ -50,6 +50,7 @@ class cfgFunctions }; class postinit { + file = "init\fn_postinit.sqf"; postInit = 1; }; }; diff --git a/Sources/mpmissions/epoch.Sara/init/client_init.sqf b/Sources/mpmissions/epoch.Sara/init/client_init.sqf new file mode 100644 index 00000000..4a32e342 --- /dev/null +++ b/Sources/mpmissions/epoch.Sara/init/client_init.sqf @@ -0,0 +1,76 @@ +/* + 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: + https://github.com/EpochModTeam/Epoch/tree/master/Sources/epoch_code/init/client_init.sqf +*/ +//Variables +EPOCH_CraftingItem = ""; +EPOCH_ESP_TARGETS = []; +EPOCH_ESPMAP_TARGETS = []; +EPOCH_ESPGROUPS = []; +EPOCH_ESPGROUPCOLORS = []; +EPOCH_ESP_PLAYER = false; +EPOCH_ESP_VEHICLES = false; +EPOCH_ESP_VEHICLEPLAYER = []; +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"]; +if (isNil 'EPOCH_diag_fps') then { + EPOCH_diag_fps = 0; +}; +EPOCH_playerIsSwimming = false; +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 = []; +EPOCH_lastPlayerPos = [0,0,0]; +EPOCH_prevOffer = []; +EPOCH_drawIcon3d = false; +EPOCH_velTransform = false; +EPOCH_stabilityTarget = objNull; +EPOCH_currentVehicle = objNull; +EPOCH_currentTarget = objNull; +EPOCH_LootedBlds = []; +EPOCH_soundLevel = 1; +EPOCH_arr_interactedObjs = []; +EPOCH_buildOption = 0; +EPOCH_nearestLocations = []; +onEachFrame EPOCH_onEachFrame; + +EPOCH_LastAirDrop = time; +EPOCH_AirDropCheck = getNumber(missionConfigFile >> "CfgEpochAirDrop" >> "AirDropFreq"); +if(EPOCH_AirDropCheck < 120)then{EPOCH_AirDropCheck = 120;}; +EPOCH_AirDropChance = getNumber(missionConfigFile >> "CfgEpochAirDrop" >> "AirDropChance"); +if(EPOCH_AirDropChance < 0)then{EPOCH_AirDropChance = 101;EPOCH_AirDropCheck = 99999;}; + +EPOCH_droneRndChance = 100; + +// Custom Keys +EPOCH_keysActionPressed = false; //prevents EH spam +0 call EPOCH_clientKeyMap; + +//ON INIT and RESPAWN +call EPOCH_clientInit; + +[] execFSM "\x\addons\a3_epoch_code\system\SPVEH.fsm"; +[] execFSM "system\player_login.fsm"; + +true diff --git a/Sources/mpmissions/epoch.Sara/init/fn_postinit.sqf b/Sources/mpmissions/epoch.Sara/init/fn_postinit.sqf new file mode 100644 index 00000000..8be5aa09 --- /dev/null +++ b/Sources/mpmissions/epoch.Sara/init/fn_postinit.sqf @@ -0,0 +1,18 @@ +/* + Author: Aaron Clark - EpochMod.com + + Contributors: + + Description: + Initalize Player + + 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/master/Sources/epoch_code/init/fn_postinit.sqf +*/ +if (!isDedicated && isMultiplayer && hasInterface) then { + call compile preprocessFileLineNumbers "init\client_init.sqf"; +}; +true diff --git a/Sources/mpmissions/epoch.SaraLite/System/player_login.fsm b/Sources/mpmissions/epoch.SaraLite/System/player_login.fsm new file mode 100644 index 00000000..9426567f --- /dev/null +++ b/Sources/mpmissions/epoch.SaraLite/System/player_login.fsm @@ -0,0 +1,1398 @@ +/*%FSM*/ +/*%FSM*/ +/* +item0[] = {"INIT",0,250,-25.000000,-375.000000,75.000000,-325.000000,0.000000,"INIT"}; +item1[] = {"FINISH",1,4346,-25.000000,1475.000000,75.000000,1525.000000,0.000000,"FINISH"}; +item2[] = {"true",8,218,-150.000000,-125.000000,-50.000000,-75.000000,0.000000,"true"}; +item3[] = {"Version_Check",2,250,-25.000000,-75.000000,75.000000,-25.000000,0.000000,"Version Check"}; +item4[] = {"Player_Object_Re",4,218,-150.000000,75.000000,-50.000000,125.000000,0.000000,"Player" \n "Object Ready"}; +item5[] = {"Check_Player_UID",2,250,-25.000000,125.000000,75.000000,175.000000,0.000000,"Check Player UID"}; +item6[] = {"PlayerUID_Okay",4,218,-150.000000,175.000000,-50.000000,225.000000,10.000000,"PlayerUID" \n "Okay"}; +item7[] = {"Wrong_Version",4,218,125.000000,-75.000000,225.000000,-25.000000,10.000000,"Wrong" \n "Version"}; +item8[] = {"",7,210,471.000061,-54.000099,478.999939,-45.999901,0.000000,""}; +item9[] = {"ERROR_Wrong_Version",2,250,275.000000,-75.000000,375.000000,-25.000000,0.000000,"ERROR" \n "Wrong Version" \n "Epoch"}; +item10[] = {"Disconnect",2,250,600.000000,1225.000000,700.000000,1275.000000,0.000000,"Disconnect"}; +item11[] = {"Server_Okay",4,218,-125.000000,425.000000,-25.000000,475.000000,0.000000,"Server" \n "Okay"}; +item12[] = {"Empty_PlayerUID",4,218,125.000000,125.000000,225.000000,175.000000,0.000000,"Empty" \n "PlayerUID"}; +item13[] = {"ERROR_PlayerUID",2,250,275.000000,125.000000,375.000000,175.000000,0.000000,"ERROR" \n "PlayerUID Empty"}; +item14[] = {"",7,210,471.000061,145.999908,478.999939,154.000092,0.000000,""}; +item15[] = {"Timeout_No_Respo",4,218,125.000000,875.000000,225.000000,925.000000,0.000000,"Timeout" \n "No Response"}; +item16[] = {"Response",4,218,-150.000000,825.000000,-50.000000,875.000000,0.000000,"Response"}; +item17[] = {"Setup_Player_Var",2,250,-25.000000,1075.000000,75.000000,1125.000000,0.000000,"Setup Player" \n "Variables"}; +item18[] = {"Request_Hive",2,250,-25.000000,575.000000,75.000000,625.000000,0.000000,"Request Hive"}; +item19[] = {"Timeout_No_Respo",4,218,125.000000,575.000000,225.000000,625.000000,0.000000,"Timeout" \n "No Response"}; +item20[] = {"ERROR_Server_not",2,250,275.000000,875.000000,375.000000,925.000000,0.000000,"ERROR" \n "Server not" \n "Response"}; +item21[] = {"",7,210,471.000000,895.999939,479.000000,904.000061,0.000000,""}; +item22[] = {"Timeout_No_Respo",4,218,125.000000,775.000000,225.000000,825.000000,0.000000,"Timeout" \n "No Response"}; +item23[] = {"Wrong_Server_Ver",4,218,125.000000,475.000000,225.000000,525.000000,10.000000,"Wrong" \n "Server Version"}; +item24[] = {"true",8,218,-150.000000,1125.000000,-50.000000,1175.000000,0.000000,"true"}; +item25[] = {"ERROR_Wrong_Server",2,250,275.000000,475.000000,375.000000,525.000000,0.000000,"ERROR" \n "Wrong" \n "Server Version"}; +item26[] = {"Display_Message",4,218,600.000000,1150.000000,700.000000,1200.000000,0.000000,"" \n "Display Message" \n "Wait..."}; +item27[] = {"Setup_Player_Obj",2,250,-25.000000,975.000000,75.000000,1025.000000,0.000000,"Setup Player" \n "Object"}; +item28[] = {"Check_if_Player",4,218,750.000000,1225.000000,850.000000,1275.000000,0.000000,"Check if" \n "Player got Kicked"}; +item29[] = {"Preload_done",8,218,-150.000000,1425.000000,-50.000000,1475.000000,0.000000,"Preload" \n "done"}; +item30[] = {"",7,210,471.000000,796.000000,479.000000,804.000000,0.000000,""}; +item31[] = {"",7,210,471.000000,796.000000,479.000000,804.000000,0.000000,""}; +item32[] = {"true",8,218,425.000000,1075.000000,525.000000,1125.000000,0.000000,"true"}; +item33[] = {"Display_Message",2,250,600.000000,1075.000000,700.000000,1125.000000,0.000000,"Display" \n "Message"}; +item34[] = {"Server_Ready",4,218,-25.000000,300.000000,75.000000,350.000000,0.000000,"Server" \n "Ready"}; +item35[] = {"Check_Server",2,250,-25.000000,375.000000,75.000000,425.000000,0.000000,"Check Server"}; +item36[] = {"Server_not_worki",4,218,125.000000,375.000000,225.000000,425.000000,10.000000,"Server" \n "not working"}; +item37[] = {"ERROR_Server_not_1",2,250,275.000000,375.000000,375.000000,425.000000,0.000000,"ERROR" \n "Server not Ready"}; +item38[] = {"",7,210,471.000000,396.000000,479.000000,404.000000,0.000000,""}; +item39[] = {"Check_Server_1",2,250,-25.000000,225.000000,75.000000,275.000000,0.000000,"Check Server"}; +item40[] = {"Timeout_No_Respo",4,218,125.000000,225.000000,225.000000,275.000000,0.000000,"Timeout" \n "No Response"}; +item41[] = {"ERROR_Server_not_2",2,250,275.000000,225.000000,375.000000,275.000000,0.000000,"ERROR" \n "Server not Ready"}; +item42[] = {"",7,210,471.000000,246.000031,479.000000,253.999969,0.000000,""}; +item43[] = {"Reject_without_B",1,250,900.000000,1225.000000,1000.000000,1275.000000,0.000000,"Reject without" \n "BattlEye"}; +item44[] = {"true",8,218,-150.000000,-25.000000,-50.000000,25.000000,0.000000,"true"}; +item45[] = {"Arma_Version_Che",2,250,-25.000000,25.000000,75.000000,75.000000,0.000000,"Arma Version" \n "Check"}; +item46[] = {"Outdated_Version",4,218,125.000000,25.000000,225.000000,75.000000,10.000000,"Outdated" \n "Version"}; +item47[] = {"ERROR_Wrong_Version_1",2,250,275.000000,25.000000,375.000000,75.000000,0.000000,"ERROR" \n "Wrong Version" \n "ArmA"}; +item48[] = {"",7,210,471.000061,45.999908,478.999939,54.000092,0.000000,""}; +item49[] = {"new_player_____p",4,218,-150.000000,1025.000000,-50.000000,1075.000000,0.000000,"new player == " \n "player"}; +item50[] = {"Setup_EH_s_and_H",2,250,-25.000000,1175.000000,75.000000,1225.000000,0.000000,"Setup EH's" \n "and" \n "HitPoints"}; +item51[] = {"no_weapons",4,218,-25.000000,1275.000000,75.000000,1325.000000,0.000000,"no weapons"}; +item52[] = {"Process",2,250,-25.000000,1375.000000,75.000000,1425.000000,0.000000,"Process"}; +item53[] = {"Has_Current_Weap",4,218,100.000000,1175.000000,200.000000,1225.000000,10.000000,"Has" \n "Current" \n "Weapon"}; +item54[] = {"Find_Active_Weap",2,250,225.000000,1175.000000,325.000000,1225.000000,0.000000,"Find" \n "Active" \n "Weapon"}; +item55[] = {"Current_Weapon_Not",4,218,150.000000,1225.000000,250.000000,1275.000000,0.000000,"Current" \n "Weapon" \n "Not Selected"}; +item56[] = {"Current_Weapon_S",4,218,300.000000,1225.000000,400.000000,1275.000000,0.000000,"Current" \n "Weapon" \n "Selected"}; +item57[] = {"Select_Weapon",2,250,150.000000,1300.000000,250.000000,1350.000000,0.000000,"Select" \n "Weapon"}; +item58[] = {"true",8,218,225.000000,1375.000000,325.000000,1425.000000,0.000000,"true"}; +item59[] = {"Do_nothing",2,250,300.000000,1300.000000,400.000000,1350.000000,0.000000,"Do nothing"}; +item60[] = {"Check_New_Player",2,250,-25.000000,875.000000,75.000000,925.000000,0.000000,"Check" \n "New Player" \n "Setup"}; +item61[] = {"check_new__player",4,218,-150.000000,925.000000,-50.000000,975.000000,0.000000,"check new " \n "player not null"}; +item62[] = {"true",8,218,-150.000000,-325.000000,-50.000000,-275.000000,0.000000,"true"}; +item63[] = {"Process_1",2,250,-25.000000,-275.000000,75.000000,-225.000000,0.000000,"Process"}; +item64[] = {"Wait_ArmA_Loading",4,218,-150.000000,-225.000000,-50.000000,-175.000000,0.000000,"Wait ArmA" \n "Loading Screen" \n "Done"}; +item65[] = {"Start_Loading_Sc",2,250,-25.000000,-175.000000,75.000000,-125.000000,0.000000,"Start Loading" \n "Screen"}; +item66[] = {"freshServer",4,218,-325.000000,225.000000,-225.000000,275.000000,0.000000,"freshServer"}; +item67[] = {"Update_Loadingscreen",2,250,-325.000000,300.000000,-225.000000,350.000000,0.000000,"Update" \n "Loadingscreen" \n "Message"}; +item68[] = {"true",8,218,-150.000000,300.000000,-50.000000,350.000000,0.000000,"true"}; +item69[] = {"Timeout_",4,218,125.000000,975.000000,225.000000,1025.000000,0.000000,"" \n "Timeout" \n ""}; +item70[] = {"ERROR_Player_Setup",2,250,275.000000,975.000000,375.000000,1025.000000,0.000000,"ERROR" \n "Player Setup" \n "Invalid"}; +item71[] = {"",7,210,471.000000,996.000000,479.000000,1004.000000,0.000000,""}; +item72[] = {"Server_Version_C",2,250,-25.000000,475.000000,75.000000,525.000000,0.000000,"Server Version" \n "Check"}; +item73[] = {"Version_Okay",4,218,-125.000000,525.000000,-25.000000,575.000000,0.000000,"Version" \n "Okay"}; +item74[] = {"",7,210,471.000000,496.000000,479.000000,504.000000,0.000000,""}; +item75[] = {"ERROR_Server_not_3",2,250,275.000000,575.000000,375.000000,625.000000,0.000000,"ERROR" \n "Server not" \n "Response"}; +item76[] = {"",7,210,471.000000,596.000000,479.000000,604.000000,0.000000,""}; +item77[] = {"new_character",4,218,-250.000000,675.000000,-150.000000,725.000000,10.000000,"new" \n "character"}; +item78[] = {"Hive_Response",4,218,-125.000000,625.000000,-25.000000,675.000000,0.000000,"Hive" \n "Response"}; +item79[] = {"load_old_charact",4,218,-125.000000,725.000000,-25.000000,775.000000,0.000000,"load old" \n "character"}; +item80[] = {"Process_2",2,250,-25.000000,675.000000,75.000000,725.000000,0.000000,"Process"}; +item81[] = {"Open_Gender_Selection",2,250,-400.000000,675.000000,-300.000000,725.000000,0.000000,"Open Gender" \n "Selection Dialog"}; +item82[] = {"Reopen_when_client",4,218,-400.000000,600.000000,-300.000000,650.000000,0.000000,"Reopen" \n "when client hit" \n "escape"}; +item83[] = {"Gender_Selected",4,218,-450.000000,750.000000,-350.000000,800.000000,10.000000,"Gender" \n "Selected"}; +item84[] = {"Timeout",4,218,-350.000000,750.000000,-250.000000,800.000000,0.000000,"Timeout"}; +item85[] = {"Send_character_s",2,250,-400.000000,825.000000,-300.000000,875.000000,0.000000,"Send" \n "character" \n "selection"}; +item86[] = {"Process_3",2,250,-25.000000,775.000000,75.000000,825.000000,0.000000,"Process"}; +item87[] = {"ERROR_Server_not_4",2,250,275.000000,775.000000,375.000000,825.000000,0.000000,"ERROR" \n "Server not" \n "Response"}; +link0[] = {0,62}; +link1[] = {2,3}; +link2[] = {3,7}; +link3[] = {3,44}; +link4[] = {4,5}; +link5[] = {5,6}; +link6[] = {5,12}; +link7[] = {6,39}; +link8[] = {7,9}; +link9[] = {8,48}; +link10[] = {9,8}; +link11[] = {10,28}; +link12[] = {11,72}; +link13[] = {12,13}; +link14[] = {13,14}; +link15[] = {14,42}; +link16[] = {15,20}; +link17[] = {16,60}; +link18[] = {17,24}; +link19[] = {18,19}; +link20[] = {18,78}; +link21[] = {19,75}; +link22[] = {20,21}; +link23[] = {21,71}; +link24[] = {22,87}; +link25[] = {23,25}; +link26[] = {24,50}; +link27[] = {25,74}; +link28[] = {26,10}; +link29[] = {27,49}; +link30[] = {27,69}; +link31[] = {28,43}; +link32[] = {29,1}; +link33[] = {31,21}; +link34[] = {32,33}; +link35[] = {33,26}; +link36[] = {34,35}; +link37[] = {35,11}; +link38[] = {35,36}; +link39[] = {36,37}; +link40[] = {37,38}; +link41[] = {38,74}; +link42[] = {39,34}; +link43[] = {39,40}; +link44[] = {39,66}; +link45[] = {40,41}; +link46[] = {41,42}; +link47[] = {42,38}; +link48[] = {44,45}; +link49[] = {45,4}; +link50[] = {45,46}; +link51[] = {46,47}; +link52[] = {47,48}; +link53[] = {48,14}; +link54[] = {49,17}; +link55[] = {50,51}; +link56[] = {50,53}; +link57[] = {51,52}; +link58[] = {52,29}; +link59[] = {53,54}; +link60[] = {54,55}; +link61[] = {54,56}; +link62[] = {55,57}; +link63[] = {56,59}; +link64[] = {57,58}; +link65[] = {58,52}; +link66[] = {59,58}; +link67[] = {60,15}; +link68[] = {60,61}; +link69[] = {61,27}; +link70[] = {62,63}; +link71[] = {63,64}; +link72[] = {64,65}; +link73[] = {65,2}; +link74[] = {66,67}; +link75[] = {67,68}; +link76[] = {68,39}; +link77[] = {69,70}; +link78[] = {70,71}; +link79[] = {71,32}; +link80[] = {72,23}; +link81[] = {72,73}; +link82[] = {73,18}; +link83[] = {74,76}; +link84[] = {75,76}; +link85[] = {76,31}; +link86[] = {77,81}; +link87[] = {78,80}; +link88[] = {79,86}; +link89[] = {80,77}; +link90[] = {80,79}; +link91[] = {81,82}; +link92[] = {81,83}; +link93[] = {81,84}; +link94[] = {82,81}; +link95[] = {83,85}; +link96[] = {84,85}; +link97[] = {85,79}; +link98[] = {86,16}; +link99[] = {86,22}; +link100[] = {87,31}; +globals[] = {0.000000,0,0,0,0,640,480,1,244,6316128,1,-207.564026,582.257507,1932.771484,781.734619,586,854,1}; +window[] = {2,-1,-1,-1,-1,838,1706,2998,26,3,604}; +*//*%FSM*/ +class FSM +{ + fsmName = "Epoch Login"; + class States + { + /*%FSM*/ + class INIT + { + name = "INIT"; + init = /*%FSM*/"titleCut ["""", ""BLACK FADED"", 1337];" \n + "0 fadeSound 0;" \n + "player enableSimulation false;" \n + "" \n + "_debug = true;" \n + "_myTime = diag_tickTime;" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Init"";" \n + "};" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Process_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class FINISH + { + name = "FINISH"; + init = /*%FSM*/"[] spawn {" \n + " disableSerialization;" \n + " waitUntil{!isNull (findDisplay 46)};" \n + " _display = findDisplay 46;" \n + " {" \n + " _display displayAddEventHandler [_x,([""CfgEpochClient"", _x, """"] call EPOCH_fnc_returnConfigEntryV2)];" \n + " } forEach ([""CfgEpochClient"", ""displayAddEventHandler"", []] call EPOCH_fnc_returnConfigEntryV2);" \n + " " \n + " player switchMove """";" \n + "};" \n + "" \n + "3 fadeSound 1;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Finish!"";" \n + "};" \n + "" \n + "" \n + "" \n + "player enableSimulation true;" \n + "" \n + "titleCut ["""", ""BLACK IN"", 1];" \n + "1338 cutText ["""",""PLAIN"",0]; " \n + "" \n + "progressLoadingScreen 1.0;" \n + "" \n + "endLoadingScreen;" \n + "EPOCH_loadingScreenDone = true;" \n + "" \n + "hintSilent ""Worked"" "/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + }; + }; + /*%FSM*/ + /*%FSM*/ + class Version_Check + { + name = "Version_Check"; + init = /*%FSM*/"if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Version Check"";" \n + "};" \n + "" \n + "// SHOULD BE:" \n + "_epoch_assets0 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_assets"");" \n + "_epoch_assets1 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_assets_1"");" \n + "_epoch_assets2 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""epoch_objects"");" \n + "_epoch_assets3 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_assets_3"");" \n + "_epoch_config = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_config"");" \n + "_epoch_language = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_language"");" \n + "_epoch_underground = getText(configFile >> ""Epoch"" >> ""Version"" >> ""Underground_Epoch"");" \n + "_epoch_vehicles = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_vehicles"");" \n + "_epoch_weapons = getText(configFile >> ""Epoch"" >> ""Version"" >> ""a3_epoch_weapons"");" \n + "" \n + "" \n + "// IS:" \n + "_my_epoch_assets0 = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_assets"" >> ""epochVersion"");" \n + "_my_epoch_assets1 = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_assets_1"" >> ""epochVersion"");" \n + "_my_epoch_assets2 = getText(configFile >> ""CfgPatches"" >> ""epoch_objects"" >> ""epochVersion"");" \n + "_my_epoch_assets3 = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_assets_3"" >> ""epochVersion"");" \n + "_my_epoch_config = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_config"" >> ""epochVersion"");" \n + "_my_epoch_language = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_language"" >> ""epochVersion"");" \n + "_my_epoch_underground = getText(configFile >> ""CfgPatches"" >> ""Underground_Epoch"" >> ""epochVersion"");" \n + "_my_epoch_vehicles = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_vehicles"" >> ""epochVersion"");" \n + "_my_epoch_weapons = getText(configFile >> ""CfgPatches"" >> ""a3_epoch_weapons"" >> ""epochVersion"");" \n + "" \n + "progressLoadingScreen 0.1;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Wrong_Version + { + priority = 10.000000; + to="ERROR_Wrong_Version"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_epoch_assets0 != _epoch_assets0 ||" \n + "_my_epoch_assets1 != _epoch_assets1 ||" \n + "_my_epoch_assets2 != _epoch_assets2 ||" \n + "_my_epoch_assets3 != _epoch_assets3 ||" \n + "_my_epoch_config != _epoch_config ||" \n + "_my_epoch_language != _epoch_language ||" \n + "_my_epoch_underground != _epoch_underground ||" \n + "_my_epoch_vehicles != _epoch_vehicles ||" \n + "_my_epoch_weapons != _epoch_weapons"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class true + { + priority = 0.000000; + to="Arma_Version_Che"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_Player_UID + { + name = "Check_Player_UID"; + init = /*%FSM*/"if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Check PlayerUID"";" \n + "};" \n + "" \n + "_playerUID = getPlayerUID player;" \n + "" \n + "progressLoadingScreen 0.2;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class PlayerUID_Okay + { + priority = 10.000000; + to="Check_Server_1"; + precondition = /*%FSM*/"!isNil ""_playerUID"""/*%FSM*/; + condition=/*%FSM*/"_playerUID != """""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Empty_PlayerUID + { + priority = 0.000000; + to="ERROR_PlayerUID"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Wrong_Version + { + name = "ERROR_Wrong_Version"; + init = /*%FSM*/"_msg = ""You have an outdated version of Epoch"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_EPOCHVERSION = true;" \n + " publicVariableServer ""PLAYER_REJECT_EPOCHVERSION"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Disconnect + { + name = "Disconnect"; + init = /*%FSM*/"endLoadingScreen;" \n + "1338 cutText [_msg,""PLAIN"",0]; " \n + "deleteVehicle player;" \n + "call _rejectPlayer;" \n + "diag_log format [""(%1) %2"",diag_tickTime,_msg];" \n + "_myTime = diag_tickTime;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Check_if_Player + { + priority = 0.000000; + to="Reject_without_B"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 2"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_PlayerUID + { + name = "ERROR_PlayerUID"; + init = /*%FSM*/"_msg = ""Can not setup Player Object! (Error 01)"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_UID = true;" \n + " publicVariableServer ""PLAYER_REJECT_UID"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Setup_Player_Var + { + name = "Setup_Player_Var"; + init = /*%FSM*/"diag_log format[""DEBUG TIME WAITED: %1"", (diag_tickTime - _myTime)];" \n + "{" \n + " missionNamespace setVariable[(format[""EPOCH_player%1"", EPOCH_customVars select _forEachIndex]), _x];" \n + "} forEach _playerVariables;" \n + "" \n + """Loading Player Variables... Please wait!"" call Epoch_updateLoadingScreen;" \n + "" \n + "EPOCH_lastPlayerPos = getPosATL vehicle player;" \n + "" \n + "progressLoadingScreen 0.7;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Setup Player Variables"";" \n + "};" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Setup_EH_s_and_H"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Request_Hive + { + name = "Request_Hive"; + init = /*%FSM*/"_myTime = diag_tickTime;" \n + "" \n + "Epoch_my_Group = [];" \n + "" \n + "player remoteExec [""EPOCH_server_checkPlayer"",2];" \n + "" \n + "" \n + """Loading Player Data... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.5;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Hive_Response + { + priority = 0.000000; + to="Process_2"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_checkPlayer_PVC"""/*%FSM*/; + action=/*%FSM*/"_newChar = EPOCH_checkPlayer_PVC;" \n + "EPOCH_checkPlayer_PVC = nil;"/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not_3"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 120"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not + { + name = "ERROR_Server_not"; + init = /*%FSM*/"_msg = ""Authentication Failed, Disconnect and try again"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_NoResponse2 = true;" \n + " publicVariableServer ""PLAYER_REJECT_NoResponse2"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Wrong_Server + { + name = "ERROR_Wrong_Server"; + init = /*%FSM*/"_msg = format[""Server and Client running with different Version! (You: %1 // Server: %2)"",getText(configFile >> ""CfgMods"" >> ""Epoch"" >> ""version""),_serverVersion];" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_ServerVersion = true;" \n + " publicVariableServer ""PLAYER_REJECT_ServerVersion"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Setup_Player_Obj + { + name = "Setup_Player_Obj"; + init = /*%FSM*/"_ply = player;" \n + "_group = group player;" \n + "" \n + "player reveal _playerObject;" \n + "_playerPos = getposATL _playerObject;" \n + "" \n + "selectPlayer _playerObject;" \n + "" \n + "deleteVehicle _ply;" \n + "deleteGroup _group;" \n + "" \n + """Loading Player Body... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.8;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Setup Player Object"";" \n + "};" \n + "" \n + "_myTime = diag_tickTime;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Timeout_ + { + priority = 0.000000; + to="ERROR_Player_Setup"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 60"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class new_player_____p + { + priority = 0.000000; + to="Setup_Player_Var"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_playerObject == player"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Display_Message + { + name = "Display_Message"; + init = /*%FSM*/"[] spawn {" \n + " waitUntil{!isNull (findDisplay 46)};" \n + " (findDisplay 46) displayAddEventHandler [""KeyDown"",""true""];" \n + " (findDisplay 46) displayAddEventHandler [""KeyUp"",""true""];" \n + "};" \n + "diag_log format [""(%1) %2"",diag_tickTime,_msg];" \n + "_myTime = diag_tickTime;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Display_Message + { + priority = 0.000000; + to="Disconnect"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 10"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_Server + { + name = "Check_Server"; + init = /*%FSM*/"_myTime = diag_tickTime;" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Check Server"";" \n + "};" \n + """Checking Server... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.4;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Server_not_worki + { + priority = 10.000000; + to="ERROR_Server_not_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_BADHIVE""" \n + ""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Server_Okay + { + priority = 0.000000; + to="Server_Version_C"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""Epoch_ServerVersion"""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_1 + { + name = "ERROR_Server_not_1"; + init = /*%FSM*/"_msg = ""Server not Ready (Error 03)"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_NotReady2 = true;" \n + " publicVariableServer ""PLAYER_REJECT_NotReady2"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_Server_1 + { + name = "Check_Server_1"; + init = /*%FSM*/"progressLoadingScreen 0.3;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not_2"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 180"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class freshServer + { + priority = 0.000000; + to="Update_Loadingscreen"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"uiNamespace getVariable ['Epoch_freshServer', false]"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Server_Ready + { + priority = 0.000000; + to="Check_Server"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_SERVER"""/*%FSM*/; + action=/*%FSM*/"_serverUptime = EPOCH_SERVER;" \n + "EPOCH_SERVER = nil;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_2 + { + name = "ERROR_Server_not_2"; + init = /*%FSM*/"_msg = ""Server not Ready (Error 02)"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_NotReady1 = true;" \n + " publicVariableServer ""PLAYER_REJECT_NotReady1"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Reject_without_B + { + name = "Reject_without_B"; + init = /*%FSM*/"[] spawn {" \n + " waitUntil{!isNull (findDisplay 46)};" \n + " waitUntil {" \n + " (findDisplay 46) closeDisplay 0;" \n + " isNull (findDisplay 46)" \n + " };" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + }; + }; + /*%FSM*/ + /*%FSM*/ + class Arma_Version_Che + { + name = "Arma_Version_Che"; + init = /*%FSM*/"progressLoadingScreen 0.15;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Outdated_Version + { + priority = 10.000000; + to="ERROR_Wrong_Version_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"productVersion select 2 < getNumber(configFile >> ""CfgMods"" >> ""Epoch"" >> ""ArmAVersion"")"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Player_Object_Re + { + priority = 0.000000; + to="Check_Player_UID"; + precondition = /*%FSM*/"!isNull player"/*%FSM*/; + condition=/*%FSM*/"player == player"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Wrong_Version_1 + { + name = "ERROR_Wrong_Version_1"; + init = /*%FSM*/"_msg = ""You have an outdated version of ArmA 3"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_ARMAVERSION = true;" \n + " publicVariableServer ""PLAYER_REJECT_ARMAVERSION"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Setup_EH_s_and_H + { + name = "Setup_EH_s_and_H"; + init = /*%FSM*/"{" \n + " player addEventHandler [_x,([""CfgEpochClient"", _x, """"] call EPOCH_fnc_returnConfigEntryV2)];" \n + "} forEach ([""CfgEpochClient"", ""addEventHandler"", []] call EPOCH_fnc_returnConfigEntryV2);" \n + "" \n + "if (count EPOCH_playerHitPoints isEqualTo count ((getAllHitPointsDamage player) param [0,[]])) then {" \n + " {" \n + " player setHitIndex [_forEachIndex, _x];" \n + " }forEach EPOCH_playerHitPoints;" \n + "};" \n + "" \n + "[] spawn EPOCH_masterLoop;" \n + "true call EPOCH_fnc_Weather;" \n + "[5,100] spawn EPOCH_niteLight;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Setup EH's"";" \n + "};" \n + "" \n + """Loading... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.9;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Has_Current_Weap + { + priority = 10.000000; + to="Find_Active_Weap"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_currentWeapon != """""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class no_weapons + { + priority = 0.000000; + to="Process"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_currentWeapon == """""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process + { + name = "Process"; + init = /*%FSM*/"progressLoadingScreen 0.975;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Preload_done + { + priority = 0.000000; + to="FINISH"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"preloadCamera _playerPos"/*%FSM*/; + action=/*%FSM*/"call compile _playerGroupOnline;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Find_Active_Weap + { + name = "Find_Active_Weap"; + init = /*%FSM*/"_activeWeapon = currentWeapon player;" \n + "progressLoadingScreen 0.95;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Current_Weapon_S + { + priority = 0.000000; + to="Do_nothing"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_activeWeapon == _currentWeapon"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Current_Weapon_Not + { + priority = 0.000000; + to="Select_Weapon"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_activeWeapon != _currentWeapon"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Select_Weapon + { + name = "Select_Weapon"; + init = /*%FSM*/"_currentWeapon spawn {" \n + " uiSleep 1; " \n + " player selectWeapon _this;" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Process"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Do_nothing + { + name = "Do_nothing"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Process"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_New_Player + { + name = "Check_New_Player"; + init = /*%FSM*/"_myTime = diag_tickTime;" \n + "" \n + """Loading Player Inventory... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.6;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class check_new__player + { + priority = 0.000000; + to="Setup_Player_Obj"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!(isNull _playerObject) && {_playerObject getVariable [""SETUP"",false]}"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 120"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process_1 + { + name = "Process_1"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Wait_ArmA_Loading + { + priority = 0.000000; + to="Start_Loading_Sc"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"{!isnull _x} count ((uinamespace getvariable ""loading_displays"") - [finddisplay 18]) == 0"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Start_Loading_Sc + { + name = "Start_Loading_Sc"; + init = /*%FSM*/"startLoadingScreen ["""",""EpochLoadingScreen""];" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Start Loadingscreen"";" \n + "};" \n + """Starting Epoch... Please wait!"" call Epoch_updateLoadingScreen;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Version_Check"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Update_Loadingscreen + { + name = "Update_Loadingscreen"; + init = /*%FSM*/"uiNamespace setVariable ['Epoch_freshServer', false];" \n + "" \n + """Server initializing... Please wait!"" call Epoch_updateLoadingScreen;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Check_Server_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Player_Setup + { + name = "ERROR_Player_Setup"; + init = /*%FSM*/"_msg = ""Problem setting up player"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_InvaildSetup = true;" \n + " publicVariableServer ""PLAYER_REJECT_InvaildSetup"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Server_Version_C + { + name = "Server_Version_C"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Wrong_Server_Ver + { + priority = 10.000000; + to="ERROR_Wrong_Server"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"Epoch_ServerVersion != getText(configFile >> ""CfgMods"" >> ""Epoch"" >> ""version"")"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Version_Okay + { + priority = 0.000000; + to="Request_Hive"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_3 + { + name = "ERROR_Server_not_3"; + init = /*%FSM*/"_msg = ""Authentication Failed, Disconnect and try again"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_HiveNotResponse = true;" \n + " publicVariableServer ""PLAYER_REJECT_HiveNotResponse"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process_2 + { + name = "Process_2"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class new_character + { + priority = 10.000000; + to="Open_Gender_Selection"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_newChar"/*%FSM*/; + action=/*%FSM*/"endLoadingScreen;" \n + "_myGenderTime = diag_tickTime;"/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class load_old_charact + { + priority = 0.000000; + to="Process_3"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/"_myTime = diag_tickTime;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Open_Gender_Selection + { + name = "Open_Gender_Selection"; + init = /*%FSM*/"createdialog ""SelectGender"";"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Gender_Selected + { + priority = 10.000000; + to="Send_character_s"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_PlayerIsMale"""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Timeout + { + priority = 0.000000; + to="Send_character_s"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"((diag_tickTime - _myGenderTime) > 30)"/*%FSM*/; + action=/*%FSM*/"EPOCH_PlayerIsMale = true;" \n + "closeDialog 0;"/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Reopen_when_client + { + priority = 0.000000; + to="Open_Gender_Selection"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!dialog && isNil ""EPOCH_PlayerIsMale"""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Send_character_s + { + name = "Send_character_s"; + init = /*%FSM*/"startLoadingScreen ["""",""EpochLoadingScreen""];" \n + """Gender Selected... Please wait!"" call Epoch_updateLoadingScreen;" \n + "" \n + "[player,EPOCH_PlayerIsMale] remoteExec [""EPOCH_server_loadPlayer"",2];" \n + "EPOCH_PlayerIsMale = nil;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class load_old_charact + { + priority = 0.000000; + to="Process_3"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/"_myTime = diag_tickTime;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process_3 + { + name = "Process_3"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not_4"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 120"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Response + { + priority = 0.000000; + to="Check_New_Player"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_C_SET"""/*%FSM*/; + action=/*%FSM*/"_array = EPOCH_C_SET;" \n + "EPOCH_C_SET = nil;" \n + "_playerObject = _array deleteAt 0;" \n + "_playerVariables = _array deleteAt 0;" \n + "_currentWeapon = _array deleteAt 0;" \n + "_magCount = _array deleteAt 0;" \n + "Epoch_my_GroupUID = _array deleteAt 0;" \n + "Epoch_canBeRevived = _array deleteAt 0;" \n + "Epoch_personalToken = _array deleteAt 0;" \n + "reverse _serverUptime;" \n + "_serverUptime pushBack (_array deleteAt 0);" \n + "reverse _serverUptime;" \n + "_serverUptime call EPOCH_client_publicEH;" \n + "_playerGroupOnline = _array deleteAt 0;" \n + "" \n + ""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_4 + { + name = "ERROR_Server_not_4"; + init = /*%FSM*/"_msg = ""Authentication Failed, Disconnect and try again"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_HiveLoadChar = true;" \n + " publicVariableServer ""PLAYER_REJECT_HiveLoadChar"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + }; + initState="INIT"; + finalStates[] = + { + "FINISH", + "Reject_without_B", + }; +}; +/*%FSM*/ \ No newline at end of file diff --git a/Sources/mpmissions/epoch.SaraLite/description.ext b/Sources/mpmissions/epoch.SaraLite/description.ext index cfe65cba..8783e3aa 100644 --- a/Sources/mpmissions/epoch.SaraLite/description.ext +++ b/Sources/mpmissions/epoch.SaraLite/description.ext @@ -50,6 +50,7 @@ class cfgFunctions }; class postinit { + file = "init\fn_postinit.sqf"; postInit = 1; }; }; diff --git a/Sources/mpmissions/epoch.SaraLite/init/client_init.sqf b/Sources/mpmissions/epoch.SaraLite/init/client_init.sqf new file mode 100644 index 00000000..4a32e342 --- /dev/null +++ b/Sources/mpmissions/epoch.SaraLite/init/client_init.sqf @@ -0,0 +1,76 @@ +/* + 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: + https://github.com/EpochModTeam/Epoch/tree/master/Sources/epoch_code/init/client_init.sqf +*/ +//Variables +EPOCH_CraftingItem = ""; +EPOCH_ESP_TARGETS = []; +EPOCH_ESPMAP_TARGETS = []; +EPOCH_ESPGROUPS = []; +EPOCH_ESPGROUPCOLORS = []; +EPOCH_ESP_PLAYER = false; +EPOCH_ESP_VEHICLES = false; +EPOCH_ESP_VEHICLEPLAYER = []; +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"]; +if (isNil 'EPOCH_diag_fps') then { + EPOCH_diag_fps = 0; +}; +EPOCH_playerIsSwimming = false; +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 = []; +EPOCH_lastPlayerPos = [0,0,0]; +EPOCH_prevOffer = []; +EPOCH_drawIcon3d = false; +EPOCH_velTransform = false; +EPOCH_stabilityTarget = objNull; +EPOCH_currentVehicle = objNull; +EPOCH_currentTarget = objNull; +EPOCH_LootedBlds = []; +EPOCH_soundLevel = 1; +EPOCH_arr_interactedObjs = []; +EPOCH_buildOption = 0; +EPOCH_nearestLocations = []; +onEachFrame EPOCH_onEachFrame; + +EPOCH_LastAirDrop = time; +EPOCH_AirDropCheck = getNumber(missionConfigFile >> "CfgEpochAirDrop" >> "AirDropFreq"); +if(EPOCH_AirDropCheck < 120)then{EPOCH_AirDropCheck = 120;}; +EPOCH_AirDropChance = getNumber(missionConfigFile >> "CfgEpochAirDrop" >> "AirDropChance"); +if(EPOCH_AirDropChance < 0)then{EPOCH_AirDropChance = 101;EPOCH_AirDropCheck = 99999;}; + +EPOCH_droneRndChance = 100; + +// Custom Keys +EPOCH_keysActionPressed = false; //prevents EH spam +0 call EPOCH_clientKeyMap; + +//ON INIT and RESPAWN +call EPOCH_clientInit; + +[] execFSM "\x\addons\a3_epoch_code\system\SPVEH.fsm"; +[] execFSM "system\player_login.fsm"; + +true diff --git a/Sources/mpmissions/epoch.SaraLite/init/fn_postinit.sqf b/Sources/mpmissions/epoch.SaraLite/init/fn_postinit.sqf new file mode 100644 index 00000000..8be5aa09 --- /dev/null +++ b/Sources/mpmissions/epoch.SaraLite/init/fn_postinit.sqf @@ -0,0 +1,18 @@ +/* + Author: Aaron Clark - EpochMod.com + + Contributors: + + Description: + Initalize Player + + 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/master/Sources/epoch_code/init/fn_postinit.sqf +*/ +if (!isDedicated && isMultiplayer && hasInterface) then { + call compile preprocessFileLineNumbers "init\client_init.sqf"; +}; +true diff --git a/Sources/mpmissions/epoch.Sara_dbe1/System/player_login.fsm b/Sources/mpmissions/epoch.Sara_dbe1/System/player_login.fsm new file mode 100644 index 00000000..9426567f --- /dev/null +++ b/Sources/mpmissions/epoch.Sara_dbe1/System/player_login.fsm @@ -0,0 +1,1398 @@ +/*%FSM*/ +/*%FSM*/ +/* +item0[] = {"INIT",0,250,-25.000000,-375.000000,75.000000,-325.000000,0.000000,"INIT"}; +item1[] = {"FINISH",1,4346,-25.000000,1475.000000,75.000000,1525.000000,0.000000,"FINISH"}; +item2[] = {"true",8,218,-150.000000,-125.000000,-50.000000,-75.000000,0.000000,"true"}; +item3[] = {"Version_Check",2,250,-25.000000,-75.000000,75.000000,-25.000000,0.000000,"Version Check"}; +item4[] = {"Player_Object_Re",4,218,-150.000000,75.000000,-50.000000,125.000000,0.000000,"Player" \n "Object Ready"}; +item5[] = {"Check_Player_UID",2,250,-25.000000,125.000000,75.000000,175.000000,0.000000,"Check Player UID"}; +item6[] = {"PlayerUID_Okay",4,218,-150.000000,175.000000,-50.000000,225.000000,10.000000,"PlayerUID" \n "Okay"}; +item7[] = {"Wrong_Version",4,218,125.000000,-75.000000,225.000000,-25.000000,10.000000,"Wrong" \n "Version"}; +item8[] = {"",7,210,471.000061,-54.000099,478.999939,-45.999901,0.000000,""}; +item9[] = {"ERROR_Wrong_Version",2,250,275.000000,-75.000000,375.000000,-25.000000,0.000000,"ERROR" \n "Wrong Version" \n "Epoch"}; +item10[] = {"Disconnect",2,250,600.000000,1225.000000,700.000000,1275.000000,0.000000,"Disconnect"}; +item11[] = {"Server_Okay",4,218,-125.000000,425.000000,-25.000000,475.000000,0.000000,"Server" \n "Okay"}; +item12[] = {"Empty_PlayerUID",4,218,125.000000,125.000000,225.000000,175.000000,0.000000,"Empty" \n "PlayerUID"}; +item13[] = {"ERROR_PlayerUID",2,250,275.000000,125.000000,375.000000,175.000000,0.000000,"ERROR" \n "PlayerUID Empty"}; +item14[] = {"",7,210,471.000061,145.999908,478.999939,154.000092,0.000000,""}; +item15[] = {"Timeout_No_Respo",4,218,125.000000,875.000000,225.000000,925.000000,0.000000,"Timeout" \n "No Response"}; +item16[] = {"Response",4,218,-150.000000,825.000000,-50.000000,875.000000,0.000000,"Response"}; +item17[] = {"Setup_Player_Var",2,250,-25.000000,1075.000000,75.000000,1125.000000,0.000000,"Setup Player" \n "Variables"}; +item18[] = {"Request_Hive",2,250,-25.000000,575.000000,75.000000,625.000000,0.000000,"Request Hive"}; +item19[] = {"Timeout_No_Respo",4,218,125.000000,575.000000,225.000000,625.000000,0.000000,"Timeout" \n "No Response"}; +item20[] = {"ERROR_Server_not",2,250,275.000000,875.000000,375.000000,925.000000,0.000000,"ERROR" \n "Server not" \n "Response"}; +item21[] = {"",7,210,471.000000,895.999939,479.000000,904.000061,0.000000,""}; +item22[] = {"Timeout_No_Respo",4,218,125.000000,775.000000,225.000000,825.000000,0.000000,"Timeout" \n "No Response"}; +item23[] = {"Wrong_Server_Ver",4,218,125.000000,475.000000,225.000000,525.000000,10.000000,"Wrong" \n "Server Version"}; +item24[] = {"true",8,218,-150.000000,1125.000000,-50.000000,1175.000000,0.000000,"true"}; +item25[] = {"ERROR_Wrong_Server",2,250,275.000000,475.000000,375.000000,525.000000,0.000000,"ERROR" \n "Wrong" \n "Server Version"}; +item26[] = {"Display_Message",4,218,600.000000,1150.000000,700.000000,1200.000000,0.000000,"" \n "Display Message" \n "Wait..."}; +item27[] = {"Setup_Player_Obj",2,250,-25.000000,975.000000,75.000000,1025.000000,0.000000,"Setup Player" \n "Object"}; +item28[] = {"Check_if_Player",4,218,750.000000,1225.000000,850.000000,1275.000000,0.000000,"Check if" \n "Player got Kicked"}; +item29[] = {"Preload_done",8,218,-150.000000,1425.000000,-50.000000,1475.000000,0.000000,"Preload" \n "done"}; +item30[] = {"",7,210,471.000000,796.000000,479.000000,804.000000,0.000000,""}; +item31[] = {"",7,210,471.000000,796.000000,479.000000,804.000000,0.000000,""}; +item32[] = {"true",8,218,425.000000,1075.000000,525.000000,1125.000000,0.000000,"true"}; +item33[] = {"Display_Message",2,250,600.000000,1075.000000,700.000000,1125.000000,0.000000,"Display" \n "Message"}; +item34[] = {"Server_Ready",4,218,-25.000000,300.000000,75.000000,350.000000,0.000000,"Server" \n "Ready"}; +item35[] = {"Check_Server",2,250,-25.000000,375.000000,75.000000,425.000000,0.000000,"Check Server"}; +item36[] = {"Server_not_worki",4,218,125.000000,375.000000,225.000000,425.000000,10.000000,"Server" \n "not working"}; +item37[] = {"ERROR_Server_not_1",2,250,275.000000,375.000000,375.000000,425.000000,0.000000,"ERROR" \n "Server not Ready"}; +item38[] = {"",7,210,471.000000,396.000000,479.000000,404.000000,0.000000,""}; +item39[] = {"Check_Server_1",2,250,-25.000000,225.000000,75.000000,275.000000,0.000000,"Check Server"}; +item40[] = {"Timeout_No_Respo",4,218,125.000000,225.000000,225.000000,275.000000,0.000000,"Timeout" \n "No Response"}; +item41[] = {"ERROR_Server_not_2",2,250,275.000000,225.000000,375.000000,275.000000,0.000000,"ERROR" \n "Server not Ready"}; +item42[] = {"",7,210,471.000000,246.000031,479.000000,253.999969,0.000000,""}; +item43[] = {"Reject_without_B",1,250,900.000000,1225.000000,1000.000000,1275.000000,0.000000,"Reject without" \n "BattlEye"}; +item44[] = {"true",8,218,-150.000000,-25.000000,-50.000000,25.000000,0.000000,"true"}; +item45[] = {"Arma_Version_Che",2,250,-25.000000,25.000000,75.000000,75.000000,0.000000,"Arma Version" \n "Check"}; +item46[] = {"Outdated_Version",4,218,125.000000,25.000000,225.000000,75.000000,10.000000,"Outdated" \n "Version"}; +item47[] = {"ERROR_Wrong_Version_1",2,250,275.000000,25.000000,375.000000,75.000000,0.000000,"ERROR" \n "Wrong Version" \n "ArmA"}; +item48[] = {"",7,210,471.000061,45.999908,478.999939,54.000092,0.000000,""}; +item49[] = {"new_player_____p",4,218,-150.000000,1025.000000,-50.000000,1075.000000,0.000000,"new player == " \n "player"}; +item50[] = {"Setup_EH_s_and_H",2,250,-25.000000,1175.000000,75.000000,1225.000000,0.000000,"Setup EH's" \n "and" \n "HitPoints"}; +item51[] = {"no_weapons",4,218,-25.000000,1275.000000,75.000000,1325.000000,0.000000,"no weapons"}; +item52[] = {"Process",2,250,-25.000000,1375.000000,75.000000,1425.000000,0.000000,"Process"}; +item53[] = {"Has_Current_Weap",4,218,100.000000,1175.000000,200.000000,1225.000000,10.000000,"Has" \n "Current" \n "Weapon"}; +item54[] = {"Find_Active_Weap",2,250,225.000000,1175.000000,325.000000,1225.000000,0.000000,"Find" \n "Active" \n "Weapon"}; +item55[] = {"Current_Weapon_Not",4,218,150.000000,1225.000000,250.000000,1275.000000,0.000000,"Current" \n "Weapon" \n "Not Selected"}; +item56[] = {"Current_Weapon_S",4,218,300.000000,1225.000000,400.000000,1275.000000,0.000000,"Current" \n "Weapon" \n "Selected"}; +item57[] = {"Select_Weapon",2,250,150.000000,1300.000000,250.000000,1350.000000,0.000000,"Select" \n "Weapon"}; +item58[] = {"true",8,218,225.000000,1375.000000,325.000000,1425.000000,0.000000,"true"}; +item59[] = {"Do_nothing",2,250,300.000000,1300.000000,400.000000,1350.000000,0.000000,"Do nothing"}; +item60[] = {"Check_New_Player",2,250,-25.000000,875.000000,75.000000,925.000000,0.000000,"Check" \n "New Player" \n "Setup"}; +item61[] = {"check_new__player",4,218,-150.000000,925.000000,-50.000000,975.000000,0.000000,"check new " \n "player not null"}; +item62[] = {"true",8,218,-150.000000,-325.000000,-50.000000,-275.000000,0.000000,"true"}; +item63[] = {"Process_1",2,250,-25.000000,-275.000000,75.000000,-225.000000,0.000000,"Process"}; +item64[] = {"Wait_ArmA_Loading",4,218,-150.000000,-225.000000,-50.000000,-175.000000,0.000000,"Wait ArmA" \n "Loading Screen" \n "Done"}; +item65[] = {"Start_Loading_Sc",2,250,-25.000000,-175.000000,75.000000,-125.000000,0.000000,"Start Loading" \n "Screen"}; +item66[] = {"freshServer",4,218,-325.000000,225.000000,-225.000000,275.000000,0.000000,"freshServer"}; +item67[] = {"Update_Loadingscreen",2,250,-325.000000,300.000000,-225.000000,350.000000,0.000000,"Update" \n "Loadingscreen" \n "Message"}; +item68[] = {"true",8,218,-150.000000,300.000000,-50.000000,350.000000,0.000000,"true"}; +item69[] = {"Timeout_",4,218,125.000000,975.000000,225.000000,1025.000000,0.000000,"" \n "Timeout" \n ""}; +item70[] = {"ERROR_Player_Setup",2,250,275.000000,975.000000,375.000000,1025.000000,0.000000,"ERROR" \n "Player Setup" \n "Invalid"}; +item71[] = {"",7,210,471.000000,996.000000,479.000000,1004.000000,0.000000,""}; +item72[] = {"Server_Version_C",2,250,-25.000000,475.000000,75.000000,525.000000,0.000000,"Server Version" \n "Check"}; +item73[] = {"Version_Okay",4,218,-125.000000,525.000000,-25.000000,575.000000,0.000000,"Version" \n "Okay"}; +item74[] = {"",7,210,471.000000,496.000000,479.000000,504.000000,0.000000,""}; +item75[] = {"ERROR_Server_not_3",2,250,275.000000,575.000000,375.000000,625.000000,0.000000,"ERROR" \n "Server not" \n "Response"}; +item76[] = {"",7,210,471.000000,596.000000,479.000000,604.000000,0.000000,""}; +item77[] = {"new_character",4,218,-250.000000,675.000000,-150.000000,725.000000,10.000000,"new" \n "character"}; +item78[] = {"Hive_Response",4,218,-125.000000,625.000000,-25.000000,675.000000,0.000000,"Hive" \n "Response"}; +item79[] = {"load_old_charact",4,218,-125.000000,725.000000,-25.000000,775.000000,0.000000,"load old" \n "character"}; +item80[] = {"Process_2",2,250,-25.000000,675.000000,75.000000,725.000000,0.000000,"Process"}; +item81[] = {"Open_Gender_Selection",2,250,-400.000000,675.000000,-300.000000,725.000000,0.000000,"Open Gender" \n "Selection Dialog"}; +item82[] = {"Reopen_when_client",4,218,-400.000000,600.000000,-300.000000,650.000000,0.000000,"Reopen" \n "when client hit" \n "escape"}; +item83[] = {"Gender_Selected",4,218,-450.000000,750.000000,-350.000000,800.000000,10.000000,"Gender" \n "Selected"}; +item84[] = {"Timeout",4,218,-350.000000,750.000000,-250.000000,800.000000,0.000000,"Timeout"}; +item85[] = {"Send_character_s",2,250,-400.000000,825.000000,-300.000000,875.000000,0.000000,"Send" \n "character" \n "selection"}; +item86[] = {"Process_3",2,250,-25.000000,775.000000,75.000000,825.000000,0.000000,"Process"}; +item87[] = {"ERROR_Server_not_4",2,250,275.000000,775.000000,375.000000,825.000000,0.000000,"ERROR" \n "Server not" \n "Response"}; +link0[] = {0,62}; +link1[] = {2,3}; +link2[] = {3,7}; +link3[] = {3,44}; +link4[] = {4,5}; +link5[] = {5,6}; +link6[] = {5,12}; +link7[] = {6,39}; +link8[] = {7,9}; +link9[] = {8,48}; +link10[] = {9,8}; +link11[] = {10,28}; +link12[] = {11,72}; +link13[] = {12,13}; +link14[] = {13,14}; +link15[] = {14,42}; +link16[] = {15,20}; +link17[] = {16,60}; +link18[] = {17,24}; +link19[] = {18,19}; +link20[] = {18,78}; +link21[] = {19,75}; +link22[] = {20,21}; +link23[] = {21,71}; +link24[] = {22,87}; +link25[] = {23,25}; +link26[] = {24,50}; +link27[] = {25,74}; +link28[] = {26,10}; +link29[] = {27,49}; +link30[] = {27,69}; +link31[] = {28,43}; +link32[] = {29,1}; +link33[] = {31,21}; +link34[] = {32,33}; +link35[] = {33,26}; +link36[] = {34,35}; +link37[] = {35,11}; +link38[] = {35,36}; +link39[] = {36,37}; +link40[] = {37,38}; +link41[] = {38,74}; +link42[] = {39,34}; +link43[] = {39,40}; +link44[] = {39,66}; +link45[] = {40,41}; +link46[] = {41,42}; +link47[] = {42,38}; +link48[] = {44,45}; +link49[] = {45,4}; +link50[] = {45,46}; +link51[] = {46,47}; +link52[] = {47,48}; +link53[] = {48,14}; +link54[] = {49,17}; +link55[] = {50,51}; +link56[] = {50,53}; +link57[] = {51,52}; +link58[] = {52,29}; +link59[] = {53,54}; +link60[] = {54,55}; +link61[] = {54,56}; +link62[] = {55,57}; +link63[] = {56,59}; +link64[] = {57,58}; +link65[] = {58,52}; +link66[] = {59,58}; +link67[] = {60,15}; +link68[] = {60,61}; +link69[] = {61,27}; +link70[] = {62,63}; +link71[] = {63,64}; +link72[] = {64,65}; +link73[] = {65,2}; +link74[] = {66,67}; +link75[] = {67,68}; +link76[] = {68,39}; +link77[] = {69,70}; +link78[] = {70,71}; +link79[] = {71,32}; +link80[] = {72,23}; +link81[] = {72,73}; +link82[] = {73,18}; +link83[] = {74,76}; +link84[] = {75,76}; +link85[] = {76,31}; +link86[] = {77,81}; +link87[] = {78,80}; +link88[] = {79,86}; +link89[] = {80,77}; +link90[] = {80,79}; +link91[] = {81,82}; +link92[] = {81,83}; +link93[] = {81,84}; +link94[] = {82,81}; +link95[] = {83,85}; +link96[] = {84,85}; +link97[] = {85,79}; +link98[] = {86,16}; +link99[] = {86,22}; +link100[] = {87,31}; +globals[] = {0.000000,0,0,0,0,640,480,1,244,6316128,1,-207.564026,582.257507,1932.771484,781.734619,586,854,1}; +window[] = {2,-1,-1,-1,-1,838,1706,2998,26,3,604}; +*//*%FSM*/ +class FSM +{ + fsmName = "Epoch Login"; + class States + { + /*%FSM*/ + class INIT + { + name = "INIT"; + init = /*%FSM*/"titleCut ["""", ""BLACK FADED"", 1337];" \n + "0 fadeSound 0;" \n + "player enableSimulation false;" \n + "" \n + "_debug = true;" \n + "_myTime = diag_tickTime;" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Init"";" \n + "};" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Process_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class FINISH + { + name = "FINISH"; + init = /*%FSM*/"[] spawn {" \n + " disableSerialization;" \n + " waitUntil{!isNull (findDisplay 46)};" \n + " _display = findDisplay 46;" \n + " {" \n + " _display displayAddEventHandler [_x,([""CfgEpochClient"", _x, """"] call EPOCH_fnc_returnConfigEntryV2)];" \n + " } forEach ([""CfgEpochClient"", ""displayAddEventHandler"", []] call EPOCH_fnc_returnConfigEntryV2);" \n + " " \n + " player switchMove """";" \n + "};" \n + "" \n + "3 fadeSound 1;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Finish!"";" \n + "};" \n + "" \n + "" \n + "" \n + "player enableSimulation true;" \n + "" \n + "titleCut ["""", ""BLACK IN"", 1];" \n + "1338 cutText ["""",""PLAIN"",0]; " \n + "" \n + "progressLoadingScreen 1.0;" \n + "" \n + "endLoadingScreen;" \n + "EPOCH_loadingScreenDone = true;" \n + "" \n + "hintSilent ""Worked"" "/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + }; + }; + /*%FSM*/ + /*%FSM*/ + class Version_Check + { + name = "Version_Check"; + init = /*%FSM*/"if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Version Check"";" \n + "};" \n + "" \n + "// SHOULD BE:" \n + "_epoch_assets0 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_assets"");" \n + "_epoch_assets1 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_assets_1"");" \n + "_epoch_assets2 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""epoch_objects"");" \n + "_epoch_assets3 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_assets_3"");" \n + "_epoch_config = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_config"");" \n + "_epoch_language = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_language"");" \n + "_epoch_underground = getText(configFile >> ""Epoch"" >> ""Version"" >> ""Underground_Epoch"");" \n + "_epoch_vehicles = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_vehicles"");" \n + "_epoch_weapons = getText(configFile >> ""Epoch"" >> ""Version"" >> ""a3_epoch_weapons"");" \n + "" \n + "" \n + "// IS:" \n + "_my_epoch_assets0 = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_assets"" >> ""epochVersion"");" \n + "_my_epoch_assets1 = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_assets_1"" >> ""epochVersion"");" \n + "_my_epoch_assets2 = getText(configFile >> ""CfgPatches"" >> ""epoch_objects"" >> ""epochVersion"");" \n + "_my_epoch_assets3 = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_assets_3"" >> ""epochVersion"");" \n + "_my_epoch_config = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_config"" >> ""epochVersion"");" \n + "_my_epoch_language = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_language"" >> ""epochVersion"");" \n + "_my_epoch_underground = getText(configFile >> ""CfgPatches"" >> ""Underground_Epoch"" >> ""epochVersion"");" \n + "_my_epoch_vehicles = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_vehicles"" >> ""epochVersion"");" \n + "_my_epoch_weapons = getText(configFile >> ""CfgPatches"" >> ""a3_epoch_weapons"" >> ""epochVersion"");" \n + "" \n + "progressLoadingScreen 0.1;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Wrong_Version + { + priority = 10.000000; + to="ERROR_Wrong_Version"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_epoch_assets0 != _epoch_assets0 ||" \n + "_my_epoch_assets1 != _epoch_assets1 ||" \n + "_my_epoch_assets2 != _epoch_assets2 ||" \n + "_my_epoch_assets3 != _epoch_assets3 ||" \n + "_my_epoch_config != _epoch_config ||" \n + "_my_epoch_language != _epoch_language ||" \n + "_my_epoch_underground != _epoch_underground ||" \n + "_my_epoch_vehicles != _epoch_vehicles ||" \n + "_my_epoch_weapons != _epoch_weapons"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class true + { + priority = 0.000000; + to="Arma_Version_Che"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_Player_UID + { + name = "Check_Player_UID"; + init = /*%FSM*/"if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Check PlayerUID"";" \n + "};" \n + "" \n + "_playerUID = getPlayerUID player;" \n + "" \n + "progressLoadingScreen 0.2;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class PlayerUID_Okay + { + priority = 10.000000; + to="Check_Server_1"; + precondition = /*%FSM*/"!isNil ""_playerUID"""/*%FSM*/; + condition=/*%FSM*/"_playerUID != """""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Empty_PlayerUID + { + priority = 0.000000; + to="ERROR_PlayerUID"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Wrong_Version + { + name = "ERROR_Wrong_Version"; + init = /*%FSM*/"_msg = ""You have an outdated version of Epoch"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_EPOCHVERSION = true;" \n + " publicVariableServer ""PLAYER_REJECT_EPOCHVERSION"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Disconnect + { + name = "Disconnect"; + init = /*%FSM*/"endLoadingScreen;" \n + "1338 cutText [_msg,""PLAIN"",0]; " \n + "deleteVehicle player;" \n + "call _rejectPlayer;" \n + "diag_log format [""(%1) %2"",diag_tickTime,_msg];" \n + "_myTime = diag_tickTime;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Check_if_Player + { + priority = 0.000000; + to="Reject_without_B"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 2"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_PlayerUID + { + name = "ERROR_PlayerUID"; + init = /*%FSM*/"_msg = ""Can not setup Player Object! (Error 01)"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_UID = true;" \n + " publicVariableServer ""PLAYER_REJECT_UID"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Setup_Player_Var + { + name = "Setup_Player_Var"; + init = /*%FSM*/"diag_log format[""DEBUG TIME WAITED: %1"", (diag_tickTime - _myTime)];" \n + "{" \n + " missionNamespace setVariable[(format[""EPOCH_player%1"", EPOCH_customVars select _forEachIndex]), _x];" \n + "} forEach _playerVariables;" \n + "" \n + """Loading Player Variables... Please wait!"" call Epoch_updateLoadingScreen;" \n + "" \n + "EPOCH_lastPlayerPos = getPosATL vehicle player;" \n + "" \n + "progressLoadingScreen 0.7;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Setup Player Variables"";" \n + "};" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Setup_EH_s_and_H"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Request_Hive + { + name = "Request_Hive"; + init = /*%FSM*/"_myTime = diag_tickTime;" \n + "" \n + "Epoch_my_Group = [];" \n + "" \n + "player remoteExec [""EPOCH_server_checkPlayer"",2];" \n + "" \n + "" \n + """Loading Player Data... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.5;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Hive_Response + { + priority = 0.000000; + to="Process_2"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_checkPlayer_PVC"""/*%FSM*/; + action=/*%FSM*/"_newChar = EPOCH_checkPlayer_PVC;" \n + "EPOCH_checkPlayer_PVC = nil;"/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not_3"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 120"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not + { + name = "ERROR_Server_not"; + init = /*%FSM*/"_msg = ""Authentication Failed, Disconnect and try again"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_NoResponse2 = true;" \n + " publicVariableServer ""PLAYER_REJECT_NoResponse2"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Wrong_Server + { + name = "ERROR_Wrong_Server"; + init = /*%FSM*/"_msg = format[""Server and Client running with different Version! (You: %1 // Server: %2)"",getText(configFile >> ""CfgMods"" >> ""Epoch"" >> ""version""),_serverVersion];" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_ServerVersion = true;" \n + " publicVariableServer ""PLAYER_REJECT_ServerVersion"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Setup_Player_Obj + { + name = "Setup_Player_Obj"; + init = /*%FSM*/"_ply = player;" \n + "_group = group player;" \n + "" \n + "player reveal _playerObject;" \n + "_playerPos = getposATL _playerObject;" \n + "" \n + "selectPlayer _playerObject;" \n + "" \n + "deleteVehicle _ply;" \n + "deleteGroup _group;" \n + "" \n + """Loading Player Body... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.8;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Setup Player Object"";" \n + "};" \n + "" \n + "_myTime = diag_tickTime;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Timeout_ + { + priority = 0.000000; + to="ERROR_Player_Setup"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 60"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class new_player_____p + { + priority = 0.000000; + to="Setup_Player_Var"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_playerObject == player"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Display_Message + { + name = "Display_Message"; + init = /*%FSM*/"[] spawn {" \n + " waitUntil{!isNull (findDisplay 46)};" \n + " (findDisplay 46) displayAddEventHandler [""KeyDown"",""true""];" \n + " (findDisplay 46) displayAddEventHandler [""KeyUp"",""true""];" \n + "};" \n + "diag_log format [""(%1) %2"",diag_tickTime,_msg];" \n + "_myTime = diag_tickTime;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Display_Message + { + priority = 0.000000; + to="Disconnect"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 10"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_Server + { + name = "Check_Server"; + init = /*%FSM*/"_myTime = diag_tickTime;" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Check Server"";" \n + "};" \n + """Checking Server... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.4;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Server_not_worki + { + priority = 10.000000; + to="ERROR_Server_not_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_BADHIVE""" \n + ""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Server_Okay + { + priority = 0.000000; + to="Server_Version_C"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""Epoch_ServerVersion"""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_1 + { + name = "ERROR_Server_not_1"; + init = /*%FSM*/"_msg = ""Server not Ready (Error 03)"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_NotReady2 = true;" \n + " publicVariableServer ""PLAYER_REJECT_NotReady2"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_Server_1 + { + name = "Check_Server_1"; + init = /*%FSM*/"progressLoadingScreen 0.3;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not_2"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 180"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class freshServer + { + priority = 0.000000; + to="Update_Loadingscreen"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"uiNamespace getVariable ['Epoch_freshServer', false]"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Server_Ready + { + priority = 0.000000; + to="Check_Server"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_SERVER"""/*%FSM*/; + action=/*%FSM*/"_serverUptime = EPOCH_SERVER;" \n + "EPOCH_SERVER = nil;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_2 + { + name = "ERROR_Server_not_2"; + init = /*%FSM*/"_msg = ""Server not Ready (Error 02)"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_NotReady1 = true;" \n + " publicVariableServer ""PLAYER_REJECT_NotReady1"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Reject_without_B + { + name = "Reject_without_B"; + init = /*%FSM*/"[] spawn {" \n + " waitUntil{!isNull (findDisplay 46)};" \n + " waitUntil {" \n + " (findDisplay 46) closeDisplay 0;" \n + " isNull (findDisplay 46)" \n + " };" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + }; + }; + /*%FSM*/ + /*%FSM*/ + class Arma_Version_Che + { + name = "Arma_Version_Che"; + init = /*%FSM*/"progressLoadingScreen 0.15;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Outdated_Version + { + priority = 10.000000; + to="ERROR_Wrong_Version_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"productVersion select 2 < getNumber(configFile >> ""CfgMods"" >> ""Epoch"" >> ""ArmAVersion"")"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Player_Object_Re + { + priority = 0.000000; + to="Check_Player_UID"; + precondition = /*%FSM*/"!isNull player"/*%FSM*/; + condition=/*%FSM*/"player == player"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Wrong_Version_1 + { + name = "ERROR_Wrong_Version_1"; + init = /*%FSM*/"_msg = ""You have an outdated version of ArmA 3"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_ARMAVERSION = true;" \n + " publicVariableServer ""PLAYER_REJECT_ARMAVERSION"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Setup_EH_s_and_H + { + name = "Setup_EH_s_and_H"; + init = /*%FSM*/"{" \n + " player addEventHandler [_x,([""CfgEpochClient"", _x, """"] call EPOCH_fnc_returnConfigEntryV2)];" \n + "} forEach ([""CfgEpochClient"", ""addEventHandler"", []] call EPOCH_fnc_returnConfigEntryV2);" \n + "" \n + "if (count EPOCH_playerHitPoints isEqualTo count ((getAllHitPointsDamage player) param [0,[]])) then {" \n + " {" \n + " player setHitIndex [_forEachIndex, _x];" \n + " }forEach EPOCH_playerHitPoints;" \n + "};" \n + "" \n + "[] spawn EPOCH_masterLoop;" \n + "true call EPOCH_fnc_Weather;" \n + "[5,100] spawn EPOCH_niteLight;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Setup EH's"";" \n + "};" \n + "" \n + """Loading... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.9;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Has_Current_Weap + { + priority = 10.000000; + to="Find_Active_Weap"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_currentWeapon != """""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class no_weapons + { + priority = 0.000000; + to="Process"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_currentWeapon == """""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process + { + name = "Process"; + init = /*%FSM*/"progressLoadingScreen 0.975;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Preload_done + { + priority = 0.000000; + to="FINISH"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"preloadCamera _playerPos"/*%FSM*/; + action=/*%FSM*/"call compile _playerGroupOnline;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Find_Active_Weap + { + name = "Find_Active_Weap"; + init = /*%FSM*/"_activeWeapon = currentWeapon player;" \n + "progressLoadingScreen 0.95;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Current_Weapon_S + { + priority = 0.000000; + to="Do_nothing"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_activeWeapon == _currentWeapon"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Current_Weapon_Not + { + priority = 0.000000; + to="Select_Weapon"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_activeWeapon != _currentWeapon"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Select_Weapon + { + name = "Select_Weapon"; + init = /*%FSM*/"_currentWeapon spawn {" \n + " uiSleep 1; " \n + " player selectWeapon _this;" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Process"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Do_nothing + { + name = "Do_nothing"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Process"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_New_Player + { + name = "Check_New_Player"; + init = /*%FSM*/"_myTime = diag_tickTime;" \n + "" \n + """Loading Player Inventory... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.6;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class check_new__player + { + priority = 0.000000; + to="Setup_Player_Obj"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!(isNull _playerObject) && {_playerObject getVariable [""SETUP"",false]}"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 120"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process_1 + { + name = "Process_1"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Wait_ArmA_Loading + { + priority = 0.000000; + to="Start_Loading_Sc"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"{!isnull _x} count ((uinamespace getvariable ""loading_displays"") - [finddisplay 18]) == 0"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Start_Loading_Sc + { + name = "Start_Loading_Sc"; + init = /*%FSM*/"startLoadingScreen ["""",""EpochLoadingScreen""];" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Start Loadingscreen"";" \n + "};" \n + """Starting Epoch... Please wait!"" call Epoch_updateLoadingScreen;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Version_Check"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Update_Loadingscreen + { + name = "Update_Loadingscreen"; + init = /*%FSM*/"uiNamespace setVariable ['Epoch_freshServer', false];" \n + "" \n + """Server initializing... Please wait!"" call Epoch_updateLoadingScreen;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Check_Server_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Player_Setup + { + name = "ERROR_Player_Setup"; + init = /*%FSM*/"_msg = ""Problem setting up player"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_InvaildSetup = true;" \n + " publicVariableServer ""PLAYER_REJECT_InvaildSetup"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Server_Version_C + { + name = "Server_Version_C"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Wrong_Server_Ver + { + priority = 10.000000; + to="ERROR_Wrong_Server"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"Epoch_ServerVersion != getText(configFile >> ""CfgMods"" >> ""Epoch"" >> ""version"")"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Version_Okay + { + priority = 0.000000; + to="Request_Hive"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_3 + { + name = "ERROR_Server_not_3"; + init = /*%FSM*/"_msg = ""Authentication Failed, Disconnect and try again"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_HiveNotResponse = true;" \n + " publicVariableServer ""PLAYER_REJECT_HiveNotResponse"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process_2 + { + name = "Process_2"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class new_character + { + priority = 10.000000; + to="Open_Gender_Selection"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_newChar"/*%FSM*/; + action=/*%FSM*/"endLoadingScreen;" \n + "_myGenderTime = diag_tickTime;"/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class load_old_charact + { + priority = 0.000000; + to="Process_3"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/"_myTime = diag_tickTime;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Open_Gender_Selection + { + name = "Open_Gender_Selection"; + init = /*%FSM*/"createdialog ""SelectGender"";"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Gender_Selected + { + priority = 10.000000; + to="Send_character_s"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_PlayerIsMale"""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Timeout + { + priority = 0.000000; + to="Send_character_s"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"((diag_tickTime - _myGenderTime) > 30)"/*%FSM*/; + action=/*%FSM*/"EPOCH_PlayerIsMale = true;" \n + "closeDialog 0;"/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Reopen_when_client + { + priority = 0.000000; + to="Open_Gender_Selection"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!dialog && isNil ""EPOCH_PlayerIsMale"""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Send_character_s + { + name = "Send_character_s"; + init = /*%FSM*/"startLoadingScreen ["""",""EpochLoadingScreen""];" \n + """Gender Selected... Please wait!"" call Epoch_updateLoadingScreen;" \n + "" \n + "[player,EPOCH_PlayerIsMale] remoteExec [""EPOCH_server_loadPlayer"",2];" \n + "EPOCH_PlayerIsMale = nil;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class load_old_charact + { + priority = 0.000000; + to="Process_3"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/"_myTime = diag_tickTime;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process_3 + { + name = "Process_3"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not_4"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 120"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Response + { + priority = 0.000000; + to="Check_New_Player"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_C_SET"""/*%FSM*/; + action=/*%FSM*/"_array = EPOCH_C_SET;" \n + "EPOCH_C_SET = nil;" \n + "_playerObject = _array deleteAt 0;" \n + "_playerVariables = _array deleteAt 0;" \n + "_currentWeapon = _array deleteAt 0;" \n + "_magCount = _array deleteAt 0;" \n + "Epoch_my_GroupUID = _array deleteAt 0;" \n + "Epoch_canBeRevived = _array deleteAt 0;" \n + "Epoch_personalToken = _array deleteAt 0;" \n + "reverse _serverUptime;" \n + "_serverUptime pushBack (_array deleteAt 0);" \n + "reverse _serverUptime;" \n + "_serverUptime call EPOCH_client_publicEH;" \n + "_playerGroupOnline = _array deleteAt 0;" \n + "" \n + ""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_4 + { + name = "ERROR_Server_not_4"; + init = /*%FSM*/"_msg = ""Authentication Failed, Disconnect and try again"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_HiveLoadChar = true;" \n + " publicVariableServer ""PLAYER_REJECT_HiveLoadChar"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + }; + initState="INIT"; + finalStates[] = + { + "FINISH", + "Reject_without_B", + }; +}; +/*%FSM*/ \ No newline at end of file diff --git a/Sources/mpmissions/epoch.Sara_dbe1/description.ext b/Sources/mpmissions/epoch.Sara_dbe1/description.ext index cfe65cba..8783e3aa 100644 --- a/Sources/mpmissions/epoch.Sara_dbe1/description.ext +++ b/Sources/mpmissions/epoch.Sara_dbe1/description.ext @@ -50,6 +50,7 @@ class cfgFunctions }; class postinit { + file = "init\fn_postinit.sqf"; postInit = 1; }; }; diff --git a/Sources/mpmissions/epoch.Sara_dbe1/init/client_init.sqf b/Sources/mpmissions/epoch.Sara_dbe1/init/client_init.sqf new file mode 100644 index 00000000..4a32e342 --- /dev/null +++ b/Sources/mpmissions/epoch.Sara_dbe1/init/client_init.sqf @@ -0,0 +1,76 @@ +/* + 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: + https://github.com/EpochModTeam/Epoch/tree/master/Sources/epoch_code/init/client_init.sqf +*/ +//Variables +EPOCH_CraftingItem = ""; +EPOCH_ESP_TARGETS = []; +EPOCH_ESPMAP_TARGETS = []; +EPOCH_ESPGROUPS = []; +EPOCH_ESPGROUPCOLORS = []; +EPOCH_ESP_PLAYER = false; +EPOCH_ESP_VEHICLES = false; +EPOCH_ESP_VEHICLEPLAYER = []; +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"]; +if (isNil 'EPOCH_diag_fps') then { + EPOCH_diag_fps = 0; +}; +EPOCH_playerIsSwimming = false; +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 = []; +EPOCH_lastPlayerPos = [0,0,0]; +EPOCH_prevOffer = []; +EPOCH_drawIcon3d = false; +EPOCH_velTransform = false; +EPOCH_stabilityTarget = objNull; +EPOCH_currentVehicle = objNull; +EPOCH_currentTarget = objNull; +EPOCH_LootedBlds = []; +EPOCH_soundLevel = 1; +EPOCH_arr_interactedObjs = []; +EPOCH_buildOption = 0; +EPOCH_nearestLocations = []; +onEachFrame EPOCH_onEachFrame; + +EPOCH_LastAirDrop = time; +EPOCH_AirDropCheck = getNumber(missionConfigFile >> "CfgEpochAirDrop" >> "AirDropFreq"); +if(EPOCH_AirDropCheck < 120)then{EPOCH_AirDropCheck = 120;}; +EPOCH_AirDropChance = getNumber(missionConfigFile >> "CfgEpochAirDrop" >> "AirDropChance"); +if(EPOCH_AirDropChance < 0)then{EPOCH_AirDropChance = 101;EPOCH_AirDropCheck = 99999;}; + +EPOCH_droneRndChance = 100; + +// Custom Keys +EPOCH_keysActionPressed = false; //prevents EH spam +0 call EPOCH_clientKeyMap; + +//ON INIT and RESPAWN +call EPOCH_clientInit; + +[] execFSM "\x\addons\a3_epoch_code\system\SPVEH.fsm"; +[] execFSM "system\player_login.fsm"; + +true diff --git a/Sources/mpmissions/epoch.Sara_dbe1/init/fn_postinit.sqf b/Sources/mpmissions/epoch.Sara_dbe1/init/fn_postinit.sqf new file mode 100644 index 00000000..8be5aa09 --- /dev/null +++ b/Sources/mpmissions/epoch.Sara_dbe1/init/fn_postinit.sqf @@ -0,0 +1,18 @@ +/* + Author: Aaron Clark - EpochMod.com + + Contributors: + + Description: + Initalize Player + + 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/master/Sources/epoch_code/init/fn_postinit.sqf +*/ +if (!isDedicated && isMultiplayer && hasInterface) then { + call compile preprocessFileLineNumbers "init\client_init.sqf"; +}; +true diff --git a/Sources/mpmissions/epoch.Shapur_BAF/System/player_login.fsm b/Sources/mpmissions/epoch.Shapur_BAF/System/player_login.fsm new file mode 100644 index 00000000..9426567f --- /dev/null +++ b/Sources/mpmissions/epoch.Shapur_BAF/System/player_login.fsm @@ -0,0 +1,1398 @@ +/*%FSM*/ +/*%FSM*/ +/* +item0[] = {"INIT",0,250,-25.000000,-375.000000,75.000000,-325.000000,0.000000,"INIT"}; +item1[] = {"FINISH",1,4346,-25.000000,1475.000000,75.000000,1525.000000,0.000000,"FINISH"}; +item2[] = {"true",8,218,-150.000000,-125.000000,-50.000000,-75.000000,0.000000,"true"}; +item3[] = {"Version_Check",2,250,-25.000000,-75.000000,75.000000,-25.000000,0.000000,"Version Check"}; +item4[] = {"Player_Object_Re",4,218,-150.000000,75.000000,-50.000000,125.000000,0.000000,"Player" \n "Object Ready"}; +item5[] = {"Check_Player_UID",2,250,-25.000000,125.000000,75.000000,175.000000,0.000000,"Check Player UID"}; +item6[] = {"PlayerUID_Okay",4,218,-150.000000,175.000000,-50.000000,225.000000,10.000000,"PlayerUID" \n "Okay"}; +item7[] = {"Wrong_Version",4,218,125.000000,-75.000000,225.000000,-25.000000,10.000000,"Wrong" \n "Version"}; +item8[] = {"",7,210,471.000061,-54.000099,478.999939,-45.999901,0.000000,""}; +item9[] = {"ERROR_Wrong_Version",2,250,275.000000,-75.000000,375.000000,-25.000000,0.000000,"ERROR" \n "Wrong Version" \n "Epoch"}; +item10[] = {"Disconnect",2,250,600.000000,1225.000000,700.000000,1275.000000,0.000000,"Disconnect"}; +item11[] = {"Server_Okay",4,218,-125.000000,425.000000,-25.000000,475.000000,0.000000,"Server" \n "Okay"}; +item12[] = {"Empty_PlayerUID",4,218,125.000000,125.000000,225.000000,175.000000,0.000000,"Empty" \n "PlayerUID"}; +item13[] = {"ERROR_PlayerUID",2,250,275.000000,125.000000,375.000000,175.000000,0.000000,"ERROR" \n "PlayerUID Empty"}; +item14[] = {"",7,210,471.000061,145.999908,478.999939,154.000092,0.000000,""}; +item15[] = {"Timeout_No_Respo",4,218,125.000000,875.000000,225.000000,925.000000,0.000000,"Timeout" \n "No Response"}; +item16[] = {"Response",4,218,-150.000000,825.000000,-50.000000,875.000000,0.000000,"Response"}; +item17[] = {"Setup_Player_Var",2,250,-25.000000,1075.000000,75.000000,1125.000000,0.000000,"Setup Player" \n "Variables"}; +item18[] = {"Request_Hive",2,250,-25.000000,575.000000,75.000000,625.000000,0.000000,"Request Hive"}; +item19[] = {"Timeout_No_Respo",4,218,125.000000,575.000000,225.000000,625.000000,0.000000,"Timeout" \n "No Response"}; +item20[] = {"ERROR_Server_not",2,250,275.000000,875.000000,375.000000,925.000000,0.000000,"ERROR" \n "Server not" \n "Response"}; +item21[] = {"",7,210,471.000000,895.999939,479.000000,904.000061,0.000000,""}; +item22[] = {"Timeout_No_Respo",4,218,125.000000,775.000000,225.000000,825.000000,0.000000,"Timeout" \n "No Response"}; +item23[] = {"Wrong_Server_Ver",4,218,125.000000,475.000000,225.000000,525.000000,10.000000,"Wrong" \n "Server Version"}; +item24[] = {"true",8,218,-150.000000,1125.000000,-50.000000,1175.000000,0.000000,"true"}; +item25[] = {"ERROR_Wrong_Server",2,250,275.000000,475.000000,375.000000,525.000000,0.000000,"ERROR" \n "Wrong" \n "Server Version"}; +item26[] = {"Display_Message",4,218,600.000000,1150.000000,700.000000,1200.000000,0.000000,"" \n "Display Message" \n "Wait..."}; +item27[] = {"Setup_Player_Obj",2,250,-25.000000,975.000000,75.000000,1025.000000,0.000000,"Setup Player" \n "Object"}; +item28[] = {"Check_if_Player",4,218,750.000000,1225.000000,850.000000,1275.000000,0.000000,"Check if" \n "Player got Kicked"}; +item29[] = {"Preload_done",8,218,-150.000000,1425.000000,-50.000000,1475.000000,0.000000,"Preload" \n "done"}; +item30[] = {"",7,210,471.000000,796.000000,479.000000,804.000000,0.000000,""}; +item31[] = {"",7,210,471.000000,796.000000,479.000000,804.000000,0.000000,""}; +item32[] = {"true",8,218,425.000000,1075.000000,525.000000,1125.000000,0.000000,"true"}; +item33[] = {"Display_Message",2,250,600.000000,1075.000000,700.000000,1125.000000,0.000000,"Display" \n "Message"}; +item34[] = {"Server_Ready",4,218,-25.000000,300.000000,75.000000,350.000000,0.000000,"Server" \n "Ready"}; +item35[] = {"Check_Server",2,250,-25.000000,375.000000,75.000000,425.000000,0.000000,"Check Server"}; +item36[] = {"Server_not_worki",4,218,125.000000,375.000000,225.000000,425.000000,10.000000,"Server" \n "not working"}; +item37[] = {"ERROR_Server_not_1",2,250,275.000000,375.000000,375.000000,425.000000,0.000000,"ERROR" \n "Server not Ready"}; +item38[] = {"",7,210,471.000000,396.000000,479.000000,404.000000,0.000000,""}; +item39[] = {"Check_Server_1",2,250,-25.000000,225.000000,75.000000,275.000000,0.000000,"Check Server"}; +item40[] = {"Timeout_No_Respo",4,218,125.000000,225.000000,225.000000,275.000000,0.000000,"Timeout" \n "No Response"}; +item41[] = {"ERROR_Server_not_2",2,250,275.000000,225.000000,375.000000,275.000000,0.000000,"ERROR" \n "Server not Ready"}; +item42[] = {"",7,210,471.000000,246.000031,479.000000,253.999969,0.000000,""}; +item43[] = {"Reject_without_B",1,250,900.000000,1225.000000,1000.000000,1275.000000,0.000000,"Reject without" \n "BattlEye"}; +item44[] = {"true",8,218,-150.000000,-25.000000,-50.000000,25.000000,0.000000,"true"}; +item45[] = {"Arma_Version_Che",2,250,-25.000000,25.000000,75.000000,75.000000,0.000000,"Arma Version" \n "Check"}; +item46[] = {"Outdated_Version",4,218,125.000000,25.000000,225.000000,75.000000,10.000000,"Outdated" \n "Version"}; +item47[] = {"ERROR_Wrong_Version_1",2,250,275.000000,25.000000,375.000000,75.000000,0.000000,"ERROR" \n "Wrong Version" \n "ArmA"}; +item48[] = {"",7,210,471.000061,45.999908,478.999939,54.000092,0.000000,""}; +item49[] = {"new_player_____p",4,218,-150.000000,1025.000000,-50.000000,1075.000000,0.000000,"new player == " \n "player"}; +item50[] = {"Setup_EH_s_and_H",2,250,-25.000000,1175.000000,75.000000,1225.000000,0.000000,"Setup EH's" \n "and" \n "HitPoints"}; +item51[] = {"no_weapons",4,218,-25.000000,1275.000000,75.000000,1325.000000,0.000000,"no weapons"}; +item52[] = {"Process",2,250,-25.000000,1375.000000,75.000000,1425.000000,0.000000,"Process"}; +item53[] = {"Has_Current_Weap",4,218,100.000000,1175.000000,200.000000,1225.000000,10.000000,"Has" \n "Current" \n "Weapon"}; +item54[] = {"Find_Active_Weap",2,250,225.000000,1175.000000,325.000000,1225.000000,0.000000,"Find" \n "Active" \n "Weapon"}; +item55[] = {"Current_Weapon_Not",4,218,150.000000,1225.000000,250.000000,1275.000000,0.000000,"Current" \n "Weapon" \n "Not Selected"}; +item56[] = {"Current_Weapon_S",4,218,300.000000,1225.000000,400.000000,1275.000000,0.000000,"Current" \n "Weapon" \n "Selected"}; +item57[] = {"Select_Weapon",2,250,150.000000,1300.000000,250.000000,1350.000000,0.000000,"Select" \n "Weapon"}; +item58[] = {"true",8,218,225.000000,1375.000000,325.000000,1425.000000,0.000000,"true"}; +item59[] = {"Do_nothing",2,250,300.000000,1300.000000,400.000000,1350.000000,0.000000,"Do nothing"}; +item60[] = {"Check_New_Player",2,250,-25.000000,875.000000,75.000000,925.000000,0.000000,"Check" \n "New Player" \n "Setup"}; +item61[] = {"check_new__player",4,218,-150.000000,925.000000,-50.000000,975.000000,0.000000,"check new " \n "player not null"}; +item62[] = {"true",8,218,-150.000000,-325.000000,-50.000000,-275.000000,0.000000,"true"}; +item63[] = {"Process_1",2,250,-25.000000,-275.000000,75.000000,-225.000000,0.000000,"Process"}; +item64[] = {"Wait_ArmA_Loading",4,218,-150.000000,-225.000000,-50.000000,-175.000000,0.000000,"Wait ArmA" \n "Loading Screen" \n "Done"}; +item65[] = {"Start_Loading_Sc",2,250,-25.000000,-175.000000,75.000000,-125.000000,0.000000,"Start Loading" \n "Screen"}; +item66[] = {"freshServer",4,218,-325.000000,225.000000,-225.000000,275.000000,0.000000,"freshServer"}; +item67[] = {"Update_Loadingscreen",2,250,-325.000000,300.000000,-225.000000,350.000000,0.000000,"Update" \n "Loadingscreen" \n "Message"}; +item68[] = {"true",8,218,-150.000000,300.000000,-50.000000,350.000000,0.000000,"true"}; +item69[] = {"Timeout_",4,218,125.000000,975.000000,225.000000,1025.000000,0.000000,"" \n "Timeout" \n ""}; +item70[] = {"ERROR_Player_Setup",2,250,275.000000,975.000000,375.000000,1025.000000,0.000000,"ERROR" \n "Player Setup" \n "Invalid"}; +item71[] = {"",7,210,471.000000,996.000000,479.000000,1004.000000,0.000000,""}; +item72[] = {"Server_Version_C",2,250,-25.000000,475.000000,75.000000,525.000000,0.000000,"Server Version" \n "Check"}; +item73[] = {"Version_Okay",4,218,-125.000000,525.000000,-25.000000,575.000000,0.000000,"Version" \n "Okay"}; +item74[] = {"",7,210,471.000000,496.000000,479.000000,504.000000,0.000000,""}; +item75[] = {"ERROR_Server_not_3",2,250,275.000000,575.000000,375.000000,625.000000,0.000000,"ERROR" \n "Server not" \n "Response"}; +item76[] = {"",7,210,471.000000,596.000000,479.000000,604.000000,0.000000,""}; +item77[] = {"new_character",4,218,-250.000000,675.000000,-150.000000,725.000000,10.000000,"new" \n "character"}; +item78[] = {"Hive_Response",4,218,-125.000000,625.000000,-25.000000,675.000000,0.000000,"Hive" \n "Response"}; +item79[] = {"load_old_charact",4,218,-125.000000,725.000000,-25.000000,775.000000,0.000000,"load old" \n "character"}; +item80[] = {"Process_2",2,250,-25.000000,675.000000,75.000000,725.000000,0.000000,"Process"}; +item81[] = {"Open_Gender_Selection",2,250,-400.000000,675.000000,-300.000000,725.000000,0.000000,"Open Gender" \n "Selection Dialog"}; +item82[] = {"Reopen_when_client",4,218,-400.000000,600.000000,-300.000000,650.000000,0.000000,"Reopen" \n "when client hit" \n "escape"}; +item83[] = {"Gender_Selected",4,218,-450.000000,750.000000,-350.000000,800.000000,10.000000,"Gender" \n "Selected"}; +item84[] = {"Timeout",4,218,-350.000000,750.000000,-250.000000,800.000000,0.000000,"Timeout"}; +item85[] = {"Send_character_s",2,250,-400.000000,825.000000,-300.000000,875.000000,0.000000,"Send" \n "character" \n "selection"}; +item86[] = {"Process_3",2,250,-25.000000,775.000000,75.000000,825.000000,0.000000,"Process"}; +item87[] = {"ERROR_Server_not_4",2,250,275.000000,775.000000,375.000000,825.000000,0.000000,"ERROR" \n "Server not" \n "Response"}; +link0[] = {0,62}; +link1[] = {2,3}; +link2[] = {3,7}; +link3[] = {3,44}; +link4[] = {4,5}; +link5[] = {5,6}; +link6[] = {5,12}; +link7[] = {6,39}; +link8[] = {7,9}; +link9[] = {8,48}; +link10[] = {9,8}; +link11[] = {10,28}; +link12[] = {11,72}; +link13[] = {12,13}; +link14[] = {13,14}; +link15[] = {14,42}; +link16[] = {15,20}; +link17[] = {16,60}; +link18[] = {17,24}; +link19[] = {18,19}; +link20[] = {18,78}; +link21[] = {19,75}; +link22[] = {20,21}; +link23[] = {21,71}; +link24[] = {22,87}; +link25[] = {23,25}; +link26[] = {24,50}; +link27[] = {25,74}; +link28[] = {26,10}; +link29[] = {27,49}; +link30[] = {27,69}; +link31[] = {28,43}; +link32[] = {29,1}; +link33[] = {31,21}; +link34[] = {32,33}; +link35[] = {33,26}; +link36[] = {34,35}; +link37[] = {35,11}; +link38[] = {35,36}; +link39[] = {36,37}; +link40[] = {37,38}; +link41[] = {38,74}; +link42[] = {39,34}; +link43[] = {39,40}; +link44[] = {39,66}; +link45[] = {40,41}; +link46[] = {41,42}; +link47[] = {42,38}; +link48[] = {44,45}; +link49[] = {45,4}; +link50[] = {45,46}; +link51[] = {46,47}; +link52[] = {47,48}; +link53[] = {48,14}; +link54[] = {49,17}; +link55[] = {50,51}; +link56[] = {50,53}; +link57[] = {51,52}; +link58[] = {52,29}; +link59[] = {53,54}; +link60[] = {54,55}; +link61[] = {54,56}; +link62[] = {55,57}; +link63[] = {56,59}; +link64[] = {57,58}; +link65[] = {58,52}; +link66[] = {59,58}; +link67[] = {60,15}; +link68[] = {60,61}; +link69[] = {61,27}; +link70[] = {62,63}; +link71[] = {63,64}; +link72[] = {64,65}; +link73[] = {65,2}; +link74[] = {66,67}; +link75[] = {67,68}; +link76[] = {68,39}; +link77[] = {69,70}; +link78[] = {70,71}; +link79[] = {71,32}; +link80[] = {72,23}; +link81[] = {72,73}; +link82[] = {73,18}; +link83[] = {74,76}; +link84[] = {75,76}; +link85[] = {76,31}; +link86[] = {77,81}; +link87[] = {78,80}; +link88[] = {79,86}; +link89[] = {80,77}; +link90[] = {80,79}; +link91[] = {81,82}; +link92[] = {81,83}; +link93[] = {81,84}; +link94[] = {82,81}; +link95[] = {83,85}; +link96[] = {84,85}; +link97[] = {85,79}; +link98[] = {86,16}; +link99[] = {86,22}; +link100[] = {87,31}; +globals[] = {0.000000,0,0,0,0,640,480,1,244,6316128,1,-207.564026,582.257507,1932.771484,781.734619,586,854,1}; +window[] = {2,-1,-1,-1,-1,838,1706,2998,26,3,604}; +*//*%FSM*/ +class FSM +{ + fsmName = "Epoch Login"; + class States + { + /*%FSM*/ + class INIT + { + name = "INIT"; + init = /*%FSM*/"titleCut ["""", ""BLACK FADED"", 1337];" \n + "0 fadeSound 0;" \n + "player enableSimulation false;" \n + "" \n + "_debug = true;" \n + "_myTime = diag_tickTime;" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Init"";" \n + "};" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Process_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class FINISH + { + name = "FINISH"; + init = /*%FSM*/"[] spawn {" \n + " disableSerialization;" \n + " waitUntil{!isNull (findDisplay 46)};" \n + " _display = findDisplay 46;" \n + " {" \n + " _display displayAddEventHandler [_x,([""CfgEpochClient"", _x, """"] call EPOCH_fnc_returnConfigEntryV2)];" \n + " } forEach ([""CfgEpochClient"", ""displayAddEventHandler"", []] call EPOCH_fnc_returnConfigEntryV2);" \n + " " \n + " player switchMove """";" \n + "};" \n + "" \n + "3 fadeSound 1;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Finish!"";" \n + "};" \n + "" \n + "" \n + "" \n + "player enableSimulation true;" \n + "" \n + "titleCut ["""", ""BLACK IN"", 1];" \n + "1338 cutText ["""",""PLAIN"",0]; " \n + "" \n + "progressLoadingScreen 1.0;" \n + "" \n + "endLoadingScreen;" \n + "EPOCH_loadingScreenDone = true;" \n + "" \n + "hintSilent ""Worked"" "/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + }; + }; + /*%FSM*/ + /*%FSM*/ + class Version_Check + { + name = "Version_Check"; + init = /*%FSM*/"if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Version Check"";" \n + "};" \n + "" \n + "// SHOULD BE:" \n + "_epoch_assets0 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_assets"");" \n + "_epoch_assets1 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_assets_1"");" \n + "_epoch_assets2 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""epoch_objects"");" \n + "_epoch_assets3 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_assets_3"");" \n + "_epoch_config = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_config"");" \n + "_epoch_language = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_language"");" \n + "_epoch_underground = getText(configFile >> ""Epoch"" >> ""Version"" >> ""Underground_Epoch"");" \n + "_epoch_vehicles = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_vehicles"");" \n + "_epoch_weapons = getText(configFile >> ""Epoch"" >> ""Version"" >> ""a3_epoch_weapons"");" \n + "" \n + "" \n + "// IS:" \n + "_my_epoch_assets0 = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_assets"" >> ""epochVersion"");" \n + "_my_epoch_assets1 = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_assets_1"" >> ""epochVersion"");" \n + "_my_epoch_assets2 = getText(configFile >> ""CfgPatches"" >> ""epoch_objects"" >> ""epochVersion"");" \n + "_my_epoch_assets3 = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_assets_3"" >> ""epochVersion"");" \n + "_my_epoch_config = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_config"" >> ""epochVersion"");" \n + "_my_epoch_language = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_language"" >> ""epochVersion"");" \n + "_my_epoch_underground = getText(configFile >> ""CfgPatches"" >> ""Underground_Epoch"" >> ""epochVersion"");" \n + "_my_epoch_vehicles = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_vehicles"" >> ""epochVersion"");" \n + "_my_epoch_weapons = getText(configFile >> ""CfgPatches"" >> ""a3_epoch_weapons"" >> ""epochVersion"");" \n + "" \n + "progressLoadingScreen 0.1;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Wrong_Version + { + priority = 10.000000; + to="ERROR_Wrong_Version"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_epoch_assets0 != _epoch_assets0 ||" \n + "_my_epoch_assets1 != _epoch_assets1 ||" \n + "_my_epoch_assets2 != _epoch_assets2 ||" \n + "_my_epoch_assets3 != _epoch_assets3 ||" \n + "_my_epoch_config != _epoch_config ||" \n + "_my_epoch_language != _epoch_language ||" \n + "_my_epoch_underground != _epoch_underground ||" \n + "_my_epoch_vehicles != _epoch_vehicles ||" \n + "_my_epoch_weapons != _epoch_weapons"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class true + { + priority = 0.000000; + to="Arma_Version_Che"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_Player_UID + { + name = "Check_Player_UID"; + init = /*%FSM*/"if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Check PlayerUID"";" \n + "};" \n + "" \n + "_playerUID = getPlayerUID player;" \n + "" \n + "progressLoadingScreen 0.2;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class PlayerUID_Okay + { + priority = 10.000000; + to="Check_Server_1"; + precondition = /*%FSM*/"!isNil ""_playerUID"""/*%FSM*/; + condition=/*%FSM*/"_playerUID != """""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Empty_PlayerUID + { + priority = 0.000000; + to="ERROR_PlayerUID"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Wrong_Version + { + name = "ERROR_Wrong_Version"; + init = /*%FSM*/"_msg = ""You have an outdated version of Epoch"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_EPOCHVERSION = true;" \n + " publicVariableServer ""PLAYER_REJECT_EPOCHVERSION"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Disconnect + { + name = "Disconnect"; + init = /*%FSM*/"endLoadingScreen;" \n + "1338 cutText [_msg,""PLAIN"",0]; " \n + "deleteVehicle player;" \n + "call _rejectPlayer;" \n + "diag_log format [""(%1) %2"",diag_tickTime,_msg];" \n + "_myTime = diag_tickTime;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Check_if_Player + { + priority = 0.000000; + to="Reject_without_B"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 2"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_PlayerUID + { + name = "ERROR_PlayerUID"; + init = /*%FSM*/"_msg = ""Can not setup Player Object! (Error 01)"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_UID = true;" \n + " publicVariableServer ""PLAYER_REJECT_UID"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Setup_Player_Var + { + name = "Setup_Player_Var"; + init = /*%FSM*/"diag_log format[""DEBUG TIME WAITED: %1"", (diag_tickTime - _myTime)];" \n + "{" \n + " missionNamespace setVariable[(format[""EPOCH_player%1"", EPOCH_customVars select _forEachIndex]), _x];" \n + "} forEach _playerVariables;" \n + "" \n + """Loading Player Variables... Please wait!"" call Epoch_updateLoadingScreen;" \n + "" \n + "EPOCH_lastPlayerPos = getPosATL vehicle player;" \n + "" \n + "progressLoadingScreen 0.7;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Setup Player Variables"";" \n + "};" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Setup_EH_s_and_H"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Request_Hive + { + name = "Request_Hive"; + init = /*%FSM*/"_myTime = diag_tickTime;" \n + "" \n + "Epoch_my_Group = [];" \n + "" \n + "player remoteExec [""EPOCH_server_checkPlayer"",2];" \n + "" \n + "" \n + """Loading Player Data... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.5;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Hive_Response + { + priority = 0.000000; + to="Process_2"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_checkPlayer_PVC"""/*%FSM*/; + action=/*%FSM*/"_newChar = EPOCH_checkPlayer_PVC;" \n + "EPOCH_checkPlayer_PVC = nil;"/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not_3"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 120"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not + { + name = "ERROR_Server_not"; + init = /*%FSM*/"_msg = ""Authentication Failed, Disconnect and try again"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_NoResponse2 = true;" \n + " publicVariableServer ""PLAYER_REJECT_NoResponse2"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Wrong_Server + { + name = "ERROR_Wrong_Server"; + init = /*%FSM*/"_msg = format[""Server and Client running with different Version! (You: %1 // Server: %2)"",getText(configFile >> ""CfgMods"" >> ""Epoch"" >> ""version""),_serverVersion];" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_ServerVersion = true;" \n + " publicVariableServer ""PLAYER_REJECT_ServerVersion"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Setup_Player_Obj + { + name = "Setup_Player_Obj"; + init = /*%FSM*/"_ply = player;" \n + "_group = group player;" \n + "" \n + "player reveal _playerObject;" \n + "_playerPos = getposATL _playerObject;" \n + "" \n + "selectPlayer _playerObject;" \n + "" \n + "deleteVehicle _ply;" \n + "deleteGroup _group;" \n + "" \n + """Loading Player Body... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.8;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Setup Player Object"";" \n + "};" \n + "" \n + "_myTime = diag_tickTime;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Timeout_ + { + priority = 0.000000; + to="ERROR_Player_Setup"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 60"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class new_player_____p + { + priority = 0.000000; + to="Setup_Player_Var"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_playerObject == player"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Display_Message + { + name = "Display_Message"; + init = /*%FSM*/"[] spawn {" \n + " waitUntil{!isNull (findDisplay 46)};" \n + " (findDisplay 46) displayAddEventHandler [""KeyDown"",""true""];" \n + " (findDisplay 46) displayAddEventHandler [""KeyUp"",""true""];" \n + "};" \n + "diag_log format [""(%1) %2"",diag_tickTime,_msg];" \n + "_myTime = diag_tickTime;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Display_Message + { + priority = 0.000000; + to="Disconnect"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 10"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_Server + { + name = "Check_Server"; + init = /*%FSM*/"_myTime = diag_tickTime;" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Check Server"";" \n + "};" \n + """Checking Server... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.4;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Server_not_worki + { + priority = 10.000000; + to="ERROR_Server_not_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_BADHIVE""" \n + ""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Server_Okay + { + priority = 0.000000; + to="Server_Version_C"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""Epoch_ServerVersion"""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_1 + { + name = "ERROR_Server_not_1"; + init = /*%FSM*/"_msg = ""Server not Ready (Error 03)"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_NotReady2 = true;" \n + " publicVariableServer ""PLAYER_REJECT_NotReady2"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_Server_1 + { + name = "Check_Server_1"; + init = /*%FSM*/"progressLoadingScreen 0.3;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not_2"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 180"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class freshServer + { + priority = 0.000000; + to="Update_Loadingscreen"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"uiNamespace getVariable ['Epoch_freshServer', false]"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Server_Ready + { + priority = 0.000000; + to="Check_Server"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_SERVER"""/*%FSM*/; + action=/*%FSM*/"_serverUptime = EPOCH_SERVER;" \n + "EPOCH_SERVER = nil;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_2 + { + name = "ERROR_Server_not_2"; + init = /*%FSM*/"_msg = ""Server not Ready (Error 02)"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_NotReady1 = true;" \n + " publicVariableServer ""PLAYER_REJECT_NotReady1"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Reject_without_B + { + name = "Reject_without_B"; + init = /*%FSM*/"[] spawn {" \n + " waitUntil{!isNull (findDisplay 46)};" \n + " waitUntil {" \n + " (findDisplay 46) closeDisplay 0;" \n + " isNull (findDisplay 46)" \n + " };" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + }; + }; + /*%FSM*/ + /*%FSM*/ + class Arma_Version_Che + { + name = "Arma_Version_Che"; + init = /*%FSM*/"progressLoadingScreen 0.15;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Outdated_Version + { + priority = 10.000000; + to="ERROR_Wrong_Version_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"productVersion select 2 < getNumber(configFile >> ""CfgMods"" >> ""Epoch"" >> ""ArmAVersion"")"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Player_Object_Re + { + priority = 0.000000; + to="Check_Player_UID"; + precondition = /*%FSM*/"!isNull player"/*%FSM*/; + condition=/*%FSM*/"player == player"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Wrong_Version_1 + { + name = "ERROR_Wrong_Version_1"; + init = /*%FSM*/"_msg = ""You have an outdated version of ArmA 3"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_ARMAVERSION = true;" \n + " publicVariableServer ""PLAYER_REJECT_ARMAVERSION"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Setup_EH_s_and_H + { + name = "Setup_EH_s_and_H"; + init = /*%FSM*/"{" \n + " player addEventHandler [_x,([""CfgEpochClient"", _x, """"] call EPOCH_fnc_returnConfigEntryV2)];" \n + "} forEach ([""CfgEpochClient"", ""addEventHandler"", []] call EPOCH_fnc_returnConfigEntryV2);" \n + "" \n + "if (count EPOCH_playerHitPoints isEqualTo count ((getAllHitPointsDamage player) param [0,[]])) then {" \n + " {" \n + " player setHitIndex [_forEachIndex, _x];" \n + " }forEach EPOCH_playerHitPoints;" \n + "};" \n + "" \n + "[] spawn EPOCH_masterLoop;" \n + "true call EPOCH_fnc_Weather;" \n + "[5,100] spawn EPOCH_niteLight;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Setup EH's"";" \n + "};" \n + "" \n + """Loading... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.9;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Has_Current_Weap + { + priority = 10.000000; + to="Find_Active_Weap"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_currentWeapon != """""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class no_weapons + { + priority = 0.000000; + to="Process"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_currentWeapon == """""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process + { + name = "Process"; + init = /*%FSM*/"progressLoadingScreen 0.975;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Preload_done + { + priority = 0.000000; + to="FINISH"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"preloadCamera _playerPos"/*%FSM*/; + action=/*%FSM*/"call compile _playerGroupOnline;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Find_Active_Weap + { + name = "Find_Active_Weap"; + init = /*%FSM*/"_activeWeapon = currentWeapon player;" \n + "progressLoadingScreen 0.95;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Current_Weapon_S + { + priority = 0.000000; + to="Do_nothing"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_activeWeapon == _currentWeapon"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Current_Weapon_Not + { + priority = 0.000000; + to="Select_Weapon"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_activeWeapon != _currentWeapon"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Select_Weapon + { + name = "Select_Weapon"; + init = /*%FSM*/"_currentWeapon spawn {" \n + " uiSleep 1; " \n + " player selectWeapon _this;" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Process"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Do_nothing + { + name = "Do_nothing"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Process"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_New_Player + { + name = "Check_New_Player"; + init = /*%FSM*/"_myTime = diag_tickTime;" \n + "" \n + """Loading Player Inventory... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.6;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class check_new__player + { + priority = 0.000000; + to="Setup_Player_Obj"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!(isNull _playerObject) && {_playerObject getVariable [""SETUP"",false]}"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 120"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process_1 + { + name = "Process_1"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Wait_ArmA_Loading + { + priority = 0.000000; + to="Start_Loading_Sc"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"{!isnull _x} count ((uinamespace getvariable ""loading_displays"") - [finddisplay 18]) == 0"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Start_Loading_Sc + { + name = "Start_Loading_Sc"; + init = /*%FSM*/"startLoadingScreen ["""",""EpochLoadingScreen""];" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Start Loadingscreen"";" \n + "};" \n + """Starting Epoch... Please wait!"" call Epoch_updateLoadingScreen;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Version_Check"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Update_Loadingscreen + { + name = "Update_Loadingscreen"; + init = /*%FSM*/"uiNamespace setVariable ['Epoch_freshServer', false];" \n + "" \n + """Server initializing... Please wait!"" call Epoch_updateLoadingScreen;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Check_Server_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Player_Setup + { + name = "ERROR_Player_Setup"; + init = /*%FSM*/"_msg = ""Problem setting up player"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_InvaildSetup = true;" \n + " publicVariableServer ""PLAYER_REJECT_InvaildSetup"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Server_Version_C + { + name = "Server_Version_C"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Wrong_Server_Ver + { + priority = 10.000000; + to="ERROR_Wrong_Server"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"Epoch_ServerVersion != getText(configFile >> ""CfgMods"" >> ""Epoch"" >> ""version"")"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Version_Okay + { + priority = 0.000000; + to="Request_Hive"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_3 + { + name = "ERROR_Server_not_3"; + init = /*%FSM*/"_msg = ""Authentication Failed, Disconnect and try again"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_HiveNotResponse = true;" \n + " publicVariableServer ""PLAYER_REJECT_HiveNotResponse"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process_2 + { + name = "Process_2"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class new_character + { + priority = 10.000000; + to="Open_Gender_Selection"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_newChar"/*%FSM*/; + action=/*%FSM*/"endLoadingScreen;" \n + "_myGenderTime = diag_tickTime;"/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class load_old_charact + { + priority = 0.000000; + to="Process_3"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/"_myTime = diag_tickTime;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Open_Gender_Selection + { + name = "Open_Gender_Selection"; + init = /*%FSM*/"createdialog ""SelectGender"";"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Gender_Selected + { + priority = 10.000000; + to="Send_character_s"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_PlayerIsMale"""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Timeout + { + priority = 0.000000; + to="Send_character_s"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"((diag_tickTime - _myGenderTime) > 30)"/*%FSM*/; + action=/*%FSM*/"EPOCH_PlayerIsMale = true;" \n + "closeDialog 0;"/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Reopen_when_client + { + priority = 0.000000; + to="Open_Gender_Selection"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!dialog && isNil ""EPOCH_PlayerIsMale"""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Send_character_s + { + name = "Send_character_s"; + init = /*%FSM*/"startLoadingScreen ["""",""EpochLoadingScreen""];" \n + """Gender Selected... Please wait!"" call Epoch_updateLoadingScreen;" \n + "" \n + "[player,EPOCH_PlayerIsMale] remoteExec [""EPOCH_server_loadPlayer"",2];" \n + "EPOCH_PlayerIsMale = nil;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class load_old_charact + { + priority = 0.000000; + to="Process_3"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/"_myTime = diag_tickTime;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process_3 + { + name = "Process_3"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not_4"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 120"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Response + { + priority = 0.000000; + to="Check_New_Player"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_C_SET"""/*%FSM*/; + action=/*%FSM*/"_array = EPOCH_C_SET;" \n + "EPOCH_C_SET = nil;" \n + "_playerObject = _array deleteAt 0;" \n + "_playerVariables = _array deleteAt 0;" \n + "_currentWeapon = _array deleteAt 0;" \n + "_magCount = _array deleteAt 0;" \n + "Epoch_my_GroupUID = _array deleteAt 0;" \n + "Epoch_canBeRevived = _array deleteAt 0;" \n + "Epoch_personalToken = _array deleteAt 0;" \n + "reverse _serverUptime;" \n + "_serverUptime pushBack (_array deleteAt 0);" \n + "reverse _serverUptime;" \n + "_serverUptime call EPOCH_client_publicEH;" \n + "_playerGroupOnline = _array deleteAt 0;" \n + "" \n + ""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_4 + { + name = "ERROR_Server_not_4"; + init = /*%FSM*/"_msg = ""Authentication Failed, Disconnect and try again"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_HiveLoadChar = true;" \n + " publicVariableServer ""PLAYER_REJECT_HiveLoadChar"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + }; + initState="INIT"; + finalStates[] = + { + "FINISH", + "Reject_without_B", + }; +}; +/*%FSM*/ \ No newline at end of file diff --git a/Sources/mpmissions/epoch.Shapur_BAF/description.ext b/Sources/mpmissions/epoch.Shapur_BAF/description.ext index cfe65cba..8783e3aa 100644 --- a/Sources/mpmissions/epoch.Shapur_BAF/description.ext +++ b/Sources/mpmissions/epoch.Shapur_BAF/description.ext @@ -50,6 +50,7 @@ class cfgFunctions }; class postinit { + file = "init\fn_postinit.sqf"; postInit = 1; }; }; diff --git a/Sources/mpmissions/epoch.Shapur_BAF/init/client_init.sqf b/Sources/mpmissions/epoch.Shapur_BAF/init/client_init.sqf new file mode 100644 index 00000000..4a32e342 --- /dev/null +++ b/Sources/mpmissions/epoch.Shapur_BAF/init/client_init.sqf @@ -0,0 +1,76 @@ +/* + 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: + https://github.com/EpochModTeam/Epoch/tree/master/Sources/epoch_code/init/client_init.sqf +*/ +//Variables +EPOCH_CraftingItem = ""; +EPOCH_ESP_TARGETS = []; +EPOCH_ESPMAP_TARGETS = []; +EPOCH_ESPGROUPS = []; +EPOCH_ESPGROUPCOLORS = []; +EPOCH_ESP_PLAYER = false; +EPOCH_ESP_VEHICLES = false; +EPOCH_ESP_VEHICLEPLAYER = []; +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"]; +if (isNil 'EPOCH_diag_fps') then { + EPOCH_diag_fps = 0; +}; +EPOCH_playerIsSwimming = false; +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 = []; +EPOCH_lastPlayerPos = [0,0,0]; +EPOCH_prevOffer = []; +EPOCH_drawIcon3d = false; +EPOCH_velTransform = false; +EPOCH_stabilityTarget = objNull; +EPOCH_currentVehicle = objNull; +EPOCH_currentTarget = objNull; +EPOCH_LootedBlds = []; +EPOCH_soundLevel = 1; +EPOCH_arr_interactedObjs = []; +EPOCH_buildOption = 0; +EPOCH_nearestLocations = []; +onEachFrame EPOCH_onEachFrame; + +EPOCH_LastAirDrop = time; +EPOCH_AirDropCheck = getNumber(missionConfigFile >> "CfgEpochAirDrop" >> "AirDropFreq"); +if(EPOCH_AirDropCheck < 120)then{EPOCH_AirDropCheck = 120;}; +EPOCH_AirDropChance = getNumber(missionConfigFile >> "CfgEpochAirDrop" >> "AirDropChance"); +if(EPOCH_AirDropChance < 0)then{EPOCH_AirDropChance = 101;EPOCH_AirDropCheck = 99999;}; + +EPOCH_droneRndChance = 100; + +// Custom Keys +EPOCH_keysActionPressed = false; //prevents EH spam +0 call EPOCH_clientKeyMap; + +//ON INIT and RESPAWN +call EPOCH_clientInit; + +[] execFSM "\x\addons\a3_epoch_code\system\SPVEH.fsm"; +[] execFSM "system\player_login.fsm"; + +true diff --git a/Sources/mpmissions/epoch.Shapur_BAF/init/fn_postinit.sqf b/Sources/mpmissions/epoch.Shapur_BAF/init/fn_postinit.sqf new file mode 100644 index 00000000..8be5aa09 --- /dev/null +++ b/Sources/mpmissions/epoch.Shapur_BAF/init/fn_postinit.sqf @@ -0,0 +1,18 @@ +/* + Author: Aaron Clark - EpochMod.com + + Contributors: + + Description: + Initalize Player + + 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/master/Sources/epoch_code/init/fn_postinit.sqf +*/ +if (!isDedicated && isMultiplayer && hasInterface) then { + call compile preprocessFileLineNumbers "init\client_init.sqf"; +}; +true diff --git a/Sources/mpmissions/epoch.Stratis/System/player_login.fsm b/Sources/mpmissions/epoch.Stratis/System/player_login.fsm new file mode 100644 index 00000000..9426567f --- /dev/null +++ b/Sources/mpmissions/epoch.Stratis/System/player_login.fsm @@ -0,0 +1,1398 @@ +/*%FSM*/ +/*%FSM*/ +/* +item0[] = {"INIT",0,250,-25.000000,-375.000000,75.000000,-325.000000,0.000000,"INIT"}; +item1[] = {"FINISH",1,4346,-25.000000,1475.000000,75.000000,1525.000000,0.000000,"FINISH"}; +item2[] = {"true",8,218,-150.000000,-125.000000,-50.000000,-75.000000,0.000000,"true"}; +item3[] = {"Version_Check",2,250,-25.000000,-75.000000,75.000000,-25.000000,0.000000,"Version Check"}; +item4[] = {"Player_Object_Re",4,218,-150.000000,75.000000,-50.000000,125.000000,0.000000,"Player" \n "Object Ready"}; +item5[] = {"Check_Player_UID",2,250,-25.000000,125.000000,75.000000,175.000000,0.000000,"Check Player UID"}; +item6[] = {"PlayerUID_Okay",4,218,-150.000000,175.000000,-50.000000,225.000000,10.000000,"PlayerUID" \n "Okay"}; +item7[] = {"Wrong_Version",4,218,125.000000,-75.000000,225.000000,-25.000000,10.000000,"Wrong" \n "Version"}; +item8[] = {"",7,210,471.000061,-54.000099,478.999939,-45.999901,0.000000,""}; +item9[] = {"ERROR_Wrong_Version",2,250,275.000000,-75.000000,375.000000,-25.000000,0.000000,"ERROR" \n "Wrong Version" \n "Epoch"}; +item10[] = {"Disconnect",2,250,600.000000,1225.000000,700.000000,1275.000000,0.000000,"Disconnect"}; +item11[] = {"Server_Okay",4,218,-125.000000,425.000000,-25.000000,475.000000,0.000000,"Server" \n "Okay"}; +item12[] = {"Empty_PlayerUID",4,218,125.000000,125.000000,225.000000,175.000000,0.000000,"Empty" \n "PlayerUID"}; +item13[] = {"ERROR_PlayerUID",2,250,275.000000,125.000000,375.000000,175.000000,0.000000,"ERROR" \n "PlayerUID Empty"}; +item14[] = {"",7,210,471.000061,145.999908,478.999939,154.000092,0.000000,""}; +item15[] = {"Timeout_No_Respo",4,218,125.000000,875.000000,225.000000,925.000000,0.000000,"Timeout" \n "No Response"}; +item16[] = {"Response",4,218,-150.000000,825.000000,-50.000000,875.000000,0.000000,"Response"}; +item17[] = {"Setup_Player_Var",2,250,-25.000000,1075.000000,75.000000,1125.000000,0.000000,"Setup Player" \n "Variables"}; +item18[] = {"Request_Hive",2,250,-25.000000,575.000000,75.000000,625.000000,0.000000,"Request Hive"}; +item19[] = {"Timeout_No_Respo",4,218,125.000000,575.000000,225.000000,625.000000,0.000000,"Timeout" \n "No Response"}; +item20[] = {"ERROR_Server_not",2,250,275.000000,875.000000,375.000000,925.000000,0.000000,"ERROR" \n "Server not" \n "Response"}; +item21[] = {"",7,210,471.000000,895.999939,479.000000,904.000061,0.000000,""}; +item22[] = {"Timeout_No_Respo",4,218,125.000000,775.000000,225.000000,825.000000,0.000000,"Timeout" \n "No Response"}; +item23[] = {"Wrong_Server_Ver",4,218,125.000000,475.000000,225.000000,525.000000,10.000000,"Wrong" \n "Server Version"}; +item24[] = {"true",8,218,-150.000000,1125.000000,-50.000000,1175.000000,0.000000,"true"}; +item25[] = {"ERROR_Wrong_Server",2,250,275.000000,475.000000,375.000000,525.000000,0.000000,"ERROR" \n "Wrong" \n "Server Version"}; +item26[] = {"Display_Message",4,218,600.000000,1150.000000,700.000000,1200.000000,0.000000,"" \n "Display Message" \n "Wait..."}; +item27[] = {"Setup_Player_Obj",2,250,-25.000000,975.000000,75.000000,1025.000000,0.000000,"Setup Player" \n "Object"}; +item28[] = {"Check_if_Player",4,218,750.000000,1225.000000,850.000000,1275.000000,0.000000,"Check if" \n "Player got Kicked"}; +item29[] = {"Preload_done",8,218,-150.000000,1425.000000,-50.000000,1475.000000,0.000000,"Preload" \n "done"}; +item30[] = {"",7,210,471.000000,796.000000,479.000000,804.000000,0.000000,""}; +item31[] = {"",7,210,471.000000,796.000000,479.000000,804.000000,0.000000,""}; +item32[] = {"true",8,218,425.000000,1075.000000,525.000000,1125.000000,0.000000,"true"}; +item33[] = {"Display_Message",2,250,600.000000,1075.000000,700.000000,1125.000000,0.000000,"Display" \n "Message"}; +item34[] = {"Server_Ready",4,218,-25.000000,300.000000,75.000000,350.000000,0.000000,"Server" \n "Ready"}; +item35[] = {"Check_Server",2,250,-25.000000,375.000000,75.000000,425.000000,0.000000,"Check Server"}; +item36[] = {"Server_not_worki",4,218,125.000000,375.000000,225.000000,425.000000,10.000000,"Server" \n "not working"}; +item37[] = {"ERROR_Server_not_1",2,250,275.000000,375.000000,375.000000,425.000000,0.000000,"ERROR" \n "Server not Ready"}; +item38[] = {"",7,210,471.000000,396.000000,479.000000,404.000000,0.000000,""}; +item39[] = {"Check_Server_1",2,250,-25.000000,225.000000,75.000000,275.000000,0.000000,"Check Server"}; +item40[] = {"Timeout_No_Respo",4,218,125.000000,225.000000,225.000000,275.000000,0.000000,"Timeout" \n "No Response"}; +item41[] = {"ERROR_Server_not_2",2,250,275.000000,225.000000,375.000000,275.000000,0.000000,"ERROR" \n "Server not Ready"}; +item42[] = {"",7,210,471.000000,246.000031,479.000000,253.999969,0.000000,""}; +item43[] = {"Reject_without_B",1,250,900.000000,1225.000000,1000.000000,1275.000000,0.000000,"Reject without" \n "BattlEye"}; +item44[] = {"true",8,218,-150.000000,-25.000000,-50.000000,25.000000,0.000000,"true"}; +item45[] = {"Arma_Version_Che",2,250,-25.000000,25.000000,75.000000,75.000000,0.000000,"Arma Version" \n "Check"}; +item46[] = {"Outdated_Version",4,218,125.000000,25.000000,225.000000,75.000000,10.000000,"Outdated" \n "Version"}; +item47[] = {"ERROR_Wrong_Version_1",2,250,275.000000,25.000000,375.000000,75.000000,0.000000,"ERROR" \n "Wrong Version" \n "ArmA"}; +item48[] = {"",7,210,471.000061,45.999908,478.999939,54.000092,0.000000,""}; +item49[] = {"new_player_____p",4,218,-150.000000,1025.000000,-50.000000,1075.000000,0.000000,"new player == " \n "player"}; +item50[] = {"Setup_EH_s_and_H",2,250,-25.000000,1175.000000,75.000000,1225.000000,0.000000,"Setup EH's" \n "and" \n "HitPoints"}; +item51[] = {"no_weapons",4,218,-25.000000,1275.000000,75.000000,1325.000000,0.000000,"no weapons"}; +item52[] = {"Process",2,250,-25.000000,1375.000000,75.000000,1425.000000,0.000000,"Process"}; +item53[] = {"Has_Current_Weap",4,218,100.000000,1175.000000,200.000000,1225.000000,10.000000,"Has" \n "Current" \n "Weapon"}; +item54[] = {"Find_Active_Weap",2,250,225.000000,1175.000000,325.000000,1225.000000,0.000000,"Find" \n "Active" \n "Weapon"}; +item55[] = {"Current_Weapon_Not",4,218,150.000000,1225.000000,250.000000,1275.000000,0.000000,"Current" \n "Weapon" \n "Not Selected"}; +item56[] = {"Current_Weapon_S",4,218,300.000000,1225.000000,400.000000,1275.000000,0.000000,"Current" \n "Weapon" \n "Selected"}; +item57[] = {"Select_Weapon",2,250,150.000000,1300.000000,250.000000,1350.000000,0.000000,"Select" \n "Weapon"}; +item58[] = {"true",8,218,225.000000,1375.000000,325.000000,1425.000000,0.000000,"true"}; +item59[] = {"Do_nothing",2,250,300.000000,1300.000000,400.000000,1350.000000,0.000000,"Do nothing"}; +item60[] = {"Check_New_Player",2,250,-25.000000,875.000000,75.000000,925.000000,0.000000,"Check" \n "New Player" \n "Setup"}; +item61[] = {"check_new__player",4,218,-150.000000,925.000000,-50.000000,975.000000,0.000000,"check new " \n "player not null"}; +item62[] = {"true",8,218,-150.000000,-325.000000,-50.000000,-275.000000,0.000000,"true"}; +item63[] = {"Process_1",2,250,-25.000000,-275.000000,75.000000,-225.000000,0.000000,"Process"}; +item64[] = {"Wait_ArmA_Loading",4,218,-150.000000,-225.000000,-50.000000,-175.000000,0.000000,"Wait ArmA" \n "Loading Screen" \n "Done"}; +item65[] = {"Start_Loading_Sc",2,250,-25.000000,-175.000000,75.000000,-125.000000,0.000000,"Start Loading" \n "Screen"}; +item66[] = {"freshServer",4,218,-325.000000,225.000000,-225.000000,275.000000,0.000000,"freshServer"}; +item67[] = {"Update_Loadingscreen",2,250,-325.000000,300.000000,-225.000000,350.000000,0.000000,"Update" \n "Loadingscreen" \n "Message"}; +item68[] = {"true",8,218,-150.000000,300.000000,-50.000000,350.000000,0.000000,"true"}; +item69[] = {"Timeout_",4,218,125.000000,975.000000,225.000000,1025.000000,0.000000,"" \n "Timeout" \n ""}; +item70[] = {"ERROR_Player_Setup",2,250,275.000000,975.000000,375.000000,1025.000000,0.000000,"ERROR" \n "Player Setup" \n "Invalid"}; +item71[] = {"",7,210,471.000000,996.000000,479.000000,1004.000000,0.000000,""}; +item72[] = {"Server_Version_C",2,250,-25.000000,475.000000,75.000000,525.000000,0.000000,"Server Version" \n "Check"}; +item73[] = {"Version_Okay",4,218,-125.000000,525.000000,-25.000000,575.000000,0.000000,"Version" \n "Okay"}; +item74[] = {"",7,210,471.000000,496.000000,479.000000,504.000000,0.000000,""}; +item75[] = {"ERROR_Server_not_3",2,250,275.000000,575.000000,375.000000,625.000000,0.000000,"ERROR" \n "Server not" \n "Response"}; +item76[] = {"",7,210,471.000000,596.000000,479.000000,604.000000,0.000000,""}; +item77[] = {"new_character",4,218,-250.000000,675.000000,-150.000000,725.000000,10.000000,"new" \n "character"}; +item78[] = {"Hive_Response",4,218,-125.000000,625.000000,-25.000000,675.000000,0.000000,"Hive" \n "Response"}; +item79[] = {"load_old_charact",4,218,-125.000000,725.000000,-25.000000,775.000000,0.000000,"load old" \n "character"}; +item80[] = {"Process_2",2,250,-25.000000,675.000000,75.000000,725.000000,0.000000,"Process"}; +item81[] = {"Open_Gender_Selection",2,250,-400.000000,675.000000,-300.000000,725.000000,0.000000,"Open Gender" \n "Selection Dialog"}; +item82[] = {"Reopen_when_client",4,218,-400.000000,600.000000,-300.000000,650.000000,0.000000,"Reopen" \n "when client hit" \n "escape"}; +item83[] = {"Gender_Selected",4,218,-450.000000,750.000000,-350.000000,800.000000,10.000000,"Gender" \n "Selected"}; +item84[] = {"Timeout",4,218,-350.000000,750.000000,-250.000000,800.000000,0.000000,"Timeout"}; +item85[] = {"Send_character_s",2,250,-400.000000,825.000000,-300.000000,875.000000,0.000000,"Send" \n "character" \n "selection"}; +item86[] = {"Process_3",2,250,-25.000000,775.000000,75.000000,825.000000,0.000000,"Process"}; +item87[] = {"ERROR_Server_not_4",2,250,275.000000,775.000000,375.000000,825.000000,0.000000,"ERROR" \n "Server not" \n "Response"}; +link0[] = {0,62}; +link1[] = {2,3}; +link2[] = {3,7}; +link3[] = {3,44}; +link4[] = {4,5}; +link5[] = {5,6}; +link6[] = {5,12}; +link7[] = {6,39}; +link8[] = {7,9}; +link9[] = {8,48}; +link10[] = {9,8}; +link11[] = {10,28}; +link12[] = {11,72}; +link13[] = {12,13}; +link14[] = {13,14}; +link15[] = {14,42}; +link16[] = {15,20}; +link17[] = {16,60}; +link18[] = {17,24}; +link19[] = {18,19}; +link20[] = {18,78}; +link21[] = {19,75}; +link22[] = {20,21}; +link23[] = {21,71}; +link24[] = {22,87}; +link25[] = {23,25}; +link26[] = {24,50}; +link27[] = {25,74}; +link28[] = {26,10}; +link29[] = {27,49}; +link30[] = {27,69}; +link31[] = {28,43}; +link32[] = {29,1}; +link33[] = {31,21}; +link34[] = {32,33}; +link35[] = {33,26}; +link36[] = {34,35}; +link37[] = {35,11}; +link38[] = {35,36}; +link39[] = {36,37}; +link40[] = {37,38}; +link41[] = {38,74}; +link42[] = {39,34}; +link43[] = {39,40}; +link44[] = {39,66}; +link45[] = {40,41}; +link46[] = {41,42}; +link47[] = {42,38}; +link48[] = {44,45}; +link49[] = {45,4}; +link50[] = {45,46}; +link51[] = {46,47}; +link52[] = {47,48}; +link53[] = {48,14}; +link54[] = {49,17}; +link55[] = {50,51}; +link56[] = {50,53}; +link57[] = {51,52}; +link58[] = {52,29}; +link59[] = {53,54}; +link60[] = {54,55}; +link61[] = {54,56}; +link62[] = {55,57}; +link63[] = {56,59}; +link64[] = {57,58}; +link65[] = {58,52}; +link66[] = {59,58}; +link67[] = {60,15}; +link68[] = {60,61}; +link69[] = {61,27}; +link70[] = {62,63}; +link71[] = {63,64}; +link72[] = {64,65}; +link73[] = {65,2}; +link74[] = {66,67}; +link75[] = {67,68}; +link76[] = {68,39}; +link77[] = {69,70}; +link78[] = {70,71}; +link79[] = {71,32}; +link80[] = {72,23}; +link81[] = {72,73}; +link82[] = {73,18}; +link83[] = {74,76}; +link84[] = {75,76}; +link85[] = {76,31}; +link86[] = {77,81}; +link87[] = {78,80}; +link88[] = {79,86}; +link89[] = {80,77}; +link90[] = {80,79}; +link91[] = {81,82}; +link92[] = {81,83}; +link93[] = {81,84}; +link94[] = {82,81}; +link95[] = {83,85}; +link96[] = {84,85}; +link97[] = {85,79}; +link98[] = {86,16}; +link99[] = {86,22}; +link100[] = {87,31}; +globals[] = {0.000000,0,0,0,0,640,480,1,244,6316128,1,-207.564026,582.257507,1932.771484,781.734619,586,854,1}; +window[] = {2,-1,-1,-1,-1,838,1706,2998,26,3,604}; +*//*%FSM*/ +class FSM +{ + fsmName = "Epoch Login"; + class States + { + /*%FSM*/ + class INIT + { + name = "INIT"; + init = /*%FSM*/"titleCut ["""", ""BLACK FADED"", 1337];" \n + "0 fadeSound 0;" \n + "player enableSimulation false;" \n + "" \n + "_debug = true;" \n + "_myTime = diag_tickTime;" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Init"";" \n + "};" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Process_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class FINISH + { + name = "FINISH"; + init = /*%FSM*/"[] spawn {" \n + " disableSerialization;" \n + " waitUntil{!isNull (findDisplay 46)};" \n + " _display = findDisplay 46;" \n + " {" \n + " _display displayAddEventHandler [_x,([""CfgEpochClient"", _x, """"] call EPOCH_fnc_returnConfigEntryV2)];" \n + " } forEach ([""CfgEpochClient"", ""displayAddEventHandler"", []] call EPOCH_fnc_returnConfigEntryV2);" \n + " " \n + " player switchMove """";" \n + "};" \n + "" \n + "3 fadeSound 1;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Finish!"";" \n + "};" \n + "" \n + "" \n + "" \n + "player enableSimulation true;" \n + "" \n + "titleCut ["""", ""BLACK IN"", 1];" \n + "1338 cutText ["""",""PLAIN"",0]; " \n + "" \n + "progressLoadingScreen 1.0;" \n + "" \n + "endLoadingScreen;" \n + "EPOCH_loadingScreenDone = true;" \n + "" \n + "hintSilent ""Worked"" "/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + }; + }; + /*%FSM*/ + /*%FSM*/ + class Version_Check + { + name = "Version_Check"; + init = /*%FSM*/"if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Version Check"";" \n + "};" \n + "" \n + "// SHOULD BE:" \n + "_epoch_assets0 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_assets"");" \n + "_epoch_assets1 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_assets_1"");" \n + "_epoch_assets2 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""epoch_objects"");" \n + "_epoch_assets3 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_assets_3"");" \n + "_epoch_config = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_config"");" \n + "_epoch_language = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_language"");" \n + "_epoch_underground = getText(configFile >> ""Epoch"" >> ""Version"" >> ""Underground_Epoch"");" \n + "_epoch_vehicles = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_vehicles"");" \n + "_epoch_weapons = getText(configFile >> ""Epoch"" >> ""Version"" >> ""a3_epoch_weapons"");" \n + "" \n + "" \n + "// IS:" \n + "_my_epoch_assets0 = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_assets"" >> ""epochVersion"");" \n + "_my_epoch_assets1 = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_assets_1"" >> ""epochVersion"");" \n + "_my_epoch_assets2 = getText(configFile >> ""CfgPatches"" >> ""epoch_objects"" >> ""epochVersion"");" \n + "_my_epoch_assets3 = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_assets_3"" >> ""epochVersion"");" \n + "_my_epoch_config = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_config"" >> ""epochVersion"");" \n + "_my_epoch_language = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_language"" >> ""epochVersion"");" \n + "_my_epoch_underground = getText(configFile >> ""CfgPatches"" >> ""Underground_Epoch"" >> ""epochVersion"");" \n + "_my_epoch_vehicles = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_vehicles"" >> ""epochVersion"");" \n + "_my_epoch_weapons = getText(configFile >> ""CfgPatches"" >> ""a3_epoch_weapons"" >> ""epochVersion"");" \n + "" \n + "progressLoadingScreen 0.1;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Wrong_Version + { + priority = 10.000000; + to="ERROR_Wrong_Version"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_epoch_assets0 != _epoch_assets0 ||" \n + "_my_epoch_assets1 != _epoch_assets1 ||" \n + "_my_epoch_assets2 != _epoch_assets2 ||" \n + "_my_epoch_assets3 != _epoch_assets3 ||" \n + "_my_epoch_config != _epoch_config ||" \n + "_my_epoch_language != _epoch_language ||" \n + "_my_epoch_underground != _epoch_underground ||" \n + "_my_epoch_vehicles != _epoch_vehicles ||" \n + "_my_epoch_weapons != _epoch_weapons"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class true + { + priority = 0.000000; + to="Arma_Version_Che"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_Player_UID + { + name = "Check_Player_UID"; + init = /*%FSM*/"if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Check PlayerUID"";" \n + "};" \n + "" \n + "_playerUID = getPlayerUID player;" \n + "" \n + "progressLoadingScreen 0.2;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class PlayerUID_Okay + { + priority = 10.000000; + to="Check_Server_1"; + precondition = /*%FSM*/"!isNil ""_playerUID"""/*%FSM*/; + condition=/*%FSM*/"_playerUID != """""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Empty_PlayerUID + { + priority = 0.000000; + to="ERROR_PlayerUID"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Wrong_Version + { + name = "ERROR_Wrong_Version"; + init = /*%FSM*/"_msg = ""You have an outdated version of Epoch"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_EPOCHVERSION = true;" \n + " publicVariableServer ""PLAYER_REJECT_EPOCHVERSION"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Disconnect + { + name = "Disconnect"; + init = /*%FSM*/"endLoadingScreen;" \n + "1338 cutText [_msg,""PLAIN"",0]; " \n + "deleteVehicle player;" \n + "call _rejectPlayer;" \n + "diag_log format [""(%1) %2"",diag_tickTime,_msg];" \n + "_myTime = diag_tickTime;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Check_if_Player + { + priority = 0.000000; + to="Reject_without_B"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 2"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_PlayerUID + { + name = "ERROR_PlayerUID"; + init = /*%FSM*/"_msg = ""Can not setup Player Object! (Error 01)"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_UID = true;" \n + " publicVariableServer ""PLAYER_REJECT_UID"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Setup_Player_Var + { + name = "Setup_Player_Var"; + init = /*%FSM*/"diag_log format[""DEBUG TIME WAITED: %1"", (diag_tickTime - _myTime)];" \n + "{" \n + " missionNamespace setVariable[(format[""EPOCH_player%1"", EPOCH_customVars select _forEachIndex]), _x];" \n + "} forEach _playerVariables;" \n + "" \n + """Loading Player Variables... Please wait!"" call Epoch_updateLoadingScreen;" \n + "" \n + "EPOCH_lastPlayerPos = getPosATL vehicle player;" \n + "" \n + "progressLoadingScreen 0.7;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Setup Player Variables"";" \n + "};" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Setup_EH_s_and_H"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Request_Hive + { + name = "Request_Hive"; + init = /*%FSM*/"_myTime = diag_tickTime;" \n + "" \n + "Epoch_my_Group = [];" \n + "" \n + "player remoteExec [""EPOCH_server_checkPlayer"",2];" \n + "" \n + "" \n + """Loading Player Data... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.5;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Hive_Response + { + priority = 0.000000; + to="Process_2"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_checkPlayer_PVC"""/*%FSM*/; + action=/*%FSM*/"_newChar = EPOCH_checkPlayer_PVC;" \n + "EPOCH_checkPlayer_PVC = nil;"/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not_3"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 120"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not + { + name = "ERROR_Server_not"; + init = /*%FSM*/"_msg = ""Authentication Failed, Disconnect and try again"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_NoResponse2 = true;" \n + " publicVariableServer ""PLAYER_REJECT_NoResponse2"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Wrong_Server + { + name = "ERROR_Wrong_Server"; + init = /*%FSM*/"_msg = format[""Server and Client running with different Version! (You: %1 // Server: %2)"",getText(configFile >> ""CfgMods"" >> ""Epoch"" >> ""version""),_serverVersion];" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_ServerVersion = true;" \n + " publicVariableServer ""PLAYER_REJECT_ServerVersion"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Setup_Player_Obj + { + name = "Setup_Player_Obj"; + init = /*%FSM*/"_ply = player;" \n + "_group = group player;" \n + "" \n + "player reveal _playerObject;" \n + "_playerPos = getposATL _playerObject;" \n + "" \n + "selectPlayer _playerObject;" \n + "" \n + "deleteVehicle _ply;" \n + "deleteGroup _group;" \n + "" \n + """Loading Player Body... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.8;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Setup Player Object"";" \n + "};" \n + "" \n + "_myTime = diag_tickTime;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Timeout_ + { + priority = 0.000000; + to="ERROR_Player_Setup"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 60"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class new_player_____p + { + priority = 0.000000; + to="Setup_Player_Var"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_playerObject == player"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Display_Message + { + name = "Display_Message"; + init = /*%FSM*/"[] spawn {" \n + " waitUntil{!isNull (findDisplay 46)};" \n + " (findDisplay 46) displayAddEventHandler [""KeyDown"",""true""];" \n + " (findDisplay 46) displayAddEventHandler [""KeyUp"",""true""];" \n + "};" \n + "diag_log format [""(%1) %2"",diag_tickTime,_msg];" \n + "_myTime = diag_tickTime;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Display_Message + { + priority = 0.000000; + to="Disconnect"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 10"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_Server + { + name = "Check_Server"; + init = /*%FSM*/"_myTime = diag_tickTime;" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Check Server"";" \n + "};" \n + """Checking Server... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.4;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Server_not_worki + { + priority = 10.000000; + to="ERROR_Server_not_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_BADHIVE""" \n + ""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Server_Okay + { + priority = 0.000000; + to="Server_Version_C"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""Epoch_ServerVersion"""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_1 + { + name = "ERROR_Server_not_1"; + init = /*%FSM*/"_msg = ""Server not Ready (Error 03)"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_NotReady2 = true;" \n + " publicVariableServer ""PLAYER_REJECT_NotReady2"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_Server_1 + { + name = "Check_Server_1"; + init = /*%FSM*/"progressLoadingScreen 0.3;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not_2"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 180"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class freshServer + { + priority = 0.000000; + to="Update_Loadingscreen"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"uiNamespace getVariable ['Epoch_freshServer', false]"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Server_Ready + { + priority = 0.000000; + to="Check_Server"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_SERVER"""/*%FSM*/; + action=/*%FSM*/"_serverUptime = EPOCH_SERVER;" \n + "EPOCH_SERVER = nil;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_2 + { + name = "ERROR_Server_not_2"; + init = /*%FSM*/"_msg = ""Server not Ready (Error 02)"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_NotReady1 = true;" \n + " publicVariableServer ""PLAYER_REJECT_NotReady1"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Reject_without_B + { + name = "Reject_without_B"; + init = /*%FSM*/"[] spawn {" \n + " waitUntil{!isNull (findDisplay 46)};" \n + " waitUntil {" \n + " (findDisplay 46) closeDisplay 0;" \n + " isNull (findDisplay 46)" \n + " };" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + }; + }; + /*%FSM*/ + /*%FSM*/ + class Arma_Version_Che + { + name = "Arma_Version_Che"; + init = /*%FSM*/"progressLoadingScreen 0.15;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Outdated_Version + { + priority = 10.000000; + to="ERROR_Wrong_Version_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"productVersion select 2 < getNumber(configFile >> ""CfgMods"" >> ""Epoch"" >> ""ArmAVersion"")"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Player_Object_Re + { + priority = 0.000000; + to="Check_Player_UID"; + precondition = /*%FSM*/"!isNull player"/*%FSM*/; + condition=/*%FSM*/"player == player"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Wrong_Version_1 + { + name = "ERROR_Wrong_Version_1"; + init = /*%FSM*/"_msg = ""You have an outdated version of ArmA 3"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_ARMAVERSION = true;" \n + " publicVariableServer ""PLAYER_REJECT_ARMAVERSION"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Setup_EH_s_and_H + { + name = "Setup_EH_s_and_H"; + init = /*%FSM*/"{" \n + " player addEventHandler [_x,([""CfgEpochClient"", _x, """"] call EPOCH_fnc_returnConfigEntryV2)];" \n + "} forEach ([""CfgEpochClient"", ""addEventHandler"", []] call EPOCH_fnc_returnConfigEntryV2);" \n + "" \n + "if (count EPOCH_playerHitPoints isEqualTo count ((getAllHitPointsDamage player) param [0,[]])) then {" \n + " {" \n + " player setHitIndex [_forEachIndex, _x];" \n + " }forEach EPOCH_playerHitPoints;" \n + "};" \n + "" \n + "[] spawn EPOCH_masterLoop;" \n + "true call EPOCH_fnc_Weather;" \n + "[5,100] spawn EPOCH_niteLight;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Setup EH's"";" \n + "};" \n + "" \n + """Loading... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.9;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Has_Current_Weap + { + priority = 10.000000; + to="Find_Active_Weap"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_currentWeapon != """""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class no_weapons + { + priority = 0.000000; + to="Process"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_currentWeapon == """""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process + { + name = "Process"; + init = /*%FSM*/"progressLoadingScreen 0.975;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Preload_done + { + priority = 0.000000; + to="FINISH"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"preloadCamera _playerPos"/*%FSM*/; + action=/*%FSM*/"call compile _playerGroupOnline;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Find_Active_Weap + { + name = "Find_Active_Weap"; + init = /*%FSM*/"_activeWeapon = currentWeapon player;" \n + "progressLoadingScreen 0.95;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Current_Weapon_S + { + priority = 0.000000; + to="Do_nothing"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_activeWeapon == _currentWeapon"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Current_Weapon_Not + { + priority = 0.000000; + to="Select_Weapon"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_activeWeapon != _currentWeapon"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Select_Weapon + { + name = "Select_Weapon"; + init = /*%FSM*/"_currentWeapon spawn {" \n + " uiSleep 1; " \n + " player selectWeapon _this;" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Process"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Do_nothing + { + name = "Do_nothing"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Process"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_New_Player + { + name = "Check_New_Player"; + init = /*%FSM*/"_myTime = diag_tickTime;" \n + "" \n + """Loading Player Inventory... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.6;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class check_new__player + { + priority = 0.000000; + to="Setup_Player_Obj"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!(isNull _playerObject) && {_playerObject getVariable [""SETUP"",false]}"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 120"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process_1 + { + name = "Process_1"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Wait_ArmA_Loading + { + priority = 0.000000; + to="Start_Loading_Sc"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"{!isnull _x} count ((uinamespace getvariable ""loading_displays"") - [finddisplay 18]) == 0"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Start_Loading_Sc + { + name = "Start_Loading_Sc"; + init = /*%FSM*/"startLoadingScreen ["""",""EpochLoadingScreen""];" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Start Loadingscreen"";" \n + "};" \n + """Starting Epoch... Please wait!"" call Epoch_updateLoadingScreen;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Version_Check"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Update_Loadingscreen + { + name = "Update_Loadingscreen"; + init = /*%FSM*/"uiNamespace setVariable ['Epoch_freshServer', false];" \n + "" \n + """Server initializing... Please wait!"" call Epoch_updateLoadingScreen;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Check_Server_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Player_Setup + { + name = "ERROR_Player_Setup"; + init = /*%FSM*/"_msg = ""Problem setting up player"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_InvaildSetup = true;" \n + " publicVariableServer ""PLAYER_REJECT_InvaildSetup"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Server_Version_C + { + name = "Server_Version_C"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Wrong_Server_Ver + { + priority = 10.000000; + to="ERROR_Wrong_Server"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"Epoch_ServerVersion != getText(configFile >> ""CfgMods"" >> ""Epoch"" >> ""version"")"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Version_Okay + { + priority = 0.000000; + to="Request_Hive"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_3 + { + name = "ERROR_Server_not_3"; + init = /*%FSM*/"_msg = ""Authentication Failed, Disconnect and try again"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_HiveNotResponse = true;" \n + " publicVariableServer ""PLAYER_REJECT_HiveNotResponse"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process_2 + { + name = "Process_2"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class new_character + { + priority = 10.000000; + to="Open_Gender_Selection"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_newChar"/*%FSM*/; + action=/*%FSM*/"endLoadingScreen;" \n + "_myGenderTime = diag_tickTime;"/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class load_old_charact + { + priority = 0.000000; + to="Process_3"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/"_myTime = diag_tickTime;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Open_Gender_Selection + { + name = "Open_Gender_Selection"; + init = /*%FSM*/"createdialog ""SelectGender"";"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Gender_Selected + { + priority = 10.000000; + to="Send_character_s"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_PlayerIsMale"""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Timeout + { + priority = 0.000000; + to="Send_character_s"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"((diag_tickTime - _myGenderTime) > 30)"/*%FSM*/; + action=/*%FSM*/"EPOCH_PlayerIsMale = true;" \n + "closeDialog 0;"/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Reopen_when_client + { + priority = 0.000000; + to="Open_Gender_Selection"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!dialog && isNil ""EPOCH_PlayerIsMale"""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Send_character_s + { + name = "Send_character_s"; + init = /*%FSM*/"startLoadingScreen ["""",""EpochLoadingScreen""];" \n + """Gender Selected... Please wait!"" call Epoch_updateLoadingScreen;" \n + "" \n + "[player,EPOCH_PlayerIsMale] remoteExec [""EPOCH_server_loadPlayer"",2];" \n + "EPOCH_PlayerIsMale = nil;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class load_old_charact + { + priority = 0.000000; + to="Process_3"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/"_myTime = diag_tickTime;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process_3 + { + name = "Process_3"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not_4"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 120"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Response + { + priority = 0.000000; + to="Check_New_Player"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_C_SET"""/*%FSM*/; + action=/*%FSM*/"_array = EPOCH_C_SET;" \n + "EPOCH_C_SET = nil;" \n + "_playerObject = _array deleteAt 0;" \n + "_playerVariables = _array deleteAt 0;" \n + "_currentWeapon = _array deleteAt 0;" \n + "_magCount = _array deleteAt 0;" \n + "Epoch_my_GroupUID = _array deleteAt 0;" \n + "Epoch_canBeRevived = _array deleteAt 0;" \n + "Epoch_personalToken = _array deleteAt 0;" \n + "reverse _serverUptime;" \n + "_serverUptime pushBack (_array deleteAt 0);" \n + "reverse _serverUptime;" \n + "_serverUptime call EPOCH_client_publicEH;" \n + "_playerGroupOnline = _array deleteAt 0;" \n + "" \n + ""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_4 + { + name = "ERROR_Server_not_4"; + init = /*%FSM*/"_msg = ""Authentication Failed, Disconnect and try again"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_HiveLoadChar = true;" \n + " publicVariableServer ""PLAYER_REJECT_HiveLoadChar"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + }; + initState="INIT"; + finalStates[] = + { + "FINISH", + "Reject_without_B", + }; +}; +/*%FSM*/ \ No newline at end of file diff --git a/Sources/mpmissions/epoch.Stratis/description.ext b/Sources/mpmissions/epoch.Stratis/description.ext index cfe65cba..8783e3aa 100644 --- a/Sources/mpmissions/epoch.Stratis/description.ext +++ b/Sources/mpmissions/epoch.Stratis/description.ext @@ -50,6 +50,7 @@ class cfgFunctions }; class postinit { + file = "init\fn_postinit.sqf"; postInit = 1; }; }; diff --git a/Sources/mpmissions/epoch.Stratis/init/client_init.sqf b/Sources/mpmissions/epoch.Stratis/init/client_init.sqf new file mode 100644 index 00000000..4a32e342 --- /dev/null +++ b/Sources/mpmissions/epoch.Stratis/init/client_init.sqf @@ -0,0 +1,76 @@ +/* + 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: + https://github.com/EpochModTeam/Epoch/tree/master/Sources/epoch_code/init/client_init.sqf +*/ +//Variables +EPOCH_CraftingItem = ""; +EPOCH_ESP_TARGETS = []; +EPOCH_ESPMAP_TARGETS = []; +EPOCH_ESPGROUPS = []; +EPOCH_ESPGROUPCOLORS = []; +EPOCH_ESP_PLAYER = false; +EPOCH_ESP_VEHICLES = false; +EPOCH_ESP_VEHICLEPLAYER = []; +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"]; +if (isNil 'EPOCH_diag_fps') then { + EPOCH_diag_fps = 0; +}; +EPOCH_playerIsSwimming = false; +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 = []; +EPOCH_lastPlayerPos = [0,0,0]; +EPOCH_prevOffer = []; +EPOCH_drawIcon3d = false; +EPOCH_velTransform = false; +EPOCH_stabilityTarget = objNull; +EPOCH_currentVehicle = objNull; +EPOCH_currentTarget = objNull; +EPOCH_LootedBlds = []; +EPOCH_soundLevel = 1; +EPOCH_arr_interactedObjs = []; +EPOCH_buildOption = 0; +EPOCH_nearestLocations = []; +onEachFrame EPOCH_onEachFrame; + +EPOCH_LastAirDrop = time; +EPOCH_AirDropCheck = getNumber(missionConfigFile >> "CfgEpochAirDrop" >> "AirDropFreq"); +if(EPOCH_AirDropCheck < 120)then{EPOCH_AirDropCheck = 120;}; +EPOCH_AirDropChance = getNumber(missionConfigFile >> "CfgEpochAirDrop" >> "AirDropChance"); +if(EPOCH_AirDropChance < 0)then{EPOCH_AirDropChance = 101;EPOCH_AirDropCheck = 99999;}; + +EPOCH_droneRndChance = 100; + +// Custom Keys +EPOCH_keysActionPressed = false; //prevents EH spam +0 call EPOCH_clientKeyMap; + +//ON INIT and RESPAWN +call EPOCH_clientInit; + +[] execFSM "\x\addons\a3_epoch_code\system\SPVEH.fsm"; +[] execFSM "system\player_login.fsm"; + +true diff --git a/Sources/mpmissions/epoch.Stratis/init/fn_postinit.sqf b/Sources/mpmissions/epoch.Stratis/init/fn_postinit.sqf new file mode 100644 index 00000000..8be5aa09 --- /dev/null +++ b/Sources/mpmissions/epoch.Stratis/init/fn_postinit.sqf @@ -0,0 +1,18 @@ +/* + Author: Aaron Clark - EpochMod.com + + Contributors: + + Description: + Initalize Player + + 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/master/Sources/epoch_code/init/fn_postinit.sqf +*/ +if (!isDedicated && isMultiplayer && hasInterface) then { + call compile preprocessFileLineNumbers "init\client_init.sqf"; +}; +true diff --git a/Sources/mpmissions/epoch.Takistan/System/player_login.fsm b/Sources/mpmissions/epoch.Takistan/System/player_login.fsm new file mode 100644 index 00000000..9426567f --- /dev/null +++ b/Sources/mpmissions/epoch.Takistan/System/player_login.fsm @@ -0,0 +1,1398 @@ +/*%FSM*/ +/*%FSM*/ +/* +item0[] = {"INIT",0,250,-25.000000,-375.000000,75.000000,-325.000000,0.000000,"INIT"}; +item1[] = {"FINISH",1,4346,-25.000000,1475.000000,75.000000,1525.000000,0.000000,"FINISH"}; +item2[] = {"true",8,218,-150.000000,-125.000000,-50.000000,-75.000000,0.000000,"true"}; +item3[] = {"Version_Check",2,250,-25.000000,-75.000000,75.000000,-25.000000,0.000000,"Version Check"}; +item4[] = {"Player_Object_Re",4,218,-150.000000,75.000000,-50.000000,125.000000,0.000000,"Player" \n "Object Ready"}; +item5[] = {"Check_Player_UID",2,250,-25.000000,125.000000,75.000000,175.000000,0.000000,"Check Player UID"}; +item6[] = {"PlayerUID_Okay",4,218,-150.000000,175.000000,-50.000000,225.000000,10.000000,"PlayerUID" \n "Okay"}; +item7[] = {"Wrong_Version",4,218,125.000000,-75.000000,225.000000,-25.000000,10.000000,"Wrong" \n "Version"}; +item8[] = {"",7,210,471.000061,-54.000099,478.999939,-45.999901,0.000000,""}; +item9[] = {"ERROR_Wrong_Version",2,250,275.000000,-75.000000,375.000000,-25.000000,0.000000,"ERROR" \n "Wrong Version" \n "Epoch"}; +item10[] = {"Disconnect",2,250,600.000000,1225.000000,700.000000,1275.000000,0.000000,"Disconnect"}; +item11[] = {"Server_Okay",4,218,-125.000000,425.000000,-25.000000,475.000000,0.000000,"Server" \n "Okay"}; +item12[] = {"Empty_PlayerUID",4,218,125.000000,125.000000,225.000000,175.000000,0.000000,"Empty" \n "PlayerUID"}; +item13[] = {"ERROR_PlayerUID",2,250,275.000000,125.000000,375.000000,175.000000,0.000000,"ERROR" \n "PlayerUID Empty"}; +item14[] = {"",7,210,471.000061,145.999908,478.999939,154.000092,0.000000,""}; +item15[] = {"Timeout_No_Respo",4,218,125.000000,875.000000,225.000000,925.000000,0.000000,"Timeout" \n "No Response"}; +item16[] = {"Response",4,218,-150.000000,825.000000,-50.000000,875.000000,0.000000,"Response"}; +item17[] = {"Setup_Player_Var",2,250,-25.000000,1075.000000,75.000000,1125.000000,0.000000,"Setup Player" \n "Variables"}; +item18[] = {"Request_Hive",2,250,-25.000000,575.000000,75.000000,625.000000,0.000000,"Request Hive"}; +item19[] = {"Timeout_No_Respo",4,218,125.000000,575.000000,225.000000,625.000000,0.000000,"Timeout" \n "No Response"}; +item20[] = {"ERROR_Server_not",2,250,275.000000,875.000000,375.000000,925.000000,0.000000,"ERROR" \n "Server not" \n "Response"}; +item21[] = {"",7,210,471.000000,895.999939,479.000000,904.000061,0.000000,""}; +item22[] = {"Timeout_No_Respo",4,218,125.000000,775.000000,225.000000,825.000000,0.000000,"Timeout" \n "No Response"}; +item23[] = {"Wrong_Server_Ver",4,218,125.000000,475.000000,225.000000,525.000000,10.000000,"Wrong" \n "Server Version"}; +item24[] = {"true",8,218,-150.000000,1125.000000,-50.000000,1175.000000,0.000000,"true"}; +item25[] = {"ERROR_Wrong_Server",2,250,275.000000,475.000000,375.000000,525.000000,0.000000,"ERROR" \n "Wrong" \n "Server Version"}; +item26[] = {"Display_Message",4,218,600.000000,1150.000000,700.000000,1200.000000,0.000000,"" \n "Display Message" \n "Wait..."}; +item27[] = {"Setup_Player_Obj",2,250,-25.000000,975.000000,75.000000,1025.000000,0.000000,"Setup Player" \n "Object"}; +item28[] = {"Check_if_Player",4,218,750.000000,1225.000000,850.000000,1275.000000,0.000000,"Check if" \n "Player got Kicked"}; +item29[] = {"Preload_done",8,218,-150.000000,1425.000000,-50.000000,1475.000000,0.000000,"Preload" \n "done"}; +item30[] = {"",7,210,471.000000,796.000000,479.000000,804.000000,0.000000,""}; +item31[] = {"",7,210,471.000000,796.000000,479.000000,804.000000,0.000000,""}; +item32[] = {"true",8,218,425.000000,1075.000000,525.000000,1125.000000,0.000000,"true"}; +item33[] = {"Display_Message",2,250,600.000000,1075.000000,700.000000,1125.000000,0.000000,"Display" \n "Message"}; +item34[] = {"Server_Ready",4,218,-25.000000,300.000000,75.000000,350.000000,0.000000,"Server" \n "Ready"}; +item35[] = {"Check_Server",2,250,-25.000000,375.000000,75.000000,425.000000,0.000000,"Check Server"}; +item36[] = {"Server_not_worki",4,218,125.000000,375.000000,225.000000,425.000000,10.000000,"Server" \n "not working"}; +item37[] = {"ERROR_Server_not_1",2,250,275.000000,375.000000,375.000000,425.000000,0.000000,"ERROR" \n "Server not Ready"}; +item38[] = {"",7,210,471.000000,396.000000,479.000000,404.000000,0.000000,""}; +item39[] = {"Check_Server_1",2,250,-25.000000,225.000000,75.000000,275.000000,0.000000,"Check Server"}; +item40[] = {"Timeout_No_Respo",4,218,125.000000,225.000000,225.000000,275.000000,0.000000,"Timeout" \n "No Response"}; +item41[] = {"ERROR_Server_not_2",2,250,275.000000,225.000000,375.000000,275.000000,0.000000,"ERROR" \n "Server not Ready"}; +item42[] = {"",7,210,471.000000,246.000031,479.000000,253.999969,0.000000,""}; +item43[] = {"Reject_without_B",1,250,900.000000,1225.000000,1000.000000,1275.000000,0.000000,"Reject without" \n "BattlEye"}; +item44[] = {"true",8,218,-150.000000,-25.000000,-50.000000,25.000000,0.000000,"true"}; +item45[] = {"Arma_Version_Che",2,250,-25.000000,25.000000,75.000000,75.000000,0.000000,"Arma Version" \n "Check"}; +item46[] = {"Outdated_Version",4,218,125.000000,25.000000,225.000000,75.000000,10.000000,"Outdated" \n "Version"}; +item47[] = {"ERROR_Wrong_Version_1",2,250,275.000000,25.000000,375.000000,75.000000,0.000000,"ERROR" \n "Wrong Version" \n "ArmA"}; +item48[] = {"",7,210,471.000061,45.999908,478.999939,54.000092,0.000000,""}; +item49[] = {"new_player_____p",4,218,-150.000000,1025.000000,-50.000000,1075.000000,0.000000,"new player == " \n "player"}; +item50[] = {"Setup_EH_s_and_H",2,250,-25.000000,1175.000000,75.000000,1225.000000,0.000000,"Setup EH's" \n "and" \n "HitPoints"}; +item51[] = {"no_weapons",4,218,-25.000000,1275.000000,75.000000,1325.000000,0.000000,"no weapons"}; +item52[] = {"Process",2,250,-25.000000,1375.000000,75.000000,1425.000000,0.000000,"Process"}; +item53[] = {"Has_Current_Weap",4,218,100.000000,1175.000000,200.000000,1225.000000,10.000000,"Has" \n "Current" \n "Weapon"}; +item54[] = {"Find_Active_Weap",2,250,225.000000,1175.000000,325.000000,1225.000000,0.000000,"Find" \n "Active" \n "Weapon"}; +item55[] = {"Current_Weapon_Not",4,218,150.000000,1225.000000,250.000000,1275.000000,0.000000,"Current" \n "Weapon" \n "Not Selected"}; +item56[] = {"Current_Weapon_S",4,218,300.000000,1225.000000,400.000000,1275.000000,0.000000,"Current" \n "Weapon" \n "Selected"}; +item57[] = {"Select_Weapon",2,250,150.000000,1300.000000,250.000000,1350.000000,0.000000,"Select" \n "Weapon"}; +item58[] = {"true",8,218,225.000000,1375.000000,325.000000,1425.000000,0.000000,"true"}; +item59[] = {"Do_nothing",2,250,300.000000,1300.000000,400.000000,1350.000000,0.000000,"Do nothing"}; +item60[] = {"Check_New_Player",2,250,-25.000000,875.000000,75.000000,925.000000,0.000000,"Check" \n "New Player" \n "Setup"}; +item61[] = {"check_new__player",4,218,-150.000000,925.000000,-50.000000,975.000000,0.000000,"check new " \n "player not null"}; +item62[] = {"true",8,218,-150.000000,-325.000000,-50.000000,-275.000000,0.000000,"true"}; +item63[] = {"Process_1",2,250,-25.000000,-275.000000,75.000000,-225.000000,0.000000,"Process"}; +item64[] = {"Wait_ArmA_Loading",4,218,-150.000000,-225.000000,-50.000000,-175.000000,0.000000,"Wait ArmA" \n "Loading Screen" \n "Done"}; +item65[] = {"Start_Loading_Sc",2,250,-25.000000,-175.000000,75.000000,-125.000000,0.000000,"Start Loading" \n "Screen"}; +item66[] = {"freshServer",4,218,-325.000000,225.000000,-225.000000,275.000000,0.000000,"freshServer"}; +item67[] = {"Update_Loadingscreen",2,250,-325.000000,300.000000,-225.000000,350.000000,0.000000,"Update" \n "Loadingscreen" \n "Message"}; +item68[] = {"true",8,218,-150.000000,300.000000,-50.000000,350.000000,0.000000,"true"}; +item69[] = {"Timeout_",4,218,125.000000,975.000000,225.000000,1025.000000,0.000000,"" \n "Timeout" \n ""}; +item70[] = {"ERROR_Player_Setup",2,250,275.000000,975.000000,375.000000,1025.000000,0.000000,"ERROR" \n "Player Setup" \n "Invalid"}; +item71[] = {"",7,210,471.000000,996.000000,479.000000,1004.000000,0.000000,""}; +item72[] = {"Server_Version_C",2,250,-25.000000,475.000000,75.000000,525.000000,0.000000,"Server Version" \n "Check"}; +item73[] = {"Version_Okay",4,218,-125.000000,525.000000,-25.000000,575.000000,0.000000,"Version" \n "Okay"}; +item74[] = {"",7,210,471.000000,496.000000,479.000000,504.000000,0.000000,""}; +item75[] = {"ERROR_Server_not_3",2,250,275.000000,575.000000,375.000000,625.000000,0.000000,"ERROR" \n "Server not" \n "Response"}; +item76[] = {"",7,210,471.000000,596.000000,479.000000,604.000000,0.000000,""}; +item77[] = {"new_character",4,218,-250.000000,675.000000,-150.000000,725.000000,10.000000,"new" \n "character"}; +item78[] = {"Hive_Response",4,218,-125.000000,625.000000,-25.000000,675.000000,0.000000,"Hive" \n "Response"}; +item79[] = {"load_old_charact",4,218,-125.000000,725.000000,-25.000000,775.000000,0.000000,"load old" \n "character"}; +item80[] = {"Process_2",2,250,-25.000000,675.000000,75.000000,725.000000,0.000000,"Process"}; +item81[] = {"Open_Gender_Selection",2,250,-400.000000,675.000000,-300.000000,725.000000,0.000000,"Open Gender" \n "Selection Dialog"}; +item82[] = {"Reopen_when_client",4,218,-400.000000,600.000000,-300.000000,650.000000,0.000000,"Reopen" \n "when client hit" \n "escape"}; +item83[] = {"Gender_Selected",4,218,-450.000000,750.000000,-350.000000,800.000000,10.000000,"Gender" \n "Selected"}; +item84[] = {"Timeout",4,218,-350.000000,750.000000,-250.000000,800.000000,0.000000,"Timeout"}; +item85[] = {"Send_character_s",2,250,-400.000000,825.000000,-300.000000,875.000000,0.000000,"Send" \n "character" \n "selection"}; +item86[] = {"Process_3",2,250,-25.000000,775.000000,75.000000,825.000000,0.000000,"Process"}; +item87[] = {"ERROR_Server_not_4",2,250,275.000000,775.000000,375.000000,825.000000,0.000000,"ERROR" \n "Server not" \n "Response"}; +link0[] = {0,62}; +link1[] = {2,3}; +link2[] = {3,7}; +link3[] = {3,44}; +link4[] = {4,5}; +link5[] = {5,6}; +link6[] = {5,12}; +link7[] = {6,39}; +link8[] = {7,9}; +link9[] = {8,48}; +link10[] = {9,8}; +link11[] = {10,28}; +link12[] = {11,72}; +link13[] = {12,13}; +link14[] = {13,14}; +link15[] = {14,42}; +link16[] = {15,20}; +link17[] = {16,60}; +link18[] = {17,24}; +link19[] = {18,19}; +link20[] = {18,78}; +link21[] = {19,75}; +link22[] = {20,21}; +link23[] = {21,71}; +link24[] = {22,87}; +link25[] = {23,25}; +link26[] = {24,50}; +link27[] = {25,74}; +link28[] = {26,10}; +link29[] = {27,49}; +link30[] = {27,69}; +link31[] = {28,43}; +link32[] = {29,1}; +link33[] = {31,21}; +link34[] = {32,33}; +link35[] = {33,26}; +link36[] = {34,35}; +link37[] = {35,11}; +link38[] = {35,36}; +link39[] = {36,37}; +link40[] = {37,38}; +link41[] = {38,74}; +link42[] = {39,34}; +link43[] = {39,40}; +link44[] = {39,66}; +link45[] = {40,41}; +link46[] = {41,42}; +link47[] = {42,38}; +link48[] = {44,45}; +link49[] = {45,4}; +link50[] = {45,46}; +link51[] = {46,47}; +link52[] = {47,48}; +link53[] = {48,14}; +link54[] = {49,17}; +link55[] = {50,51}; +link56[] = {50,53}; +link57[] = {51,52}; +link58[] = {52,29}; +link59[] = {53,54}; +link60[] = {54,55}; +link61[] = {54,56}; +link62[] = {55,57}; +link63[] = {56,59}; +link64[] = {57,58}; +link65[] = {58,52}; +link66[] = {59,58}; +link67[] = {60,15}; +link68[] = {60,61}; +link69[] = {61,27}; +link70[] = {62,63}; +link71[] = {63,64}; +link72[] = {64,65}; +link73[] = {65,2}; +link74[] = {66,67}; +link75[] = {67,68}; +link76[] = {68,39}; +link77[] = {69,70}; +link78[] = {70,71}; +link79[] = {71,32}; +link80[] = {72,23}; +link81[] = {72,73}; +link82[] = {73,18}; +link83[] = {74,76}; +link84[] = {75,76}; +link85[] = {76,31}; +link86[] = {77,81}; +link87[] = {78,80}; +link88[] = {79,86}; +link89[] = {80,77}; +link90[] = {80,79}; +link91[] = {81,82}; +link92[] = {81,83}; +link93[] = {81,84}; +link94[] = {82,81}; +link95[] = {83,85}; +link96[] = {84,85}; +link97[] = {85,79}; +link98[] = {86,16}; +link99[] = {86,22}; +link100[] = {87,31}; +globals[] = {0.000000,0,0,0,0,640,480,1,244,6316128,1,-207.564026,582.257507,1932.771484,781.734619,586,854,1}; +window[] = {2,-1,-1,-1,-1,838,1706,2998,26,3,604}; +*//*%FSM*/ +class FSM +{ + fsmName = "Epoch Login"; + class States + { + /*%FSM*/ + class INIT + { + name = "INIT"; + init = /*%FSM*/"titleCut ["""", ""BLACK FADED"", 1337];" \n + "0 fadeSound 0;" \n + "player enableSimulation false;" \n + "" \n + "_debug = true;" \n + "_myTime = diag_tickTime;" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Init"";" \n + "};" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Process_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class FINISH + { + name = "FINISH"; + init = /*%FSM*/"[] spawn {" \n + " disableSerialization;" \n + " waitUntil{!isNull (findDisplay 46)};" \n + " _display = findDisplay 46;" \n + " {" \n + " _display displayAddEventHandler [_x,([""CfgEpochClient"", _x, """"] call EPOCH_fnc_returnConfigEntryV2)];" \n + " } forEach ([""CfgEpochClient"", ""displayAddEventHandler"", []] call EPOCH_fnc_returnConfigEntryV2);" \n + " " \n + " player switchMove """";" \n + "};" \n + "" \n + "3 fadeSound 1;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Finish!"";" \n + "};" \n + "" \n + "" \n + "" \n + "player enableSimulation true;" \n + "" \n + "titleCut ["""", ""BLACK IN"", 1];" \n + "1338 cutText ["""",""PLAIN"",0]; " \n + "" \n + "progressLoadingScreen 1.0;" \n + "" \n + "endLoadingScreen;" \n + "EPOCH_loadingScreenDone = true;" \n + "" \n + "hintSilent ""Worked"" "/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + }; + }; + /*%FSM*/ + /*%FSM*/ + class Version_Check + { + name = "Version_Check"; + init = /*%FSM*/"if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Version Check"";" \n + "};" \n + "" \n + "// SHOULD BE:" \n + "_epoch_assets0 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_assets"");" \n + "_epoch_assets1 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_assets_1"");" \n + "_epoch_assets2 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""epoch_objects"");" \n + "_epoch_assets3 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_assets_3"");" \n + "_epoch_config = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_config"");" \n + "_epoch_language = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_language"");" \n + "_epoch_underground = getText(configFile >> ""Epoch"" >> ""Version"" >> ""Underground_Epoch"");" \n + "_epoch_vehicles = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_vehicles"");" \n + "_epoch_weapons = getText(configFile >> ""Epoch"" >> ""Version"" >> ""a3_epoch_weapons"");" \n + "" \n + "" \n + "// IS:" \n + "_my_epoch_assets0 = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_assets"" >> ""epochVersion"");" \n + "_my_epoch_assets1 = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_assets_1"" >> ""epochVersion"");" \n + "_my_epoch_assets2 = getText(configFile >> ""CfgPatches"" >> ""epoch_objects"" >> ""epochVersion"");" \n + "_my_epoch_assets3 = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_assets_3"" >> ""epochVersion"");" \n + "_my_epoch_config = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_config"" >> ""epochVersion"");" \n + "_my_epoch_language = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_language"" >> ""epochVersion"");" \n + "_my_epoch_underground = getText(configFile >> ""CfgPatches"" >> ""Underground_Epoch"" >> ""epochVersion"");" \n + "_my_epoch_vehicles = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_vehicles"" >> ""epochVersion"");" \n + "_my_epoch_weapons = getText(configFile >> ""CfgPatches"" >> ""a3_epoch_weapons"" >> ""epochVersion"");" \n + "" \n + "progressLoadingScreen 0.1;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Wrong_Version + { + priority = 10.000000; + to="ERROR_Wrong_Version"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_epoch_assets0 != _epoch_assets0 ||" \n + "_my_epoch_assets1 != _epoch_assets1 ||" \n + "_my_epoch_assets2 != _epoch_assets2 ||" \n + "_my_epoch_assets3 != _epoch_assets3 ||" \n + "_my_epoch_config != _epoch_config ||" \n + "_my_epoch_language != _epoch_language ||" \n + "_my_epoch_underground != _epoch_underground ||" \n + "_my_epoch_vehicles != _epoch_vehicles ||" \n + "_my_epoch_weapons != _epoch_weapons"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class true + { + priority = 0.000000; + to="Arma_Version_Che"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_Player_UID + { + name = "Check_Player_UID"; + init = /*%FSM*/"if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Check PlayerUID"";" \n + "};" \n + "" \n + "_playerUID = getPlayerUID player;" \n + "" \n + "progressLoadingScreen 0.2;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class PlayerUID_Okay + { + priority = 10.000000; + to="Check_Server_1"; + precondition = /*%FSM*/"!isNil ""_playerUID"""/*%FSM*/; + condition=/*%FSM*/"_playerUID != """""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Empty_PlayerUID + { + priority = 0.000000; + to="ERROR_PlayerUID"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Wrong_Version + { + name = "ERROR_Wrong_Version"; + init = /*%FSM*/"_msg = ""You have an outdated version of Epoch"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_EPOCHVERSION = true;" \n + " publicVariableServer ""PLAYER_REJECT_EPOCHVERSION"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Disconnect + { + name = "Disconnect"; + init = /*%FSM*/"endLoadingScreen;" \n + "1338 cutText [_msg,""PLAIN"",0]; " \n + "deleteVehicle player;" \n + "call _rejectPlayer;" \n + "diag_log format [""(%1) %2"",diag_tickTime,_msg];" \n + "_myTime = diag_tickTime;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Check_if_Player + { + priority = 0.000000; + to="Reject_without_B"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 2"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_PlayerUID + { + name = "ERROR_PlayerUID"; + init = /*%FSM*/"_msg = ""Can not setup Player Object! (Error 01)"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_UID = true;" \n + " publicVariableServer ""PLAYER_REJECT_UID"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Setup_Player_Var + { + name = "Setup_Player_Var"; + init = /*%FSM*/"diag_log format[""DEBUG TIME WAITED: %1"", (diag_tickTime - _myTime)];" \n + "{" \n + " missionNamespace setVariable[(format[""EPOCH_player%1"", EPOCH_customVars select _forEachIndex]), _x];" \n + "} forEach _playerVariables;" \n + "" \n + """Loading Player Variables... Please wait!"" call Epoch_updateLoadingScreen;" \n + "" \n + "EPOCH_lastPlayerPos = getPosATL vehicle player;" \n + "" \n + "progressLoadingScreen 0.7;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Setup Player Variables"";" \n + "};" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Setup_EH_s_and_H"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Request_Hive + { + name = "Request_Hive"; + init = /*%FSM*/"_myTime = diag_tickTime;" \n + "" \n + "Epoch_my_Group = [];" \n + "" \n + "player remoteExec [""EPOCH_server_checkPlayer"",2];" \n + "" \n + "" \n + """Loading Player Data... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.5;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Hive_Response + { + priority = 0.000000; + to="Process_2"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_checkPlayer_PVC"""/*%FSM*/; + action=/*%FSM*/"_newChar = EPOCH_checkPlayer_PVC;" \n + "EPOCH_checkPlayer_PVC = nil;"/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not_3"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 120"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not + { + name = "ERROR_Server_not"; + init = /*%FSM*/"_msg = ""Authentication Failed, Disconnect and try again"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_NoResponse2 = true;" \n + " publicVariableServer ""PLAYER_REJECT_NoResponse2"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Wrong_Server + { + name = "ERROR_Wrong_Server"; + init = /*%FSM*/"_msg = format[""Server and Client running with different Version! (You: %1 // Server: %2)"",getText(configFile >> ""CfgMods"" >> ""Epoch"" >> ""version""),_serverVersion];" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_ServerVersion = true;" \n + " publicVariableServer ""PLAYER_REJECT_ServerVersion"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Setup_Player_Obj + { + name = "Setup_Player_Obj"; + init = /*%FSM*/"_ply = player;" \n + "_group = group player;" \n + "" \n + "player reveal _playerObject;" \n + "_playerPos = getposATL _playerObject;" \n + "" \n + "selectPlayer _playerObject;" \n + "" \n + "deleteVehicle _ply;" \n + "deleteGroup _group;" \n + "" \n + """Loading Player Body... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.8;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Setup Player Object"";" \n + "};" \n + "" \n + "_myTime = diag_tickTime;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Timeout_ + { + priority = 0.000000; + to="ERROR_Player_Setup"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 60"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class new_player_____p + { + priority = 0.000000; + to="Setup_Player_Var"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_playerObject == player"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Display_Message + { + name = "Display_Message"; + init = /*%FSM*/"[] spawn {" \n + " waitUntil{!isNull (findDisplay 46)};" \n + " (findDisplay 46) displayAddEventHandler [""KeyDown"",""true""];" \n + " (findDisplay 46) displayAddEventHandler [""KeyUp"",""true""];" \n + "};" \n + "diag_log format [""(%1) %2"",diag_tickTime,_msg];" \n + "_myTime = diag_tickTime;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Display_Message + { + priority = 0.000000; + to="Disconnect"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 10"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_Server + { + name = "Check_Server"; + init = /*%FSM*/"_myTime = diag_tickTime;" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Check Server"";" \n + "};" \n + """Checking Server... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.4;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Server_not_worki + { + priority = 10.000000; + to="ERROR_Server_not_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_BADHIVE""" \n + ""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Server_Okay + { + priority = 0.000000; + to="Server_Version_C"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""Epoch_ServerVersion"""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_1 + { + name = "ERROR_Server_not_1"; + init = /*%FSM*/"_msg = ""Server not Ready (Error 03)"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_NotReady2 = true;" \n + " publicVariableServer ""PLAYER_REJECT_NotReady2"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_Server_1 + { + name = "Check_Server_1"; + init = /*%FSM*/"progressLoadingScreen 0.3;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not_2"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 180"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class freshServer + { + priority = 0.000000; + to="Update_Loadingscreen"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"uiNamespace getVariable ['Epoch_freshServer', false]"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Server_Ready + { + priority = 0.000000; + to="Check_Server"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_SERVER"""/*%FSM*/; + action=/*%FSM*/"_serverUptime = EPOCH_SERVER;" \n + "EPOCH_SERVER = nil;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_2 + { + name = "ERROR_Server_not_2"; + init = /*%FSM*/"_msg = ""Server not Ready (Error 02)"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_NotReady1 = true;" \n + " publicVariableServer ""PLAYER_REJECT_NotReady1"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Reject_without_B + { + name = "Reject_without_B"; + init = /*%FSM*/"[] spawn {" \n + " waitUntil{!isNull (findDisplay 46)};" \n + " waitUntil {" \n + " (findDisplay 46) closeDisplay 0;" \n + " isNull (findDisplay 46)" \n + " };" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + }; + }; + /*%FSM*/ + /*%FSM*/ + class Arma_Version_Che + { + name = "Arma_Version_Che"; + init = /*%FSM*/"progressLoadingScreen 0.15;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Outdated_Version + { + priority = 10.000000; + to="ERROR_Wrong_Version_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"productVersion select 2 < getNumber(configFile >> ""CfgMods"" >> ""Epoch"" >> ""ArmAVersion"")"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Player_Object_Re + { + priority = 0.000000; + to="Check_Player_UID"; + precondition = /*%FSM*/"!isNull player"/*%FSM*/; + condition=/*%FSM*/"player == player"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Wrong_Version_1 + { + name = "ERROR_Wrong_Version_1"; + init = /*%FSM*/"_msg = ""You have an outdated version of ArmA 3"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_ARMAVERSION = true;" \n + " publicVariableServer ""PLAYER_REJECT_ARMAVERSION"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Setup_EH_s_and_H + { + name = "Setup_EH_s_and_H"; + init = /*%FSM*/"{" \n + " player addEventHandler [_x,([""CfgEpochClient"", _x, """"] call EPOCH_fnc_returnConfigEntryV2)];" \n + "} forEach ([""CfgEpochClient"", ""addEventHandler"", []] call EPOCH_fnc_returnConfigEntryV2);" \n + "" \n + "if (count EPOCH_playerHitPoints isEqualTo count ((getAllHitPointsDamage player) param [0,[]])) then {" \n + " {" \n + " player setHitIndex [_forEachIndex, _x];" \n + " }forEach EPOCH_playerHitPoints;" \n + "};" \n + "" \n + "[] spawn EPOCH_masterLoop;" \n + "true call EPOCH_fnc_Weather;" \n + "[5,100] spawn EPOCH_niteLight;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Setup EH's"";" \n + "};" \n + "" \n + """Loading... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.9;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Has_Current_Weap + { + priority = 10.000000; + to="Find_Active_Weap"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_currentWeapon != """""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class no_weapons + { + priority = 0.000000; + to="Process"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_currentWeapon == """""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process + { + name = "Process"; + init = /*%FSM*/"progressLoadingScreen 0.975;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Preload_done + { + priority = 0.000000; + to="FINISH"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"preloadCamera _playerPos"/*%FSM*/; + action=/*%FSM*/"call compile _playerGroupOnline;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Find_Active_Weap + { + name = "Find_Active_Weap"; + init = /*%FSM*/"_activeWeapon = currentWeapon player;" \n + "progressLoadingScreen 0.95;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Current_Weapon_S + { + priority = 0.000000; + to="Do_nothing"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_activeWeapon == _currentWeapon"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Current_Weapon_Not + { + priority = 0.000000; + to="Select_Weapon"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_activeWeapon != _currentWeapon"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Select_Weapon + { + name = "Select_Weapon"; + init = /*%FSM*/"_currentWeapon spawn {" \n + " uiSleep 1; " \n + " player selectWeapon _this;" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Process"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Do_nothing + { + name = "Do_nothing"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Process"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_New_Player + { + name = "Check_New_Player"; + init = /*%FSM*/"_myTime = diag_tickTime;" \n + "" \n + """Loading Player Inventory... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.6;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class check_new__player + { + priority = 0.000000; + to="Setup_Player_Obj"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!(isNull _playerObject) && {_playerObject getVariable [""SETUP"",false]}"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 120"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process_1 + { + name = "Process_1"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Wait_ArmA_Loading + { + priority = 0.000000; + to="Start_Loading_Sc"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"{!isnull _x} count ((uinamespace getvariable ""loading_displays"") - [finddisplay 18]) == 0"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Start_Loading_Sc + { + name = "Start_Loading_Sc"; + init = /*%FSM*/"startLoadingScreen ["""",""EpochLoadingScreen""];" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Start Loadingscreen"";" \n + "};" \n + """Starting Epoch... Please wait!"" call Epoch_updateLoadingScreen;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Version_Check"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Update_Loadingscreen + { + name = "Update_Loadingscreen"; + init = /*%FSM*/"uiNamespace setVariable ['Epoch_freshServer', false];" \n + "" \n + """Server initializing... Please wait!"" call Epoch_updateLoadingScreen;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Check_Server_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Player_Setup + { + name = "ERROR_Player_Setup"; + init = /*%FSM*/"_msg = ""Problem setting up player"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_InvaildSetup = true;" \n + " publicVariableServer ""PLAYER_REJECT_InvaildSetup"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Server_Version_C + { + name = "Server_Version_C"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Wrong_Server_Ver + { + priority = 10.000000; + to="ERROR_Wrong_Server"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"Epoch_ServerVersion != getText(configFile >> ""CfgMods"" >> ""Epoch"" >> ""version"")"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Version_Okay + { + priority = 0.000000; + to="Request_Hive"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_3 + { + name = "ERROR_Server_not_3"; + init = /*%FSM*/"_msg = ""Authentication Failed, Disconnect and try again"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_HiveNotResponse = true;" \n + " publicVariableServer ""PLAYER_REJECT_HiveNotResponse"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process_2 + { + name = "Process_2"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class new_character + { + priority = 10.000000; + to="Open_Gender_Selection"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_newChar"/*%FSM*/; + action=/*%FSM*/"endLoadingScreen;" \n + "_myGenderTime = diag_tickTime;"/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class load_old_charact + { + priority = 0.000000; + to="Process_3"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/"_myTime = diag_tickTime;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Open_Gender_Selection + { + name = "Open_Gender_Selection"; + init = /*%FSM*/"createdialog ""SelectGender"";"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Gender_Selected + { + priority = 10.000000; + to="Send_character_s"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_PlayerIsMale"""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Timeout + { + priority = 0.000000; + to="Send_character_s"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"((diag_tickTime - _myGenderTime) > 30)"/*%FSM*/; + action=/*%FSM*/"EPOCH_PlayerIsMale = true;" \n + "closeDialog 0;"/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Reopen_when_client + { + priority = 0.000000; + to="Open_Gender_Selection"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!dialog && isNil ""EPOCH_PlayerIsMale"""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Send_character_s + { + name = "Send_character_s"; + init = /*%FSM*/"startLoadingScreen ["""",""EpochLoadingScreen""];" \n + """Gender Selected... Please wait!"" call Epoch_updateLoadingScreen;" \n + "" \n + "[player,EPOCH_PlayerIsMale] remoteExec [""EPOCH_server_loadPlayer"",2];" \n + "EPOCH_PlayerIsMale = nil;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class load_old_charact + { + priority = 0.000000; + to="Process_3"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/"_myTime = diag_tickTime;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process_3 + { + name = "Process_3"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not_4"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 120"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Response + { + priority = 0.000000; + to="Check_New_Player"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_C_SET"""/*%FSM*/; + action=/*%FSM*/"_array = EPOCH_C_SET;" \n + "EPOCH_C_SET = nil;" \n + "_playerObject = _array deleteAt 0;" \n + "_playerVariables = _array deleteAt 0;" \n + "_currentWeapon = _array deleteAt 0;" \n + "_magCount = _array deleteAt 0;" \n + "Epoch_my_GroupUID = _array deleteAt 0;" \n + "Epoch_canBeRevived = _array deleteAt 0;" \n + "Epoch_personalToken = _array deleteAt 0;" \n + "reverse _serverUptime;" \n + "_serverUptime pushBack (_array deleteAt 0);" \n + "reverse _serverUptime;" \n + "_serverUptime call EPOCH_client_publicEH;" \n + "_playerGroupOnline = _array deleteAt 0;" \n + "" \n + ""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_4 + { + name = "ERROR_Server_not_4"; + init = /*%FSM*/"_msg = ""Authentication Failed, Disconnect and try again"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_HiveLoadChar = true;" \n + " publicVariableServer ""PLAYER_REJECT_HiveLoadChar"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + }; + initState="INIT"; + finalStates[] = + { + "FINISH", + "Reject_without_B", + }; +}; +/*%FSM*/ \ No newline at end of file diff --git a/Sources/mpmissions/epoch.Takistan/description.ext b/Sources/mpmissions/epoch.Takistan/description.ext index cfe65cba..8783e3aa 100644 --- a/Sources/mpmissions/epoch.Takistan/description.ext +++ b/Sources/mpmissions/epoch.Takistan/description.ext @@ -50,6 +50,7 @@ class cfgFunctions }; class postinit { + file = "init\fn_postinit.sqf"; postInit = 1; }; }; diff --git a/Sources/mpmissions/epoch.Takistan/init/client_init.sqf b/Sources/mpmissions/epoch.Takistan/init/client_init.sqf new file mode 100644 index 00000000..4a32e342 --- /dev/null +++ b/Sources/mpmissions/epoch.Takistan/init/client_init.sqf @@ -0,0 +1,76 @@ +/* + 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: + https://github.com/EpochModTeam/Epoch/tree/master/Sources/epoch_code/init/client_init.sqf +*/ +//Variables +EPOCH_CraftingItem = ""; +EPOCH_ESP_TARGETS = []; +EPOCH_ESPMAP_TARGETS = []; +EPOCH_ESPGROUPS = []; +EPOCH_ESPGROUPCOLORS = []; +EPOCH_ESP_PLAYER = false; +EPOCH_ESP_VEHICLES = false; +EPOCH_ESP_VEHICLEPLAYER = []; +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"]; +if (isNil 'EPOCH_diag_fps') then { + EPOCH_diag_fps = 0; +}; +EPOCH_playerIsSwimming = false; +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 = []; +EPOCH_lastPlayerPos = [0,0,0]; +EPOCH_prevOffer = []; +EPOCH_drawIcon3d = false; +EPOCH_velTransform = false; +EPOCH_stabilityTarget = objNull; +EPOCH_currentVehicle = objNull; +EPOCH_currentTarget = objNull; +EPOCH_LootedBlds = []; +EPOCH_soundLevel = 1; +EPOCH_arr_interactedObjs = []; +EPOCH_buildOption = 0; +EPOCH_nearestLocations = []; +onEachFrame EPOCH_onEachFrame; + +EPOCH_LastAirDrop = time; +EPOCH_AirDropCheck = getNumber(missionConfigFile >> "CfgEpochAirDrop" >> "AirDropFreq"); +if(EPOCH_AirDropCheck < 120)then{EPOCH_AirDropCheck = 120;}; +EPOCH_AirDropChance = getNumber(missionConfigFile >> "CfgEpochAirDrop" >> "AirDropChance"); +if(EPOCH_AirDropChance < 0)then{EPOCH_AirDropChance = 101;EPOCH_AirDropCheck = 99999;}; + +EPOCH_droneRndChance = 100; + +// Custom Keys +EPOCH_keysActionPressed = false; //prevents EH spam +0 call EPOCH_clientKeyMap; + +//ON INIT and RESPAWN +call EPOCH_clientInit; + +[] execFSM "\x\addons\a3_epoch_code\system\SPVEH.fsm"; +[] execFSM "system\player_login.fsm"; + +true diff --git a/Sources/mpmissions/epoch.Takistan/init/fn_postinit.sqf b/Sources/mpmissions/epoch.Takistan/init/fn_postinit.sqf new file mode 100644 index 00000000..8be5aa09 --- /dev/null +++ b/Sources/mpmissions/epoch.Takistan/init/fn_postinit.sqf @@ -0,0 +1,18 @@ +/* + Author: Aaron Clark - EpochMod.com + + Contributors: + + Description: + Initalize Player + + 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/master/Sources/epoch_code/init/fn_postinit.sqf +*/ +if (!isDedicated && isMultiplayer && hasInterface) then { + call compile preprocessFileLineNumbers "init\client_init.sqf"; +}; +true diff --git a/Sources/mpmissions/epoch.VR/System/player_login.fsm b/Sources/mpmissions/epoch.VR/System/player_login.fsm new file mode 100644 index 00000000..9426567f --- /dev/null +++ b/Sources/mpmissions/epoch.VR/System/player_login.fsm @@ -0,0 +1,1398 @@ +/*%FSM*/ +/*%FSM*/ +/* +item0[] = {"INIT",0,250,-25.000000,-375.000000,75.000000,-325.000000,0.000000,"INIT"}; +item1[] = {"FINISH",1,4346,-25.000000,1475.000000,75.000000,1525.000000,0.000000,"FINISH"}; +item2[] = {"true",8,218,-150.000000,-125.000000,-50.000000,-75.000000,0.000000,"true"}; +item3[] = {"Version_Check",2,250,-25.000000,-75.000000,75.000000,-25.000000,0.000000,"Version Check"}; +item4[] = {"Player_Object_Re",4,218,-150.000000,75.000000,-50.000000,125.000000,0.000000,"Player" \n "Object Ready"}; +item5[] = {"Check_Player_UID",2,250,-25.000000,125.000000,75.000000,175.000000,0.000000,"Check Player UID"}; +item6[] = {"PlayerUID_Okay",4,218,-150.000000,175.000000,-50.000000,225.000000,10.000000,"PlayerUID" \n "Okay"}; +item7[] = {"Wrong_Version",4,218,125.000000,-75.000000,225.000000,-25.000000,10.000000,"Wrong" \n "Version"}; +item8[] = {"",7,210,471.000061,-54.000099,478.999939,-45.999901,0.000000,""}; +item9[] = {"ERROR_Wrong_Version",2,250,275.000000,-75.000000,375.000000,-25.000000,0.000000,"ERROR" \n "Wrong Version" \n "Epoch"}; +item10[] = {"Disconnect",2,250,600.000000,1225.000000,700.000000,1275.000000,0.000000,"Disconnect"}; +item11[] = {"Server_Okay",4,218,-125.000000,425.000000,-25.000000,475.000000,0.000000,"Server" \n "Okay"}; +item12[] = {"Empty_PlayerUID",4,218,125.000000,125.000000,225.000000,175.000000,0.000000,"Empty" \n "PlayerUID"}; +item13[] = {"ERROR_PlayerUID",2,250,275.000000,125.000000,375.000000,175.000000,0.000000,"ERROR" \n "PlayerUID Empty"}; +item14[] = {"",7,210,471.000061,145.999908,478.999939,154.000092,0.000000,""}; +item15[] = {"Timeout_No_Respo",4,218,125.000000,875.000000,225.000000,925.000000,0.000000,"Timeout" \n "No Response"}; +item16[] = {"Response",4,218,-150.000000,825.000000,-50.000000,875.000000,0.000000,"Response"}; +item17[] = {"Setup_Player_Var",2,250,-25.000000,1075.000000,75.000000,1125.000000,0.000000,"Setup Player" \n "Variables"}; +item18[] = {"Request_Hive",2,250,-25.000000,575.000000,75.000000,625.000000,0.000000,"Request Hive"}; +item19[] = {"Timeout_No_Respo",4,218,125.000000,575.000000,225.000000,625.000000,0.000000,"Timeout" \n "No Response"}; +item20[] = {"ERROR_Server_not",2,250,275.000000,875.000000,375.000000,925.000000,0.000000,"ERROR" \n "Server not" \n "Response"}; +item21[] = {"",7,210,471.000000,895.999939,479.000000,904.000061,0.000000,""}; +item22[] = {"Timeout_No_Respo",4,218,125.000000,775.000000,225.000000,825.000000,0.000000,"Timeout" \n "No Response"}; +item23[] = {"Wrong_Server_Ver",4,218,125.000000,475.000000,225.000000,525.000000,10.000000,"Wrong" \n "Server Version"}; +item24[] = {"true",8,218,-150.000000,1125.000000,-50.000000,1175.000000,0.000000,"true"}; +item25[] = {"ERROR_Wrong_Server",2,250,275.000000,475.000000,375.000000,525.000000,0.000000,"ERROR" \n "Wrong" \n "Server Version"}; +item26[] = {"Display_Message",4,218,600.000000,1150.000000,700.000000,1200.000000,0.000000,"" \n "Display Message" \n "Wait..."}; +item27[] = {"Setup_Player_Obj",2,250,-25.000000,975.000000,75.000000,1025.000000,0.000000,"Setup Player" \n "Object"}; +item28[] = {"Check_if_Player",4,218,750.000000,1225.000000,850.000000,1275.000000,0.000000,"Check if" \n "Player got Kicked"}; +item29[] = {"Preload_done",8,218,-150.000000,1425.000000,-50.000000,1475.000000,0.000000,"Preload" \n "done"}; +item30[] = {"",7,210,471.000000,796.000000,479.000000,804.000000,0.000000,""}; +item31[] = {"",7,210,471.000000,796.000000,479.000000,804.000000,0.000000,""}; +item32[] = {"true",8,218,425.000000,1075.000000,525.000000,1125.000000,0.000000,"true"}; +item33[] = {"Display_Message",2,250,600.000000,1075.000000,700.000000,1125.000000,0.000000,"Display" \n "Message"}; +item34[] = {"Server_Ready",4,218,-25.000000,300.000000,75.000000,350.000000,0.000000,"Server" \n "Ready"}; +item35[] = {"Check_Server",2,250,-25.000000,375.000000,75.000000,425.000000,0.000000,"Check Server"}; +item36[] = {"Server_not_worki",4,218,125.000000,375.000000,225.000000,425.000000,10.000000,"Server" \n "not working"}; +item37[] = {"ERROR_Server_not_1",2,250,275.000000,375.000000,375.000000,425.000000,0.000000,"ERROR" \n "Server not Ready"}; +item38[] = {"",7,210,471.000000,396.000000,479.000000,404.000000,0.000000,""}; +item39[] = {"Check_Server_1",2,250,-25.000000,225.000000,75.000000,275.000000,0.000000,"Check Server"}; +item40[] = {"Timeout_No_Respo",4,218,125.000000,225.000000,225.000000,275.000000,0.000000,"Timeout" \n "No Response"}; +item41[] = {"ERROR_Server_not_2",2,250,275.000000,225.000000,375.000000,275.000000,0.000000,"ERROR" \n "Server not Ready"}; +item42[] = {"",7,210,471.000000,246.000031,479.000000,253.999969,0.000000,""}; +item43[] = {"Reject_without_B",1,250,900.000000,1225.000000,1000.000000,1275.000000,0.000000,"Reject without" \n "BattlEye"}; +item44[] = {"true",8,218,-150.000000,-25.000000,-50.000000,25.000000,0.000000,"true"}; +item45[] = {"Arma_Version_Che",2,250,-25.000000,25.000000,75.000000,75.000000,0.000000,"Arma Version" \n "Check"}; +item46[] = {"Outdated_Version",4,218,125.000000,25.000000,225.000000,75.000000,10.000000,"Outdated" \n "Version"}; +item47[] = {"ERROR_Wrong_Version_1",2,250,275.000000,25.000000,375.000000,75.000000,0.000000,"ERROR" \n "Wrong Version" \n "ArmA"}; +item48[] = {"",7,210,471.000061,45.999908,478.999939,54.000092,0.000000,""}; +item49[] = {"new_player_____p",4,218,-150.000000,1025.000000,-50.000000,1075.000000,0.000000,"new player == " \n "player"}; +item50[] = {"Setup_EH_s_and_H",2,250,-25.000000,1175.000000,75.000000,1225.000000,0.000000,"Setup EH's" \n "and" \n "HitPoints"}; +item51[] = {"no_weapons",4,218,-25.000000,1275.000000,75.000000,1325.000000,0.000000,"no weapons"}; +item52[] = {"Process",2,250,-25.000000,1375.000000,75.000000,1425.000000,0.000000,"Process"}; +item53[] = {"Has_Current_Weap",4,218,100.000000,1175.000000,200.000000,1225.000000,10.000000,"Has" \n "Current" \n "Weapon"}; +item54[] = {"Find_Active_Weap",2,250,225.000000,1175.000000,325.000000,1225.000000,0.000000,"Find" \n "Active" \n "Weapon"}; +item55[] = {"Current_Weapon_Not",4,218,150.000000,1225.000000,250.000000,1275.000000,0.000000,"Current" \n "Weapon" \n "Not Selected"}; +item56[] = {"Current_Weapon_S",4,218,300.000000,1225.000000,400.000000,1275.000000,0.000000,"Current" \n "Weapon" \n "Selected"}; +item57[] = {"Select_Weapon",2,250,150.000000,1300.000000,250.000000,1350.000000,0.000000,"Select" \n "Weapon"}; +item58[] = {"true",8,218,225.000000,1375.000000,325.000000,1425.000000,0.000000,"true"}; +item59[] = {"Do_nothing",2,250,300.000000,1300.000000,400.000000,1350.000000,0.000000,"Do nothing"}; +item60[] = {"Check_New_Player",2,250,-25.000000,875.000000,75.000000,925.000000,0.000000,"Check" \n "New Player" \n "Setup"}; +item61[] = {"check_new__player",4,218,-150.000000,925.000000,-50.000000,975.000000,0.000000,"check new " \n "player not null"}; +item62[] = {"true",8,218,-150.000000,-325.000000,-50.000000,-275.000000,0.000000,"true"}; +item63[] = {"Process_1",2,250,-25.000000,-275.000000,75.000000,-225.000000,0.000000,"Process"}; +item64[] = {"Wait_ArmA_Loading",4,218,-150.000000,-225.000000,-50.000000,-175.000000,0.000000,"Wait ArmA" \n "Loading Screen" \n "Done"}; +item65[] = {"Start_Loading_Sc",2,250,-25.000000,-175.000000,75.000000,-125.000000,0.000000,"Start Loading" \n "Screen"}; +item66[] = {"freshServer",4,218,-325.000000,225.000000,-225.000000,275.000000,0.000000,"freshServer"}; +item67[] = {"Update_Loadingscreen",2,250,-325.000000,300.000000,-225.000000,350.000000,0.000000,"Update" \n "Loadingscreen" \n "Message"}; +item68[] = {"true",8,218,-150.000000,300.000000,-50.000000,350.000000,0.000000,"true"}; +item69[] = {"Timeout_",4,218,125.000000,975.000000,225.000000,1025.000000,0.000000,"" \n "Timeout" \n ""}; +item70[] = {"ERROR_Player_Setup",2,250,275.000000,975.000000,375.000000,1025.000000,0.000000,"ERROR" \n "Player Setup" \n "Invalid"}; +item71[] = {"",7,210,471.000000,996.000000,479.000000,1004.000000,0.000000,""}; +item72[] = {"Server_Version_C",2,250,-25.000000,475.000000,75.000000,525.000000,0.000000,"Server Version" \n "Check"}; +item73[] = {"Version_Okay",4,218,-125.000000,525.000000,-25.000000,575.000000,0.000000,"Version" \n "Okay"}; +item74[] = {"",7,210,471.000000,496.000000,479.000000,504.000000,0.000000,""}; +item75[] = {"ERROR_Server_not_3",2,250,275.000000,575.000000,375.000000,625.000000,0.000000,"ERROR" \n "Server not" \n "Response"}; +item76[] = {"",7,210,471.000000,596.000000,479.000000,604.000000,0.000000,""}; +item77[] = {"new_character",4,218,-250.000000,675.000000,-150.000000,725.000000,10.000000,"new" \n "character"}; +item78[] = {"Hive_Response",4,218,-125.000000,625.000000,-25.000000,675.000000,0.000000,"Hive" \n "Response"}; +item79[] = {"load_old_charact",4,218,-125.000000,725.000000,-25.000000,775.000000,0.000000,"load old" \n "character"}; +item80[] = {"Process_2",2,250,-25.000000,675.000000,75.000000,725.000000,0.000000,"Process"}; +item81[] = {"Open_Gender_Selection",2,250,-400.000000,675.000000,-300.000000,725.000000,0.000000,"Open Gender" \n "Selection Dialog"}; +item82[] = {"Reopen_when_client",4,218,-400.000000,600.000000,-300.000000,650.000000,0.000000,"Reopen" \n "when client hit" \n "escape"}; +item83[] = {"Gender_Selected",4,218,-450.000000,750.000000,-350.000000,800.000000,10.000000,"Gender" \n "Selected"}; +item84[] = {"Timeout",4,218,-350.000000,750.000000,-250.000000,800.000000,0.000000,"Timeout"}; +item85[] = {"Send_character_s",2,250,-400.000000,825.000000,-300.000000,875.000000,0.000000,"Send" \n "character" \n "selection"}; +item86[] = {"Process_3",2,250,-25.000000,775.000000,75.000000,825.000000,0.000000,"Process"}; +item87[] = {"ERROR_Server_not_4",2,250,275.000000,775.000000,375.000000,825.000000,0.000000,"ERROR" \n "Server not" \n "Response"}; +link0[] = {0,62}; +link1[] = {2,3}; +link2[] = {3,7}; +link3[] = {3,44}; +link4[] = {4,5}; +link5[] = {5,6}; +link6[] = {5,12}; +link7[] = {6,39}; +link8[] = {7,9}; +link9[] = {8,48}; +link10[] = {9,8}; +link11[] = {10,28}; +link12[] = {11,72}; +link13[] = {12,13}; +link14[] = {13,14}; +link15[] = {14,42}; +link16[] = {15,20}; +link17[] = {16,60}; +link18[] = {17,24}; +link19[] = {18,19}; +link20[] = {18,78}; +link21[] = {19,75}; +link22[] = {20,21}; +link23[] = {21,71}; +link24[] = {22,87}; +link25[] = {23,25}; +link26[] = {24,50}; +link27[] = {25,74}; +link28[] = {26,10}; +link29[] = {27,49}; +link30[] = {27,69}; +link31[] = {28,43}; +link32[] = {29,1}; +link33[] = {31,21}; +link34[] = {32,33}; +link35[] = {33,26}; +link36[] = {34,35}; +link37[] = {35,11}; +link38[] = {35,36}; +link39[] = {36,37}; +link40[] = {37,38}; +link41[] = {38,74}; +link42[] = {39,34}; +link43[] = {39,40}; +link44[] = {39,66}; +link45[] = {40,41}; +link46[] = {41,42}; +link47[] = {42,38}; +link48[] = {44,45}; +link49[] = {45,4}; +link50[] = {45,46}; +link51[] = {46,47}; +link52[] = {47,48}; +link53[] = {48,14}; +link54[] = {49,17}; +link55[] = {50,51}; +link56[] = {50,53}; +link57[] = {51,52}; +link58[] = {52,29}; +link59[] = {53,54}; +link60[] = {54,55}; +link61[] = {54,56}; +link62[] = {55,57}; +link63[] = {56,59}; +link64[] = {57,58}; +link65[] = {58,52}; +link66[] = {59,58}; +link67[] = {60,15}; +link68[] = {60,61}; +link69[] = {61,27}; +link70[] = {62,63}; +link71[] = {63,64}; +link72[] = {64,65}; +link73[] = {65,2}; +link74[] = {66,67}; +link75[] = {67,68}; +link76[] = {68,39}; +link77[] = {69,70}; +link78[] = {70,71}; +link79[] = {71,32}; +link80[] = {72,23}; +link81[] = {72,73}; +link82[] = {73,18}; +link83[] = {74,76}; +link84[] = {75,76}; +link85[] = {76,31}; +link86[] = {77,81}; +link87[] = {78,80}; +link88[] = {79,86}; +link89[] = {80,77}; +link90[] = {80,79}; +link91[] = {81,82}; +link92[] = {81,83}; +link93[] = {81,84}; +link94[] = {82,81}; +link95[] = {83,85}; +link96[] = {84,85}; +link97[] = {85,79}; +link98[] = {86,16}; +link99[] = {86,22}; +link100[] = {87,31}; +globals[] = {0.000000,0,0,0,0,640,480,1,244,6316128,1,-207.564026,582.257507,1932.771484,781.734619,586,854,1}; +window[] = {2,-1,-1,-1,-1,838,1706,2998,26,3,604}; +*//*%FSM*/ +class FSM +{ + fsmName = "Epoch Login"; + class States + { + /*%FSM*/ + class INIT + { + name = "INIT"; + init = /*%FSM*/"titleCut ["""", ""BLACK FADED"", 1337];" \n + "0 fadeSound 0;" \n + "player enableSimulation false;" \n + "" \n + "_debug = true;" \n + "_myTime = diag_tickTime;" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Init"";" \n + "};" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Process_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class FINISH + { + name = "FINISH"; + init = /*%FSM*/"[] spawn {" \n + " disableSerialization;" \n + " waitUntil{!isNull (findDisplay 46)};" \n + " _display = findDisplay 46;" \n + " {" \n + " _display displayAddEventHandler [_x,([""CfgEpochClient"", _x, """"] call EPOCH_fnc_returnConfigEntryV2)];" \n + " } forEach ([""CfgEpochClient"", ""displayAddEventHandler"", []] call EPOCH_fnc_returnConfigEntryV2);" \n + " " \n + " player switchMove """";" \n + "};" \n + "" \n + "3 fadeSound 1;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Finish!"";" \n + "};" \n + "" \n + "" \n + "" \n + "player enableSimulation true;" \n + "" \n + "titleCut ["""", ""BLACK IN"", 1];" \n + "1338 cutText ["""",""PLAIN"",0]; " \n + "" \n + "progressLoadingScreen 1.0;" \n + "" \n + "endLoadingScreen;" \n + "EPOCH_loadingScreenDone = true;" \n + "" \n + "hintSilent ""Worked"" "/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + }; + }; + /*%FSM*/ + /*%FSM*/ + class Version_Check + { + name = "Version_Check"; + init = /*%FSM*/"if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Version Check"";" \n + "};" \n + "" \n + "// SHOULD BE:" \n + "_epoch_assets0 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_assets"");" \n + "_epoch_assets1 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_assets_1"");" \n + "_epoch_assets2 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""epoch_objects"");" \n + "_epoch_assets3 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_assets_3"");" \n + "_epoch_config = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_config"");" \n + "_epoch_language = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_language"");" \n + "_epoch_underground = getText(configFile >> ""Epoch"" >> ""Version"" >> ""Underground_Epoch"");" \n + "_epoch_vehicles = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_vehicles"");" \n + "_epoch_weapons = getText(configFile >> ""Epoch"" >> ""Version"" >> ""a3_epoch_weapons"");" \n + "" \n + "" \n + "// IS:" \n + "_my_epoch_assets0 = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_assets"" >> ""epochVersion"");" \n + "_my_epoch_assets1 = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_assets_1"" >> ""epochVersion"");" \n + "_my_epoch_assets2 = getText(configFile >> ""CfgPatches"" >> ""epoch_objects"" >> ""epochVersion"");" \n + "_my_epoch_assets3 = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_assets_3"" >> ""epochVersion"");" \n + "_my_epoch_config = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_config"" >> ""epochVersion"");" \n + "_my_epoch_language = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_language"" >> ""epochVersion"");" \n + "_my_epoch_underground = getText(configFile >> ""CfgPatches"" >> ""Underground_Epoch"" >> ""epochVersion"");" \n + "_my_epoch_vehicles = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_vehicles"" >> ""epochVersion"");" \n + "_my_epoch_weapons = getText(configFile >> ""CfgPatches"" >> ""a3_epoch_weapons"" >> ""epochVersion"");" \n + "" \n + "progressLoadingScreen 0.1;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Wrong_Version + { + priority = 10.000000; + to="ERROR_Wrong_Version"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_epoch_assets0 != _epoch_assets0 ||" \n + "_my_epoch_assets1 != _epoch_assets1 ||" \n + "_my_epoch_assets2 != _epoch_assets2 ||" \n + "_my_epoch_assets3 != _epoch_assets3 ||" \n + "_my_epoch_config != _epoch_config ||" \n + "_my_epoch_language != _epoch_language ||" \n + "_my_epoch_underground != _epoch_underground ||" \n + "_my_epoch_vehicles != _epoch_vehicles ||" \n + "_my_epoch_weapons != _epoch_weapons"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class true + { + priority = 0.000000; + to="Arma_Version_Che"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_Player_UID + { + name = "Check_Player_UID"; + init = /*%FSM*/"if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Check PlayerUID"";" \n + "};" \n + "" \n + "_playerUID = getPlayerUID player;" \n + "" \n + "progressLoadingScreen 0.2;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class PlayerUID_Okay + { + priority = 10.000000; + to="Check_Server_1"; + precondition = /*%FSM*/"!isNil ""_playerUID"""/*%FSM*/; + condition=/*%FSM*/"_playerUID != """""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Empty_PlayerUID + { + priority = 0.000000; + to="ERROR_PlayerUID"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Wrong_Version + { + name = "ERROR_Wrong_Version"; + init = /*%FSM*/"_msg = ""You have an outdated version of Epoch"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_EPOCHVERSION = true;" \n + " publicVariableServer ""PLAYER_REJECT_EPOCHVERSION"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Disconnect + { + name = "Disconnect"; + init = /*%FSM*/"endLoadingScreen;" \n + "1338 cutText [_msg,""PLAIN"",0]; " \n + "deleteVehicle player;" \n + "call _rejectPlayer;" \n + "diag_log format [""(%1) %2"",diag_tickTime,_msg];" \n + "_myTime = diag_tickTime;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Check_if_Player + { + priority = 0.000000; + to="Reject_without_B"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 2"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_PlayerUID + { + name = "ERROR_PlayerUID"; + init = /*%FSM*/"_msg = ""Can not setup Player Object! (Error 01)"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_UID = true;" \n + " publicVariableServer ""PLAYER_REJECT_UID"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Setup_Player_Var + { + name = "Setup_Player_Var"; + init = /*%FSM*/"diag_log format[""DEBUG TIME WAITED: %1"", (diag_tickTime - _myTime)];" \n + "{" \n + " missionNamespace setVariable[(format[""EPOCH_player%1"", EPOCH_customVars select _forEachIndex]), _x];" \n + "} forEach _playerVariables;" \n + "" \n + """Loading Player Variables... Please wait!"" call Epoch_updateLoadingScreen;" \n + "" \n + "EPOCH_lastPlayerPos = getPosATL vehicle player;" \n + "" \n + "progressLoadingScreen 0.7;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Setup Player Variables"";" \n + "};" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Setup_EH_s_and_H"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Request_Hive + { + name = "Request_Hive"; + init = /*%FSM*/"_myTime = diag_tickTime;" \n + "" \n + "Epoch_my_Group = [];" \n + "" \n + "player remoteExec [""EPOCH_server_checkPlayer"",2];" \n + "" \n + "" \n + """Loading Player Data... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.5;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Hive_Response + { + priority = 0.000000; + to="Process_2"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_checkPlayer_PVC"""/*%FSM*/; + action=/*%FSM*/"_newChar = EPOCH_checkPlayer_PVC;" \n + "EPOCH_checkPlayer_PVC = nil;"/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not_3"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 120"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not + { + name = "ERROR_Server_not"; + init = /*%FSM*/"_msg = ""Authentication Failed, Disconnect and try again"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_NoResponse2 = true;" \n + " publicVariableServer ""PLAYER_REJECT_NoResponse2"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Wrong_Server + { + name = "ERROR_Wrong_Server"; + init = /*%FSM*/"_msg = format[""Server and Client running with different Version! (You: %1 // Server: %2)"",getText(configFile >> ""CfgMods"" >> ""Epoch"" >> ""version""),_serverVersion];" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_ServerVersion = true;" \n + " publicVariableServer ""PLAYER_REJECT_ServerVersion"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Setup_Player_Obj + { + name = "Setup_Player_Obj"; + init = /*%FSM*/"_ply = player;" \n + "_group = group player;" \n + "" \n + "player reveal _playerObject;" \n + "_playerPos = getposATL _playerObject;" \n + "" \n + "selectPlayer _playerObject;" \n + "" \n + "deleteVehicle _ply;" \n + "deleteGroup _group;" \n + "" \n + """Loading Player Body... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.8;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Setup Player Object"";" \n + "};" \n + "" \n + "_myTime = diag_tickTime;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Timeout_ + { + priority = 0.000000; + to="ERROR_Player_Setup"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 60"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class new_player_____p + { + priority = 0.000000; + to="Setup_Player_Var"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_playerObject == player"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Display_Message + { + name = "Display_Message"; + init = /*%FSM*/"[] spawn {" \n + " waitUntil{!isNull (findDisplay 46)};" \n + " (findDisplay 46) displayAddEventHandler [""KeyDown"",""true""];" \n + " (findDisplay 46) displayAddEventHandler [""KeyUp"",""true""];" \n + "};" \n + "diag_log format [""(%1) %2"",diag_tickTime,_msg];" \n + "_myTime = diag_tickTime;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Display_Message + { + priority = 0.000000; + to="Disconnect"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 10"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_Server + { + name = "Check_Server"; + init = /*%FSM*/"_myTime = diag_tickTime;" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Check Server"";" \n + "};" \n + """Checking Server... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.4;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Server_not_worki + { + priority = 10.000000; + to="ERROR_Server_not_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_BADHIVE""" \n + ""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Server_Okay + { + priority = 0.000000; + to="Server_Version_C"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""Epoch_ServerVersion"""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_1 + { + name = "ERROR_Server_not_1"; + init = /*%FSM*/"_msg = ""Server not Ready (Error 03)"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_NotReady2 = true;" \n + " publicVariableServer ""PLAYER_REJECT_NotReady2"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_Server_1 + { + name = "Check_Server_1"; + init = /*%FSM*/"progressLoadingScreen 0.3;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not_2"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 180"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class freshServer + { + priority = 0.000000; + to="Update_Loadingscreen"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"uiNamespace getVariable ['Epoch_freshServer', false]"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Server_Ready + { + priority = 0.000000; + to="Check_Server"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_SERVER"""/*%FSM*/; + action=/*%FSM*/"_serverUptime = EPOCH_SERVER;" \n + "EPOCH_SERVER = nil;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_2 + { + name = "ERROR_Server_not_2"; + init = /*%FSM*/"_msg = ""Server not Ready (Error 02)"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_NotReady1 = true;" \n + " publicVariableServer ""PLAYER_REJECT_NotReady1"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Reject_without_B + { + name = "Reject_without_B"; + init = /*%FSM*/"[] spawn {" \n + " waitUntil{!isNull (findDisplay 46)};" \n + " waitUntil {" \n + " (findDisplay 46) closeDisplay 0;" \n + " isNull (findDisplay 46)" \n + " };" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + }; + }; + /*%FSM*/ + /*%FSM*/ + class Arma_Version_Che + { + name = "Arma_Version_Che"; + init = /*%FSM*/"progressLoadingScreen 0.15;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Outdated_Version + { + priority = 10.000000; + to="ERROR_Wrong_Version_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"productVersion select 2 < getNumber(configFile >> ""CfgMods"" >> ""Epoch"" >> ""ArmAVersion"")"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Player_Object_Re + { + priority = 0.000000; + to="Check_Player_UID"; + precondition = /*%FSM*/"!isNull player"/*%FSM*/; + condition=/*%FSM*/"player == player"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Wrong_Version_1 + { + name = "ERROR_Wrong_Version_1"; + init = /*%FSM*/"_msg = ""You have an outdated version of ArmA 3"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_ARMAVERSION = true;" \n + " publicVariableServer ""PLAYER_REJECT_ARMAVERSION"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Setup_EH_s_and_H + { + name = "Setup_EH_s_and_H"; + init = /*%FSM*/"{" \n + " player addEventHandler [_x,([""CfgEpochClient"", _x, """"] call EPOCH_fnc_returnConfigEntryV2)];" \n + "} forEach ([""CfgEpochClient"", ""addEventHandler"", []] call EPOCH_fnc_returnConfigEntryV2);" \n + "" \n + "if (count EPOCH_playerHitPoints isEqualTo count ((getAllHitPointsDamage player) param [0,[]])) then {" \n + " {" \n + " player setHitIndex [_forEachIndex, _x];" \n + " }forEach EPOCH_playerHitPoints;" \n + "};" \n + "" \n + "[] spawn EPOCH_masterLoop;" \n + "true call EPOCH_fnc_Weather;" \n + "[5,100] spawn EPOCH_niteLight;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Setup EH's"";" \n + "};" \n + "" \n + """Loading... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.9;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Has_Current_Weap + { + priority = 10.000000; + to="Find_Active_Weap"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_currentWeapon != """""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class no_weapons + { + priority = 0.000000; + to="Process"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_currentWeapon == """""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process + { + name = "Process"; + init = /*%FSM*/"progressLoadingScreen 0.975;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Preload_done + { + priority = 0.000000; + to="FINISH"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"preloadCamera _playerPos"/*%FSM*/; + action=/*%FSM*/"call compile _playerGroupOnline;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Find_Active_Weap + { + name = "Find_Active_Weap"; + init = /*%FSM*/"_activeWeapon = currentWeapon player;" \n + "progressLoadingScreen 0.95;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Current_Weapon_S + { + priority = 0.000000; + to="Do_nothing"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_activeWeapon == _currentWeapon"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Current_Weapon_Not + { + priority = 0.000000; + to="Select_Weapon"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_activeWeapon != _currentWeapon"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Select_Weapon + { + name = "Select_Weapon"; + init = /*%FSM*/"_currentWeapon spawn {" \n + " uiSleep 1; " \n + " player selectWeapon _this;" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Process"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Do_nothing + { + name = "Do_nothing"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Process"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_New_Player + { + name = "Check_New_Player"; + init = /*%FSM*/"_myTime = diag_tickTime;" \n + "" \n + """Loading Player Inventory... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.6;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class check_new__player + { + priority = 0.000000; + to="Setup_Player_Obj"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!(isNull _playerObject) && {_playerObject getVariable [""SETUP"",false]}"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 120"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process_1 + { + name = "Process_1"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Wait_ArmA_Loading + { + priority = 0.000000; + to="Start_Loading_Sc"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"{!isnull _x} count ((uinamespace getvariable ""loading_displays"") - [finddisplay 18]) == 0"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Start_Loading_Sc + { + name = "Start_Loading_Sc"; + init = /*%FSM*/"startLoadingScreen ["""",""EpochLoadingScreen""];" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Start Loadingscreen"";" \n + "};" \n + """Starting Epoch... Please wait!"" call Epoch_updateLoadingScreen;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Version_Check"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Update_Loadingscreen + { + name = "Update_Loadingscreen"; + init = /*%FSM*/"uiNamespace setVariable ['Epoch_freshServer', false];" \n + "" \n + """Server initializing... Please wait!"" call Epoch_updateLoadingScreen;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Check_Server_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Player_Setup + { + name = "ERROR_Player_Setup"; + init = /*%FSM*/"_msg = ""Problem setting up player"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_InvaildSetup = true;" \n + " publicVariableServer ""PLAYER_REJECT_InvaildSetup"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Server_Version_C + { + name = "Server_Version_C"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Wrong_Server_Ver + { + priority = 10.000000; + to="ERROR_Wrong_Server"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"Epoch_ServerVersion != getText(configFile >> ""CfgMods"" >> ""Epoch"" >> ""version"")"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Version_Okay + { + priority = 0.000000; + to="Request_Hive"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_3 + { + name = "ERROR_Server_not_3"; + init = /*%FSM*/"_msg = ""Authentication Failed, Disconnect and try again"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_HiveNotResponse = true;" \n + " publicVariableServer ""PLAYER_REJECT_HiveNotResponse"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process_2 + { + name = "Process_2"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class new_character + { + priority = 10.000000; + to="Open_Gender_Selection"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_newChar"/*%FSM*/; + action=/*%FSM*/"endLoadingScreen;" \n + "_myGenderTime = diag_tickTime;"/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class load_old_charact + { + priority = 0.000000; + to="Process_3"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/"_myTime = diag_tickTime;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Open_Gender_Selection + { + name = "Open_Gender_Selection"; + init = /*%FSM*/"createdialog ""SelectGender"";"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Gender_Selected + { + priority = 10.000000; + to="Send_character_s"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_PlayerIsMale"""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Timeout + { + priority = 0.000000; + to="Send_character_s"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"((diag_tickTime - _myGenderTime) > 30)"/*%FSM*/; + action=/*%FSM*/"EPOCH_PlayerIsMale = true;" \n + "closeDialog 0;"/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Reopen_when_client + { + priority = 0.000000; + to="Open_Gender_Selection"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!dialog && isNil ""EPOCH_PlayerIsMale"""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Send_character_s + { + name = "Send_character_s"; + init = /*%FSM*/"startLoadingScreen ["""",""EpochLoadingScreen""];" \n + """Gender Selected... Please wait!"" call Epoch_updateLoadingScreen;" \n + "" \n + "[player,EPOCH_PlayerIsMale] remoteExec [""EPOCH_server_loadPlayer"",2];" \n + "EPOCH_PlayerIsMale = nil;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class load_old_charact + { + priority = 0.000000; + to="Process_3"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/"_myTime = diag_tickTime;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process_3 + { + name = "Process_3"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not_4"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 120"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Response + { + priority = 0.000000; + to="Check_New_Player"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_C_SET"""/*%FSM*/; + action=/*%FSM*/"_array = EPOCH_C_SET;" \n + "EPOCH_C_SET = nil;" \n + "_playerObject = _array deleteAt 0;" \n + "_playerVariables = _array deleteAt 0;" \n + "_currentWeapon = _array deleteAt 0;" \n + "_magCount = _array deleteAt 0;" \n + "Epoch_my_GroupUID = _array deleteAt 0;" \n + "Epoch_canBeRevived = _array deleteAt 0;" \n + "Epoch_personalToken = _array deleteAt 0;" \n + "reverse _serverUptime;" \n + "_serverUptime pushBack (_array deleteAt 0);" \n + "reverse _serverUptime;" \n + "_serverUptime call EPOCH_client_publicEH;" \n + "_playerGroupOnline = _array deleteAt 0;" \n + "" \n + ""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_4 + { + name = "ERROR_Server_not_4"; + init = /*%FSM*/"_msg = ""Authentication Failed, Disconnect and try again"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_HiveLoadChar = true;" \n + " publicVariableServer ""PLAYER_REJECT_HiveLoadChar"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + }; + initState="INIT"; + finalStates[] = + { + "FINISH", + "Reject_without_B", + }; +}; +/*%FSM*/ \ No newline at end of file diff --git a/Sources/mpmissions/epoch.VR/description.ext b/Sources/mpmissions/epoch.VR/description.ext index ae92cce3..8783e3aa 100644 --- a/Sources/mpmissions/epoch.VR/description.ext +++ b/Sources/mpmissions/epoch.VR/description.ext @@ -50,52 +50,13 @@ class cfgFunctions }; class postinit { + file = "init\fn_postinit.sqf"; postInit = 1; }; }; }; }; -class CfgEpochClient -{ - epochVersion = "0.3.7.0"; - - sapperRngChance = 100; // increase number to reduce chances and reduce to increase. Default 100 = 1% - 55% if soiled (+ 2% if in city) chance to spawn sapper - droneRngChance = 100; // increase number to reduce chances and reduce to increase. Default 100 = // 2% chance (+ 4% chance if in city) (1% - 2% Half if using silencer) to spawn drone if shot fired - - buildingNearbyMilitary = 0; //1 to allow building nearby - buildingNearbyMilitaryRange = 300; //Define radius of blocked area - - buildingRequireJammer = 0; // 1 = to allow building without a jammer - buildingCountLimit = 200; // how many objects can be built within range of a jammer - buildingJammerRange = 75; // jammer range in meters - - EPOCH_news[] = {"Word is that Sappers have a new boss.","Dogs will often lure them monsters away.","My dog was blown up. I miss him.."}; - - // #include "\x\addons\a3_epoch_config\Configs\CfgEpochClient\VR.hpp" - - class vr { - Rocks[] = { - }; - ATM[] = { - }; - Water[] = { - }; - Trash[] = { - }; - Trees[] = { - }; - Bushes[] = { - }; - Cinder[] = { - }; - Wrecks[] = { - }; - }; - - -}; - class CfgEpochSapper { detonateDistMax = 8; //Random distance between 3m and this number at which sapper detonates. Min value = 4 diff --git a/Sources/mpmissions/epoch.VR/init/client_init.sqf b/Sources/mpmissions/epoch.VR/init/client_init.sqf new file mode 100644 index 00000000..4a32e342 --- /dev/null +++ b/Sources/mpmissions/epoch.VR/init/client_init.sqf @@ -0,0 +1,76 @@ +/* + 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: + https://github.com/EpochModTeam/Epoch/tree/master/Sources/epoch_code/init/client_init.sqf +*/ +//Variables +EPOCH_CraftingItem = ""; +EPOCH_ESP_TARGETS = []; +EPOCH_ESPMAP_TARGETS = []; +EPOCH_ESPGROUPS = []; +EPOCH_ESPGROUPCOLORS = []; +EPOCH_ESP_PLAYER = false; +EPOCH_ESP_VEHICLES = false; +EPOCH_ESP_VEHICLEPLAYER = []; +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"]; +if (isNil 'EPOCH_diag_fps') then { + EPOCH_diag_fps = 0; +}; +EPOCH_playerIsSwimming = false; +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 = []; +EPOCH_lastPlayerPos = [0,0,0]; +EPOCH_prevOffer = []; +EPOCH_drawIcon3d = false; +EPOCH_velTransform = false; +EPOCH_stabilityTarget = objNull; +EPOCH_currentVehicle = objNull; +EPOCH_currentTarget = objNull; +EPOCH_LootedBlds = []; +EPOCH_soundLevel = 1; +EPOCH_arr_interactedObjs = []; +EPOCH_buildOption = 0; +EPOCH_nearestLocations = []; +onEachFrame EPOCH_onEachFrame; + +EPOCH_LastAirDrop = time; +EPOCH_AirDropCheck = getNumber(missionConfigFile >> "CfgEpochAirDrop" >> "AirDropFreq"); +if(EPOCH_AirDropCheck < 120)then{EPOCH_AirDropCheck = 120;}; +EPOCH_AirDropChance = getNumber(missionConfigFile >> "CfgEpochAirDrop" >> "AirDropChance"); +if(EPOCH_AirDropChance < 0)then{EPOCH_AirDropChance = 101;EPOCH_AirDropCheck = 99999;}; + +EPOCH_droneRndChance = 100; + +// Custom Keys +EPOCH_keysActionPressed = false; //prevents EH spam +0 call EPOCH_clientKeyMap; + +//ON INIT and RESPAWN +call EPOCH_clientInit; + +[] execFSM "\x\addons\a3_epoch_code\system\SPVEH.fsm"; +[] execFSM "system\player_login.fsm"; + +true diff --git a/Sources/mpmissions/epoch.VR/init/fn_postinit.sqf b/Sources/mpmissions/epoch.VR/init/fn_postinit.sqf new file mode 100644 index 00000000..8be5aa09 --- /dev/null +++ b/Sources/mpmissions/epoch.VR/init/fn_postinit.sqf @@ -0,0 +1,18 @@ +/* + Author: Aaron Clark - EpochMod.com + + Contributors: + + Description: + Initalize Player + + 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/master/Sources/epoch_code/init/fn_postinit.sqf +*/ +if (!isDedicated && isMultiplayer && hasInterface) then { + call compile preprocessFileLineNumbers "init\client_init.sqf"; +}; +true diff --git a/Sources/mpmissions/epoch.Woodland_ACR/System/player_login.fsm b/Sources/mpmissions/epoch.Woodland_ACR/System/player_login.fsm new file mode 100644 index 00000000..9426567f --- /dev/null +++ b/Sources/mpmissions/epoch.Woodland_ACR/System/player_login.fsm @@ -0,0 +1,1398 @@ +/*%FSM*/ +/*%FSM*/ +/* +item0[] = {"INIT",0,250,-25.000000,-375.000000,75.000000,-325.000000,0.000000,"INIT"}; +item1[] = {"FINISH",1,4346,-25.000000,1475.000000,75.000000,1525.000000,0.000000,"FINISH"}; +item2[] = {"true",8,218,-150.000000,-125.000000,-50.000000,-75.000000,0.000000,"true"}; +item3[] = {"Version_Check",2,250,-25.000000,-75.000000,75.000000,-25.000000,0.000000,"Version Check"}; +item4[] = {"Player_Object_Re",4,218,-150.000000,75.000000,-50.000000,125.000000,0.000000,"Player" \n "Object Ready"}; +item5[] = {"Check_Player_UID",2,250,-25.000000,125.000000,75.000000,175.000000,0.000000,"Check Player UID"}; +item6[] = {"PlayerUID_Okay",4,218,-150.000000,175.000000,-50.000000,225.000000,10.000000,"PlayerUID" \n "Okay"}; +item7[] = {"Wrong_Version",4,218,125.000000,-75.000000,225.000000,-25.000000,10.000000,"Wrong" \n "Version"}; +item8[] = {"",7,210,471.000061,-54.000099,478.999939,-45.999901,0.000000,""}; +item9[] = {"ERROR_Wrong_Version",2,250,275.000000,-75.000000,375.000000,-25.000000,0.000000,"ERROR" \n "Wrong Version" \n "Epoch"}; +item10[] = {"Disconnect",2,250,600.000000,1225.000000,700.000000,1275.000000,0.000000,"Disconnect"}; +item11[] = {"Server_Okay",4,218,-125.000000,425.000000,-25.000000,475.000000,0.000000,"Server" \n "Okay"}; +item12[] = {"Empty_PlayerUID",4,218,125.000000,125.000000,225.000000,175.000000,0.000000,"Empty" \n "PlayerUID"}; +item13[] = {"ERROR_PlayerUID",2,250,275.000000,125.000000,375.000000,175.000000,0.000000,"ERROR" \n "PlayerUID Empty"}; +item14[] = {"",7,210,471.000061,145.999908,478.999939,154.000092,0.000000,""}; +item15[] = {"Timeout_No_Respo",4,218,125.000000,875.000000,225.000000,925.000000,0.000000,"Timeout" \n "No Response"}; +item16[] = {"Response",4,218,-150.000000,825.000000,-50.000000,875.000000,0.000000,"Response"}; +item17[] = {"Setup_Player_Var",2,250,-25.000000,1075.000000,75.000000,1125.000000,0.000000,"Setup Player" \n "Variables"}; +item18[] = {"Request_Hive",2,250,-25.000000,575.000000,75.000000,625.000000,0.000000,"Request Hive"}; +item19[] = {"Timeout_No_Respo",4,218,125.000000,575.000000,225.000000,625.000000,0.000000,"Timeout" \n "No Response"}; +item20[] = {"ERROR_Server_not",2,250,275.000000,875.000000,375.000000,925.000000,0.000000,"ERROR" \n "Server not" \n "Response"}; +item21[] = {"",7,210,471.000000,895.999939,479.000000,904.000061,0.000000,""}; +item22[] = {"Timeout_No_Respo",4,218,125.000000,775.000000,225.000000,825.000000,0.000000,"Timeout" \n "No Response"}; +item23[] = {"Wrong_Server_Ver",4,218,125.000000,475.000000,225.000000,525.000000,10.000000,"Wrong" \n "Server Version"}; +item24[] = {"true",8,218,-150.000000,1125.000000,-50.000000,1175.000000,0.000000,"true"}; +item25[] = {"ERROR_Wrong_Server",2,250,275.000000,475.000000,375.000000,525.000000,0.000000,"ERROR" \n "Wrong" \n "Server Version"}; +item26[] = {"Display_Message",4,218,600.000000,1150.000000,700.000000,1200.000000,0.000000,"" \n "Display Message" \n "Wait..."}; +item27[] = {"Setup_Player_Obj",2,250,-25.000000,975.000000,75.000000,1025.000000,0.000000,"Setup Player" \n "Object"}; +item28[] = {"Check_if_Player",4,218,750.000000,1225.000000,850.000000,1275.000000,0.000000,"Check if" \n "Player got Kicked"}; +item29[] = {"Preload_done",8,218,-150.000000,1425.000000,-50.000000,1475.000000,0.000000,"Preload" \n "done"}; +item30[] = {"",7,210,471.000000,796.000000,479.000000,804.000000,0.000000,""}; +item31[] = {"",7,210,471.000000,796.000000,479.000000,804.000000,0.000000,""}; +item32[] = {"true",8,218,425.000000,1075.000000,525.000000,1125.000000,0.000000,"true"}; +item33[] = {"Display_Message",2,250,600.000000,1075.000000,700.000000,1125.000000,0.000000,"Display" \n "Message"}; +item34[] = {"Server_Ready",4,218,-25.000000,300.000000,75.000000,350.000000,0.000000,"Server" \n "Ready"}; +item35[] = {"Check_Server",2,250,-25.000000,375.000000,75.000000,425.000000,0.000000,"Check Server"}; +item36[] = {"Server_not_worki",4,218,125.000000,375.000000,225.000000,425.000000,10.000000,"Server" \n "not working"}; +item37[] = {"ERROR_Server_not_1",2,250,275.000000,375.000000,375.000000,425.000000,0.000000,"ERROR" \n "Server not Ready"}; +item38[] = {"",7,210,471.000000,396.000000,479.000000,404.000000,0.000000,""}; +item39[] = {"Check_Server_1",2,250,-25.000000,225.000000,75.000000,275.000000,0.000000,"Check Server"}; +item40[] = {"Timeout_No_Respo",4,218,125.000000,225.000000,225.000000,275.000000,0.000000,"Timeout" \n "No Response"}; +item41[] = {"ERROR_Server_not_2",2,250,275.000000,225.000000,375.000000,275.000000,0.000000,"ERROR" \n "Server not Ready"}; +item42[] = {"",7,210,471.000000,246.000031,479.000000,253.999969,0.000000,""}; +item43[] = {"Reject_without_B",1,250,900.000000,1225.000000,1000.000000,1275.000000,0.000000,"Reject without" \n "BattlEye"}; +item44[] = {"true",8,218,-150.000000,-25.000000,-50.000000,25.000000,0.000000,"true"}; +item45[] = {"Arma_Version_Che",2,250,-25.000000,25.000000,75.000000,75.000000,0.000000,"Arma Version" \n "Check"}; +item46[] = {"Outdated_Version",4,218,125.000000,25.000000,225.000000,75.000000,10.000000,"Outdated" \n "Version"}; +item47[] = {"ERROR_Wrong_Version_1",2,250,275.000000,25.000000,375.000000,75.000000,0.000000,"ERROR" \n "Wrong Version" \n "ArmA"}; +item48[] = {"",7,210,471.000061,45.999908,478.999939,54.000092,0.000000,""}; +item49[] = {"new_player_____p",4,218,-150.000000,1025.000000,-50.000000,1075.000000,0.000000,"new player == " \n "player"}; +item50[] = {"Setup_EH_s_and_H",2,250,-25.000000,1175.000000,75.000000,1225.000000,0.000000,"Setup EH's" \n "and" \n "HitPoints"}; +item51[] = {"no_weapons",4,218,-25.000000,1275.000000,75.000000,1325.000000,0.000000,"no weapons"}; +item52[] = {"Process",2,250,-25.000000,1375.000000,75.000000,1425.000000,0.000000,"Process"}; +item53[] = {"Has_Current_Weap",4,218,100.000000,1175.000000,200.000000,1225.000000,10.000000,"Has" \n "Current" \n "Weapon"}; +item54[] = {"Find_Active_Weap",2,250,225.000000,1175.000000,325.000000,1225.000000,0.000000,"Find" \n "Active" \n "Weapon"}; +item55[] = {"Current_Weapon_Not",4,218,150.000000,1225.000000,250.000000,1275.000000,0.000000,"Current" \n "Weapon" \n "Not Selected"}; +item56[] = {"Current_Weapon_S",4,218,300.000000,1225.000000,400.000000,1275.000000,0.000000,"Current" \n "Weapon" \n "Selected"}; +item57[] = {"Select_Weapon",2,250,150.000000,1300.000000,250.000000,1350.000000,0.000000,"Select" \n "Weapon"}; +item58[] = {"true",8,218,225.000000,1375.000000,325.000000,1425.000000,0.000000,"true"}; +item59[] = {"Do_nothing",2,250,300.000000,1300.000000,400.000000,1350.000000,0.000000,"Do nothing"}; +item60[] = {"Check_New_Player",2,250,-25.000000,875.000000,75.000000,925.000000,0.000000,"Check" \n "New Player" \n "Setup"}; +item61[] = {"check_new__player",4,218,-150.000000,925.000000,-50.000000,975.000000,0.000000,"check new " \n "player not null"}; +item62[] = {"true",8,218,-150.000000,-325.000000,-50.000000,-275.000000,0.000000,"true"}; +item63[] = {"Process_1",2,250,-25.000000,-275.000000,75.000000,-225.000000,0.000000,"Process"}; +item64[] = {"Wait_ArmA_Loading",4,218,-150.000000,-225.000000,-50.000000,-175.000000,0.000000,"Wait ArmA" \n "Loading Screen" \n "Done"}; +item65[] = {"Start_Loading_Sc",2,250,-25.000000,-175.000000,75.000000,-125.000000,0.000000,"Start Loading" \n "Screen"}; +item66[] = {"freshServer",4,218,-325.000000,225.000000,-225.000000,275.000000,0.000000,"freshServer"}; +item67[] = {"Update_Loadingscreen",2,250,-325.000000,300.000000,-225.000000,350.000000,0.000000,"Update" \n "Loadingscreen" \n "Message"}; +item68[] = {"true",8,218,-150.000000,300.000000,-50.000000,350.000000,0.000000,"true"}; +item69[] = {"Timeout_",4,218,125.000000,975.000000,225.000000,1025.000000,0.000000,"" \n "Timeout" \n ""}; +item70[] = {"ERROR_Player_Setup",2,250,275.000000,975.000000,375.000000,1025.000000,0.000000,"ERROR" \n "Player Setup" \n "Invalid"}; +item71[] = {"",7,210,471.000000,996.000000,479.000000,1004.000000,0.000000,""}; +item72[] = {"Server_Version_C",2,250,-25.000000,475.000000,75.000000,525.000000,0.000000,"Server Version" \n "Check"}; +item73[] = {"Version_Okay",4,218,-125.000000,525.000000,-25.000000,575.000000,0.000000,"Version" \n "Okay"}; +item74[] = {"",7,210,471.000000,496.000000,479.000000,504.000000,0.000000,""}; +item75[] = {"ERROR_Server_not_3",2,250,275.000000,575.000000,375.000000,625.000000,0.000000,"ERROR" \n "Server not" \n "Response"}; +item76[] = {"",7,210,471.000000,596.000000,479.000000,604.000000,0.000000,""}; +item77[] = {"new_character",4,218,-250.000000,675.000000,-150.000000,725.000000,10.000000,"new" \n "character"}; +item78[] = {"Hive_Response",4,218,-125.000000,625.000000,-25.000000,675.000000,0.000000,"Hive" \n "Response"}; +item79[] = {"load_old_charact",4,218,-125.000000,725.000000,-25.000000,775.000000,0.000000,"load old" \n "character"}; +item80[] = {"Process_2",2,250,-25.000000,675.000000,75.000000,725.000000,0.000000,"Process"}; +item81[] = {"Open_Gender_Selection",2,250,-400.000000,675.000000,-300.000000,725.000000,0.000000,"Open Gender" \n "Selection Dialog"}; +item82[] = {"Reopen_when_client",4,218,-400.000000,600.000000,-300.000000,650.000000,0.000000,"Reopen" \n "when client hit" \n "escape"}; +item83[] = {"Gender_Selected",4,218,-450.000000,750.000000,-350.000000,800.000000,10.000000,"Gender" \n "Selected"}; +item84[] = {"Timeout",4,218,-350.000000,750.000000,-250.000000,800.000000,0.000000,"Timeout"}; +item85[] = {"Send_character_s",2,250,-400.000000,825.000000,-300.000000,875.000000,0.000000,"Send" \n "character" \n "selection"}; +item86[] = {"Process_3",2,250,-25.000000,775.000000,75.000000,825.000000,0.000000,"Process"}; +item87[] = {"ERROR_Server_not_4",2,250,275.000000,775.000000,375.000000,825.000000,0.000000,"ERROR" \n "Server not" \n "Response"}; +link0[] = {0,62}; +link1[] = {2,3}; +link2[] = {3,7}; +link3[] = {3,44}; +link4[] = {4,5}; +link5[] = {5,6}; +link6[] = {5,12}; +link7[] = {6,39}; +link8[] = {7,9}; +link9[] = {8,48}; +link10[] = {9,8}; +link11[] = {10,28}; +link12[] = {11,72}; +link13[] = {12,13}; +link14[] = {13,14}; +link15[] = {14,42}; +link16[] = {15,20}; +link17[] = {16,60}; +link18[] = {17,24}; +link19[] = {18,19}; +link20[] = {18,78}; +link21[] = {19,75}; +link22[] = {20,21}; +link23[] = {21,71}; +link24[] = {22,87}; +link25[] = {23,25}; +link26[] = {24,50}; +link27[] = {25,74}; +link28[] = {26,10}; +link29[] = {27,49}; +link30[] = {27,69}; +link31[] = {28,43}; +link32[] = {29,1}; +link33[] = {31,21}; +link34[] = {32,33}; +link35[] = {33,26}; +link36[] = {34,35}; +link37[] = {35,11}; +link38[] = {35,36}; +link39[] = {36,37}; +link40[] = {37,38}; +link41[] = {38,74}; +link42[] = {39,34}; +link43[] = {39,40}; +link44[] = {39,66}; +link45[] = {40,41}; +link46[] = {41,42}; +link47[] = {42,38}; +link48[] = {44,45}; +link49[] = {45,4}; +link50[] = {45,46}; +link51[] = {46,47}; +link52[] = {47,48}; +link53[] = {48,14}; +link54[] = {49,17}; +link55[] = {50,51}; +link56[] = {50,53}; +link57[] = {51,52}; +link58[] = {52,29}; +link59[] = {53,54}; +link60[] = {54,55}; +link61[] = {54,56}; +link62[] = {55,57}; +link63[] = {56,59}; +link64[] = {57,58}; +link65[] = {58,52}; +link66[] = {59,58}; +link67[] = {60,15}; +link68[] = {60,61}; +link69[] = {61,27}; +link70[] = {62,63}; +link71[] = {63,64}; +link72[] = {64,65}; +link73[] = {65,2}; +link74[] = {66,67}; +link75[] = {67,68}; +link76[] = {68,39}; +link77[] = {69,70}; +link78[] = {70,71}; +link79[] = {71,32}; +link80[] = {72,23}; +link81[] = {72,73}; +link82[] = {73,18}; +link83[] = {74,76}; +link84[] = {75,76}; +link85[] = {76,31}; +link86[] = {77,81}; +link87[] = {78,80}; +link88[] = {79,86}; +link89[] = {80,77}; +link90[] = {80,79}; +link91[] = {81,82}; +link92[] = {81,83}; +link93[] = {81,84}; +link94[] = {82,81}; +link95[] = {83,85}; +link96[] = {84,85}; +link97[] = {85,79}; +link98[] = {86,16}; +link99[] = {86,22}; +link100[] = {87,31}; +globals[] = {0.000000,0,0,0,0,640,480,1,244,6316128,1,-207.564026,582.257507,1932.771484,781.734619,586,854,1}; +window[] = {2,-1,-1,-1,-1,838,1706,2998,26,3,604}; +*//*%FSM*/ +class FSM +{ + fsmName = "Epoch Login"; + class States + { + /*%FSM*/ + class INIT + { + name = "INIT"; + init = /*%FSM*/"titleCut ["""", ""BLACK FADED"", 1337];" \n + "0 fadeSound 0;" \n + "player enableSimulation false;" \n + "" \n + "_debug = true;" \n + "_myTime = diag_tickTime;" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Init"";" \n + "};" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Process_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class FINISH + { + name = "FINISH"; + init = /*%FSM*/"[] spawn {" \n + " disableSerialization;" \n + " waitUntil{!isNull (findDisplay 46)};" \n + " _display = findDisplay 46;" \n + " {" \n + " _display displayAddEventHandler [_x,([""CfgEpochClient"", _x, """"] call EPOCH_fnc_returnConfigEntryV2)];" \n + " } forEach ([""CfgEpochClient"", ""displayAddEventHandler"", []] call EPOCH_fnc_returnConfigEntryV2);" \n + " " \n + " player switchMove """";" \n + "};" \n + "" \n + "3 fadeSound 1;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Finish!"";" \n + "};" \n + "" \n + "" \n + "" \n + "player enableSimulation true;" \n + "" \n + "titleCut ["""", ""BLACK IN"", 1];" \n + "1338 cutText ["""",""PLAIN"",0]; " \n + "" \n + "progressLoadingScreen 1.0;" \n + "" \n + "endLoadingScreen;" \n + "EPOCH_loadingScreenDone = true;" \n + "" \n + "hintSilent ""Worked"" "/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + }; + }; + /*%FSM*/ + /*%FSM*/ + class Version_Check + { + name = "Version_Check"; + init = /*%FSM*/"if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Version Check"";" \n + "};" \n + "" \n + "// SHOULD BE:" \n + "_epoch_assets0 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_assets"");" \n + "_epoch_assets1 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_assets_1"");" \n + "_epoch_assets2 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""epoch_objects"");" \n + "_epoch_assets3 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_assets_3"");" \n + "_epoch_config = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_config"");" \n + "_epoch_language = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_language"");" \n + "_epoch_underground = getText(configFile >> ""Epoch"" >> ""Version"" >> ""Underground_Epoch"");" \n + "_epoch_vehicles = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_vehicles"");" \n + "_epoch_weapons = getText(configFile >> ""Epoch"" >> ""Version"" >> ""a3_epoch_weapons"");" \n + "" \n + "" \n + "// IS:" \n + "_my_epoch_assets0 = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_assets"" >> ""epochVersion"");" \n + "_my_epoch_assets1 = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_assets_1"" >> ""epochVersion"");" \n + "_my_epoch_assets2 = getText(configFile >> ""CfgPatches"" >> ""epoch_objects"" >> ""epochVersion"");" \n + "_my_epoch_assets3 = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_assets_3"" >> ""epochVersion"");" \n + "_my_epoch_config = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_config"" >> ""epochVersion"");" \n + "_my_epoch_language = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_language"" >> ""epochVersion"");" \n + "_my_epoch_underground = getText(configFile >> ""CfgPatches"" >> ""Underground_Epoch"" >> ""epochVersion"");" \n + "_my_epoch_vehicles = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_vehicles"" >> ""epochVersion"");" \n + "_my_epoch_weapons = getText(configFile >> ""CfgPatches"" >> ""a3_epoch_weapons"" >> ""epochVersion"");" \n + "" \n + "progressLoadingScreen 0.1;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Wrong_Version + { + priority = 10.000000; + to="ERROR_Wrong_Version"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_epoch_assets0 != _epoch_assets0 ||" \n + "_my_epoch_assets1 != _epoch_assets1 ||" \n + "_my_epoch_assets2 != _epoch_assets2 ||" \n + "_my_epoch_assets3 != _epoch_assets3 ||" \n + "_my_epoch_config != _epoch_config ||" \n + "_my_epoch_language != _epoch_language ||" \n + "_my_epoch_underground != _epoch_underground ||" \n + "_my_epoch_vehicles != _epoch_vehicles ||" \n + "_my_epoch_weapons != _epoch_weapons"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class true + { + priority = 0.000000; + to="Arma_Version_Che"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_Player_UID + { + name = "Check_Player_UID"; + init = /*%FSM*/"if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Check PlayerUID"";" \n + "};" \n + "" \n + "_playerUID = getPlayerUID player;" \n + "" \n + "progressLoadingScreen 0.2;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class PlayerUID_Okay + { + priority = 10.000000; + to="Check_Server_1"; + precondition = /*%FSM*/"!isNil ""_playerUID"""/*%FSM*/; + condition=/*%FSM*/"_playerUID != """""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Empty_PlayerUID + { + priority = 0.000000; + to="ERROR_PlayerUID"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Wrong_Version + { + name = "ERROR_Wrong_Version"; + init = /*%FSM*/"_msg = ""You have an outdated version of Epoch"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_EPOCHVERSION = true;" \n + " publicVariableServer ""PLAYER_REJECT_EPOCHVERSION"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Disconnect + { + name = "Disconnect"; + init = /*%FSM*/"endLoadingScreen;" \n + "1338 cutText [_msg,""PLAIN"",0]; " \n + "deleteVehicle player;" \n + "call _rejectPlayer;" \n + "diag_log format [""(%1) %2"",diag_tickTime,_msg];" \n + "_myTime = diag_tickTime;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Check_if_Player + { + priority = 0.000000; + to="Reject_without_B"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 2"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_PlayerUID + { + name = "ERROR_PlayerUID"; + init = /*%FSM*/"_msg = ""Can not setup Player Object! (Error 01)"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_UID = true;" \n + " publicVariableServer ""PLAYER_REJECT_UID"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Setup_Player_Var + { + name = "Setup_Player_Var"; + init = /*%FSM*/"diag_log format[""DEBUG TIME WAITED: %1"", (diag_tickTime - _myTime)];" \n + "{" \n + " missionNamespace setVariable[(format[""EPOCH_player%1"", EPOCH_customVars select _forEachIndex]), _x];" \n + "} forEach _playerVariables;" \n + "" \n + """Loading Player Variables... Please wait!"" call Epoch_updateLoadingScreen;" \n + "" \n + "EPOCH_lastPlayerPos = getPosATL vehicle player;" \n + "" \n + "progressLoadingScreen 0.7;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Setup Player Variables"";" \n + "};" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Setup_EH_s_and_H"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Request_Hive + { + name = "Request_Hive"; + init = /*%FSM*/"_myTime = diag_tickTime;" \n + "" \n + "Epoch_my_Group = [];" \n + "" \n + "player remoteExec [""EPOCH_server_checkPlayer"",2];" \n + "" \n + "" \n + """Loading Player Data... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.5;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Hive_Response + { + priority = 0.000000; + to="Process_2"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_checkPlayer_PVC"""/*%FSM*/; + action=/*%FSM*/"_newChar = EPOCH_checkPlayer_PVC;" \n + "EPOCH_checkPlayer_PVC = nil;"/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not_3"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 120"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not + { + name = "ERROR_Server_not"; + init = /*%FSM*/"_msg = ""Authentication Failed, Disconnect and try again"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_NoResponse2 = true;" \n + " publicVariableServer ""PLAYER_REJECT_NoResponse2"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Wrong_Server + { + name = "ERROR_Wrong_Server"; + init = /*%FSM*/"_msg = format[""Server and Client running with different Version! (You: %1 // Server: %2)"",getText(configFile >> ""CfgMods"" >> ""Epoch"" >> ""version""),_serverVersion];" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_ServerVersion = true;" \n + " publicVariableServer ""PLAYER_REJECT_ServerVersion"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Setup_Player_Obj + { + name = "Setup_Player_Obj"; + init = /*%FSM*/"_ply = player;" \n + "_group = group player;" \n + "" \n + "player reveal _playerObject;" \n + "_playerPos = getposATL _playerObject;" \n + "" \n + "selectPlayer _playerObject;" \n + "" \n + "deleteVehicle _ply;" \n + "deleteGroup _group;" \n + "" \n + """Loading Player Body... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.8;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Setup Player Object"";" \n + "};" \n + "" \n + "_myTime = diag_tickTime;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Timeout_ + { + priority = 0.000000; + to="ERROR_Player_Setup"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 60"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class new_player_____p + { + priority = 0.000000; + to="Setup_Player_Var"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_playerObject == player"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Display_Message + { + name = "Display_Message"; + init = /*%FSM*/"[] spawn {" \n + " waitUntil{!isNull (findDisplay 46)};" \n + " (findDisplay 46) displayAddEventHandler [""KeyDown"",""true""];" \n + " (findDisplay 46) displayAddEventHandler [""KeyUp"",""true""];" \n + "};" \n + "diag_log format [""(%1) %2"",diag_tickTime,_msg];" \n + "_myTime = diag_tickTime;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Display_Message + { + priority = 0.000000; + to="Disconnect"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 10"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_Server + { + name = "Check_Server"; + init = /*%FSM*/"_myTime = diag_tickTime;" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Check Server"";" \n + "};" \n + """Checking Server... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.4;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Server_not_worki + { + priority = 10.000000; + to="ERROR_Server_not_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_BADHIVE""" \n + ""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Server_Okay + { + priority = 0.000000; + to="Server_Version_C"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""Epoch_ServerVersion"""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_1 + { + name = "ERROR_Server_not_1"; + init = /*%FSM*/"_msg = ""Server not Ready (Error 03)"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_NotReady2 = true;" \n + " publicVariableServer ""PLAYER_REJECT_NotReady2"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_Server_1 + { + name = "Check_Server_1"; + init = /*%FSM*/"progressLoadingScreen 0.3;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not_2"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 180"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class freshServer + { + priority = 0.000000; + to="Update_Loadingscreen"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"uiNamespace getVariable ['Epoch_freshServer', false]"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Server_Ready + { + priority = 0.000000; + to="Check_Server"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_SERVER"""/*%FSM*/; + action=/*%FSM*/"_serverUptime = EPOCH_SERVER;" \n + "EPOCH_SERVER = nil;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_2 + { + name = "ERROR_Server_not_2"; + init = /*%FSM*/"_msg = ""Server not Ready (Error 02)"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_NotReady1 = true;" \n + " publicVariableServer ""PLAYER_REJECT_NotReady1"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Reject_without_B + { + name = "Reject_without_B"; + init = /*%FSM*/"[] spawn {" \n + " waitUntil{!isNull (findDisplay 46)};" \n + " waitUntil {" \n + " (findDisplay 46) closeDisplay 0;" \n + " isNull (findDisplay 46)" \n + " };" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + }; + }; + /*%FSM*/ + /*%FSM*/ + class Arma_Version_Che + { + name = "Arma_Version_Che"; + init = /*%FSM*/"progressLoadingScreen 0.15;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Outdated_Version + { + priority = 10.000000; + to="ERROR_Wrong_Version_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"productVersion select 2 < getNumber(configFile >> ""CfgMods"" >> ""Epoch"" >> ""ArmAVersion"")"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Player_Object_Re + { + priority = 0.000000; + to="Check_Player_UID"; + precondition = /*%FSM*/"!isNull player"/*%FSM*/; + condition=/*%FSM*/"player == player"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Wrong_Version_1 + { + name = "ERROR_Wrong_Version_1"; + init = /*%FSM*/"_msg = ""You have an outdated version of ArmA 3"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_ARMAVERSION = true;" \n + " publicVariableServer ""PLAYER_REJECT_ARMAVERSION"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Setup_EH_s_and_H + { + name = "Setup_EH_s_and_H"; + init = /*%FSM*/"{" \n + " player addEventHandler [_x,([""CfgEpochClient"", _x, """"] call EPOCH_fnc_returnConfigEntryV2)];" \n + "} forEach ([""CfgEpochClient"", ""addEventHandler"", []] call EPOCH_fnc_returnConfigEntryV2);" \n + "" \n + "if (count EPOCH_playerHitPoints isEqualTo count ((getAllHitPointsDamage player) param [0,[]])) then {" \n + " {" \n + " player setHitIndex [_forEachIndex, _x];" \n + " }forEach EPOCH_playerHitPoints;" \n + "};" \n + "" \n + "[] spawn EPOCH_masterLoop;" \n + "true call EPOCH_fnc_Weather;" \n + "[5,100] spawn EPOCH_niteLight;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Setup EH's"";" \n + "};" \n + "" \n + """Loading... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.9;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Has_Current_Weap + { + priority = 10.000000; + to="Find_Active_Weap"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_currentWeapon != """""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class no_weapons + { + priority = 0.000000; + to="Process"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_currentWeapon == """""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process + { + name = "Process"; + init = /*%FSM*/"progressLoadingScreen 0.975;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Preload_done + { + priority = 0.000000; + to="FINISH"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"preloadCamera _playerPos"/*%FSM*/; + action=/*%FSM*/"call compile _playerGroupOnline;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Find_Active_Weap + { + name = "Find_Active_Weap"; + init = /*%FSM*/"_activeWeapon = currentWeapon player;" \n + "progressLoadingScreen 0.95;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Current_Weapon_S + { + priority = 0.000000; + to="Do_nothing"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_activeWeapon == _currentWeapon"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Current_Weapon_Not + { + priority = 0.000000; + to="Select_Weapon"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_activeWeapon != _currentWeapon"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Select_Weapon + { + name = "Select_Weapon"; + init = /*%FSM*/"_currentWeapon spawn {" \n + " uiSleep 1; " \n + " player selectWeapon _this;" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Process"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Do_nothing + { + name = "Do_nothing"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Process"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_New_Player + { + name = "Check_New_Player"; + init = /*%FSM*/"_myTime = diag_tickTime;" \n + "" \n + """Loading Player Inventory... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.6;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class check_new__player + { + priority = 0.000000; + to="Setup_Player_Obj"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!(isNull _playerObject) && {_playerObject getVariable [""SETUP"",false]}"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 120"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process_1 + { + name = "Process_1"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Wait_ArmA_Loading + { + priority = 0.000000; + to="Start_Loading_Sc"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"{!isnull _x} count ((uinamespace getvariable ""loading_displays"") - [finddisplay 18]) == 0"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Start_Loading_Sc + { + name = "Start_Loading_Sc"; + init = /*%FSM*/"startLoadingScreen ["""",""EpochLoadingScreen""];" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Start Loadingscreen"";" \n + "};" \n + """Starting Epoch... Please wait!"" call Epoch_updateLoadingScreen;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Version_Check"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Update_Loadingscreen + { + name = "Update_Loadingscreen"; + init = /*%FSM*/"uiNamespace setVariable ['Epoch_freshServer', false];" \n + "" \n + """Server initializing... Please wait!"" call Epoch_updateLoadingScreen;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Check_Server_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Player_Setup + { + name = "ERROR_Player_Setup"; + init = /*%FSM*/"_msg = ""Problem setting up player"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_InvaildSetup = true;" \n + " publicVariableServer ""PLAYER_REJECT_InvaildSetup"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Server_Version_C + { + name = "Server_Version_C"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Wrong_Server_Ver + { + priority = 10.000000; + to="ERROR_Wrong_Server"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"Epoch_ServerVersion != getText(configFile >> ""CfgMods"" >> ""Epoch"" >> ""version"")"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Version_Okay + { + priority = 0.000000; + to="Request_Hive"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_3 + { + name = "ERROR_Server_not_3"; + init = /*%FSM*/"_msg = ""Authentication Failed, Disconnect and try again"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_HiveNotResponse = true;" \n + " publicVariableServer ""PLAYER_REJECT_HiveNotResponse"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process_2 + { + name = "Process_2"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class new_character + { + priority = 10.000000; + to="Open_Gender_Selection"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_newChar"/*%FSM*/; + action=/*%FSM*/"endLoadingScreen;" \n + "_myGenderTime = diag_tickTime;"/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class load_old_charact + { + priority = 0.000000; + to="Process_3"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/"_myTime = diag_tickTime;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Open_Gender_Selection + { + name = "Open_Gender_Selection"; + init = /*%FSM*/"createdialog ""SelectGender"";"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Gender_Selected + { + priority = 10.000000; + to="Send_character_s"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_PlayerIsMale"""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Timeout + { + priority = 0.000000; + to="Send_character_s"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"((diag_tickTime - _myGenderTime) > 30)"/*%FSM*/; + action=/*%FSM*/"EPOCH_PlayerIsMale = true;" \n + "closeDialog 0;"/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Reopen_when_client + { + priority = 0.000000; + to="Open_Gender_Selection"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!dialog && isNil ""EPOCH_PlayerIsMale"""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Send_character_s + { + name = "Send_character_s"; + init = /*%FSM*/"startLoadingScreen ["""",""EpochLoadingScreen""];" \n + """Gender Selected... Please wait!"" call Epoch_updateLoadingScreen;" \n + "" \n + "[player,EPOCH_PlayerIsMale] remoteExec [""EPOCH_server_loadPlayer"",2];" \n + "EPOCH_PlayerIsMale = nil;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class load_old_charact + { + priority = 0.000000; + to="Process_3"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/"_myTime = diag_tickTime;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process_3 + { + name = "Process_3"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not_4"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 120"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Response + { + priority = 0.000000; + to="Check_New_Player"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_C_SET"""/*%FSM*/; + action=/*%FSM*/"_array = EPOCH_C_SET;" \n + "EPOCH_C_SET = nil;" \n + "_playerObject = _array deleteAt 0;" \n + "_playerVariables = _array deleteAt 0;" \n + "_currentWeapon = _array deleteAt 0;" \n + "_magCount = _array deleteAt 0;" \n + "Epoch_my_GroupUID = _array deleteAt 0;" \n + "Epoch_canBeRevived = _array deleteAt 0;" \n + "Epoch_personalToken = _array deleteAt 0;" \n + "reverse _serverUptime;" \n + "_serverUptime pushBack (_array deleteAt 0);" \n + "reverse _serverUptime;" \n + "_serverUptime call EPOCH_client_publicEH;" \n + "_playerGroupOnline = _array deleteAt 0;" \n + "" \n + ""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_4 + { + name = "ERROR_Server_not_4"; + init = /*%FSM*/"_msg = ""Authentication Failed, Disconnect and try again"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_HiveLoadChar = true;" \n + " publicVariableServer ""PLAYER_REJECT_HiveLoadChar"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + }; + initState="INIT"; + finalStates[] = + { + "FINISH", + "Reject_without_B", + }; +}; +/*%FSM*/ \ No newline at end of file diff --git a/Sources/mpmissions/epoch.Woodland_ACR/description.ext b/Sources/mpmissions/epoch.Woodland_ACR/description.ext index cfe65cba..8783e3aa 100644 --- a/Sources/mpmissions/epoch.Woodland_ACR/description.ext +++ b/Sources/mpmissions/epoch.Woodland_ACR/description.ext @@ -50,6 +50,7 @@ class cfgFunctions }; class postinit { + file = "init\fn_postinit.sqf"; postInit = 1; }; }; diff --git a/Sources/mpmissions/epoch.Woodland_ACR/init/client_init.sqf b/Sources/mpmissions/epoch.Woodland_ACR/init/client_init.sqf new file mode 100644 index 00000000..4a32e342 --- /dev/null +++ b/Sources/mpmissions/epoch.Woodland_ACR/init/client_init.sqf @@ -0,0 +1,76 @@ +/* + 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: + https://github.com/EpochModTeam/Epoch/tree/master/Sources/epoch_code/init/client_init.sqf +*/ +//Variables +EPOCH_CraftingItem = ""; +EPOCH_ESP_TARGETS = []; +EPOCH_ESPMAP_TARGETS = []; +EPOCH_ESPGROUPS = []; +EPOCH_ESPGROUPCOLORS = []; +EPOCH_ESP_PLAYER = false; +EPOCH_ESP_VEHICLES = false; +EPOCH_ESP_VEHICLEPLAYER = []; +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"]; +if (isNil 'EPOCH_diag_fps') then { + EPOCH_diag_fps = 0; +}; +EPOCH_playerIsSwimming = false; +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 = []; +EPOCH_lastPlayerPos = [0,0,0]; +EPOCH_prevOffer = []; +EPOCH_drawIcon3d = false; +EPOCH_velTransform = false; +EPOCH_stabilityTarget = objNull; +EPOCH_currentVehicle = objNull; +EPOCH_currentTarget = objNull; +EPOCH_LootedBlds = []; +EPOCH_soundLevel = 1; +EPOCH_arr_interactedObjs = []; +EPOCH_buildOption = 0; +EPOCH_nearestLocations = []; +onEachFrame EPOCH_onEachFrame; + +EPOCH_LastAirDrop = time; +EPOCH_AirDropCheck = getNumber(missionConfigFile >> "CfgEpochAirDrop" >> "AirDropFreq"); +if(EPOCH_AirDropCheck < 120)then{EPOCH_AirDropCheck = 120;}; +EPOCH_AirDropChance = getNumber(missionConfigFile >> "CfgEpochAirDrop" >> "AirDropChance"); +if(EPOCH_AirDropChance < 0)then{EPOCH_AirDropChance = 101;EPOCH_AirDropCheck = 99999;}; + +EPOCH_droneRndChance = 100; + +// Custom Keys +EPOCH_keysActionPressed = false; //prevents EH spam +0 call EPOCH_clientKeyMap; + +//ON INIT and RESPAWN +call EPOCH_clientInit; + +[] execFSM "\x\addons\a3_epoch_code\system\SPVEH.fsm"; +[] execFSM "system\player_login.fsm"; + +true diff --git a/Sources/mpmissions/epoch.Woodland_ACR/init/fn_postinit.sqf b/Sources/mpmissions/epoch.Woodland_ACR/init/fn_postinit.sqf new file mode 100644 index 00000000..8be5aa09 --- /dev/null +++ b/Sources/mpmissions/epoch.Woodland_ACR/init/fn_postinit.sqf @@ -0,0 +1,18 @@ +/* + Author: Aaron Clark - EpochMod.com + + Contributors: + + Description: + Initalize Player + + 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/master/Sources/epoch_code/init/fn_postinit.sqf +*/ +if (!isDedicated && isMultiplayer && hasInterface) then { + call compile preprocessFileLineNumbers "init\client_init.sqf"; +}; +true diff --git a/Sources/mpmissions/epoch.Zargabad/System/player_login.fsm b/Sources/mpmissions/epoch.Zargabad/System/player_login.fsm new file mode 100644 index 00000000..9426567f --- /dev/null +++ b/Sources/mpmissions/epoch.Zargabad/System/player_login.fsm @@ -0,0 +1,1398 @@ +/*%FSM*/ +/*%FSM*/ +/* +item0[] = {"INIT",0,250,-25.000000,-375.000000,75.000000,-325.000000,0.000000,"INIT"}; +item1[] = {"FINISH",1,4346,-25.000000,1475.000000,75.000000,1525.000000,0.000000,"FINISH"}; +item2[] = {"true",8,218,-150.000000,-125.000000,-50.000000,-75.000000,0.000000,"true"}; +item3[] = {"Version_Check",2,250,-25.000000,-75.000000,75.000000,-25.000000,0.000000,"Version Check"}; +item4[] = {"Player_Object_Re",4,218,-150.000000,75.000000,-50.000000,125.000000,0.000000,"Player" \n "Object Ready"}; +item5[] = {"Check_Player_UID",2,250,-25.000000,125.000000,75.000000,175.000000,0.000000,"Check Player UID"}; +item6[] = {"PlayerUID_Okay",4,218,-150.000000,175.000000,-50.000000,225.000000,10.000000,"PlayerUID" \n "Okay"}; +item7[] = {"Wrong_Version",4,218,125.000000,-75.000000,225.000000,-25.000000,10.000000,"Wrong" \n "Version"}; +item8[] = {"",7,210,471.000061,-54.000099,478.999939,-45.999901,0.000000,""}; +item9[] = {"ERROR_Wrong_Version",2,250,275.000000,-75.000000,375.000000,-25.000000,0.000000,"ERROR" \n "Wrong Version" \n "Epoch"}; +item10[] = {"Disconnect",2,250,600.000000,1225.000000,700.000000,1275.000000,0.000000,"Disconnect"}; +item11[] = {"Server_Okay",4,218,-125.000000,425.000000,-25.000000,475.000000,0.000000,"Server" \n "Okay"}; +item12[] = {"Empty_PlayerUID",4,218,125.000000,125.000000,225.000000,175.000000,0.000000,"Empty" \n "PlayerUID"}; +item13[] = {"ERROR_PlayerUID",2,250,275.000000,125.000000,375.000000,175.000000,0.000000,"ERROR" \n "PlayerUID Empty"}; +item14[] = {"",7,210,471.000061,145.999908,478.999939,154.000092,0.000000,""}; +item15[] = {"Timeout_No_Respo",4,218,125.000000,875.000000,225.000000,925.000000,0.000000,"Timeout" \n "No Response"}; +item16[] = {"Response",4,218,-150.000000,825.000000,-50.000000,875.000000,0.000000,"Response"}; +item17[] = {"Setup_Player_Var",2,250,-25.000000,1075.000000,75.000000,1125.000000,0.000000,"Setup Player" \n "Variables"}; +item18[] = {"Request_Hive",2,250,-25.000000,575.000000,75.000000,625.000000,0.000000,"Request Hive"}; +item19[] = {"Timeout_No_Respo",4,218,125.000000,575.000000,225.000000,625.000000,0.000000,"Timeout" \n "No Response"}; +item20[] = {"ERROR_Server_not",2,250,275.000000,875.000000,375.000000,925.000000,0.000000,"ERROR" \n "Server not" \n "Response"}; +item21[] = {"",7,210,471.000000,895.999939,479.000000,904.000061,0.000000,""}; +item22[] = {"Timeout_No_Respo",4,218,125.000000,775.000000,225.000000,825.000000,0.000000,"Timeout" \n "No Response"}; +item23[] = {"Wrong_Server_Ver",4,218,125.000000,475.000000,225.000000,525.000000,10.000000,"Wrong" \n "Server Version"}; +item24[] = {"true",8,218,-150.000000,1125.000000,-50.000000,1175.000000,0.000000,"true"}; +item25[] = {"ERROR_Wrong_Server",2,250,275.000000,475.000000,375.000000,525.000000,0.000000,"ERROR" \n "Wrong" \n "Server Version"}; +item26[] = {"Display_Message",4,218,600.000000,1150.000000,700.000000,1200.000000,0.000000,"" \n "Display Message" \n "Wait..."}; +item27[] = {"Setup_Player_Obj",2,250,-25.000000,975.000000,75.000000,1025.000000,0.000000,"Setup Player" \n "Object"}; +item28[] = {"Check_if_Player",4,218,750.000000,1225.000000,850.000000,1275.000000,0.000000,"Check if" \n "Player got Kicked"}; +item29[] = {"Preload_done",8,218,-150.000000,1425.000000,-50.000000,1475.000000,0.000000,"Preload" \n "done"}; +item30[] = {"",7,210,471.000000,796.000000,479.000000,804.000000,0.000000,""}; +item31[] = {"",7,210,471.000000,796.000000,479.000000,804.000000,0.000000,""}; +item32[] = {"true",8,218,425.000000,1075.000000,525.000000,1125.000000,0.000000,"true"}; +item33[] = {"Display_Message",2,250,600.000000,1075.000000,700.000000,1125.000000,0.000000,"Display" \n "Message"}; +item34[] = {"Server_Ready",4,218,-25.000000,300.000000,75.000000,350.000000,0.000000,"Server" \n "Ready"}; +item35[] = {"Check_Server",2,250,-25.000000,375.000000,75.000000,425.000000,0.000000,"Check Server"}; +item36[] = {"Server_not_worki",4,218,125.000000,375.000000,225.000000,425.000000,10.000000,"Server" \n "not working"}; +item37[] = {"ERROR_Server_not_1",2,250,275.000000,375.000000,375.000000,425.000000,0.000000,"ERROR" \n "Server not Ready"}; +item38[] = {"",7,210,471.000000,396.000000,479.000000,404.000000,0.000000,""}; +item39[] = {"Check_Server_1",2,250,-25.000000,225.000000,75.000000,275.000000,0.000000,"Check Server"}; +item40[] = {"Timeout_No_Respo",4,218,125.000000,225.000000,225.000000,275.000000,0.000000,"Timeout" \n "No Response"}; +item41[] = {"ERROR_Server_not_2",2,250,275.000000,225.000000,375.000000,275.000000,0.000000,"ERROR" \n "Server not Ready"}; +item42[] = {"",7,210,471.000000,246.000031,479.000000,253.999969,0.000000,""}; +item43[] = {"Reject_without_B",1,250,900.000000,1225.000000,1000.000000,1275.000000,0.000000,"Reject without" \n "BattlEye"}; +item44[] = {"true",8,218,-150.000000,-25.000000,-50.000000,25.000000,0.000000,"true"}; +item45[] = {"Arma_Version_Che",2,250,-25.000000,25.000000,75.000000,75.000000,0.000000,"Arma Version" \n "Check"}; +item46[] = {"Outdated_Version",4,218,125.000000,25.000000,225.000000,75.000000,10.000000,"Outdated" \n "Version"}; +item47[] = {"ERROR_Wrong_Version_1",2,250,275.000000,25.000000,375.000000,75.000000,0.000000,"ERROR" \n "Wrong Version" \n "ArmA"}; +item48[] = {"",7,210,471.000061,45.999908,478.999939,54.000092,0.000000,""}; +item49[] = {"new_player_____p",4,218,-150.000000,1025.000000,-50.000000,1075.000000,0.000000,"new player == " \n "player"}; +item50[] = {"Setup_EH_s_and_H",2,250,-25.000000,1175.000000,75.000000,1225.000000,0.000000,"Setup EH's" \n "and" \n "HitPoints"}; +item51[] = {"no_weapons",4,218,-25.000000,1275.000000,75.000000,1325.000000,0.000000,"no weapons"}; +item52[] = {"Process",2,250,-25.000000,1375.000000,75.000000,1425.000000,0.000000,"Process"}; +item53[] = {"Has_Current_Weap",4,218,100.000000,1175.000000,200.000000,1225.000000,10.000000,"Has" \n "Current" \n "Weapon"}; +item54[] = {"Find_Active_Weap",2,250,225.000000,1175.000000,325.000000,1225.000000,0.000000,"Find" \n "Active" \n "Weapon"}; +item55[] = {"Current_Weapon_Not",4,218,150.000000,1225.000000,250.000000,1275.000000,0.000000,"Current" \n "Weapon" \n "Not Selected"}; +item56[] = {"Current_Weapon_S",4,218,300.000000,1225.000000,400.000000,1275.000000,0.000000,"Current" \n "Weapon" \n "Selected"}; +item57[] = {"Select_Weapon",2,250,150.000000,1300.000000,250.000000,1350.000000,0.000000,"Select" \n "Weapon"}; +item58[] = {"true",8,218,225.000000,1375.000000,325.000000,1425.000000,0.000000,"true"}; +item59[] = {"Do_nothing",2,250,300.000000,1300.000000,400.000000,1350.000000,0.000000,"Do nothing"}; +item60[] = {"Check_New_Player",2,250,-25.000000,875.000000,75.000000,925.000000,0.000000,"Check" \n "New Player" \n "Setup"}; +item61[] = {"check_new__player",4,218,-150.000000,925.000000,-50.000000,975.000000,0.000000,"check new " \n "player not null"}; +item62[] = {"true",8,218,-150.000000,-325.000000,-50.000000,-275.000000,0.000000,"true"}; +item63[] = {"Process_1",2,250,-25.000000,-275.000000,75.000000,-225.000000,0.000000,"Process"}; +item64[] = {"Wait_ArmA_Loading",4,218,-150.000000,-225.000000,-50.000000,-175.000000,0.000000,"Wait ArmA" \n "Loading Screen" \n "Done"}; +item65[] = {"Start_Loading_Sc",2,250,-25.000000,-175.000000,75.000000,-125.000000,0.000000,"Start Loading" \n "Screen"}; +item66[] = {"freshServer",4,218,-325.000000,225.000000,-225.000000,275.000000,0.000000,"freshServer"}; +item67[] = {"Update_Loadingscreen",2,250,-325.000000,300.000000,-225.000000,350.000000,0.000000,"Update" \n "Loadingscreen" \n "Message"}; +item68[] = {"true",8,218,-150.000000,300.000000,-50.000000,350.000000,0.000000,"true"}; +item69[] = {"Timeout_",4,218,125.000000,975.000000,225.000000,1025.000000,0.000000,"" \n "Timeout" \n ""}; +item70[] = {"ERROR_Player_Setup",2,250,275.000000,975.000000,375.000000,1025.000000,0.000000,"ERROR" \n "Player Setup" \n "Invalid"}; +item71[] = {"",7,210,471.000000,996.000000,479.000000,1004.000000,0.000000,""}; +item72[] = {"Server_Version_C",2,250,-25.000000,475.000000,75.000000,525.000000,0.000000,"Server Version" \n "Check"}; +item73[] = {"Version_Okay",4,218,-125.000000,525.000000,-25.000000,575.000000,0.000000,"Version" \n "Okay"}; +item74[] = {"",7,210,471.000000,496.000000,479.000000,504.000000,0.000000,""}; +item75[] = {"ERROR_Server_not_3",2,250,275.000000,575.000000,375.000000,625.000000,0.000000,"ERROR" \n "Server not" \n "Response"}; +item76[] = {"",7,210,471.000000,596.000000,479.000000,604.000000,0.000000,""}; +item77[] = {"new_character",4,218,-250.000000,675.000000,-150.000000,725.000000,10.000000,"new" \n "character"}; +item78[] = {"Hive_Response",4,218,-125.000000,625.000000,-25.000000,675.000000,0.000000,"Hive" \n "Response"}; +item79[] = {"load_old_charact",4,218,-125.000000,725.000000,-25.000000,775.000000,0.000000,"load old" \n "character"}; +item80[] = {"Process_2",2,250,-25.000000,675.000000,75.000000,725.000000,0.000000,"Process"}; +item81[] = {"Open_Gender_Selection",2,250,-400.000000,675.000000,-300.000000,725.000000,0.000000,"Open Gender" \n "Selection Dialog"}; +item82[] = {"Reopen_when_client",4,218,-400.000000,600.000000,-300.000000,650.000000,0.000000,"Reopen" \n "when client hit" \n "escape"}; +item83[] = {"Gender_Selected",4,218,-450.000000,750.000000,-350.000000,800.000000,10.000000,"Gender" \n "Selected"}; +item84[] = {"Timeout",4,218,-350.000000,750.000000,-250.000000,800.000000,0.000000,"Timeout"}; +item85[] = {"Send_character_s",2,250,-400.000000,825.000000,-300.000000,875.000000,0.000000,"Send" \n "character" \n "selection"}; +item86[] = {"Process_3",2,250,-25.000000,775.000000,75.000000,825.000000,0.000000,"Process"}; +item87[] = {"ERROR_Server_not_4",2,250,275.000000,775.000000,375.000000,825.000000,0.000000,"ERROR" \n "Server not" \n "Response"}; +link0[] = {0,62}; +link1[] = {2,3}; +link2[] = {3,7}; +link3[] = {3,44}; +link4[] = {4,5}; +link5[] = {5,6}; +link6[] = {5,12}; +link7[] = {6,39}; +link8[] = {7,9}; +link9[] = {8,48}; +link10[] = {9,8}; +link11[] = {10,28}; +link12[] = {11,72}; +link13[] = {12,13}; +link14[] = {13,14}; +link15[] = {14,42}; +link16[] = {15,20}; +link17[] = {16,60}; +link18[] = {17,24}; +link19[] = {18,19}; +link20[] = {18,78}; +link21[] = {19,75}; +link22[] = {20,21}; +link23[] = {21,71}; +link24[] = {22,87}; +link25[] = {23,25}; +link26[] = {24,50}; +link27[] = {25,74}; +link28[] = {26,10}; +link29[] = {27,49}; +link30[] = {27,69}; +link31[] = {28,43}; +link32[] = {29,1}; +link33[] = {31,21}; +link34[] = {32,33}; +link35[] = {33,26}; +link36[] = {34,35}; +link37[] = {35,11}; +link38[] = {35,36}; +link39[] = {36,37}; +link40[] = {37,38}; +link41[] = {38,74}; +link42[] = {39,34}; +link43[] = {39,40}; +link44[] = {39,66}; +link45[] = {40,41}; +link46[] = {41,42}; +link47[] = {42,38}; +link48[] = {44,45}; +link49[] = {45,4}; +link50[] = {45,46}; +link51[] = {46,47}; +link52[] = {47,48}; +link53[] = {48,14}; +link54[] = {49,17}; +link55[] = {50,51}; +link56[] = {50,53}; +link57[] = {51,52}; +link58[] = {52,29}; +link59[] = {53,54}; +link60[] = {54,55}; +link61[] = {54,56}; +link62[] = {55,57}; +link63[] = {56,59}; +link64[] = {57,58}; +link65[] = {58,52}; +link66[] = {59,58}; +link67[] = {60,15}; +link68[] = {60,61}; +link69[] = {61,27}; +link70[] = {62,63}; +link71[] = {63,64}; +link72[] = {64,65}; +link73[] = {65,2}; +link74[] = {66,67}; +link75[] = {67,68}; +link76[] = {68,39}; +link77[] = {69,70}; +link78[] = {70,71}; +link79[] = {71,32}; +link80[] = {72,23}; +link81[] = {72,73}; +link82[] = {73,18}; +link83[] = {74,76}; +link84[] = {75,76}; +link85[] = {76,31}; +link86[] = {77,81}; +link87[] = {78,80}; +link88[] = {79,86}; +link89[] = {80,77}; +link90[] = {80,79}; +link91[] = {81,82}; +link92[] = {81,83}; +link93[] = {81,84}; +link94[] = {82,81}; +link95[] = {83,85}; +link96[] = {84,85}; +link97[] = {85,79}; +link98[] = {86,16}; +link99[] = {86,22}; +link100[] = {87,31}; +globals[] = {0.000000,0,0,0,0,640,480,1,244,6316128,1,-207.564026,582.257507,1932.771484,781.734619,586,854,1}; +window[] = {2,-1,-1,-1,-1,838,1706,2998,26,3,604}; +*//*%FSM*/ +class FSM +{ + fsmName = "Epoch Login"; + class States + { + /*%FSM*/ + class INIT + { + name = "INIT"; + init = /*%FSM*/"titleCut ["""", ""BLACK FADED"", 1337];" \n + "0 fadeSound 0;" \n + "player enableSimulation false;" \n + "" \n + "_debug = true;" \n + "_myTime = diag_tickTime;" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Init"";" \n + "};" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Process_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class FINISH + { + name = "FINISH"; + init = /*%FSM*/"[] spawn {" \n + " disableSerialization;" \n + " waitUntil{!isNull (findDisplay 46)};" \n + " _display = findDisplay 46;" \n + " {" \n + " _display displayAddEventHandler [_x,([""CfgEpochClient"", _x, """"] call EPOCH_fnc_returnConfigEntryV2)];" \n + " } forEach ([""CfgEpochClient"", ""displayAddEventHandler"", []] call EPOCH_fnc_returnConfigEntryV2);" \n + " " \n + " player switchMove """";" \n + "};" \n + "" \n + "3 fadeSound 1;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Finish!"";" \n + "};" \n + "" \n + "" \n + "" \n + "player enableSimulation true;" \n + "" \n + "titleCut ["""", ""BLACK IN"", 1];" \n + "1338 cutText ["""",""PLAIN"",0]; " \n + "" \n + "progressLoadingScreen 1.0;" \n + "" \n + "endLoadingScreen;" \n + "EPOCH_loadingScreenDone = true;" \n + "" \n + "hintSilent ""Worked"" "/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + }; + }; + /*%FSM*/ + /*%FSM*/ + class Version_Check + { + name = "Version_Check"; + init = /*%FSM*/"if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Version Check"";" \n + "};" \n + "" \n + "// SHOULD BE:" \n + "_epoch_assets0 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_assets"");" \n + "_epoch_assets1 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_assets_1"");" \n + "_epoch_assets2 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""epoch_objects"");" \n + "_epoch_assets3 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_assets_3"");" \n + "_epoch_config = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_config"");" \n + "_epoch_language = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_language"");" \n + "_epoch_underground = getText(configFile >> ""Epoch"" >> ""Version"" >> ""Underground_Epoch"");" \n + "_epoch_vehicles = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_vehicles"");" \n + "_epoch_weapons = getText(configFile >> ""Epoch"" >> ""Version"" >> ""a3_epoch_weapons"");" \n + "" \n + "" \n + "// IS:" \n + "_my_epoch_assets0 = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_assets"" >> ""epochVersion"");" \n + "_my_epoch_assets1 = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_assets_1"" >> ""epochVersion"");" \n + "_my_epoch_assets2 = getText(configFile >> ""CfgPatches"" >> ""epoch_objects"" >> ""epochVersion"");" \n + "_my_epoch_assets3 = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_assets_3"" >> ""epochVersion"");" \n + "_my_epoch_config = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_config"" >> ""epochVersion"");" \n + "_my_epoch_language = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_language"" >> ""epochVersion"");" \n + "_my_epoch_underground = getText(configFile >> ""CfgPatches"" >> ""Underground_Epoch"" >> ""epochVersion"");" \n + "_my_epoch_vehicles = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_vehicles"" >> ""epochVersion"");" \n + "_my_epoch_weapons = getText(configFile >> ""CfgPatches"" >> ""a3_epoch_weapons"" >> ""epochVersion"");" \n + "" \n + "progressLoadingScreen 0.1;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Wrong_Version + { + priority = 10.000000; + to="ERROR_Wrong_Version"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_epoch_assets0 != _epoch_assets0 ||" \n + "_my_epoch_assets1 != _epoch_assets1 ||" \n + "_my_epoch_assets2 != _epoch_assets2 ||" \n + "_my_epoch_assets3 != _epoch_assets3 ||" \n + "_my_epoch_config != _epoch_config ||" \n + "_my_epoch_language != _epoch_language ||" \n + "_my_epoch_underground != _epoch_underground ||" \n + "_my_epoch_vehicles != _epoch_vehicles ||" \n + "_my_epoch_weapons != _epoch_weapons"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class true + { + priority = 0.000000; + to="Arma_Version_Che"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_Player_UID + { + name = "Check_Player_UID"; + init = /*%FSM*/"if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Check PlayerUID"";" \n + "};" \n + "" \n + "_playerUID = getPlayerUID player;" \n + "" \n + "progressLoadingScreen 0.2;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class PlayerUID_Okay + { + priority = 10.000000; + to="Check_Server_1"; + precondition = /*%FSM*/"!isNil ""_playerUID"""/*%FSM*/; + condition=/*%FSM*/"_playerUID != """""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Empty_PlayerUID + { + priority = 0.000000; + to="ERROR_PlayerUID"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Wrong_Version + { + name = "ERROR_Wrong_Version"; + init = /*%FSM*/"_msg = ""You have an outdated version of Epoch"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_EPOCHVERSION = true;" \n + " publicVariableServer ""PLAYER_REJECT_EPOCHVERSION"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Disconnect + { + name = "Disconnect"; + init = /*%FSM*/"endLoadingScreen;" \n + "1338 cutText [_msg,""PLAIN"",0]; " \n + "deleteVehicle player;" \n + "call _rejectPlayer;" \n + "diag_log format [""(%1) %2"",diag_tickTime,_msg];" \n + "_myTime = diag_tickTime;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Check_if_Player + { + priority = 0.000000; + to="Reject_without_B"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 2"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_PlayerUID + { + name = "ERROR_PlayerUID"; + init = /*%FSM*/"_msg = ""Can not setup Player Object! (Error 01)"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_UID = true;" \n + " publicVariableServer ""PLAYER_REJECT_UID"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Setup_Player_Var + { + name = "Setup_Player_Var"; + init = /*%FSM*/"diag_log format[""DEBUG TIME WAITED: %1"", (diag_tickTime - _myTime)];" \n + "{" \n + " missionNamespace setVariable[(format[""EPOCH_player%1"", EPOCH_customVars select _forEachIndex]), _x];" \n + "} forEach _playerVariables;" \n + "" \n + """Loading Player Variables... Please wait!"" call Epoch_updateLoadingScreen;" \n + "" \n + "EPOCH_lastPlayerPos = getPosATL vehicle player;" \n + "" \n + "progressLoadingScreen 0.7;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Setup Player Variables"";" \n + "};" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Setup_EH_s_and_H"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Request_Hive + { + name = "Request_Hive"; + init = /*%FSM*/"_myTime = diag_tickTime;" \n + "" \n + "Epoch_my_Group = [];" \n + "" \n + "player remoteExec [""EPOCH_server_checkPlayer"",2];" \n + "" \n + "" \n + """Loading Player Data... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.5;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Hive_Response + { + priority = 0.000000; + to="Process_2"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_checkPlayer_PVC"""/*%FSM*/; + action=/*%FSM*/"_newChar = EPOCH_checkPlayer_PVC;" \n + "EPOCH_checkPlayer_PVC = nil;"/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not_3"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 120"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not + { + name = "ERROR_Server_not"; + init = /*%FSM*/"_msg = ""Authentication Failed, Disconnect and try again"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_NoResponse2 = true;" \n + " publicVariableServer ""PLAYER_REJECT_NoResponse2"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Wrong_Server + { + name = "ERROR_Wrong_Server"; + init = /*%FSM*/"_msg = format[""Server and Client running with different Version! (You: %1 // Server: %2)"",getText(configFile >> ""CfgMods"" >> ""Epoch"" >> ""version""),_serverVersion];" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_ServerVersion = true;" \n + " publicVariableServer ""PLAYER_REJECT_ServerVersion"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Setup_Player_Obj + { + name = "Setup_Player_Obj"; + init = /*%FSM*/"_ply = player;" \n + "_group = group player;" \n + "" \n + "player reveal _playerObject;" \n + "_playerPos = getposATL _playerObject;" \n + "" \n + "selectPlayer _playerObject;" \n + "" \n + "deleteVehicle _ply;" \n + "deleteGroup _group;" \n + "" \n + """Loading Player Body... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.8;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Setup Player Object"";" \n + "};" \n + "" \n + "_myTime = diag_tickTime;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Timeout_ + { + priority = 0.000000; + to="ERROR_Player_Setup"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 60"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class new_player_____p + { + priority = 0.000000; + to="Setup_Player_Var"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_playerObject == player"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Display_Message + { + name = "Display_Message"; + init = /*%FSM*/"[] spawn {" \n + " waitUntil{!isNull (findDisplay 46)};" \n + " (findDisplay 46) displayAddEventHandler [""KeyDown"",""true""];" \n + " (findDisplay 46) displayAddEventHandler [""KeyUp"",""true""];" \n + "};" \n + "diag_log format [""(%1) %2"",diag_tickTime,_msg];" \n + "_myTime = diag_tickTime;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Display_Message + { + priority = 0.000000; + to="Disconnect"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 10"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_Server + { + name = "Check_Server"; + init = /*%FSM*/"_myTime = diag_tickTime;" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Check Server"";" \n + "};" \n + """Checking Server... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.4;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Server_not_worki + { + priority = 10.000000; + to="ERROR_Server_not_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_BADHIVE""" \n + ""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Server_Okay + { + priority = 0.000000; + to="Server_Version_C"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""Epoch_ServerVersion"""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_1 + { + name = "ERROR_Server_not_1"; + init = /*%FSM*/"_msg = ""Server not Ready (Error 03)"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_NotReady2 = true;" \n + " publicVariableServer ""PLAYER_REJECT_NotReady2"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_Server_1 + { + name = "Check_Server_1"; + init = /*%FSM*/"progressLoadingScreen 0.3;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not_2"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 180"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class freshServer + { + priority = 0.000000; + to="Update_Loadingscreen"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"uiNamespace getVariable ['Epoch_freshServer', false]"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Server_Ready + { + priority = 0.000000; + to="Check_Server"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_SERVER"""/*%FSM*/; + action=/*%FSM*/"_serverUptime = EPOCH_SERVER;" \n + "EPOCH_SERVER = nil;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_2 + { + name = "ERROR_Server_not_2"; + init = /*%FSM*/"_msg = ""Server not Ready (Error 02)"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_NotReady1 = true;" \n + " publicVariableServer ""PLAYER_REJECT_NotReady1"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Reject_without_B + { + name = "Reject_without_B"; + init = /*%FSM*/"[] spawn {" \n + " waitUntil{!isNull (findDisplay 46)};" \n + " waitUntil {" \n + " (findDisplay 46) closeDisplay 0;" \n + " isNull (findDisplay 46)" \n + " };" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + }; + }; + /*%FSM*/ + /*%FSM*/ + class Arma_Version_Che + { + name = "Arma_Version_Che"; + init = /*%FSM*/"progressLoadingScreen 0.15;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Outdated_Version + { + priority = 10.000000; + to="ERROR_Wrong_Version_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"productVersion select 2 < getNumber(configFile >> ""CfgMods"" >> ""Epoch"" >> ""ArmAVersion"")"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Player_Object_Re + { + priority = 0.000000; + to="Check_Player_UID"; + precondition = /*%FSM*/"!isNull player"/*%FSM*/; + condition=/*%FSM*/"player == player"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Wrong_Version_1 + { + name = "ERROR_Wrong_Version_1"; + init = /*%FSM*/"_msg = ""You have an outdated version of ArmA 3"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_ARMAVERSION = true;" \n + " publicVariableServer ""PLAYER_REJECT_ARMAVERSION"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Setup_EH_s_and_H + { + name = "Setup_EH_s_and_H"; + init = /*%FSM*/"{" \n + " player addEventHandler [_x,([""CfgEpochClient"", _x, """"] call EPOCH_fnc_returnConfigEntryV2)];" \n + "} forEach ([""CfgEpochClient"", ""addEventHandler"", []] call EPOCH_fnc_returnConfigEntryV2);" \n + "" \n + "if (count EPOCH_playerHitPoints isEqualTo count ((getAllHitPointsDamage player) param [0,[]])) then {" \n + " {" \n + " player setHitIndex [_forEachIndex, _x];" \n + " }forEach EPOCH_playerHitPoints;" \n + "};" \n + "" \n + "[] spawn EPOCH_masterLoop;" \n + "true call EPOCH_fnc_Weather;" \n + "[5,100] spawn EPOCH_niteLight;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Setup EH's"";" \n + "};" \n + "" \n + """Loading... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.9;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Has_Current_Weap + { + priority = 10.000000; + to="Find_Active_Weap"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_currentWeapon != """""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class no_weapons + { + priority = 0.000000; + to="Process"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_currentWeapon == """""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process + { + name = "Process"; + init = /*%FSM*/"progressLoadingScreen 0.975;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Preload_done + { + priority = 0.000000; + to="FINISH"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"preloadCamera _playerPos"/*%FSM*/; + action=/*%FSM*/"call compile _playerGroupOnline;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Find_Active_Weap + { + name = "Find_Active_Weap"; + init = /*%FSM*/"_activeWeapon = currentWeapon player;" \n + "progressLoadingScreen 0.95;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Current_Weapon_S + { + priority = 0.000000; + to="Do_nothing"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_activeWeapon == _currentWeapon"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Current_Weapon_Not + { + priority = 0.000000; + to="Select_Weapon"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_activeWeapon != _currentWeapon"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Select_Weapon + { + name = "Select_Weapon"; + init = /*%FSM*/"_currentWeapon spawn {" \n + " uiSleep 1; " \n + " player selectWeapon _this;" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Process"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Do_nothing + { + name = "Do_nothing"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Process"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_New_Player + { + name = "Check_New_Player"; + init = /*%FSM*/"_myTime = diag_tickTime;" \n + "" \n + """Loading Player Inventory... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.6;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class check_new__player + { + priority = 0.000000; + to="Setup_Player_Obj"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!(isNull _playerObject) && {_playerObject getVariable [""SETUP"",false]}"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 120"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process_1 + { + name = "Process_1"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Wait_ArmA_Loading + { + priority = 0.000000; + to="Start_Loading_Sc"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"{!isnull _x} count ((uinamespace getvariable ""loading_displays"") - [finddisplay 18]) == 0"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Start_Loading_Sc + { + name = "Start_Loading_Sc"; + init = /*%FSM*/"startLoadingScreen ["""",""EpochLoadingScreen""];" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Start Loadingscreen"";" \n + "};" \n + """Starting Epoch... Please wait!"" call Epoch_updateLoadingScreen;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Version_Check"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Update_Loadingscreen + { + name = "Update_Loadingscreen"; + init = /*%FSM*/"uiNamespace setVariable ['Epoch_freshServer', false];" \n + "" \n + """Server initializing... Please wait!"" call Epoch_updateLoadingScreen;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Check_Server_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Player_Setup + { + name = "ERROR_Player_Setup"; + init = /*%FSM*/"_msg = ""Problem setting up player"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_InvaildSetup = true;" \n + " publicVariableServer ""PLAYER_REJECT_InvaildSetup"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Server_Version_C + { + name = "Server_Version_C"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Wrong_Server_Ver + { + priority = 10.000000; + to="ERROR_Wrong_Server"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"Epoch_ServerVersion != getText(configFile >> ""CfgMods"" >> ""Epoch"" >> ""version"")"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Version_Okay + { + priority = 0.000000; + to="Request_Hive"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_3 + { + name = "ERROR_Server_not_3"; + init = /*%FSM*/"_msg = ""Authentication Failed, Disconnect and try again"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_HiveNotResponse = true;" \n + " publicVariableServer ""PLAYER_REJECT_HiveNotResponse"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process_2 + { + name = "Process_2"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class new_character + { + priority = 10.000000; + to="Open_Gender_Selection"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_newChar"/*%FSM*/; + action=/*%FSM*/"endLoadingScreen;" \n + "_myGenderTime = diag_tickTime;"/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class load_old_charact + { + priority = 0.000000; + to="Process_3"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/"_myTime = diag_tickTime;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Open_Gender_Selection + { + name = "Open_Gender_Selection"; + init = /*%FSM*/"createdialog ""SelectGender"";"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Gender_Selected + { + priority = 10.000000; + to="Send_character_s"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_PlayerIsMale"""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Timeout + { + priority = 0.000000; + to="Send_character_s"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"((diag_tickTime - _myGenderTime) > 30)"/*%FSM*/; + action=/*%FSM*/"EPOCH_PlayerIsMale = true;" \n + "closeDialog 0;"/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Reopen_when_client + { + priority = 0.000000; + to="Open_Gender_Selection"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!dialog && isNil ""EPOCH_PlayerIsMale"""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Send_character_s + { + name = "Send_character_s"; + init = /*%FSM*/"startLoadingScreen ["""",""EpochLoadingScreen""];" \n + """Gender Selected... Please wait!"" call Epoch_updateLoadingScreen;" \n + "" \n + "[player,EPOCH_PlayerIsMale] remoteExec [""EPOCH_server_loadPlayer"",2];" \n + "EPOCH_PlayerIsMale = nil;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class load_old_charact + { + priority = 0.000000; + to="Process_3"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/"_myTime = diag_tickTime;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process_3 + { + name = "Process_3"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not_4"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 120"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Response + { + priority = 0.000000; + to="Check_New_Player"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_C_SET"""/*%FSM*/; + action=/*%FSM*/"_array = EPOCH_C_SET;" \n + "EPOCH_C_SET = nil;" \n + "_playerObject = _array deleteAt 0;" \n + "_playerVariables = _array deleteAt 0;" \n + "_currentWeapon = _array deleteAt 0;" \n + "_magCount = _array deleteAt 0;" \n + "Epoch_my_GroupUID = _array deleteAt 0;" \n + "Epoch_canBeRevived = _array deleteAt 0;" \n + "Epoch_personalToken = _array deleteAt 0;" \n + "reverse _serverUptime;" \n + "_serverUptime pushBack (_array deleteAt 0);" \n + "reverse _serverUptime;" \n + "_serverUptime call EPOCH_client_publicEH;" \n + "_playerGroupOnline = _array deleteAt 0;" \n + "" \n + ""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_4 + { + name = "ERROR_Server_not_4"; + init = /*%FSM*/"_msg = ""Authentication Failed, Disconnect and try again"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_HiveLoadChar = true;" \n + " publicVariableServer ""PLAYER_REJECT_HiveLoadChar"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + }; + initState="INIT"; + finalStates[] = + { + "FINISH", + "Reject_without_B", + }; +}; +/*%FSM*/ \ No newline at end of file diff --git a/Sources/mpmissions/epoch.Zargabad/description.ext b/Sources/mpmissions/epoch.Zargabad/description.ext index cfe65cba..8783e3aa 100644 --- a/Sources/mpmissions/epoch.Zargabad/description.ext +++ b/Sources/mpmissions/epoch.Zargabad/description.ext @@ -50,6 +50,7 @@ class cfgFunctions }; class postinit { + file = "init\fn_postinit.sqf"; postInit = 1; }; }; diff --git a/Sources/mpmissions/epoch.Zargabad/init/client_init.sqf b/Sources/mpmissions/epoch.Zargabad/init/client_init.sqf new file mode 100644 index 00000000..4a32e342 --- /dev/null +++ b/Sources/mpmissions/epoch.Zargabad/init/client_init.sqf @@ -0,0 +1,76 @@ +/* + 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: + https://github.com/EpochModTeam/Epoch/tree/master/Sources/epoch_code/init/client_init.sqf +*/ +//Variables +EPOCH_CraftingItem = ""; +EPOCH_ESP_TARGETS = []; +EPOCH_ESPMAP_TARGETS = []; +EPOCH_ESPGROUPS = []; +EPOCH_ESPGROUPCOLORS = []; +EPOCH_ESP_PLAYER = false; +EPOCH_ESP_VEHICLES = false; +EPOCH_ESP_VEHICLEPLAYER = []; +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"]; +if (isNil 'EPOCH_diag_fps') then { + EPOCH_diag_fps = 0; +}; +EPOCH_playerIsSwimming = false; +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 = []; +EPOCH_lastPlayerPos = [0,0,0]; +EPOCH_prevOffer = []; +EPOCH_drawIcon3d = false; +EPOCH_velTransform = false; +EPOCH_stabilityTarget = objNull; +EPOCH_currentVehicle = objNull; +EPOCH_currentTarget = objNull; +EPOCH_LootedBlds = []; +EPOCH_soundLevel = 1; +EPOCH_arr_interactedObjs = []; +EPOCH_buildOption = 0; +EPOCH_nearestLocations = []; +onEachFrame EPOCH_onEachFrame; + +EPOCH_LastAirDrop = time; +EPOCH_AirDropCheck = getNumber(missionConfigFile >> "CfgEpochAirDrop" >> "AirDropFreq"); +if(EPOCH_AirDropCheck < 120)then{EPOCH_AirDropCheck = 120;}; +EPOCH_AirDropChance = getNumber(missionConfigFile >> "CfgEpochAirDrop" >> "AirDropChance"); +if(EPOCH_AirDropChance < 0)then{EPOCH_AirDropChance = 101;EPOCH_AirDropCheck = 99999;}; + +EPOCH_droneRndChance = 100; + +// Custom Keys +EPOCH_keysActionPressed = false; //prevents EH spam +0 call EPOCH_clientKeyMap; + +//ON INIT and RESPAWN +call EPOCH_clientInit; + +[] execFSM "\x\addons\a3_epoch_code\system\SPVEH.fsm"; +[] execFSM "system\player_login.fsm"; + +true diff --git a/Sources/mpmissions/epoch.Zargabad/init/fn_postinit.sqf b/Sources/mpmissions/epoch.Zargabad/init/fn_postinit.sqf new file mode 100644 index 00000000..8be5aa09 --- /dev/null +++ b/Sources/mpmissions/epoch.Zargabad/init/fn_postinit.sqf @@ -0,0 +1,18 @@ +/* + Author: Aaron Clark - EpochMod.com + + Contributors: + + Description: + Initalize Player + + 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/master/Sources/epoch_code/init/fn_postinit.sqf +*/ +if (!isDedicated && isMultiplayer && hasInterface) then { + call compile preprocessFileLineNumbers "init\client_init.sqf"; +}; +true diff --git a/Sources/mpmissions/epoch.utes/System/player_login.fsm b/Sources/mpmissions/epoch.utes/System/player_login.fsm new file mode 100644 index 00000000..9426567f --- /dev/null +++ b/Sources/mpmissions/epoch.utes/System/player_login.fsm @@ -0,0 +1,1398 @@ +/*%FSM*/ +/*%FSM*/ +/* +item0[] = {"INIT",0,250,-25.000000,-375.000000,75.000000,-325.000000,0.000000,"INIT"}; +item1[] = {"FINISH",1,4346,-25.000000,1475.000000,75.000000,1525.000000,0.000000,"FINISH"}; +item2[] = {"true",8,218,-150.000000,-125.000000,-50.000000,-75.000000,0.000000,"true"}; +item3[] = {"Version_Check",2,250,-25.000000,-75.000000,75.000000,-25.000000,0.000000,"Version Check"}; +item4[] = {"Player_Object_Re",4,218,-150.000000,75.000000,-50.000000,125.000000,0.000000,"Player" \n "Object Ready"}; +item5[] = {"Check_Player_UID",2,250,-25.000000,125.000000,75.000000,175.000000,0.000000,"Check Player UID"}; +item6[] = {"PlayerUID_Okay",4,218,-150.000000,175.000000,-50.000000,225.000000,10.000000,"PlayerUID" \n "Okay"}; +item7[] = {"Wrong_Version",4,218,125.000000,-75.000000,225.000000,-25.000000,10.000000,"Wrong" \n "Version"}; +item8[] = {"",7,210,471.000061,-54.000099,478.999939,-45.999901,0.000000,""}; +item9[] = {"ERROR_Wrong_Version",2,250,275.000000,-75.000000,375.000000,-25.000000,0.000000,"ERROR" \n "Wrong Version" \n "Epoch"}; +item10[] = {"Disconnect",2,250,600.000000,1225.000000,700.000000,1275.000000,0.000000,"Disconnect"}; +item11[] = {"Server_Okay",4,218,-125.000000,425.000000,-25.000000,475.000000,0.000000,"Server" \n "Okay"}; +item12[] = {"Empty_PlayerUID",4,218,125.000000,125.000000,225.000000,175.000000,0.000000,"Empty" \n "PlayerUID"}; +item13[] = {"ERROR_PlayerUID",2,250,275.000000,125.000000,375.000000,175.000000,0.000000,"ERROR" \n "PlayerUID Empty"}; +item14[] = {"",7,210,471.000061,145.999908,478.999939,154.000092,0.000000,""}; +item15[] = {"Timeout_No_Respo",4,218,125.000000,875.000000,225.000000,925.000000,0.000000,"Timeout" \n "No Response"}; +item16[] = {"Response",4,218,-150.000000,825.000000,-50.000000,875.000000,0.000000,"Response"}; +item17[] = {"Setup_Player_Var",2,250,-25.000000,1075.000000,75.000000,1125.000000,0.000000,"Setup Player" \n "Variables"}; +item18[] = {"Request_Hive",2,250,-25.000000,575.000000,75.000000,625.000000,0.000000,"Request Hive"}; +item19[] = {"Timeout_No_Respo",4,218,125.000000,575.000000,225.000000,625.000000,0.000000,"Timeout" \n "No Response"}; +item20[] = {"ERROR_Server_not",2,250,275.000000,875.000000,375.000000,925.000000,0.000000,"ERROR" \n "Server not" \n "Response"}; +item21[] = {"",7,210,471.000000,895.999939,479.000000,904.000061,0.000000,""}; +item22[] = {"Timeout_No_Respo",4,218,125.000000,775.000000,225.000000,825.000000,0.000000,"Timeout" \n "No Response"}; +item23[] = {"Wrong_Server_Ver",4,218,125.000000,475.000000,225.000000,525.000000,10.000000,"Wrong" \n "Server Version"}; +item24[] = {"true",8,218,-150.000000,1125.000000,-50.000000,1175.000000,0.000000,"true"}; +item25[] = {"ERROR_Wrong_Server",2,250,275.000000,475.000000,375.000000,525.000000,0.000000,"ERROR" \n "Wrong" \n "Server Version"}; +item26[] = {"Display_Message",4,218,600.000000,1150.000000,700.000000,1200.000000,0.000000,"" \n "Display Message" \n "Wait..."}; +item27[] = {"Setup_Player_Obj",2,250,-25.000000,975.000000,75.000000,1025.000000,0.000000,"Setup Player" \n "Object"}; +item28[] = {"Check_if_Player",4,218,750.000000,1225.000000,850.000000,1275.000000,0.000000,"Check if" \n "Player got Kicked"}; +item29[] = {"Preload_done",8,218,-150.000000,1425.000000,-50.000000,1475.000000,0.000000,"Preload" \n "done"}; +item30[] = {"",7,210,471.000000,796.000000,479.000000,804.000000,0.000000,""}; +item31[] = {"",7,210,471.000000,796.000000,479.000000,804.000000,0.000000,""}; +item32[] = {"true",8,218,425.000000,1075.000000,525.000000,1125.000000,0.000000,"true"}; +item33[] = {"Display_Message",2,250,600.000000,1075.000000,700.000000,1125.000000,0.000000,"Display" \n "Message"}; +item34[] = {"Server_Ready",4,218,-25.000000,300.000000,75.000000,350.000000,0.000000,"Server" \n "Ready"}; +item35[] = {"Check_Server",2,250,-25.000000,375.000000,75.000000,425.000000,0.000000,"Check Server"}; +item36[] = {"Server_not_worki",4,218,125.000000,375.000000,225.000000,425.000000,10.000000,"Server" \n "not working"}; +item37[] = {"ERROR_Server_not_1",2,250,275.000000,375.000000,375.000000,425.000000,0.000000,"ERROR" \n "Server not Ready"}; +item38[] = {"",7,210,471.000000,396.000000,479.000000,404.000000,0.000000,""}; +item39[] = {"Check_Server_1",2,250,-25.000000,225.000000,75.000000,275.000000,0.000000,"Check Server"}; +item40[] = {"Timeout_No_Respo",4,218,125.000000,225.000000,225.000000,275.000000,0.000000,"Timeout" \n "No Response"}; +item41[] = {"ERROR_Server_not_2",2,250,275.000000,225.000000,375.000000,275.000000,0.000000,"ERROR" \n "Server not Ready"}; +item42[] = {"",7,210,471.000000,246.000031,479.000000,253.999969,0.000000,""}; +item43[] = {"Reject_without_B",1,250,900.000000,1225.000000,1000.000000,1275.000000,0.000000,"Reject without" \n "BattlEye"}; +item44[] = {"true",8,218,-150.000000,-25.000000,-50.000000,25.000000,0.000000,"true"}; +item45[] = {"Arma_Version_Che",2,250,-25.000000,25.000000,75.000000,75.000000,0.000000,"Arma Version" \n "Check"}; +item46[] = {"Outdated_Version",4,218,125.000000,25.000000,225.000000,75.000000,10.000000,"Outdated" \n "Version"}; +item47[] = {"ERROR_Wrong_Version_1",2,250,275.000000,25.000000,375.000000,75.000000,0.000000,"ERROR" \n "Wrong Version" \n "ArmA"}; +item48[] = {"",7,210,471.000061,45.999908,478.999939,54.000092,0.000000,""}; +item49[] = {"new_player_____p",4,218,-150.000000,1025.000000,-50.000000,1075.000000,0.000000,"new player == " \n "player"}; +item50[] = {"Setup_EH_s_and_H",2,250,-25.000000,1175.000000,75.000000,1225.000000,0.000000,"Setup EH's" \n "and" \n "HitPoints"}; +item51[] = {"no_weapons",4,218,-25.000000,1275.000000,75.000000,1325.000000,0.000000,"no weapons"}; +item52[] = {"Process",2,250,-25.000000,1375.000000,75.000000,1425.000000,0.000000,"Process"}; +item53[] = {"Has_Current_Weap",4,218,100.000000,1175.000000,200.000000,1225.000000,10.000000,"Has" \n "Current" \n "Weapon"}; +item54[] = {"Find_Active_Weap",2,250,225.000000,1175.000000,325.000000,1225.000000,0.000000,"Find" \n "Active" \n "Weapon"}; +item55[] = {"Current_Weapon_Not",4,218,150.000000,1225.000000,250.000000,1275.000000,0.000000,"Current" \n "Weapon" \n "Not Selected"}; +item56[] = {"Current_Weapon_S",4,218,300.000000,1225.000000,400.000000,1275.000000,0.000000,"Current" \n "Weapon" \n "Selected"}; +item57[] = {"Select_Weapon",2,250,150.000000,1300.000000,250.000000,1350.000000,0.000000,"Select" \n "Weapon"}; +item58[] = {"true",8,218,225.000000,1375.000000,325.000000,1425.000000,0.000000,"true"}; +item59[] = {"Do_nothing",2,250,300.000000,1300.000000,400.000000,1350.000000,0.000000,"Do nothing"}; +item60[] = {"Check_New_Player",2,250,-25.000000,875.000000,75.000000,925.000000,0.000000,"Check" \n "New Player" \n "Setup"}; +item61[] = {"check_new__player",4,218,-150.000000,925.000000,-50.000000,975.000000,0.000000,"check new " \n "player not null"}; +item62[] = {"true",8,218,-150.000000,-325.000000,-50.000000,-275.000000,0.000000,"true"}; +item63[] = {"Process_1",2,250,-25.000000,-275.000000,75.000000,-225.000000,0.000000,"Process"}; +item64[] = {"Wait_ArmA_Loading",4,218,-150.000000,-225.000000,-50.000000,-175.000000,0.000000,"Wait ArmA" \n "Loading Screen" \n "Done"}; +item65[] = {"Start_Loading_Sc",2,250,-25.000000,-175.000000,75.000000,-125.000000,0.000000,"Start Loading" \n "Screen"}; +item66[] = {"freshServer",4,218,-325.000000,225.000000,-225.000000,275.000000,0.000000,"freshServer"}; +item67[] = {"Update_Loadingscreen",2,250,-325.000000,300.000000,-225.000000,350.000000,0.000000,"Update" \n "Loadingscreen" \n "Message"}; +item68[] = {"true",8,218,-150.000000,300.000000,-50.000000,350.000000,0.000000,"true"}; +item69[] = {"Timeout_",4,218,125.000000,975.000000,225.000000,1025.000000,0.000000,"" \n "Timeout" \n ""}; +item70[] = {"ERROR_Player_Setup",2,250,275.000000,975.000000,375.000000,1025.000000,0.000000,"ERROR" \n "Player Setup" \n "Invalid"}; +item71[] = {"",7,210,471.000000,996.000000,479.000000,1004.000000,0.000000,""}; +item72[] = {"Server_Version_C",2,250,-25.000000,475.000000,75.000000,525.000000,0.000000,"Server Version" \n "Check"}; +item73[] = {"Version_Okay",4,218,-125.000000,525.000000,-25.000000,575.000000,0.000000,"Version" \n "Okay"}; +item74[] = {"",7,210,471.000000,496.000000,479.000000,504.000000,0.000000,""}; +item75[] = {"ERROR_Server_not_3",2,250,275.000000,575.000000,375.000000,625.000000,0.000000,"ERROR" \n "Server not" \n "Response"}; +item76[] = {"",7,210,471.000000,596.000000,479.000000,604.000000,0.000000,""}; +item77[] = {"new_character",4,218,-250.000000,675.000000,-150.000000,725.000000,10.000000,"new" \n "character"}; +item78[] = {"Hive_Response",4,218,-125.000000,625.000000,-25.000000,675.000000,0.000000,"Hive" \n "Response"}; +item79[] = {"load_old_charact",4,218,-125.000000,725.000000,-25.000000,775.000000,0.000000,"load old" \n "character"}; +item80[] = {"Process_2",2,250,-25.000000,675.000000,75.000000,725.000000,0.000000,"Process"}; +item81[] = {"Open_Gender_Selection",2,250,-400.000000,675.000000,-300.000000,725.000000,0.000000,"Open Gender" \n "Selection Dialog"}; +item82[] = {"Reopen_when_client",4,218,-400.000000,600.000000,-300.000000,650.000000,0.000000,"Reopen" \n "when client hit" \n "escape"}; +item83[] = {"Gender_Selected",4,218,-450.000000,750.000000,-350.000000,800.000000,10.000000,"Gender" \n "Selected"}; +item84[] = {"Timeout",4,218,-350.000000,750.000000,-250.000000,800.000000,0.000000,"Timeout"}; +item85[] = {"Send_character_s",2,250,-400.000000,825.000000,-300.000000,875.000000,0.000000,"Send" \n "character" \n "selection"}; +item86[] = {"Process_3",2,250,-25.000000,775.000000,75.000000,825.000000,0.000000,"Process"}; +item87[] = {"ERROR_Server_not_4",2,250,275.000000,775.000000,375.000000,825.000000,0.000000,"ERROR" \n "Server not" \n "Response"}; +link0[] = {0,62}; +link1[] = {2,3}; +link2[] = {3,7}; +link3[] = {3,44}; +link4[] = {4,5}; +link5[] = {5,6}; +link6[] = {5,12}; +link7[] = {6,39}; +link8[] = {7,9}; +link9[] = {8,48}; +link10[] = {9,8}; +link11[] = {10,28}; +link12[] = {11,72}; +link13[] = {12,13}; +link14[] = {13,14}; +link15[] = {14,42}; +link16[] = {15,20}; +link17[] = {16,60}; +link18[] = {17,24}; +link19[] = {18,19}; +link20[] = {18,78}; +link21[] = {19,75}; +link22[] = {20,21}; +link23[] = {21,71}; +link24[] = {22,87}; +link25[] = {23,25}; +link26[] = {24,50}; +link27[] = {25,74}; +link28[] = {26,10}; +link29[] = {27,49}; +link30[] = {27,69}; +link31[] = {28,43}; +link32[] = {29,1}; +link33[] = {31,21}; +link34[] = {32,33}; +link35[] = {33,26}; +link36[] = {34,35}; +link37[] = {35,11}; +link38[] = {35,36}; +link39[] = {36,37}; +link40[] = {37,38}; +link41[] = {38,74}; +link42[] = {39,34}; +link43[] = {39,40}; +link44[] = {39,66}; +link45[] = {40,41}; +link46[] = {41,42}; +link47[] = {42,38}; +link48[] = {44,45}; +link49[] = {45,4}; +link50[] = {45,46}; +link51[] = {46,47}; +link52[] = {47,48}; +link53[] = {48,14}; +link54[] = {49,17}; +link55[] = {50,51}; +link56[] = {50,53}; +link57[] = {51,52}; +link58[] = {52,29}; +link59[] = {53,54}; +link60[] = {54,55}; +link61[] = {54,56}; +link62[] = {55,57}; +link63[] = {56,59}; +link64[] = {57,58}; +link65[] = {58,52}; +link66[] = {59,58}; +link67[] = {60,15}; +link68[] = {60,61}; +link69[] = {61,27}; +link70[] = {62,63}; +link71[] = {63,64}; +link72[] = {64,65}; +link73[] = {65,2}; +link74[] = {66,67}; +link75[] = {67,68}; +link76[] = {68,39}; +link77[] = {69,70}; +link78[] = {70,71}; +link79[] = {71,32}; +link80[] = {72,23}; +link81[] = {72,73}; +link82[] = {73,18}; +link83[] = {74,76}; +link84[] = {75,76}; +link85[] = {76,31}; +link86[] = {77,81}; +link87[] = {78,80}; +link88[] = {79,86}; +link89[] = {80,77}; +link90[] = {80,79}; +link91[] = {81,82}; +link92[] = {81,83}; +link93[] = {81,84}; +link94[] = {82,81}; +link95[] = {83,85}; +link96[] = {84,85}; +link97[] = {85,79}; +link98[] = {86,16}; +link99[] = {86,22}; +link100[] = {87,31}; +globals[] = {0.000000,0,0,0,0,640,480,1,244,6316128,1,-207.564026,582.257507,1932.771484,781.734619,586,854,1}; +window[] = {2,-1,-1,-1,-1,838,1706,2998,26,3,604}; +*//*%FSM*/ +class FSM +{ + fsmName = "Epoch Login"; + class States + { + /*%FSM*/ + class INIT + { + name = "INIT"; + init = /*%FSM*/"titleCut ["""", ""BLACK FADED"", 1337];" \n + "0 fadeSound 0;" \n + "player enableSimulation false;" \n + "" \n + "_debug = true;" \n + "_myTime = diag_tickTime;" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Init"";" \n + "};" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Process_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class FINISH + { + name = "FINISH"; + init = /*%FSM*/"[] spawn {" \n + " disableSerialization;" \n + " waitUntil{!isNull (findDisplay 46)};" \n + " _display = findDisplay 46;" \n + " {" \n + " _display displayAddEventHandler [_x,([""CfgEpochClient"", _x, """"] call EPOCH_fnc_returnConfigEntryV2)];" \n + " } forEach ([""CfgEpochClient"", ""displayAddEventHandler"", []] call EPOCH_fnc_returnConfigEntryV2);" \n + " " \n + " player switchMove """";" \n + "};" \n + "" \n + "3 fadeSound 1;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Finish!"";" \n + "};" \n + "" \n + "" \n + "" \n + "player enableSimulation true;" \n + "" \n + "titleCut ["""", ""BLACK IN"", 1];" \n + "1338 cutText ["""",""PLAIN"",0]; " \n + "" \n + "progressLoadingScreen 1.0;" \n + "" \n + "endLoadingScreen;" \n + "EPOCH_loadingScreenDone = true;" \n + "" \n + "hintSilent ""Worked"" "/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + }; + }; + /*%FSM*/ + /*%FSM*/ + class Version_Check + { + name = "Version_Check"; + init = /*%FSM*/"if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Version Check"";" \n + "};" \n + "" \n + "// SHOULD BE:" \n + "_epoch_assets0 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_assets"");" \n + "_epoch_assets1 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_assets_1"");" \n + "_epoch_assets2 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""epoch_objects"");" \n + "_epoch_assets3 = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_assets_3"");" \n + "_epoch_config = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_config"");" \n + "_epoch_language = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_language"");" \n + "_epoch_underground = getText(configFile >> ""Epoch"" >> ""Version"" >> ""Underground_Epoch"");" \n + "_epoch_vehicles = getText(configFile >> ""Epoch"" >> ""Version"" >> ""A3_epoch_vehicles"");" \n + "_epoch_weapons = getText(configFile >> ""Epoch"" >> ""Version"" >> ""a3_epoch_weapons"");" \n + "" \n + "" \n + "// IS:" \n + "_my_epoch_assets0 = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_assets"" >> ""epochVersion"");" \n + "_my_epoch_assets1 = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_assets_1"" >> ""epochVersion"");" \n + "_my_epoch_assets2 = getText(configFile >> ""CfgPatches"" >> ""epoch_objects"" >> ""epochVersion"");" \n + "_my_epoch_assets3 = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_assets_3"" >> ""epochVersion"");" \n + "_my_epoch_config = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_config"" >> ""epochVersion"");" \n + "_my_epoch_language = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_language"" >> ""epochVersion"");" \n + "_my_epoch_underground = getText(configFile >> ""CfgPatches"" >> ""Underground_Epoch"" >> ""epochVersion"");" \n + "_my_epoch_vehicles = getText(configFile >> ""CfgPatches"" >> ""A3_epoch_vehicles"" >> ""epochVersion"");" \n + "_my_epoch_weapons = getText(configFile >> ""CfgPatches"" >> ""a3_epoch_weapons"" >> ""epochVersion"");" \n + "" \n + "progressLoadingScreen 0.1;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Wrong_Version + { + priority = 10.000000; + to="ERROR_Wrong_Version"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_epoch_assets0 != _epoch_assets0 ||" \n + "_my_epoch_assets1 != _epoch_assets1 ||" \n + "_my_epoch_assets2 != _epoch_assets2 ||" \n + "_my_epoch_assets3 != _epoch_assets3 ||" \n + "_my_epoch_config != _epoch_config ||" \n + "_my_epoch_language != _epoch_language ||" \n + "_my_epoch_underground != _epoch_underground ||" \n + "_my_epoch_vehicles != _epoch_vehicles ||" \n + "_my_epoch_weapons != _epoch_weapons"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class true + { + priority = 0.000000; + to="Arma_Version_Che"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_Player_UID + { + name = "Check_Player_UID"; + init = /*%FSM*/"if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Check PlayerUID"";" \n + "};" \n + "" \n + "_playerUID = getPlayerUID player;" \n + "" \n + "progressLoadingScreen 0.2;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class PlayerUID_Okay + { + priority = 10.000000; + to="Check_Server_1"; + precondition = /*%FSM*/"!isNil ""_playerUID"""/*%FSM*/; + condition=/*%FSM*/"_playerUID != """""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Empty_PlayerUID + { + priority = 0.000000; + to="ERROR_PlayerUID"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Wrong_Version + { + name = "ERROR_Wrong_Version"; + init = /*%FSM*/"_msg = ""You have an outdated version of Epoch"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_EPOCHVERSION = true;" \n + " publicVariableServer ""PLAYER_REJECT_EPOCHVERSION"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Disconnect + { + name = "Disconnect"; + init = /*%FSM*/"endLoadingScreen;" \n + "1338 cutText [_msg,""PLAIN"",0]; " \n + "deleteVehicle player;" \n + "call _rejectPlayer;" \n + "diag_log format [""(%1) %2"",diag_tickTime,_msg];" \n + "_myTime = diag_tickTime;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Check_if_Player + { + priority = 0.000000; + to="Reject_without_B"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 2"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_PlayerUID + { + name = "ERROR_PlayerUID"; + init = /*%FSM*/"_msg = ""Can not setup Player Object! (Error 01)"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_UID = true;" \n + " publicVariableServer ""PLAYER_REJECT_UID"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Setup_Player_Var + { + name = "Setup_Player_Var"; + init = /*%FSM*/"diag_log format[""DEBUG TIME WAITED: %1"", (diag_tickTime - _myTime)];" \n + "{" \n + " missionNamespace setVariable[(format[""EPOCH_player%1"", EPOCH_customVars select _forEachIndex]), _x];" \n + "} forEach _playerVariables;" \n + "" \n + """Loading Player Variables... Please wait!"" call Epoch_updateLoadingScreen;" \n + "" \n + "EPOCH_lastPlayerPos = getPosATL vehicle player;" \n + "" \n + "progressLoadingScreen 0.7;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Setup Player Variables"";" \n + "};" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Setup_EH_s_and_H"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Request_Hive + { + name = "Request_Hive"; + init = /*%FSM*/"_myTime = diag_tickTime;" \n + "" \n + "Epoch_my_Group = [];" \n + "" \n + "player remoteExec [""EPOCH_server_checkPlayer"",2];" \n + "" \n + "" \n + """Loading Player Data... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.5;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Hive_Response + { + priority = 0.000000; + to="Process_2"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_checkPlayer_PVC"""/*%FSM*/; + action=/*%FSM*/"_newChar = EPOCH_checkPlayer_PVC;" \n + "EPOCH_checkPlayer_PVC = nil;"/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not_3"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 120"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not + { + name = "ERROR_Server_not"; + init = /*%FSM*/"_msg = ""Authentication Failed, Disconnect and try again"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_NoResponse2 = true;" \n + " publicVariableServer ""PLAYER_REJECT_NoResponse2"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Wrong_Server + { + name = "ERROR_Wrong_Server"; + init = /*%FSM*/"_msg = format[""Server and Client running with different Version! (You: %1 // Server: %2)"",getText(configFile >> ""CfgMods"" >> ""Epoch"" >> ""version""),_serverVersion];" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_ServerVersion = true;" \n + " publicVariableServer ""PLAYER_REJECT_ServerVersion"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Setup_Player_Obj + { + name = "Setup_Player_Obj"; + init = /*%FSM*/"_ply = player;" \n + "_group = group player;" \n + "" \n + "player reveal _playerObject;" \n + "_playerPos = getposATL _playerObject;" \n + "" \n + "selectPlayer _playerObject;" \n + "" \n + "deleteVehicle _ply;" \n + "deleteGroup _group;" \n + "" \n + """Loading Player Body... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.8;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Setup Player Object"";" \n + "};" \n + "" \n + "_myTime = diag_tickTime;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Timeout_ + { + priority = 0.000000; + to="ERROR_Player_Setup"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 60"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class new_player_____p + { + priority = 0.000000; + to="Setup_Player_Var"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_playerObject == player"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Display_Message + { + name = "Display_Message"; + init = /*%FSM*/"[] spawn {" \n + " waitUntil{!isNull (findDisplay 46)};" \n + " (findDisplay 46) displayAddEventHandler [""KeyDown"",""true""];" \n + " (findDisplay 46) displayAddEventHandler [""KeyUp"",""true""];" \n + "};" \n + "diag_log format [""(%1) %2"",diag_tickTime,_msg];" \n + "_myTime = diag_tickTime;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Display_Message + { + priority = 0.000000; + to="Disconnect"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 10"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_Server + { + name = "Check_Server"; + init = /*%FSM*/"_myTime = diag_tickTime;" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Check Server"";" \n + "};" \n + """Checking Server... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.4;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Server_not_worki + { + priority = 10.000000; + to="ERROR_Server_not_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_BADHIVE""" \n + ""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Server_Okay + { + priority = 0.000000; + to="Server_Version_C"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""Epoch_ServerVersion"""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_1 + { + name = "ERROR_Server_not_1"; + init = /*%FSM*/"_msg = ""Server not Ready (Error 03)"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_NotReady2 = true;" \n + " publicVariableServer ""PLAYER_REJECT_NotReady2"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_Server_1 + { + name = "Check_Server_1"; + init = /*%FSM*/"progressLoadingScreen 0.3;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not_2"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 180"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class freshServer + { + priority = 0.000000; + to="Update_Loadingscreen"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"uiNamespace getVariable ['Epoch_freshServer', false]"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Server_Ready + { + priority = 0.000000; + to="Check_Server"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_SERVER"""/*%FSM*/; + action=/*%FSM*/"_serverUptime = EPOCH_SERVER;" \n + "EPOCH_SERVER = nil;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_2 + { + name = "ERROR_Server_not_2"; + init = /*%FSM*/"_msg = ""Server not Ready (Error 02)"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_NotReady1 = true;" \n + " publicVariableServer ""PLAYER_REJECT_NotReady1"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Reject_without_B + { + name = "Reject_without_B"; + init = /*%FSM*/"[] spawn {" \n + " waitUntil{!isNull (findDisplay 46)};" \n + " waitUntil {" \n + " (findDisplay 46) closeDisplay 0;" \n + " isNull (findDisplay 46)" \n + " };" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + }; + }; + /*%FSM*/ + /*%FSM*/ + class Arma_Version_Che + { + name = "Arma_Version_Che"; + init = /*%FSM*/"progressLoadingScreen 0.15;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Outdated_Version + { + priority = 10.000000; + to="ERROR_Wrong_Version_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"productVersion select 2 < getNumber(configFile >> ""CfgMods"" >> ""Epoch"" >> ""ArmAVersion"")"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Player_Object_Re + { + priority = 0.000000; + to="Check_Player_UID"; + precondition = /*%FSM*/"!isNull player"/*%FSM*/; + condition=/*%FSM*/"player == player"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Wrong_Version_1 + { + name = "ERROR_Wrong_Version_1"; + init = /*%FSM*/"_msg = ""You have an outdated version of ArmA 3"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_ARMAVERSION = true;" \n + " publicVariableServer ""PLAYER_REJECT_ARMAVERSION"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Setup_EH_s_and_H + { + name = "Setup_EH_s_and_H"; + init = /*%FSM*/"{" \n + " player addEventHandler [_x,([""CfgEpochClient"", _x, """"] call EPOCH_fnc_returnConfigEntryV2)];" \n + "} forEach ([""CfgEpochClient"", ""addEventHandler"", []] call EPOCH_fnc_returnConfigEntryV2);" \n + "" \n + "if (count EPOCH_playerHitPoints isEqualTo count ((getAllHitPointsDamage player) param [0,[]])) then {" \n + " {" \n + " player setHitIndex [_forEachIndex, _x];" \n + " }forEach EPOCH_playerHitPoints;" \n + "};" \n + "" \n + "[] spawn EPOCH_masterLoop;" \n + "true call EPOCH_fnc_Weather;" \n + "[5,100] spawn EPOCH_niteLight;" \n + "" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Setup EH's"";" \n + "};" \n + "" \n + """Loading... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.9;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Has_Current_Weap + { + priority = 10.000000; + to="Find_Active_Weap"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_currentWeapon != """""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class no_weapons + { + priority = 0.000000; + to="Process"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_currentWeapon == """""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process + { + name = "Process"; + init = /*%FSM*/"progressLoadingScreen 0.975;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Preload_done + { + priority = 0.000000; + to="FINISH"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"preloadCamera _playerPos"/*%FSM*/; + action=/*%FSM*/"call compile _playerGroupOnline;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Find_Active_Weap + { + name = "Find_Active_Weap"; + init = /*%FSM*/"_activeWeapon = currentWeapon player;" \n + "progressLoadingScreen 0.95;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Current_Weapon_S + { + priority = 0.000000; + to="Do_nothing"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_activeWeapon == _currentWeapon"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Current_Weapon_Not + { + priority = 0.000000; + to="Select_Weapon"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_activeWeapon != _currentWeapon"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Select_Weapon + { + name = "Select_Weapon"; + init = /*%FSM*/"_currentWeapon spawn {" \n + " uiSleep 1; " \n + " player selectWeapon _this;" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Process"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Do_nothing + { + name = "Do_nothing"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Process"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Check_New_Player + { + name = "Check_New_Player"; + init = /*%FSM*/"_myTime = diag_tickTime;" \n + "" \n + """Loading Player Inventory... Please wait!"" call Epoch_updateLoadingScreen;" \n + "progressLoadingScreen 0.6;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class check_new__player + { + priority = 0.000000; + to="Setup_Player_Obj"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!(isNull _playerObject) && {_playerObject getVariable [""SETUP"",false]}"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 120"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process_1 + { + name = "Process_1"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Wait_ArmA_Loading + { + priority = 0.000000; + to="Start_Loading_Sc"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"{!isnull _x} count ((uinamespace getvariable ""loading_displays"") - [finddisplay 18]) == 0"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Start_Loading_Sc + { + name = "Start_Loading_Sc"; + init = /*%FSM*/"startLoadingScreen ["""",""EpochLoadingScreen""];" \n + "if (_debug) then {" \n + " diag_log ""EPOCH-LOGIN: Start Loadingscreen"";" \n + "};" \n + """Starting Epoch... Please wait!"" call Epoch_updateLoadingScreen;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Version_Check"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Update_Loadingscreen + { + name = "Update_Loadingscreen"; + init = /*%FSM*/"uiNamespace setVariable ['Epoch_freshServer', false];" \n + "" \n + """Server initializing... Please wait!"" call Epoch_updateLoadingScreen;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Check_Server_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Player_Setup + { + name = "ERROR_Player_Setup"; + init = /*%FSM*/"_msg = ""Problem setting up player"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_InvaildSetup = true;" \n + " publicVariableServer ""PLAYER_REJECT_InvaildSetup"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Server_Version_C + { + name = "Server_Version_C"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Wrong_Server_Ver + { + priority = 10.000000; + to="ERROR_Wrong_Server"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"Epoch_ServerVersion != getText(configFile >> ""CfgMods"" >> ""Epoch"" >> ""version"")"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Version_Okay + { + priority = 0.000000; + to="Request_Hive"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_3 + { + name = "ERROR_Server_not_3"; + init = /*%FSM*/"_msg = ""Authentication Failed, Disconnect and try again"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_HiveNotResponse = true;" \n + " publicVariableServer ""PLAYER_REJECT_HiveNotResponse"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process_2 + { + name = "Process_2"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class new_character + { + priority = 10.000000; + to="Open_Gender_Selection"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_newChar"/*%FSM*/; + action=/*%FSM*/"endLoadingScreen;" \n + "_myGenderTime = diag_tickTime;"/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class load_old_charact + { + priority = 0.000000; + to="Process_3"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/"_myTime = diag_tickTime;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Open_Gender_Selection + { + name = "Open_Gender_Selection"; + init = /*%FSM*/"createdialog ""SelectGender"";"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Gender_Selected + { + priority = 10.000000; + to="Send_character_s"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_PlayerIsMale"""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Timeout + { + priority = 0.000000; + to="Send_character_s"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"((diag_tickTime - _myGenderTime) > 30)"/*%FSM*/; + action=/*%FSM*/"EPOCH_PlayerIsMale = true;" \n + "closeDialog 0;"/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Reopen_when_client + { + priority = 0.000000; + to="Open_Gender_Selection"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!dialog && isNil ""EPOCH_PlayerIsMale"""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Send_character_s + { + name = "Send_character_s"; + init = /*%FSM*/"startLoadingScreen ["""",""EpochLoadingScreen""];" \n + """Gender Selected... Please wait!"" call Epoch_updateLoadingScreen;" \n + "" \n + "[player,EPOCH_PlayerIsMale] remoteExec [""EPOCH_server_loadPlayer"",2];" \n + "EPOCH_PlayerIsMale = nil;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class load_old_charact + { + priority = 0.000000; + to="Process_3"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/"_myTime = diag_tickTime;"/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Process_3 + { + name = "Process_3"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Timeout_No_Respo + { + priority = 0.000000; + to="ERROR_Server_not_4"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(diag_tickTime - _myTime) > 120"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Response + { + priority = 0.000000; + to="Check_New_Player"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isNil ""EPOCH_C_SET"""/*%FSM*/; + action=/*%FSM*/"_array = EPOCH_C_SET;" \n + "EPOCH_C_SET = nil;" \n + "_playerObject = _array deleteAt 0;" \n + "_playerVariables = _array deleteAt 0;" \n + "_currentWeapon = _array deleteAt 0;" \n + "_magCount = _array deleteAt 0;" \n + "Epoch_my_GroupUID = _array deleteAt 0;" \n + "Epoch_canBeRevived = _array deleteAt 0;" \n + "Epoch_personalToken = _array deleteAt 0;" \n + "reverse _serverUptime;" \n + "_serverUptime pushBack (_array deleteAt 0);" \n + "reverse _serverUptime;" \n + "_serverUptime call EPOCH_client_publicEH;" \n + "_playerGroupOnline = _array deleteAt 0;" \n + "" \n + ""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class ERROR_Server_not_4 + { + name = "ERROR_Server_not_4"; + init = /*%FSM*/"_msg = ""Authentication Failed, Disconnect and try again"";" \n + "_msg call Epoch_updateLoadingScreen;" \n + "diag_log _msg;" \n + "" \n + "_rejectPlayer = {" \n + " PLAYER_REJECT_HiveLoadChar = true;" \n + " publicVariableServer ""PLAYER_REJECT_HiveLoadChar"";" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="Display_Message"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + }; + initState="INIT"; + finalStates[] = + { + "FINISH", + "Reject_without_B", + }; +}; +/*%FSM*/ \ No newline at end of file diff --git a/Sources/mpmissions/epoch.utes/description.ext b/Sources/mpmissions/epoch.utes/description.ext index cfe65cba..8783e3aa 100644 --- a/Sources/mpmissions/epoch.utes/description.ext +++ b/Sources/mpmissions/epoch.utes/description.ext @@ -50,6 +50,7 @@ class cfgFunctions }; class postinit { + file = "init\fn_postinit.sqf"; postInit = 1; }; }; diff --git a/Sources/mpmissions/epoch.utes/init/client_init.sqf b/Sources/mpmissions/epoch.utes/init/client_init.sqf new file mode 100644 index 00000000..4a32e342 --- /dev/null +++ b/Sources/mpmissions/epoch.utes/init/client_init.sqf @@ -0,0 +1,76 @@ +/* + 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: + https://github.com/EpochModTeam/Epoch/tree/master/Sources/epoch_code/init/client_init.sqf +*/ +//Variables +EPOCH_CraftingItem = ""; +EPOCH_ESP_TARGETS = []; +EPOCH_ESPMAP_TARGETS = []; +EPOCH_ESPGROUPS = []; +EPOCH_ESPGROUPCOLORS = []; +EPOCH_ESP_PLAYER = false; +EPOCH_ESP_VEHICLES = false; +EPOCH_ESP_VEHICLEPLAYER = []; +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"]; +if (isNil 'EPOCH_diag_fps') then { + EPOCH_diag_fps = 0; +}; +EPOCH_playerIsSwimming = false; +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 = []; +EPOCH_lastPlayerPos = [0,0,0]; +EPOCH_prevOffer = []; +EPOCH_drawIcon3d = false; +EPOCH_velTransform = false; +EPOCH_stabilityTarget = objNull; +EPOCH_currentVehicle = objNull; +EPOCH_currentTarget = objNull; +EPOCH_LootedBlds = []; +EPOCH_soundLevel = 1; +EPOCH_arr_interactedObjs = []; +EPOCH_buildOption = 0; +EPOCH_nearestLocations = []; +onEachFrame EPOCH_onEachFrame; + +EPOCH_LastAirDrop = time; +EPOCH_AirDropCheck = getNumber(missionConfigFile >> "CfgEpochAirDrop" >> "AirDropFreq"); +if(EPOCH_AirDropCheck < 120)then{EPOCH_AirDropCheck = 120;}; +EPOCH_AirDropChance = getNumber(missionConfigFile >> "CfgEpochAirDrop" >> "AirDropChance"); +if(EPOCH_AirDropChance < 0)then{EPOCH_AirDropChance = 101;EPOCH_AirDropCheck = 99999;}; + +EPOCH_droneRndChance = 100; + +// Custom Keys +EPOCH_keysActionPressed = false; //prevents EH spam +0 call EPOCH_clientKeyMap; + +//ON INIT and RESPAWN +call EPOCH_clientInit; + +[] execFSM "\x\addons\a3_epoch_code\system\SPVEH.fsm"; +[] execFSM "system\player_login.fsm"; + +true diff --git a/Sources/mpmissions/epoch.utes/init/fn_postinit.sqf b/Sources/mpmissions/epoch.utes/init/fn_postinit.sqf new file mode 100644 index 00000000..8be5aa09 --- /dev/null +++ b/Sources/mpmissions/epoch.utes/init/fn_postinit.sqf @@ -0,0 +1,18 @@ +/* + Author: Aaron Clark - EpochMod.com + + Contributors: + + Description: + Initalize Player + + 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/master/Sources/epoch_code/init/fn_postinit.sqf +*/ +if (!isDedicated && isMultiplayer && hasInterface) then { + call compile preprocessFileLineNumbers "init\client_init.sqf"; +}; +true