From 055b129bcc1d63d51d6d30116665fafedc54a444 Mon Sep 17 00:00:00 2001 From: vbawol Date: Sun, 8 Nov 2015 09:26:38 -0600 Subject: [PATCH] 0.3.5.029 --- Changelogs/0.3.5.0.txt | 23 ++- Server_Install_Pack/@epochhive/epochah.hpp | 10 +- Server_Install_Pack/sc/battleye/attachto.txt | 2 +- .../sc/battleye/createvehicle.txt | 2 +- Server_Install_Pack/sc/battleye/setpos.txt | 2 +- Sources/epoch_code/System/player_login.fsm | 2 +- .../compile/building/EPOCH_checkBuild.sqf | 2 +- .../compile/building/staticMoveV2.sqf | 137 -------------- .../compile/functions/EPOCH_pushCustomVar.sqf | 37 ++-- .../compile/setup/EPOCH_clientRespawn.sqf | 4 +- .../compile/setup/EPOCH_clientRevive.sqf | 2 +- .../compile/setup/EPOCH_masterLoop.sqf | 19 +- .../compile/setup/EPOCH_masterLoop_v2.sqf | 40 ++++ .../compile/setup/masterLoop/Event1.sqf | 142 ++++++++++++++ .../compile/setup/masterLoop/Event2.sqf | 94 +++++++++ .../compile/setup/masterLoop/Event3.sqf | 6 + .../compile/setup/masterLoop/Event4.sqf | 17 ++ .../compile/setup/masterLoop/Event5.sqf | 60 ++++++ .../compile/setup/masterLoop/Event6.sqf | 1 + .../compile/setup/masterLoop/Event7.sqf | 23 +++ .../compile/setup/masterLoop/init.sqf | 179 ++++++++++++++++++ .../compile/traders/EPOCH_startNpcTrade.sqf | 1 - Sources/epoch_code/config.cpp | 2 + Sources/epoch_code/gui/Epoch_GUI_rmx.hpp | 130 +++++++++++++ .../dynamenu/Epoch_dynamicMenuPopulate.sqf | 7 +- .../scripts/post_process/Epoch_setDrunk.sqf | 74 ++++++++ Sources/epoch_code/init/both_init.sqf | 9 +- Sources/epoch_code/init/client_init.sqf | 1 + .../epoch_config/Configs/CfgBaseBuilding.hpp | 5 + .../epoch_config/Configs/CfgEpochClient.hpp | 7 +- .../epoch_config/Configs/CfgMasterLoop.hpp | 42 ++++ Sources/epoch_config/Configs/CfgVehicles.hpp | 43 ++++- Sources/epoch_config/config.cpp | 3 +- .../epoch_server/system/server_monitor.fsm | 4 +- 34 files changed, 935 insertions(+), 197 deletions(-) delete mode 100644 Sources/epoch_code/compile/building/staticMoveV2.sqf create mode 100644 Sources/epoch_code/compile/setup/EPOCH_masterLoop_v2.sqf create mode 100644 Sources/epoch_code/compile/setup/masterLoop/Event1.sqf create mode 100644 Sources/epoch_code/compile/setup/masterLoop/Event2.sqf create mode 100644 Sources/epoch_code/compile/setup/masterLoop/Event3.sqf create mode 100644 Sources/epoch_code/compile/setup/masterLoop/Event4.sqf create mode 100644 Sources/epoch_code/compile/setup/masterLoop/Event5.sqf create mode 100644 Sources/epoch_code/compile/setup/masterLoop/Event6.sqf create mode 100644 Sources/epoch_code/compile/setup/masterLoop/Event7.sqf create mode 100644 Sources/epoch_code/compile/setup/masterLoop/init.sqf create mode 100644 Sources/epoch_code/gui/scripts/post_process/Epoch_setDrunk.sqf create mode 100644 Sources/epoch_config/Configs/CfgMasterLoop.hpp diff --git a/Changelogs/0.3.5.0.txt b/Changelogs/0.3.5.0.txt index 7693935d..1e0b67b5 100644 --- a/Changelogs/0.3.5.0.txt +++ b/Changelogs/0.3.5.0.txt @@ -1,11 +1,24 @@ -[Added] Hesco barrier. -[Added] Persistent Spike traps. +[Added] Metal Floors as upgrade in-place option for wood floors. +[Added] Gender selection screen improvements. [Added] New interaction system. [Added] Documentation on server core framework functions and hive calls. -[Added] Custom Epoch Tank trap. -[Added] New version of the Fishing Rod. +[Added] Persistent wood and metal spike traps. +[Added] New custom 3x wide hesco type barrier. +[Added] New custom tank trap. +[Added] Updated version of the Fishing Rod. [Added] muzzle_snds_338_sand to loot and pricing tables. -[Changed] Overhaul of secure storage system with support for new UI. +[Added] Client side master loop is now fully config (CfgMasterLoop) based. +[Changed] Final overhaul of secure storage system with support for new UI. +[Changed] Increased reverse token check timeout from 90 to 180 seconds. +[Changed] Server pack Tools folder now contains InstalEpoch.cmd that is an updated version of the command line download Epoch client files download script for steam workshop. +[Fixed] Was unable to use cursorTarget underwater, added new function EPOCH_fnc_cursorTarget that works everywhere. +[Fixed] NPC item trades that cannot fit in the players inventory will be placed at the feet of the player. +[Fixed] If player started a trade with a zero Krypto and then obtained Krypto they had to relog to be able to trade again. +[Fixed] Removed forced weather sync on server startup from server init phase so weather changes are now solely dependent on Epoch Events weather script. +[Fixed] Added private array to all Epoch Event scripts due to feedback. +[Fixed] Not loosing Stamina while swimming. +[Fixed] Removed extra roadway on top of columns. [Fixed] Force trader data save to save when loading starter items. [Fixed] Dynamic traders did not correctly track the stored vehicle count and limits. +[Fixed] Error Zero divisor in master loop. [Fixed] .rpt error after gutting animal added by adding isNull check to animal brain. diff --git a/Server_Install_Pack/@epochhive/epochah.hpp b/Server_Install_Pack/@epochhive/epochah.hpp index baeb4458..38ed95cf 100644 --- a/Server_Install_Pack/@epochhive/epochah.hpp +++ b/Server_Install_Pack/@epochhive/epochah.hpp @@ -3,7 +3,7 @@ antihack_Enabled = true; // built-in Anti-Hack antihack_cfgPatchesCheck = true; // cfgPatches (AddOn Check) antihack_PVSPrefix = "EPAH_"; // used to help whitelist pveh variables in BE without BEC and watchdog, leave blank to use no prefix. antihack_cfgPatchesCfg[] = {0}; // 0 == BAN - 1 = LOG -antihack_ahInitAuthCfg[] = {0,90}; // 0 == BAN - 1 = LOG, 60 = ban or log if anti hack is not started in 90 seconds +antihack_ahInitAuthCfg[] = {0,180}; // 0 == BAN - 1 = LOG, 60 = ban or log if anti hack is not started in 180 seconds antihack_whitelistedCfgPatches[] = {"A3_AIR_F_RTD","AiA_Worlds_Author","AiA_Worlds_Grid","AiA_BaseConfig_F","AiA_A1AlwaysDummy","CAVideo2_PMC","CA_AnimsHotfix","CA_CutSceneAnims","CAIntroAnims","CAUSMCD","CAVoice","CAweapons3_aks74pso","CAWeapons3_ammocrates","CAweapons3_ksvk","CAweapons3_m107","CAweapons3_m16a4_acg_gl","CAweapons3_m16a4_acg","CAweapons3_m16a4_gl","CAweapons3_m16a4","CAWeapons3","CTI_buildingsBmp2_hq","CTI_buildingsM113_hq","DSHkM_Mini","M2HD_Mini","MK19_Tripod","Warfare","WarfareBuildings_Stinger_Twice_static","WarfareBuildings_T72_RACS","WarfareBuildings_TOW_Tripod","AiA_cba_xeh_a2_Dummy","AiA_CBA_A2_xeh_Dummy","AiA_cba_xeh_oa_Dummy","AiA_CBA_OA_xeh_Dummy","AiA_CA_Data","AiA_A10_Data","AiA_Afghan_Data","AiA_Air2_Data","AiA_Air3_Data","AiA_Air_Data","AiA_Air_e_Data","AiA_Animations_Data","AiA_Animations_Config","AiA_Bohemia_Data","AiA_Bootcamp_acr_Data","AiA_Buildings2_Data","AiA_Buildings2_Ind_Cementworks_Data","AiA_Buildings_Data","AiA_Ca_acr_Data","AiA_CA_Config","CAData","AiA_CA_Config_Data_ParticleEffects","CAData_ParticleEffects","AiA_Ca_e_Data","AiA_Ca_pmc_Data","AiA_Characters2_Data","AiA_Chernarus_Data","AiA_Chernarus_Data_Data","AiA_Chernarus_Data_Layers_Data","AiA_Chernarus_Summer_Data","AiA_Cti_buildings_Data","AiA_CA_Data_Data_ParticleEffects","AiA_Data_baf_Data","AiA_Desert2_Data","Desert2_Objects","AiA_Desert_Data","AiA_Desert_e_Data","AiA_Hotfix_Data","AiA_Introanims_Data","CALanguage","AiA_Language_acr_Data","AiA_Language_baf_Data","AiA_Language_e_Data","AiA_Language_pmc_Data","CALanguage_missions","AiA_Languagemissions_acr_Data","AiA_Languagemissions_baf_Data","CALanguage_missions_e","AiA_Languagemissions_pmc_Data","AiA_Misc2_Data","AiA_Misc3_Data","AiA_Misc_Data","AiA_Misc_acr_Data","AiA_Misc_e_Data","AiA_Plants2_Bush_Data","AiA_Plants2_Clutter_Data","AiA_Plants2_Misc_Data","AiA_Plants2_Plant_Data","AiA_Plants2_Tree_Data","AiA_Plants_Data","AiA_Plants_Config","CAPlants","AiA_Plants_e2_Data","AiA_Plants_e_Data","AiA_Plants_pmc_Data","AiA_Provinggrounds_pmc_Data","AiA_Roads2_Data","AiA_Roads2_Config","CARoads2","CARoads2Bridge","CARoads2Dam","AiA_Roads_Data","AiA_Roads_Config","CARoads","AiA_Roads_e_Data","AiA_Roads_pmc_Data","AiA_Roads_pmc_Config","CARoads_PMC_Bridge","AiA_Rocks2_Data","AiA_Rocks2_Config","CARocks2","AiA_Rocks_Data","AiA_Rocks_Config","CARocks","AiA_Rocks_e_Data","AiA_Sara_Data","AiA_Saralite_Data","AiA_Shapur_baf_Data","AiA_Signs2_Data","AiA_Signs2_Config","CASigns2","AiA_Signs_Data","AiA_Signs_Config","CASigns","AiA_Signs_e_Data","AiA_Sounds_Data","AiA_Sounds_Config","CASounds","AiA_Sounds_e_Data","AiA_Structures_Data","pond_test","AiA_Structures_e_Data","AiA_Structures_pmc_Data","AiA_Takistan_Data","AiA_Takistan_Data_Data","AiA_Takistan_Data_Layers_Data","AiA_Tracked2_Data","AiA_Tracked_Data","AiA_Tracked_e_Data","AiA_Ui_Data","AiA_Utes_Data","AiA_Utes_Config","Utes","AiA_Water2_Data","CAWater2_LHD","AiA_Water_Data","AiA_Weapons2_Data","AiA_Weapons_Data","AiA_Weapons_e_Data","AiA_Weapons_pmc_Data","AiA_Wheeled2_Data","AiA_Wheeled_Data","AiA_Wheeled_e_Data","AiA_Zargabad_Data","AiA_Models_DBE1_Data","Music_DBE1","ploty_DBE1","Roads_DBE1","AiA_Sara_dbe1_Data","Disable_XEH_Logging","AiA_TKOH_Dummy","HSim_Data_H","HSim_Data_H_data_ParticleEffects","HSim_Data_H_data_ParticleEffects_rotor_blades","HSim_Dubbing_H","HSim_DubbingRadio_H","HSim_Editor_H","Intro_Island_H","HSim_Missions_H","HSim_ModulesCore_H","HSim_ModulesCore_H_AmbientCombat","HSim_ModulesCore_H_DynO","HSim_ModulesCore_H_Functions","HSim_ModulesCore_H_GarbageCollector","HSim_ModulesCore_H_Functions_E","HSim_ModulesCore_H_OO","HSim_ModulesCore_H_Functions_PMC","HSim_Music_H","HSim_Sounds_H","South_Asia_H","HSim_UIFonts_H","United_States_H","HSim_Animals_H","HSim_Animals_H_Anim_Config","HSim_Animals_H_Dog","HSim_Characters_H_Faces","HSim_Characters_H_Heads","HSim_Modules_H","HSim_UI_H","HSim_Weapons_H","HSim_Weapons_H_AK47","HSim_Weapons_H_DShKM","HSim_Weapons_H_Glock","HSim_Weapons_H_HandItems","HSim_Weapons_H_M16","HSim_Weapons_US_H","HSim_Characters_H","HSim_Characters_US_H","HSim_Missions_H_FreeFlight","HSim_Functions_Base_H","HSim_Water_H","HSim_Water_H_Civ_FishingBoat_Large","HSim_Water_H_Civ_Jetboat","HSim_Water_H_Civ_Yacht","HSim_Water_H_Container_Ship","HSim_Water_H_Cruise_Ship","HSim_Water_H_Destroyer","HSim_Water_H_Fishing_Boat","HSim_Water_H_Fregata","HSim_Water_H_LHD","HSim_Water_H_Oil_tanker","HSim_Water_H_Rubber_Boat","HSim_Water_H_Whales","HSim_Water_H_Whales_GreyWhale","HSim_Water_H_Whales_Whale1","HSim_Weapons_H_IGLA","HSim_Weapons_US_H_M2","HSim_Wheeled_H","HSim_Wheeled_H_Ambulance","HSim_Wheeled_H_FireTruck","HSim_Wheeled_H_Hatchback","HSim_Wheeled_H_Military_Offroad_LR","HSim_Wheeled_H_Military_Pickup_DSHKM","HSim_Wheeled_H_Offroad","HSim_Wheeled_H_Police_Car","HSim_Wheeled_H_TowingTractor","HSim_Wheeled_H_Tractor","HSim_Wheeled_H_Trailers","HSim_Wheeled_H_Truck_Light_Transport","HSim_Wheeled_H_Ural","HSim_Wheeled_H_Van_Passenger","HSim_Wheeled_US_H","HSim_Wheeled_US_H_Military_Offroad","HSim_Wheeled_US_H_Military_Truck","HSim_Wheeled_US_H_Pickup_01","HSim_Wheeled_US_H_Pickup_02","HSim_Wheeled_US_H_SUV","HSim_Wheeled_US_H_Truck_US_Type","HSim_Air_H","HSim_Air_H_Aircraft_A","HSim_Air_H_Aircraft_C","HSim_Air_H_Aircraft_D","HSim_Air_H_Aircraft_E_H","HSim_Air_H_Airliner_A","HSim_Air_H_Airliner_B","HSim_Air_H_Parachute","HSim_Air_US_H","HSim_Air_US_H_Helicopters_Heavy","HSim_Air_US_H_Helicopters_Light","HSim_Air_US_H_Helicopters_Medium","HSim_Misc_H","HSim_Misc_H_Antena","HSim_Misc_H_Barels","HSim_Misc_H_Bleacher","HSim_Misc_H_BoardsPack","HSim_Misc_H_CncBlock","HSim_Misc_H_Doghouse","HSim_Misc_H_Engine_Crane","HSim_Misc_H_Fence","HSim_Misc_H_Fire_Extinguisher","HSim_Misc_H_Fire_Suppression","HSim_Misc_H_First_Aid","HSim_Misc_H_Flagpole","HSim_Misc_H_Folding_Ladder","HSim_Misc_H_FuelCan","HSim_Misc_H_Heliport_Furniture","HSim_Misc_H_Helicopter_Parts","HSim_Misc_H_Helipads","HSim_Misc_H_Heliport_Objects","HSim_Misc_H_Helpers","HSim_Misc_H_Info_Board","HSim_Misc_H_Infostands","HSim_Misc_H_Inspection_Visuals","HSim_Misc_H_Interior","HSim_Misc_H_Loudspeakers","HSim_Misc_H_Market","HSim_Misc_H_Office_Objects","HSim_Misc_H_Perimeter_Ligh","HSim_Misc_H_Pike","HSim_Misc_H_Platform_Cart","HSim_Misc_H_Portable_Generator","HSim_Misc_H_Props","HSim_Misc_H_SawHorse","HSim_Misc_H_Shooting_Range","HSim_Misc_H_Signs","HSim_Misc_H_Sink","HSim_Misc_H_Targets","HSim_Misc_H_Tent","HSim_Misc_H_Toilet","HSim_Misc_H_Tools","HSim_Misc_H_Tools_Racking","HSim_Misc_H_Trash","HSim_Misc_H_Weather_Station","HSim_Misc_H_Weld_Gastank","HSim_Misc_H_Wheel_Chocks","HSim_Misc_H_Wheeled_Scaffolding","HSim_Misc_H_wheeled_tool_cart","HSim_Misc_H_Wheeled_Whiteboard","HSim_Misc_H_Winch","HSim_Misc_H_Windsock","HSim_Misc_H_Workbench","HSim_Misc_H_Wrecks","HSim_Structures_H","HSim_Structures_H_Airport_Papi","HSim_Structures_H_Harbour","HSim_Structures_H_Heliports_Heliport_Big","HSim_Structures_H_Heliports_Heliport_Small","HSim_Structures_H_Industrial_A_CraneCon","HSim_Structures_H_Industrial_Rooftop_Objects","HSim_Structures_US_H","HSim_Structures_US_H_Bld_US","HSim_Structures_US_H_Landmarks_Space_Needle","HSim_Tracked_H","HSim_Tracked_H_BMP2","HSim_Tracked_US_H","HSim_Tracked_US_H_M1A2","HSim_Tracked_US_H_MLRS","HSim_Data_H_EditorGroups","HSim_Anims_H","HSim_Anims_H_config_sdr","HSim_Anims_H_config_wmn","Hsim_Language_H","Hsim_Language_missions_H","AiA_StandaloneTerrainPack_Dummy","CA_ACR","CA_Animals2_Anim_Config","CA_Anims_Char","CA_Anims_E_Wmn","CA_E","CA_PMC","CAAir","CACharacters","CATracked","CAUI","CAWater","CAWater2","CAWater2_seafox","CAWeapons","CAWeapons_Warfare_weapons","CAWheeled","CAWheeled_E","CAWheeled2","6G30_DBE1","Arma2_Ka52","BI_SRRS","CA_AH64D","CA_AIR_E_MQ9PredatorB","CA_AIR_E_Su25","CA_AIR2_Su25","CA_Animals_E","CA_Animals2","CA_Animals2_Chicken","CA_Animals2_Cow","CA_Animals2_Dogs","CA_Animals2_Dogs_Fin","CA_Animals2_Dogs_Pastor","CA_Animals2_Goat","CA_Animals2_Rabbit","CA_Animals2_Sheep","CA_Animals2_WildBoar","CA_Anims","CA_Anims_E","CA_Anims_E_Sdr","CA_Anims_Sdr","CA_Anims_Wmn","CA_CommunityConfigurationProject_E","CA_CruiseMissile","CA_Dubbing","CA_Dubbing_Baf","CA_Dubbing_Counterattack","CA_Dubbing_E","CA_Dubbing_PMC","CA_DubbingRadio_E","CA_DubbingRadio_PMC","CA_E_ParticleEffects","CA_Editor","CA_HC_Sounds","CA_Heads","CA_HighCommand","CA_L39","CA_Missions","CA_Missions_AlternativeInjurySimulation","CA_Missions_AmbientCombat","CA_Missions_Armory1","CA_Missions_Armory2","CA_Missions_BAF","CA_Missions_BAF_2","CA_Missions_BAF_Templates_SecOps","CA_Missions_BattlefieldClearance","CA_Missions_E","CA_Missions_E_Armory2","CA_Missions_E_SecOps","CA_Missions_E_Templates_SecOps","CA_Missions_FirstAidSystem","CA_Missions_GarbageCollector","CA_Missions_PMC","CA_Missions_SecOps","CA_Missions_Templates_SecOps","CA_Missions2_PMC","CA_Modules","CA_Modules_Alice","CA_Modules_Animals","CA_Modules_ARTY","CA_Modules_clouds","CA_Modules_Coin","CA_Modules_DynO","CA_Modules_E","CA_Modules_E_DynO","CA_Modules_E_Jukebox","CA_Modules_E_OO","CA_Modules_E_UAV","CA_Modules_E_UAV_Heli","CA_Modules_E_Weather","CA_Modules_Functions","CA_Modules_Marta","CA_Modules_PMC","CA_Modules_PMC_SimpleFIrstAid","CA_Modules_Silvie","CA_Modules_StratLayer","CA_Modules_UAV","CA_Modules_ZoRA","CA_MPA","CA_MPA_Challenges","CA_MPA_Core","CA_MPA_MP","CA_MPA_Scenarios","CA_Sounds_Baf","CA_SoundsMissions_E","CA_Support","CAA10","CAAir_BAF","CAAir_BAF_CH_47F","CAAir_E","CAAir_E_A10","CAAir_E_AH64D","CAAir_E_AH6J","CAAir_E_An2","CAAir_E_C130J","CAAir_E_CH_47F","CAAir_E_Halo","CAAir_E_Mi24","CAAir_E_MI8","CAAir_E_UH1H_EP1","CAAir_E_UH60M","CAAir_PMC","CAAir_PMC_KA137","CAAir_PMC_KA60","CAAir2","CAAir2_C130J","CAAir2_ChukarTarget","CAAir2_F35B","CAAir2_MQ9PredatorB","CAAir2_MV22","CAAir2_Pchela1T","CAAir2_UH1Y","CAAir3","CAAir3_Su34","CAAnimals","CACharacters_BAF","CACharacters_BAF_Head","CACharacters_E","CACharacters_E_Head","CACharacters_PMC","CACharacters_PMC_Head","CACharacters_W_BAF","CACharacters2","CAFonts","CAMisc_fix","CAMisc_fix_A2FREE","CAMisc_fix_air","CAMisc_fix_Ch2","CAMisc_fix_Str","CAMisc_fix_Weap","CAMP_Armory_Misc","CAMP_Armory_Misc_Concrete_Wall","CAMP_Armory_Misc_Entrance_Gate","CAMP_Armory_Misc_Info_Board","CAMP_Armory_Misc_Infostands","CAMP_Armory_Misc_Laptop","CAMP_Armory_Misc_Loudspeakers","CAMP_Armory_Misc_Plasticpole","CAMP_Armory_Misc_Red_Light","CAMP_Armory_Misc_Sign_Armex","CAMP_Armory_Misc_Sign_Direction","CAMusic","CAMusic_E","CAMusic_PMC","CASounds_E","CASounds_Missions","CATracked_BAF","CATracked_E","CATracked_E_BMP2","CATracked_E_M1_Abrams","CATracked_E_M113","CATracked_E_M2A2_Bradley","CATracked_E_T34","CATracked_E_T55","CATracked_E_T72","CATracked_E_us_m270mlrs","CATracked_E_ZSU","CATracked_W_BAF","CATracked2","CATracked2_2S6M_Tunguska","CATracked2_AAV","CATracked2_BMP3","CATracked2_T34","CATracked2_T90","CATracked2_us_m270mlrs","CAWater2_Destroyer","CAWater2_fishing_boat","CAWater2_Fregata","CAWater2_smallboat_1","CAWeapons_2b14_82mm_Mortar","CAWeapons_AK","CAWeapons_AmmoBoxes","CAWeapons_BAF","CAWeapons_bizon","CAWeapons_Colt1911","CAWeapons_DMR","CAWeapons_E","CAWeapons_E_AGS","CAWeapons_E_AK","CAWeapons_E_AmmoBoxes","CAWeapons_E_Colt1911","CAWeapons_E_D30","CAWeapons_E_DSHKM","CAWeapons_E_FIM92_static","CAWeapons_E_fnfal","CAWeapons_E_G36","CAWeapons_E_GrenadeLauncher","CAWeapons_E_Igla","CAWeapons_E_Javelin","CAWeapons_E_KORD","CAWeapons_E_ksvk","CAWeapons_E_LeeEnfield","CAweapons_E_m107","CAWeapons_E_M110","CAWeapons_E_M119_Howitzer","CAWeapons_E_M136","CAWeapons_E_M14","CAWeapons_E_M16","CAWeapons_E_M240","CAWeapons_E_M252_81mm_Mortar","CAWeapons_E_M2StaticMG","CAWeapons_E_M47","CAWeapons_E_M9","CAWeapons_E_MAAWS","CAWeapons_E_Makarov","CAWeapons_E_Metis","CAWeapons_E_Mk19_MiniTriPod","CAWeapons_E_PK","CAWeapons_E_Podnos_2b14_82mm","CAWeapons_E_RPG18","CAWeapons_E_RPG7","CAWeapons_E_scar","CAWeapons_E_Searchlight","CAWeapons_E_SPG9","CAWeapons_E_STATIC","CAWeapons_E_Stinger","CAWeapons_E_Strela","CAWeapons_E_TOW","CAWeapons_E_ZU23","CAWeapons_Kord","CAweapons_ksvk","CAWeapons_M1014","CAweapons_m107","CAWeapons_M252_81mm_Mortar","CAWeapons_Metis_AT_13","CAWeapons_PMC","CAWeapons_PMC_AA_12","CAWeapons_PMC_AS50","CAWeapons_PMC_XM8","CAWeapons_Saiga12K","CAWeapons_SPG9","CAWeapons_VSS_vintorez","CAWeapons_ZU23","CAWeapons2","CAWeapons2_HuntingRifle","CAWeapons2_RPG18","CAWeapons2_SMAW","CAWheeled_D_BAF","CAWheeled_E_ATV","CAWheeled_E_BRDM2","CAWheeled_E_BTR40","CAWheeled_E_BTR60","CAWheeled_E_HMMWV","CAWheeled_E_Ikarus","CAWheeled_E_LADA","CAWheeled_E_LandRover","CAWheeled_E_M1030","CAWheeled_E_MTVR","CAWheeled_E_Offroad","CAWheeled_E_Old_bike","CAWheeled_E_Old_moto","CAWheeled_E_Pickup","CAWheeled_E_s1203","CAWheeled_E_SCUD","CAWheeled_E_stryker","CAWheeled_E_SUV","CAWheeled_E_TT650","CAWheeled_E_UAZ","CAWheeled_E_Ural","CAWheeled_E_V3S","CAWheeled_E_Volha","CAWheeled_Offroad","CAWheeled_Pickup","CAWheeled_PMC","CAWheeled_PMC_ArmoredSUV","CAWheeled_W_BAF","CAWheeled2_BTR90","CAWheeled2_GAZ39371","CAWheeled2_HMMWV_Ambulance","CAWheeled2_HMMWV_BASE","CAWheeled2_Ikarus","CAWheeled2_Kamaz","CAWheeled2_LADA","CAWheeled2_LAV25","CAWheeled2_M1114_Armored","CAWheeled2_M998A2_Avenger","CAWheeled2_MMT","CAWheeled2_MTVR","CAWheeled2_TowingTractor","CAWheeled2_V3S","CAWheeled2_VWGolf","CAWheeled3","CAWheeled3_M1030","CAWheeled3_TT650","Datsun_armed_DBE1","DBE1","DBE1_UI","DC3_DBE1","HALO_Test","Hilux_armed_DBE1","Warfare2","Warfare2_E","Warfare2Vehicles","AiA_Buildings_Config","CABuildings","CABuildings_Misc","Desert2_Buildings","CA_desert2_Characters","DBE1_Hotfix","AiA_Language_acr_Config","CALanguage_ACR","AiA_Language_e_Config","CALanguage_e","AiA_Language_pmc_Config","CALanguage_PMC","AiA_Languagemissions_acr_Config","CALanguage_missions_ACR","AiA_Languagemissions_pmc_Config","CALanguage_missions_PMC","AiA_Misc_Config","CAMisc","CAWater2_seafox_EP1","AiA_Roads_e_Config","CARoads_E","AiA_Rocks_e_Config","CARocks_E","AiA_Sara_Config","Sara","AiA_Saralite_Config","SaraLite","AiA_Structures_Config","CAStructures","CAStructures_A_BuildingWIP","CAStructures_A_CraneCon","CAStructuresLand_A_MunicipalOffice","CAStructuresBarn_W","CAStructures_Castle","CAStructuresHouse","CAStructuresHouse_A_FuelStation","CAStructuresHouse_A_Hospital","CAStructuresHouse_A_Office01","CAStructuresHouse_A_Office02","CAStructuresHouse_a_stationhouse","CAStructuresHouse_Church_02","CAStructuresHouse_Church_03","CAStructuresHouse_Church_05R","CAStructuresHouse_HouseBT","CAStructuresHouse_HouseV2","CAStructuresHouse_HouseV","CAStructuresLand_Ind_Stack_Big","CAStructures_IndPipe1","CAStructuresInd_Quarry","Ind_SawMill","CAStructures_Mil","CAStructures_Misc","CAStructures_Misc_Armory","CAStructures_Misc_Armory_Armor_Popuptarget","CAStructures_Misc_Powerlines","CAStructures_Nav","CAStructuresLand_Nav_Boathouse","CAStructures_Proxy_BuildingParts","CAStructures_Proxy_Ruins","CAStructures_Rail","CAStructuresHouse_rail_station_big","CAStructures_Ruins","CAStructuresShed_Small","CAStructuresHouse_Shed_Ind","CAStructures_Wall","AiA_Models_DBE1_Config","Models_DBE1","Anims_DBE1","HMMWV_DBE1","Kamenolom_DBE1","Mercenary_DBE1","Misc_DBE1","NPCs_DBE1","Pila_DBE1","Prisoners_DBE1","UH60Desert","UI_DBE1","Vysilac_DBE1","Zakladna_DBE1","AiA_Sara_dbe1_Config","Sara_dbe1","AiA_Buildings2_Config","CABuildings2","A_Crane_02","A_GeneralStore_01","CABuildings2_A_Pub","A_statue","Barn_Metal","CABuildingParts","CABuildingParts_Signs","CATEC","Church_01","Farm_Cowshed","Farm_WTower","CAHouseBlock_A","CAHouseBlock_B","CAHouseBlock_C","CAHouseBlock_D","HouseRuins","Ind_Dopravnik","Ind_Expedice","Ind_MalyKomin","Ind_Mlyn","Ind_Pec","ind_silomale","Ind_SiloVelke","Ind_Vysypka","Ind_Garage01","CAStructures_IndPipe1_todo_delete","IndPipe2","Ind_Shed_01","Ind_Shed_02","Ind_Tank","Ind_Workshop01","CABuildings2_Misc_Cargo","Misc_PowerStation","Misc_WaterStation","Rail_House_01","Shed_small","Shed_wooden","particle_effects","AiA_Chernarus_Config","Chernarus","AiA_Chernarus_Summer_Config","Chernarus_Summer","AiA_Desert2_Config","Porto","AiA_Desert_Config","Desert","AiA_Hotfix_Config","CA_Hotfix","CA_QGClutterHotfix","CA_Hotfix_vez_ropa","AiA_Misc2_Config","CAMisc2","AiA_Misc3_Config","CAMisc3","WarfareBuildings","AiA_Misc_e_Config","CAMisc_E","CAMisc_E_WF","AiA_Signs_e_Config","CASigns_E","A_TVTower","CAStructures_Nav_pier","CAStructures_Railway","AiA_Structures_e_Config","CAStructures_E","CAStructures_E_HouseA","CAStructures_E_HouseA_A_BuildingWIP","CAStructures_E_HouseA_A_CityGate1","CAStructures_E_HouseA_A_Minaret","CAStructures_E_HouseA_A_Minaret_Porto","CAStructures_E_HouseA_A_Mosque_big","CAStructures_E_HouseA_A_Mosque_small","CAStructures_E_HouseA_A_Office01","CAStructures_E_HouseA_a_stationhouse","CAStructures_E_HouseA_A_Statue","CAStructures_E_HouseA_A_Villa","CAStructures_E_HouseC","CAStructures_E_HouseK","CAStructures_E_HouseL","CAStructures_E_Ind","CAStructures_E_Ind_Ind_Coltan_Mine","CAStructures_E_Ind_Ind_FuelStation","CAStructures_E_Ind_Ind_Garage01","CAStructures_E_Ind_Oil_Mine","CAStructures_E_Ind_IndPipes","CAStructures_E_Ind_Misc_PowerStation","CAStructures_E_Ind_Ind_Shed","CAStructures_E_Mil","CAStructures_E_Misc","CAStructures_E_Misc_Misc_cables","CAStructures_E_Misc_Misc_Construction","CAStructures_E_Misc_Misc_Garbage","CAStructures_E_Misc_Misc_Interier","CAStructures_E_Misc_Misc_Lamp","CAStructures_E_Misc_Misc_Market","CAStructures_E_Misc_Misc_powerline","CAStructures_E_Misc_Misc_Water","CAStructures_E_Misc_Misc_Well","CAStructures_E_Wall","CAStructures_E_Wall_Wall_L","AiA_Structures_pmc_Config","CAStructures_PMC","CAStructures_PMC_Buildings","CAStructures_PMC_Buildings_Bunker","CAStructures_PMC_Buildings_GeneralStore_PMC","CAStructures_PMC_Buildings_Ruin_Cowshed","CAStructures_PMC_Ind","CAStructures_PMC_FuelStation","CAStructures_PMC_Misc","CAStructures_PMC_Misc_Shed","CAStructures_PMC_Ruins","CAStructures_PMC_Walls","AiA_Takistan_Config","Takistan","AiA_Zargabad_Config","zargabad","AiA_Afghan_Config","Mountains_ACR","AiA_Bohemia_Config","Woodland_ACR","AiA_Bootcamp_acr_Config","Bootcamp_ACR","AiA_Data_baf_Config","CA_BAF","AiA_Desert_e_Config","Desert_E","AiA_Language_baf_Config","CALanguage_Baf","AiA_Languagemissions_baf_Config","CALanguageMissions_baf","AiA_Misc_acr_Config","CAMisc_ACR","CAMisc_ACR_3DMarkers","CAMisc_ACR_Container","CAMisc_ACR_Dog","CAMisc_ACR_Helpers","CAMisc_ACR_PBX","CAMisc_ACR_ScaffoldingSmall","CAMisc_ACR_Shooting_range","CAMisc_ACR_Sign_Mines","CAMisc_ACR_Targets","CAMisc_ACR_Targets_InvisibleTarget","CAMisc_ACR_TestSphere","AiA_Provinggrounds_pmc_Config","ProvingGrounds_PMC","AiA_Shapur_baf_Config","Shapur_BAF","AiA_Core","AiA_Worlds","AiA_Worlds_Ambient","AiA_Worlds_Clutter","AiA_Worlds_ClutterDist","AiA_Worlds_Delete","AiA_Worlds_DisableInfiniteTerrain","AiA_Worlds_DustEffects","AiA_Worlds_EnvSounds","AiA_Worlds_FullDetailDist","AiA_Worlds_Intros","AiA_Worlds_Lighting","AiA_Worlds_Lighting_Chernarus","AiA_Worlds_Lighting_Desert","AiA_Worlds_MapSize","AiA_Worlds_MidDetailTexture","AiA_Worlds_NoDetailDist","AiA_Worlds_PictureMap","AiA_Worlds_PictureShot","AiA_Worlds_Seabed","AiA_Worlds_SkyTexture","AiA_Worlds_StreetLamp","AiA_Worlds_Surfaces","AiA_Worlds_Water","AiA_StandaloneTerrainPack_Core","AiA_StandaloneTerrainPack_Core_Faction","AiA_StandaloneTerrainPack_Core_VehicleClass"}; //whitelisted cfgPatches for AiA TP antihack_InvOpenCheck[] = {}; // blank array disables, enable with {6} distance in meters disallows gear access if another player is within this range also disables gear access in vehicles. antihack_banReason = "EpochMod.com Autoban"; @@ -20,7 +20,7 @@ antihack_customVariablesCheck = false; // true enables variable scanning on miss antihack_customVariables[] = {}; //Add global variables from custom scripts, example: {"MyOwnVar","CP_KK"} //Global Variables begin without "_" !! antihack_customVariablesCheckMode = 0; // 0 = Ban, 1 = Log, 2 == learning mode (only enable with trusted players in a passwored server to profile your variables keep disabled for normal operation) -adminMenu_Owner[] = {}; +adminMenu_Owner[] = {}; adminMenu_OwnerSetting[] = { "ESP-PLAYER", "ESP-VEHICLE", @@ -35,7 +35,7 @@ adminMenu_OwnerSetting[] = { // "MAP-LOOT", "MAP-VEHICLE", "MAP-AI", - // "MAP-BASEBUILDING", + // "MAP-BASEBUILDING", "TARGET-HEAL", "TARGET-AMMO", "TARGET-KILL", @@ -71,7 +71,7 @@ adminMenu_Owner[] = { {"STEAMID64","ADMINNAME1"}, {"STEAMID64","ADMINNAME2"}, {"STEAMID64","ADMINNAME3"} //<- No comma on the last entry -}; +}; adminMenu_High[] = { {"STEAMID64","ADMINNAME4"}, {"STEAMID64","ADMINNAME5"}, @@ -123,4 +123,4 @@ Available Settings: "SPAWN-MENU" => Access to Spawn Menu -*/ \ No newline at end of file +*/ diff --git a/Server_Install_Pack/sc/battleye/attachto.txt b/Server_Install_Pack/sc/battleye/attachto.txt index be4815e8..bbbda9d3 100644 --- a/Server_Install_Pack/sc/battleye/attachto.txt +++ b/Server_Install_Pack/sc/battleye/attachto.txt @@ -1 +1 @@ -5 "" !WeaponHolderSimulated !Shot !"(Safe|LockBox|FirePlace|PlotPole|Jack|SolarGen)_EPOCH" !"Jack_SIM_EPOCH" !"LockBox_Ghost_EPOCH" !"CinderWallHalf_Ghost_EPOCH" !"(Tipi|Workbench|StorageShelf|Wood(Floor|LargeWall|Stairs|Ramp|Ladder|Tower)_Ghost_EPOCH" !="Hesco3_Ghost_EPOCH" !"Foundation_Ghost_EPOCH" !"Land_Cages_F" !"Epoch_Sapper_F" +5 "" !WeaponHolderSimulated !Shot !"(Safe|LockBox|FirePlace|PlotPole|Jack|SolarGen)_EPOCH" !"Jack_SIM_EPOCH" !"LockBox_Ghost_EPOCH" !"CinderWallHalf_Ghost_EPOCH" !"(Tipi|Workbench|StorageShelf|Wood(Floor|LargeWall|Stairs|Ramp|Ladder|Tower)_Ghost_EPOCH" !="(Hesco3|Metal|Foundation)_Ghost_EPOCH" !"Land_Cages_F" !"Epoch_Sapper_F" diff --git a/Server_Install_Pack/sc/battleye/createvehicle.txt b/Server_Install_Pack/sc/battleye/createvehicle.txt index f0f2ded0..02ba1834 100644 --- a/Server_Install_Pack/sc/battleye/createvehicle.txt +++ b/Server_Install_Pack/sc/battleye/createvehicle.txt @@ -1,3 +1,3 @@ 5 "" !="I_UAV_01_F" !="(I|B|O)_UAV_AI" !"_EPOCH" !="B_65x39_Minigun_Caseless_Red_splash" !="B_762x51_Minigun_Tracer_Yellow_splash" !="B_(Swing|Stick)" !"^SmokeShell" !"^G_40mm_" !"^F_40mm_" !"Sub_F_" !"^F_Signal_" !="mini_Grenade" !="GrenadeHand" !="LaserTarget(C|W|E)" !"^Chemlight_" !="(ClaymoreDirectionalMine|DemoCharge|SatchelCharge)_Remote_Ammo" !="SLAMDirectionalMine_Wire_Ammo" !="(CMflare_Chaff|Sapper_Charge|SapperB_Charge|ATMine_Range)_Ammo" !="APERS(TripMine_Wire|BoundingMine_Range|Mine_Range)_Ammo" !="Epoch_(Sapper|SapperB|Cloak)_F" !="GreatWhite_F" !="groundWeaponHolder" !="WeaponHolderSimulated" !="Epoch_(Male|Female)_F" !"Supply[0-9]" !"Steerable_Parachute_F" !="Epoch_Female_CamoRed_F" !="Land_Cages_F" !="(O|I|B)_UAV_01_backpack_F" !="I_(helipilot|helicrew)_F" !="#smokesource" !="SmokeLauncherAmmo" -5 "_EPOCH" !="(SapperHead|Jack|SolarGen)_SIM_EPOCH" !="Wood(Floor|LargeWall|Stairs|Ramp|Foundation|Ladder|Tower)_EPOCH" !="(Tipi|Workbench|StorageShelf|CinderWallHalf|Foundation|Wood(Floor|LargeWall|Stairs|Ramp|Foundation|Ladder|Tower))_Ghost_EPOCH" !="(Tipi|StorageShelf|Safe|LockBox|FirePlace|FirePlaceOn|PlotPole|SolarGen|Jack|Freezer|Tarp|CinderWallHalf|Bobber)_EPOCH" !="I_(Soldier[1-3]|Soldier)_EPOCH" !="(Bed|locker|Filing|Chair|ChairRed|wardrobe|cooker|Couch|Table|Pelican|Fridge|Shelf|ToolRack|Shoebox|Bunk|Rabbit|Cabinet)_EPOCH" !="(Sheep|Goat|Snake|Snake2|Hen|Cock|Fin|Alsatian)_random_EPOCH" !="(Safe|Workbench|LockBox|CinderWall|CinderWallGarage|CinderWallHalf|PlotPole|Tipi|StorageShelf|Fireplace|TankTrap)_SIM_EPOCH" !="Wood(Floor|LargeWall|LargeWallCor|LargeWallDoor|LargeWallDoorL|LargeWallDoorway|Stairs|Stairs2|Ramp|Ladder|Tower)_SIM_EPOCH" !="Hesco3(_Ghost|_SIM|)_EPOCH" !="(Spike|Metal)_TRAP_SIM_EPOCH" !="(WoodFoundation|Foundation)_EPOCH" !="WoodWall[1-4](_SIM|_Ghost|)_EPOCH" +5 "_EPOCH" !="(SapperHead|Jack|SolarGen)_SIM_EPOCH" !="Wood(Floor|LargeWall|Stairs|Ramp|Foundation|Ladder|Tower)_EPOCH" !="(Tipi|Workbench|StorageShelf|CinderWallHalf|Foundation|Wood(Floor|LargeWall|Stairs|Ramp|Foundation|Ladder|Tower))_Ghost_EPOCH" !="(Tipi|StorageShelf|Safe|LockBox|FirePlace|FirePlaceOn|PlotPole|SolarGen|Jack|Freezer|Tarp|CinderWallHalf|Bobber)_EPOCH" !="I_(Soldier[1-3]|Soldier)_EPOCH" !="(Bed|locker|Filing|Chair|ChairRed|wardrobe|cooker|Couch|Table|Pelican|Fridge|Shelf|ToolRack|Shoebox|Bunk|Rabbit|Cabinet)_EPOCH" !="(Sheep|Goat|Snake|Snake2|Hen|Cock|Fin|Alsatian)_random_EPOCH" !="(Safe|Workbench|LockBox|CinderWall|CinderWallGarage|CinderWallHalf|PlotPole|Tipi|StorageShelf|Fireplace|TankTrap)_SIM_EPOCH" !="Wood(Floor|LargeWall|LargeWallCor|LargeWallDoor|LargeWallDoorL|LargeWallDoorway|Stairs|Stairs2|Ramp|Ladder|Tower)_SIM_EPOCH" !="(Hesco3|Metal)(_Ghost|_SIM|)_EPOCH" !="(Spike|Metal)_TRAP_SIM_EPOCH" !="(WoodFoundation|Foundation)_EPOCH" !="WoodWall[1-4](_SIM|_Ghost|)_EPOCH" 5 SeaGull diff --git a/Server_Install_Pack/sc/battleye/setpos.txt b/Server_Install_Pack/sc/battleye/setpos.txt index b2c69a8d..916a4694 100644 --- a/Server_Install_Pack/sc/battleye/setpos.txt +++ b/Server_Install_Pack/sc/battleye/setpos.txt @@ -1 +1 @@ -5 "" !="Epoch_(Male|Female)_F" !="SapperHead_SIM_EPOCH" !="(Tipi|Workbench|StorageShelf|Safe|LockBox|FirePlace|FirePlaceOn|PlotPole|SolarGen)_EPOCH" !="(Bed|locker|Filing|Chair|ChairRed|wardrobe|cooker|Couch|Table|Pelican|Fridge|Shelf|ToolRack|Rabbit|Cabinet)_EPOCH" !="(Sheep|Goat|Snake|Hen|Cock|Fin|Alsatian)_random_EPOCH" !="(Safe|LockBox|CinderWallHalf|CinderWall|Fireplace|SolarGen|TankTrap)_SIM_EPOCH" !="Wood(Floor|LargeWall|LargeWallCor|LargeWallDoor|LargeWallDoorway|Stairs|Stairs2|Ramp)_SIM_EPOCH" !="(Foundation|Wood(Foundation|Ladder|Tower))_Ghost_EPOCH" !="Foundation_EPOCH" !="WoodFoundation_EPOCH" !="WoodWall[1-4](_SIM|_Ghost|)_EPOCH" +5 "" !="Epoch_(Male|Female)_F" !="SapperHead_SIM_EPOCH" !="(Tipi|Workbench|StorageShelf|Safe|LockBox|FirePlace|FirePlaceOn|PlotPole|SolarGen)_EPOCH" !="(Bed|locker|Filing|Chair|ChairRed|wardrobe|cooker|Couch|Table|Pelican|Fridge|Shelf|ToolRack|Rabbit|Cabinet)_EPOCH" !="(Sheep|Goat|Snake|Hen|Cock|Fin|Alsatian)_random_EPOCH" !="(Safe|LockBox|CinderWallHalf|CinderWall|Fireplace|SolarGen|TankTrap)_SIM_EPOCH" !="Wood(Floor|LargeWall|LargeWallCor|LargeWallDoor|LargeWallDoorway|Stairs|Stairs2|Ramp)_SIM_EPOCH" !="(Foundation|Wood(Foundation|Ladder|Tower))_Ghost_EPOCH" !="Foundation_EPOCH" !="WoodFoundation_EPOCH" !="(Hesco3|Metal)(_Ghost|_SIM|)_EPOCH" !="WoodWall[1-4](_SIM|_Ghost|)_EPOCH" diff --git a/Sources/epoch_code/System/player_login.fsm b/Sources/epoch_code/System/player_login.fsm index 222a0409..aad55b99 100644 --- a/Sources/epoch_code/System/player_login.fsm +++ b/Sources/epoch_code/System/player_login.fsm @@ -931,7 +931,7 @@ class FSM " }forEach EPOCH_playerHitPoints;" \n "};" \n "" \n - "[] spawn EPOCH_masterLoop;" \n + "[] spawn EPOCH_masterLoop_v2;" \n "true call EPOCH_fnc_Weather;" \n "[5,100] spawn EPOCH_niteLight;" \n "" \n diff --git a/Sources/epoch_code/compile/building/EPOCH_checkBuild.sqf b/Sources/epoch_code/compile/building/EPOCH_checkBuild.sqf index edf43cd0..27bea990 100644 --- a/Sources/epoch_code/compile/building/EPOCH_checkBuild.sqf +++ b/Sources/epoch_code/compile/building/EPOCH_checkBuild.sqf @@ -2,7 +2,6 @@ _out = [false, false, false]; if !(isNil "EPOCH_simulSwap_Lock") exitWith{ _out }; if !(isNull EPOCH_Target) exitWith{ _out }; -if (EPOCH_playerEnergy <= 0) exitWith{ _dt = ["Need energy", 0, 1, 5, 2, 0, 1] spawn bis_fnc_dynamictext; _out }; params ["_object"]; @@ -10,6 +9,7 @@ if (isNull _object) exitWith{ _out }; if ((player distance _object) > 9) exitWith { _out }; if !(EPOCH_buildMode > 0) exitWith {_out}; +if (EPOCH_playerEnergy <= 0) exitWith{ _dt = ["Need energy", 0, 1, 5, 2, 0, 1] spawn bis_fnc_dynamictext; _out }; _objType = typeOf _object; _config = 'CfgBaseBuilding' call EPOCH_returnConfig; diff --git a/Sources/epoch_code/compile/building/staticMoveV2.sqf b/Sources/epoch_code/compile/building/staticMoveV2.sqf deleted file mode 100644 index 4528f396..00000000 --- a/Sources/epoch_code/compile/building/staticMoveV2.sqf +++ /dev/null @@ -1,137 +0,0 @@ -EPOCH_buildClasses = ["Land_Obstacle_Bridge_F", - -"Land_Shoot_House_Wall_F", -"Land_Shoot_House_Wall_Stand_F", -"Land_Shoot_House_Wall_Crouch_F", -"Land_Shoot_House_Wall_Prone_F", -"Land_Shoot_House_Wall_Long_F", -"Land_Shoot_House_Wall_Long_Stand_F", -"Land_Shoot_House_Wall_Long_Crouch_F", -"Land_Shoot_House_Wall_Long_Prone_F", -"Land_Shoot_House_Corner_F", -"Land_Shoot_House_Corner_Stand_F", -"Land_Shoot_House_Corner_Crouch_F", -"Land_Shoot_House_Corner_Prone_F", -"Land_Shoot_House_Panels_F", -"Land_Shoot_House_Panels_Crouch_F", -"Land_Shoot_House_Panels_Prone_F", -"Land_Shoot_House_Panels_Vault_F", -"Land_Shoot_House_Panels_Window_F", -"Land_Shoot_House_Panels_Windows_F", -"Land_Shoot_House_Tunnel_F", -"Land_Shoot_House_Tunnel_Stand_F", -"Land_Shoot_House_Tunnel_Crouch_F", -"Land_Shoot_House_Tunnel_Prone_F", - - -"Land_Obstacle_RunAround_F","Land_Obstacle_Saddle_F","Land_RampConcrete_F","Land_RampConcreteHigh_F","Land_GH_Stairs_F","Land_Billboard_F","Land_HBarrier_1_F","Land_HBarrier_3_F","Land_HBarrier_5_F","Land_Razorwire_F","Land_HBarrierWall6_F","WoodFloor_EPOCH","WoodLargeWall_EPOCH","Land_BagFence_Long_F","Land_BagFence_Corner_F","Land_BagFence_End_F","Land_BagFence_Round_F","Land_BagFence_Short_F"]; -EPOCH_buildClassesCount = count EPOCH_buildClasses - 1; -Epoch_selectedBuildClasIndex = 0; -EPOCH_selectedBuildClass = EPOCH_buildClasses select 0; - -EPOCH_buildWorldspace = [[0,0,0],[0,0,0],[0,0,0]]; -EPOCH_KeyDownFunctionhandler = { - _dikCode = _this select 1; - _shift = _this select 2; - _ctrl = _this select 3; - _alt = _this select 4; - - switch (_dikCode) do { - case 0x39 : { - _worldspace = EPOCH_buildWorldspace; - _newObj = EPOCH_selectedBuildClass createVehicle (_worldspace select 0); - _newObj setVectorDirAndUp [_worldspace select 1,_worldspace select 2]; - _newObj setposASL (_worldspace select 0); - _handled = true; - }; - case 0xC9 : { - Epoch_selectedBuildClasIndex = ((Epoch_selectedBuildClasIndex + 1) min EPOCH_buildClassesCount) max 0; - EPOCH_selectedBuildClass = EPOCH_buildClasses select Epoch_selectedBuildClasIndex; - - if !(isNull EPOCH_currentBuildObj) then { - deleteVehicle EPOCH_currentBuildObj; - EPOCH_currentBuildObj = EPOCH_selectedBuildClass createVehicle [0,0,0]; - EPOCH_currentBuildObj disableCollisionWith player; - EPOCH_currentBuildObj setObjectTextureGlobal [0, "#(rgb,8,8,3)color(0,0,1,1)"]; - }; - - hint EPOCH_selectedBuildClass; - _handled = true; - }; - case 0xD1 : { - Epoch_selectedBuildClasIndex = ((Epoch_selectedBuildClasIndex - 1) min EPOCH_buildClassesCount) max 0; - EPOCH_selectedBuildClass = EPOCH_buildClasses select Epoch_selectedBuildClasIndex; - hint EPOCH_selectedBuildClass; - - if !(isNull EPOCH_currentBuildObj) then { - deleteVehicle EPOCH_currentBuildObj; - EPOCH_currentBuildObj = EPOCH_selectedBuildClass createVehicle [0,0,0]; - EPOCH_currentBuildObj disableCollisionWith player; - EPOCH_currentBuildObj setObjectTextureGlobal [0, "#(rgb,8,8,3)color(0,0,1,1)"]; - }; - - _handled = true; - }; - }; - _handled -}; - - -[] spawn { - (findDisplay 46) displayRemoveAllEventHandlers "KeyDown"; - (findDisplay 46) displayAddEventHandler["KeyDown",{_this call EPOCH_KeyDownFunctionhandler}]; -}; - -EPOCH_currentBuildObj = EPOCH_selectedBuildClass createVehicle [0,0,0]; -EPOCH_currentBuildObj disableCollisionWith player; -EPOCH_currentBuildObj setObjectTextureGlobal [0, "#(rgb,8,8,3)color(0,0,1,1)"]; - -onEachFrame { - _ins = lineIntersectsSurfaces [AGLToASL positionCameraToWorld [0,0,0],AGLToASL positionCameraToWorld [0,0,10],player,EPOCH_currentBuildObj]; - if (count _ins == 0) exitWith {EPOCH_currentBuildObj setPosASL [0,0,0]}; - - _intersectObj = (_ins select 0 select 2); - if (isNull _intersectObj) then {_intersectObj = player}; - EPOCH_currentBuildObj setVectorDirAndUp [vectordir _intersectObj,(_ins select 0 select 1)]; - EPOCH_currentBuildObj setPosASL (_ins select 0 select 0); - EPOCH_buildWorldspace = [(_ins select 0 select 0),vectordir _intersectObj,(_ins select 0 select 1)]; - - _currentPos = (_ins select 0 select 0); - _numberOfContacts = 0; - - _currentDir = direction EPOCH_currentBuildObj; - - _bbr = boundingBoxReal EPOCH_currentBuildObj; - _p1 = _bbr select 0; - _p2 = _bbr select 1; - _maxWidth = abs ((_p2 select 0) - (_p1 select 0)) / 2; - _maxLength = abs ((_p2 select 1) - (_p1 select 1)) / 2; - _maxHeight = abs ((_p2 select 2) - (_p1 select 2)) / 2; - - { - _pos1 = EPOCH_currentBuildObj modelToWorld [0,0,_maxHeight]; - _pos2 = EPOCH_currentBuildObj modelToWorld _x; - _ins = lineIntersectsSurfaces [AGLToASL _pos1,AGLToASL _pos2,player,EPOCH_currentBuildObj]; - _color = [0,0,1,1]; - - if (count _ins == 0) then { - - - _color = [0,0,1,1]; - drawIcon3D ["a3\modules_f\data\iconunlock_ca.paa", [1,1,1,1], _pos2, 1, 1, 45, "", 1, 0.05, "TahomaB"]; - - - } else { - _numberOfContacts = _numberOfContacts + 1; - drawIcon3D ["a3\modules_f\data\iconlock_ca.paa", [1,1,1,1], ASLToATL (_ins select 0 select 0), 1, 1, 45, "Snap", 1, 0.05, "TahomaB"]; - _color = [1,0,0,1]; - }; - - drawLine3D [ - _pos1, - _pos2, - _color - ]; - - } forEach[[_maxWidth,0,_maxHeight], [0,_maxLength,_maxHeight], [-_maxWidth,0,_maxHeight], [0,-_maxLength,_maxHeight], [0,0,-_maxHeight]]; -}; diff --git a/Sources/epoch_code/compile/functions/EPOCH_pushCustomVar.sqf b/Sources/epoch_code/compile/functions/EPOCH_pushCustomVar.sqf index dddcec13..188bc59e 100644 --- a/Sources/epoch_code/compile/functions/EPOCH_pushCustomVar.sqf +++ b/Sources/epoch_code/compile/functions/EPOCH_pushCustomVar.sqf @@ -5,28 +5,19 @@ _EPOCH_lastSave = missionNamespace getVariable["EPOCH_lastSave", diag_tickTime]; if ((diag_tickTime - _EPOCH_lastSave) >= _time) then { - missionNamespace setVariable["EPOCH_lastSave", diag_tickTime]; + // manually set hitpoints array + EPOCH_playerHitPoints = ((getAllHitPointsDamage player) param [2,[]]); - missionNamespace setVariable ["EPOCH_pushPlayer_PVS", - [ player, - [ - missionNamespace getVariable "EPOCH_playerTemp", - missionNamespace getVariable "EPOCH_playerHunger", - missionNamespace getVariable "EPOCH_playerThirst", - missionNamespace getVariable "EPOCH_playerAliveTime", - missionNamespace getVariable "EPOCH_playerEnergy", - missionNamespace getVariable "EPOCH_playerWet", - missionNamespace getVariable "EPOCH_playerSoiled", - missionNamespace getVariable "EPOCH_playerImmunity", - missionNamespace getVariable "EPOCH_playerToxicity", - missionNamespace getVariable "EPOCH_playerStamina", - missionNamespace getVariable "EPOCH_playerCrypto", - ((getAllHitPointsDamage player) param [2,[]]), - missionNamespace getVariable "EPOCH_playerBloodP", - missionNamespace getVariable "EPOCH_playerSpawnArray" - ], - missionNamespace getVariable "Epoch_personalToken" - ] - ]; + // Get all custom variables + _customVars = []; + _customVarsInit = ["CfgEpochClient", "customVarsDefaults", missionNamespace getVariable["EPOCH_customVarsDefaults", []]] call EPOCH_fnc_returnConfigEntryV2; + { + _customVars pushBack (missionNamespace getVariable format["EPOCH_player%1",_x select 0]); + } forEach _customVarsInit; + + // TODO: use remoteExec here + missionNamespace setVariable ["EPOCH_pushPlayer_PVS",[player,_customVars,missionNamespace getVariable "Epoch_personalToken"]]; publicVariableServer "EPOCH_pushPlayer_PVS"; -}; \ No newline at end of file + + missionNamespace setVariable["EPOCH_lastSave", diag_tickTime]; +}; diff --git a/Sources/epoch_code/compile/setup/EPOCH_clientRespawn.sqf b/Sources/epoch_code/compile/setup/EPOCH_clientRespawn.sqf index 1b4e1bca..4969200d 100644 --- a/Sources/epoch_code/compile/setup/EPOCH_clientRespawn.sqf +++ b/Sources/epoch_code/compile/setup/EPOCH_clientRespawn.sqf @@ -1,5 +1,5 @@ call EPOCH_clientInit; -[] spawn EPOCH_masterLoop; +[] spawn EPOCH_masterLoop_v2; [5,100] call EPOCH_niteLight; Epoch_canBeRevived = true; @@ -7,4 +7,4 @@ Epoch_canBeRevived = true; [] execFSM "\x\addons\a3_epoch_code\system\gender_selection.fsm"; -true \ No newline at end of file +true diff --git a/Sources/epoch_code/compile/setup/EPOCH_clientRevive.sqf b/Sources/epoch_code/compile/setup/EPOCH_clientRevive.sqf index d8af0f7c..52010850 100644 --- a/Sources/epoch_code/compile/setup/EPOCH_clientRevive.sqf +++ b/Sources/epoch_code/compile/setup/EPOCH_clientRevive.sqf @@ -12,7 +12,7 @@ if !(alive player && alive _playerObject && !isPlayer _playerObject) then { Epoch_personalToken = _this select 1; // call EPOCH_clientInit; - [] spawn EPOCH_masterLoop; + [] spawn EPOCH_masterLoop_v2; [5, 100] call EPOCH_niteLight; closeDialog 0; diff --git a/Sources/epoch_code/compile/setup/EPOCH_masterLoop.sqf b/Sources/epoch_code/compile/setup/EPOCH_masterLoop.sqf index 3fca3b38..a3961057 100644 --- a/Sources/epoch_code/compile/setup/EPOCH_masterLoop.sqf +++ b/Sources/epoch_code/compile/setup/EPOCH_masterLoop.sqf @@ -218,7 +218,9 @@ while {alive player} do { _vehicle = vehicle player; if (_vehicle == player) then { _val = log(abs(speed player)); - if (_val>0.7) then { + _staminaThreshold = 0.7; + if (EPOCH_playerIsSwimming) then {_staminaThreshold = 0.3}; + if (_val>_staminaThreshold) then { EPOCH_playerStamina = (EPOCH_playerStamina - (_val/4)) max 0; } else { _increaseStamina = true; @@ -478,6 +480,7 @@ while {alive player} do { _position = getPosATL player; EPOCH_nearestLocations = nearestLocations[player, ["NameCityCapital", "NameCity", "Airport"], 300]; + EPOCH_playerIsSwimming = false; if !(surfaceIsWater _position) then { if (EPOCH_nearestLocations isEqualTo []) then{ @@ -489,12 +492,19 @@ while {alive player} do { } else { // spawn shark if player is deep water and not in vehicle if (vehicle player == player) then{ - if (((_position vectorDiff getPosASL player) select 2) > 50) then { + _offsetZ = ((_position vectorDiff getPosASL player) select 2); + if (_offsetZ > 1.7) then { + EPOCH_playerIsSwimming = true; + }; + if (_offsetZ > 50) then { "GreatWhite_F" call EPOCH_unitSpawn; }; }; }; + // default power state + EPOCH_nearPower = false; + EPOCH_chargeRate = 0; // energy Charge from nearby power plants _powerSources = nearestObjects[player, ["Land_spp_Tower_F","Land_wpp_Turbine_V2_F","Land_wpp_Turbine_V1_F","SolarGen_EPOCH"], _energyRange]; @@ -521,11 +531,8 @@ while {alive player} do { } else { EPOCH_chargeRate = ceil (_totalCapacity / (count _players)); }; + EPOCH_nearPower = true; }; - EPOCH_nearPower = true; - } else { - EPOCH_nearPower = false; - EPOCH_chargeRate = 0; }; EPOCH_playerAliveTime = round(EPOCH_playerAliveTime + (_tickTime - EPOCH_clientAliveTimer)); diff --git a/Sources/epoch_code/compile/setup/EPOCH_masterLoop_v2.sqf b/Sources/epoch_code/compile/setup/EPOCH_masterLoop_v2.sqf new file mode 100644 index 00000000..5afeef29 --- /dev/null +++ b/Sources/epoch_code/compile/setup/EPOCH_masterLoop_v2.sqf @@ -0,0 +1,40 @@ +// EPOCHMOD.com +disableSerialization; +_config = 'CfgMasterLoop' call EPOCH_returnConfig; +_build_sqf = preprocessFile getText (_config >> "Init" >> "file"); +_configs = "true" configClasses (_config >> "Events"); +_condition = getText (_config >> "Events" >> "condition"); +_file = getText (_config >> "Events" >> "file"); +{ + _configName = configName _x; + _varName = format["_EPOCH_%1",_configName]; + _build_sqf = _build_sqf + ' + '+_varName+' = diag_tickTime; + '; +}forEach _configs; +_build_sqf = _build_sqf + ' +while {'+_condition+'} do { + _tickTime = diag_tickTime; +'; +{ + _delay = getNumber(_x >> "delay"); + _configName = configName _x; + _varName = format["_EPOCH_%1",_configName]; + _code = preprocessFile format ["%1\%2.sqf",_file,_configName]; + _build_sqf = _build_sqf + ' + if ((_tickTime - '+_varName+') > '+str(_delay)+') then { + '+_varName+' = _tickTime; + '+_code+' + }; + '; +}forEach _configs; +_build_sqf = _build_sqf + ' + if (vehicle player != player) then { + if (isNull EPOCH_currentVehicle) then { + EPOCH_currentVehicle = vehicle player; + EPOCH_currentVehicle addEventHandler["GetOut", "_this call EPOCH_antiWall"]; + }; + }; + uiSleep 0.1; +};'; +call compile _build_sqf; diff --git a/Sources/epoch_code/compile/setup/masterLoop/Event1.sqf b/Sources/epoch_code/compile/setup/masterLoop/Event1.sqf new file mode 100644 index 00000000..274445fb --- /dev/null +++ b/Sources/epoch_code/compile/setup/masterLoop/Event1.sqf @@ -0,0 +1,142 @@ + + // current target + + _currentTarget = objNull; + _cursorTarget = ([10] call EPOCH_fnc_cursorTarget); + if (!isNull _cursorTarget && {!(EPOCH_target isEqualTo _cursorTarget)}) then { + if (_cursorTarget isKindOf "ThingX" || _cursorTarget isKindOf "Constructions_static_F" || _cursorTarget isKindOf "Constructions_foundation_F" || _cursorTarget isKindOf "WeaponHolder" || _cursorTarget isKindOf "AllVehicles" || _cursorTarget isKindOf "PlotPole_EPOCH") then{ + if (_cursorTarget isKindOf "Animal_Base_F") then { + if !(alive _cursorTarget) then { + _currentTarget = _cursorTarget; + }; + } else { + _currentTarget = _cursorTarget; + }; + }; + }; + EPOCH_currentTarget = _currentTarget; + + _increaseStamina = false; + _vehicle = vehicle player; + if (_vehicle == player) then { + _val = log(abs(speed player)); + _staminaThreshold = 0.7; + if (EPOCH_playerIsSwimming) then {_staminaThreshold = 0.3}; + if (_val>_staminaThreshold) then { + EPOCH_playerStamina = (EPOCH_playerStamina - (_val/4)) max 0; + } else { + _increaseStamina = true; + }; + } else { + if (EPOCH_buildMode > 0) then { + EPOCH_buildMode = 0; + EPOCH_snapDirection = 0; + hintsilent "BUILD MODE: DISABLED"; + EPOCH_Target = objNull; + // EPOCH_SURVEY = []; + }; + _increaseStamina = true; + + switch (typeOf _vehicle) do { + case "jetski_epoch": { + _clock_hour10 = floor ((date select 3)/10); + _clock_minute10 = floor ((date select 4)/10); + { + _vehicle setObjectTexture [_forEachIndex,_x]; + }forEach[ + format["\x\addons\a3_epoch_vehicles\data\num%1_ca.paa",_clock_hour10], + format["\x\addons\a3_epoch_vehicles\data\num%1_ca.paa",(date select 3)-(_clock_hour10*10)], + format["\x\addons\a3_epoch_vehicles\data\num%1_ca.paa",_clock_minute10], + format["\x\addons\a3_epoch_vehicles\data\num%1_ca.paa",(date select 4)-(_clock_minute10*10)], + format["\x\addons\a3_epoch_vehicles\data\fuel%1_ca.paa",floor(fuel _vehicle*10)] + ]; + }; + case "ebike_epoch": { + { + _vehicle setObjectTexture [_forEachIndex,_x]; + }forEach[ + format["\x\addons\a3_epoch_vehicles\data\speed%1_ca.paa",floor(speed _vehicle/9) max 0], + format["\x\addons\a3_epoch_vehicles\data\energ%1_ca.paa",floor(fuel _vehicle*14)] + ]; + }; + }; + }; + + _envCold = EPOCH_playerTemp <= 95.0; + _envHot = EPOCH_playerTemp >= 106.7; + _hungry = EPOCH_playerHunger <= 0; + _thirsty = EPOCH_playerThirst <= 0; + _warnbloodPressure = EPOCH_playerBloodP > 120; + + _thirst ctrlShow (EPOCH_playerThirst <= 625); + if (ctrlShown _thirst) then { + [_thirst,_thirsty] call _fadeUI; + _thirstScale = linearConversion [0,EPOCH_playerThirst,2500,0.01,1]; + _thirst ctrlSetTextColor [_thirstScale, _thirstScale, 0.9, 1]; + }; + + _hunger ctrlShow (EPOCH_playerHunger <= 1250); + if (ctrlShown _hunger) then { + [_hunger,_hungry] call _fadeUI; + _hungerScale = linearConversion [0,EPOCH_playerHunger,5000,0.01,1]; + _hunger ctrlSetTextColor [1, _hungerScale, _hungerScale, 1]; + }; + + _playerOxygen = getOxygenRemaining player; + _oxygen ctrlShow (_playerOxygen < 1); + if (ctrlShown _oxygen) then { + [_oxygen,(_playerOxygen <= 0.55)] call _fadeUI; + _oxygen ctrlSetTextColor [1, _playerOxygen, _playerOxygen, 1]; + }; + + _hazzard ctrlShow (EPOCH_playerToxicity > 1); + if (ctrlShown _hazzard) then { + [_hazzard,(EPOCH_playerToxicity >= 55)] call _fadeUI; + _toxicScale = 1-linearConversion [0,EPOCH_playerToxicity,100,0.01,1]; + _hazzard ctrlSetTextColor [_toxicScale, 1, _toxicScale, 1]; + }; + + _broken ctrlShow ((player getHitPointDamage "HitLegs") >= 0.5); + if (ctrlShown _broken) then { + [_broken,true] call _fadeUI; + }; + + if (_envCold || _envHot || _hungry || _thirsty) then { + if (_envHot || _envCold) then { + player setFatigue 1; + }; + EPOCH_playerBloodP = (EPOCH_playerBloodP + 0.05) min 190; + _increaseStamina = false; + } else { + if (EPOCH_playerStamina > 0) then { + if !(_panic) then { + if (!_warnbloodPressure) then { + player setFatigue 0; + }; + EPOCH_playerBloodP = EPOCH_playerBloodP - 1 max 100; + }; + }; + }; + + _critical = (damage player >= 0.7 || _warnbloodPressure); + _emergency ctrlShow _critical; + if (ctrlShown _emergency) then { + [_emergency,(EPOCH_playerBloodP > 140)] call _fadeUI; + _emergencyScale = 1-linearConversion [0,EPOCH_playerBloodP,180,0.01,1]; + _emergency ctrlSetTextColor [1, _emergencyScale, _emergencyScale, 1]; + }; + + if (EPOCH_playerBloodP >= 180) then { + true call EPOCH_pushCustomVar; + }; + if (_increaseStamina && (getFatigue player) == 0) then { + EPOCH_playerStamina = (EPOCH_playerStamina + 0.5) min EPOCH_playerStaminaMax; + }; + if (EPOCH_debugMode) then { + call EPOCH_debugMonitor; + }; + + call EPOCH_TradeLoop; + + + onEachFrame EPOCH_onEachFrame; diff --git a/Sources/epoch_code/compile/setup/masterLoop/Event2.sqf b/Sources/epoch_code/compile/setup/masterLoop/Event2.sqf new file mode 100644 index 00000000..7afca83a --- /dev/null +++ b/Sources/epoch_code/compile/setup/masterLoop/Event2.sqf @@ -0,0 +1,94 @@ + + if !(EPOCH_arr_interactedObjs isEqualTo[]) then { + EPOCH_arr_interactedObjs remoteExec["EPOCH_server_save_vehicles", 2]; + EPOCH_arr_interactedObjs = []; + }; + + if (damage player != _damagePlayer) then { + if (alive player) then { + true call EPOCH_pushCustomVar; + _damagePlayer = damage player; + }; + }; + + if ((rating player) < 0) then { + player addRating abs(rating player); + }; + + // calculate total available power + // 1. number of power production devices within range 75m + + // find share of power based on factors + // 1. number of players + // 2. Other sources of drain (Lights) + + _energyValue = EPOCH_chargeRate min _energyRegenMax; + _vehicle = vehicle player; + if (_vehicle != player && isEngineOn _vehicle) then { + _energyValue = _energyValue + 5; + }; + + if (currentVisionMode player == 1) then { //NV enabled + _energyValue = _energyValue - _energyCostNV; + if (EPOCH_playerEnergy == 0) then { + player action["nvGogglesOff", player]; + }; + }; + + EPOCH_playerEnergy = ((EPOCH_playerEnergy + _energyValue) min EPOCH_playerEnergyMax) max 0; + + if !(EPOCH_playerEnergy isEqualTo _prevEnergy) then { + 9993 cutRsc["EpochGameUI3", "PLAIN", 0, false]; + _display3 = uiNamespace getVariable "EPOCH_EpochGameUI3"; + _energyDiff = round(EPOCH_playerEnergy - _prevEnergy); + _diffText = if (_energyDiff > 0) then {format["+%1",_energyDiff]} else {format["%1",_energyDiff]}; + // hint str [_energyValue,_prevEnergy,EPOCH_playerEnergy]; + (_display3 displayCtrl 21210) ctrlSetText format["%1/%2 %3", round(EPOCH_playerEnergy), EPOCH_playerEnergyMax, _diffText]; + _prevEnergy = EPOCH_playerEnergy; + }; + + if (EPOCH_playerEnergy == 0) then { + if (EPOCH_buildMode > 0) then { + EPOCH_buildMode = 0; + EPOCH_snapDirection = 0; + _dt = ["Build Mode Disabled: Need Energy< / t>", 0, 1, 5, 2, 0, 1] spawn bis_fnc_dynamictext; + EPOCH_Target = objNull; + EPOCH_Z_OFFSET = 0; + EPOCH_X_OFFSET = 0; + EPOCH_Y_OFFSET = 5; + }; + }; + + _attackers = player nearEntities[["Snake_random_EPOCH", "GreatWhite_F", "Epoch_Cloak_F"], 30]; + if !(_attackers isEqualTo[]) then { + (_attackers select 0) call EPOCH_client_bitePlayer; + _panic = true; + } else { + // custom poision + _toxicObjs = player nearobjects["SmokeShellCustom", 6]; + if!(_toxicObjs IsEqualTo[]) then { + (_toxicObjs select 0) call EPOCH_client_bitePlayer; + _panic = true; + } else { + _panic = false; + }; + }; + + call EPOCH_fnc_Weather; + + // Hunger / Thirst + _HTlossRate = _baseHTLoss; + if (EPOCH_playerStamina < 100) then { + if ((getFatigue player) > 0) then { + _HTlossRate = _HTlossRate + (_HTlossRate*(getFatigue player)); + }; + } else { + _HTlossRate = (_HTlossRate / 2); + }; + + EPOCH_playerHunger = (EPOCH_playerHunger - _HTlossRate) max 0; + EPOCH_playerThirst = (EPOCH_playerThirst - _HTlossRate) max 0; + + call _lootBubble; + + EPOCH_playerStaminaMax = (100 * (round(EPOCH_playerAliveTime/360)/10)) min 2500; diff --git a/Sources/epoch_code/compile/setup/masterLoop/Event3.sqf b/Sources/epoch_code/compile/setup/masterLoop/Event3.sqf new file mode 100644 index 00000000..15e4bae8 --- /dev/null +++ b/Sources/epoch_code/compile/setup/masterLoop/Event3.sqf @@ -0,0 +1,6 @@ + + if !(_prevEquippedItem isEqualTo EPOCH_equippedItem_PVS) then { + _EPOCH_15 = _tickTime; + _prevEquippedItem = EPOCH_equippedItem_PVS; + publicVariableServer "EPOCH_equippedItem_PVS"; + }; diff --git a/Sources/epoch_code/compile/setup/masterLoop/Event4.sqf b/Sources/epoch_code/compile/setup/masterLoop/Event4.sqf new file mode 100644 index 00000000..da2292d3 --- /dev/null +++ b/Sources/epoch_code/compile/setup/masterLoop/Event4.sqf @@ -0,0 +1,17 @@ + + _nearByBobbersLocal = []; + _nearByBobbers = player nearEntities[["Bobber_EPOCH"], 12]; + { + if (local _x) then { + _nearByBobbersLocal pushBack _x + } + } forEach _nearByBobbers; + + if !(_nearByBobbersLocal isEqualTo []) then { + if ((random 100) < 50) then { + _bobber = _nearByBobbersLocal select floor(random(count _nearByBobbers)); + _bobber setVelocity [0,-1,-1]; + _bobber setVariable ["EPOCH_fishOnLine" , diag_tickTime]; + }; + + }; diff --git a/Sources/epoch_code/compile/setup/masterLoop/Event5.sqf b/Sources/epoch_code/compile/setup/masterLoop/Event5.sqf new file mode 100644 index 00000000..42a39402 --- /dev/null +++ b/Sources/epoch_code/compile/setup/masterLoop/Event5.sqf @@ -0,0 +1,60 @@ +_position = getPosATL player; + +EPOCH_nearestLocations = nearestLocations[player, ["NameCityCapital", "NameCity", "Airport"], 300]; +EPOCH_playerIsSwimming = false; + +if !(surfaceIsWater _position) then { + if (EPOCH_nearestLocations isEqualTo []) then{ + if (count(_position nearEntities["Animal_Base_F", 800]) < 2) then { + // diag_log "DEBUG: Attempt to spawn animal"; + call EPOCH_client_loadAnimalBrain; + }; + }; +} else { + // spawn shark if player is deep water and not in vehicle + if (vehicle player == player) then{ + _offsetZ = ((_position vectorDiff getPosASL player) select 2); + if (_offsetZ > 1.7) then { + EPOCH_playerIsSwimming = true; + }; + if (_offsetZ > 50) then { + "GreatWhite_F" call EPOCH_unitSpawn; + }; + }; +}; + +// default power state +EPOCH_nearPower = false; +EPOCH_chargeRate = 0; + +// energy Charge from nearby power plants +_powerSources = nearestObjects[player, ["Land_spp_Tower_F","Land_wpp_Turbine_V2_F","Land_wpp_Turbine_V1_F","SolarGen_EPOCH"], _energyRange]; +if !(_powerSources isEqualTo[]) then { + _totalCapacity = 0; + { + _powerClass = typeOf _x; + _powerCap = getNumber(configFile >> "CfgVehicles" >> _powerClass >> "powerCapacity"); + _powerType = getNumber(configFile >> "CfgVehicles" >> _powerClass >> "powerType"); + if (_powerCap == 0) then { + _powerCap = 100; + }; + if (_powerType == 1) then { + if (sunOrMoon < 1) then { + _powerCap = _powerCap/2; + }; + }; + _totalCapacity = _totalCapacity + _powerCap; + } forEach _powerSources; + if (_totalCapacity > 0) then { + _players = player nearEntities[["Epoch_Male_F", "Epoch_Female_F"], _energyRange]; + if (_players isEqualTo []) then { + EPOCH_chargeRate = ceil _totalCapacity; + } else { + EPOCH_chargeRate = ceil (_totalCapacity / (count _players)); + }; + EPOCH_nearPower = true; + }; +}; + +EPOCH_playerAliveTime = round(EPOCH_playerAliveTime + (_tickTime - EPOCH_clientAliveTimer)); +EPOCH_clientAliveTimer = _tickTime; diff --git a/Sources/epoch_code/compile/setup/masterLoop/Event6.sqf b/Sources/epoch_code/compile/setup/masterLoop/Event6.sqf new file mode 100644 index 00000000..7d922a60 --- /dev/null +++ b/Sources/epoch_code/compile/setup/masterLoop/Event6.sqf @@ -0,0 +1 @@ +false call EPOCH_pushCustomVar; diff --git a/Sources/epoch_code/compile/setup/masterLoop/Event7.sqf b/Sources/epoch_code/compile/setup/masterLoop/Event7.sqf new file mode 100644 index 00000000..2a4516bc --- /dev/null +++ b/Sources/epoch_code/compile/setup/masterLoop/Event7.sqf @@ -0,0 +1,23 @@ + + if ((EPOCH_playerSpawnArray select(EPOCH_spawnIndex find "Epoch_Sapper_F")) <= 0) then{ + _sapperChance = 1 + (EPOCH_playerSoiled / 2); + if !(EPOCH_nearestLocations isEqualTo[]) then{ + _sapperChance = _sapperChance + 2; + }; + // 1% - 55% if soiled (+ 2% if in city) chance to spawn sapper every 10 minutes + if (random _sapperRndChance < _sapperChance) then{ + "Epoch_Sapper_F" call EPOCH_unitSpawnIncrease; + }; + }; + + _spawnUnits = []; + { + if (_x > 0) then{ + _spawnUnits pushBack(EPOCH_spawnIndex select _forEachIndex); + }; + } forEach EPOCH_playerSpawnArray; + + // test spawning one antagonist every 10 minutes select one unit at random to spawn + if !(_spawnUnits isEqualTo[]) then{ + (_spawnUnits select(floor random(count _spawnUnits))) call EPOCH_unitSpawn; + }; diff --git a/Sources/epoch_code/compile/setup/masterLoop/init.sqf b/Sources/epoch_code/compile/setup/masterLoop/init.sqf new file mode 100644 index 00000000..e4cc32bd --- /dev/null +++ b/Sources/epoch_code/compile/setup/masterLoop/init.sqf @@ -0,0 +1,179 @@ + +_prevEquippedItem = []; +_damagePlayer = damage player; +_panic = false; +_prevEnergy = EPOCH_playerEnergy; + +// init config data +_sapperRndChance = ["CfgEpochClient", "sapperRngChance", 100] call EPOCH_fnc_returnConfigEntryV2; +EPOCH_droneRndChance = ["CfgEpochClient", "droneRngChance", 100] call EPOCH_fnc_returnConfigEntryV2; +_baseHTLoss = ["CfgEpochClient", "baseHTLoss", 8] call EPOCH_fnc_returnConfigEntryV2; +_energyCostNV = ["CfgEpochClient", "energyCostNV", 3] call EPOCH_fnc_returnConfigEntryV2; +_energyRegenMax = ["CfgEpochClient", "energyRegenMax", 5] call EPOCH_fnc_returnConfigEntryV2; +_energyRange = ["CfgEpochClient", "energyRange", 75] call EPOCH_fnc_returnConfigEntryV2; + +EPOCH_chargeRate = 0; + +// default data if mismatch +if (count EPOCH_playerSpawnArray != count EPOCH_spawnIndex) then{ + { EPOCH_playerSpawnArray pushBack 0 } forEach EPOCH_spawnIndex; +}; + +9990 cutRsc ["EpochGameUI","PLAIN",2,false]; +_display = uiNamespace getVariable "EPOCH_EpochGameUI"; + +_thirst = _display displayCtrl 21201; +_hunger = _display displayCtrl 21202; +_broken = _display displayCtrl 21203; +_oxygen = _display displayCtrl 21204; +_hazzard = _display displayCtrl 21205; +_emergency = _display displayCtrl 21206; + +{ + _x ctrlShow false; +}forEach[_thirst,_hunger,_broken,_oxygen,_hazzard,_emergency]; + +// find radio +{ + if (configName(inheritsFrom(configFile >> "CfgWeapons" >> _x)) == "ItemRadio") exitWith{ + EPOCH_equippedItem_PVS = [_x, true, player]; + }; +} forEach assignedItems player; + +// lootBubble Init +_loots = ["CfgEpochClient", "lootClasses", EPOCH_lootClasses] call EPOCH_fnc_returnConfigEntryV2; + +_lootClasses = ('CfgBuildingLootPos' call EPOCH_returnConfig) call Bis_fnc_getCfgSubClasses; +_lootClasses = _lootClasses - ["Default"]; + +_lootBubble = { + private["_pos", "_others", "_objects", "_nearObjects", "_building", "_travelDir", "_lootDist", "_xPos", "_yPos", "_lootLoc", "_playerPos", "_distanceTraveled", "_class", "_dir", "_color", "_colors", "_item", "_randomColor", "_positions", "_lootBiasPos", "_lootType", "_config"]; + _playerPos = getPosATL vehicle player; + _distanceTraveled = EPOCH_lastPlayerPos distance _playerPos; + if (_distanceTraveled > 10 && _distanceTraveled < 200) then { + _travelDir = [EPOCH_lastPlayerPos, _playerPos] call BIS_fnc_dirTo; + _lootDist = 30 + _distanceTraveled; + _xPos = (_playerPos select 0) + (_lootDist * sin(_travelDir)); + _yPos = (_playerPos select 1) + (_lootDist * cos(_travelDir)); + _lootLoc = [_xPos, _yPos, 0]; + + _objects = nearestObjects[_lootLoc, _lootClasses, 30]; + _config = 'CfgEpochClient' call EPOCH_returnConfig; + _buildingJammerRange = getNumber(_config >> "buildingJammerRange"); + if (_buildingJammerRange == 0) then { _buildingJammerRange = 75; }; + + _jammer = nearestObjects [_lootLoc, ["PlotPole_EPOCH"], _buildingJammerRange]; + + if (!(_objects isEqualTo[]) && (_jammer isEqualTo[])) then { + + _building = _objects select(floor(random(count _objects))); + + if !(_building in EPOCH_LootedBlds) then { + + _pos = getPosATL _building; + _others = _building nearEntities[["Epoch_Male_F", "Epoch_Female_F"], 15]; + if (_others isEqualTo[]) then { + + _nearObjects = nearestObjects[_pos, ["WH_Loot", "Animated_Loot"], 35]; + if (_nearObjects isEqualTo[]) then { + + _config = ('CfgBuildingLootPos' call EPOCH_returnConfig) >> (typeOf _building); + + if (isClass(_config)) then { + + _lootBiasPos = getNumber(_config >> "lootBiasPos"); + _lootType = getText(_config >> "lootType"); + + EPOCH_LootedBlds pushBack _building; + if (count EPOCH_LootedBlds >= 20) then { + EPOCH_LootedBlds deleteAt 0; + }; + + { + _positions = [] + getArray(_config >> (_x select 0)); + if !(_positions isEqualTo[]) then { + _class = _x select 1; + _randomColor = _x select 2; + { + + if ((random 100) < _lootBiasPos) then { + + _pos = _building modelToWorld(_x select 0); + + if (nearestObjects[_pos, ["WH_Loot", "Animated_Loot"], 2] isEqualTo[]) then { + + if ((typeName _class) == "ARRAY") then { + _class = _class select(floor(random(count _class))); + }; + + _dir = (_x select 1) + (getDir _building); + if (_dir > 360) then { + _dir = _dir - 360; + }; + + // Temp for now till we get more + if (_lootType == "mil" && _class == "Bed_EPOCH") then { + _class = "Bunk_EPOCH"; + }; + + _item = createVehicle[_class, _pos, [], 0.0, "CAN_COLLIDE"]; + _item setDir _dir; + + // force item to ground level is resulting z pos is below ground. + if (_pos select 2 < 0) then { + _pos set[2, 0]; + }; + + if (surfaceIsWater _pos) then { + _item setPosASL _pos; + } else { + _item setPosATL _pos; + }; + + if (typeName _randomColor isEqualTo "STRING") then { + _randomColor = _randomColor isEqualTo "true"; + }; + + if (_randomColor) then { + _colors = [] + getArray(configFile >> "CfgVehicles" >> _class >> "availableTextures"); + if !(_colors isEqualTo[]) then { + _color = _colors select floor(random(count _colors)); + _item setObjectTextureGlobal[0, _color]; + }; + }; + }; + }; + }forEach _positions; + }; + }forEach _loots; + }; + }; + }; + }; + }; + }; + EPOCH_lastPlayerPos = _playerPos; +}; + +// [control,bool] call _fadeUI; +_fadeUI = { + private ["_ctrl"]; + _ctrl = _this select 0; + if (_this select 1) then { + if (ctrlFade _ctrl == 0) then { + _ctrl ctrlSetFade 1; + _ctrl ctrlCommit 0.5; + }; + if (ctrlFade _ctrl == 1) then { + _ctrl ctrlSetFade 0; + _ctrl ctrlCommit 0.5; + }; + } else { + if (ctrlFade _ctrl != 1) then { + _ctrl ctrlSetFade 0; + _ctrl ctrlCommit 0; + }; + }; +}; + +_cursorTarget = objNull; diff --git a/Sources/epoch_code/compile/traders/EPOCH_startNpcTrade.sqf b/Sources/epoch_code/compile/traders/EPOCH_startNpcTrade.sqf index f01c47b1..c295825e 100644 --- a/Sources/epoch_code/compile/traders/EPOCH_startNpcTrade.sqf +++ b/Sources/epoch_code/compile/traders/EPOCH_startNpcTrade.sqf @@ -2,7 +2,6 @@ private["_item", "_currQty", "_tradeType", "_itemWorth", "_aiItems", "_itemClass if (!isNil "EPOCH_TRADE_COMPLETE") exitWith {}; if (!isNil "EPOCH_TRADE_STARTED") exitWith{}; -if (EPOCH_playerCrypto <= 0) exitWith {}; if (!isNull _this) then { diff --git a/Sources/epoch_code/config.cpp b/Sources/epoch_code/config.cpp index 40a5099b..640d3731 100644 --- a/Sources/epoch_code/config.cpp +++ b/Sources/epoch_code/config.cpp @@ -185,6 +185,7 @@ class CfgClientFunctions { class client_publicEH {}; class masterLoop {}; + class masterLoop_v2 {}; class clientInit {}; class clientRespawn {}; class clientRevive {}; @@ -339,6 +340,7 @@ class CfgClientFunctions class postprocessCreate {}; class postprocessAdjust {}; class postprocessDestroy {}; + class setDrunk {}; //needs a better name }; class worldToScreen { file = "\x\addons\a3_epoch_code\gui\scripts\worldToScreen"; diff --git a/Sources/epoch_code/gui/Epoch_GUI_rmx.hpp b/Sources/epoch_code/gui/Epoch_GUI_rmx.hpp index c86dc807..5bd2807c 100644 --- a/Sources/epoch_code/gui/Epoch_GUI_rmx.hpp +++ b/Sources/epoch_code/gui/Epoch_GUI_rmx.hpp @@ -48,6 +48,136 @@ class rmx_rscObject }; }; +class rmx_rscContainer +{ + + idd = 99440; + movingEnable = 0; + enableSimulation = 1; + enableDisplay = 0; + + class Objects + { + class _CT_OBJECT_CONTAINER + { + access = 0; // Control access (0 - ReadAndWrite, 1 - ReadAndCreate, 2 - ReadOnly, 3 - ReadOnlyVerified) + idc = 99441; // Control identification (without it, the control won't be displayed) + type = 82; // Type + style = ST_LEFT; // Style + blinkingPeriod = 0; // Time in which control will fade out and back in. Use 0 to disable the effect. + + //model = "\A3\Misc_F\Helpers\UserTexture1m.p3d"; // Displayed model + //model = "\x\addons\a3_epoch_code\gui\terminal2.p3d"; // Displayed model + model = "\x\addons\a3_epoch_assets_3\CfgVehicles\center_plane.p3d"; + scale = 0.2; // Model scale + + x = 26 * GUI_GRID_CENTER_W + GUI_GRID_CENTER_X; // Horizontal coordinates + y = 21 * GUI_GRID_CENTER_H + GUI_GRID_CENTER_Y; // Vertical coordinates + z = 1; // Depth coordinates + //position[] = {0,0,1}; // Alternative XYZ coordinates, where XY is center of the screen + + xBack = 25 * GUI_GRID_CENTER_W + GUI_GRID_CENTER_X; // Horizontal background coordinates + yBack = 12 * GUI_GRID_CENTER_H + GUI_GRID_CENTER_Y; // Vertical background coordinates + zBack = 2; // Depth background coordinates + //positionBack[] = {0,0,2}; // Alternative XYZ coordinates, where XY is center of the screen + + enableZoom = 1; // Allow foreground/background transformation + zoomDuration = 0.5; // Speed of foreground/background transformation + inBack = 0; // Start in back (Back coordinates are used) + + direction[] = {1,0,0.5}; // Model vector dir + up[] = {0.5,1,0}; // Model vector up + + tooltip = "CT_OBJECT"; // Tooltip text + tooltipColorShade[] = {0,0,0,1}; // Tooltip background color + tooltipColorText[] = {1,1,1,1}; // Tooltip text color + tooltipColorBox[] = {1,1,1,1}; // Tooltip frame color + + class Areas // Configurable UI areas. Normally interactive controls (buttons, listboxes, ...) are not interactive here. + { + class UserTextureL + { + selection = "usertextureL"; // Model selection on which the UI will be rendered + class Controls + { + class _CT_STATIC + { + idc = 1100; // Control identification (without it, the control won't be displayed) + type = CT_STATIC; // Type + style = ST_LEFT + ST_CENTER + ST_MULTI; // Style + + x = 0; // Horizontal coordinates (relative to the selection area) + y = 0; // Vertical coordinates (relative to the selection area) + w = 1; // Width (relative to the selection area) + h = 1; // Height (relative to the selection area) + + colorBackground[] = {0,0,0,1}; // Fill color + + text = "\nCT_OBJECT\n_CONTAINER"; // Displayed text + sizeEx = 6 * GUI_GRID_CENTER_H; // Text size + font = "VT323"; // Font from CfgFontFamilies + colorText[] = {1,0,0,1}; // Text color + lineSpacing = 1; // When ST_MULTI style is used, this defines distance between lines (1 is text height) + }; + }; + }; + class UserTexture + { + selection = "usertexture"; // Model selection on which the UI will be rendered + class Controls + { + class _CT_STATIC + { + idc = 11002; // Control identification (without it, the control won't be displayed) + type = CT_STATIC; // Type + style = ST_LEFT + ST_CENTER + ST_MULTI; // Style + + x = 0; // Horizontal coordinates (relative to the selection area) + y = 0; // Vertical coordinates (relative to the selection area) + w = 1; // Width (relative to the selection area) + h = 1; // Height (relative to the selection area) + + colorBackground[] = {0,0,0,1}; // Fill color + + text = "\nCT_OBJECT\n_CONTAINER"; // Displayed text + sizeEx = 6 * GUI_GRID_CENTER_H; // Text size + font = "VT323"; // Font from CfgFontFamilies + colorText[] = {1,0,0,1}; // Text color + lineSpacing = 1; // When ST_MULTI style is used, this defines distance between lines (1 is text height) + }; + }; + }; + class UserTextureR + { + selection = "usertextureR"; // Model selection on which the UI will be rendered + class Controls + { + class _CT_STATIC + { + idc = 11001; // Control identification (without it, the control won't be displayed) + type = CT_STATIC; // Type + style = ST_LEFT + ST_CENTER + ST_MULTI; // Style + + x = 0; // Horizontal coordinates (relative to the selection area) + y = 0; // Vertical coordinates (relative to the selection area) + w = 1; // Width (relative to the selection area) + h = 1; // Height (relative to the selection area) + + colorBackground[] = {0,0,0,1}; // Fill color + + text = "\nCT_OBJECT\n_CONTAINER"; // Displayed text + sizeEx = 6 * GUI_GRID_CENTER_H; // Text size + font = "VT323"; // Font from CfgFontFamilies + colorText[] = {1,0,0,1}; // Text color + lineSpacing = 1; // When ST_MULTI style is used, this defines distance between lines (1 is text height) + }; + }; + }; + }; + }; + }; +}; + class rmx_rscControlsGroup: RscControlsGroup { idc = -1; diff --git a/Sources/epoch_code/gui/scripts/dynamenu/Epoch_dynamicMenuPopulate.sqf b/Sources/epoch_code/gui/scripts/dynamenu/Epoch_dynamicMenuPopulate.sqf index e1b79395..18a3fb14 100644 --- a/Sources/epoch_code/gui/scripts/dynamenu/Epoch_dynamicMenuPopulate.sqf +++ b/Sources/epoch_code/gui/scripts/dynamenu/Epoch_dynamicMenuPopulate.sqf @@ -45,7 +45,7 @@ for "_p" from 0 to 360 step _points do { _positions2 pushBack [_x + (_center - (_scaleSmallX / 2)),_y + (_center - (_scaleSmallY / 2)),_scaleSmallX,_scaleSmallY]; }; -rmx_var_dynaControls = []; +missionNamespace setVariable ["rmx_var_dynaControls",[]]; //_buttonSettings [icon,tooltip,action] for "_e" from 0 to (_entries - 1) do { private ["_ctrl","_ctrl2"]; @@ -71,8 +71,9 @@ for "_e" from 0 to (_entries - 1) do { _ctrl2 ctrlSetPosition (_positions2 select _e); _ctrl2 ctrlCommit 0.1; - rmx_var_dynaControls pushBack _ctrl; - rmx_var_dynaControls pushBack _ctrl2; + _arr = missionNamespace getVariable ["rmx_var_dynaControls",[]]; + _arr append [_ctrl,_ctrl2]; + missionNamespace setVariable ["rmx_var_dynaControls",_arr]; }; true diff --git a/Sources/epoch_code/gui/scripts/post_process/Epoch_setDrunk.sqf b/Sources/epoch_code/gui/scripts/post_process/Epoch_setDrunk.sqf new file mode 100644 index 00000000..5d9af587 --- /dev/null +++ b/Sources/epoch_code/gui/scripts/post_process/Epoch_setDrunk.sqf @@ -0,0 +1,74 @@ +/* + Usage: + 0.5 call epoch_setDrunk; + [0.2, _time] call epoch_setDrunk; + Notes: + Drunk levels 1-9, 0 to disable + Use low times, wet distortion does not work well when animated over time +*/ + +private ["_level","_speed"]; +params [["_level",0,[0]],["_speed",0,[0]]]; + +if (isNil "rmx_var_drunkHandles") then { + + _priority = 15; + _wd = ["wetdistortion",_priority] call epoch_postProcessCreate; + _db = ["dynamicBlur",_priority] call epoch_postProcessCreate; + + rmx_var_drunkHandles = [_wd,_db]; +}; + +switch _level do { + case 0: + { + rmx_var_drunkHandles call epoch_postprocessDestroy; + rmx_var_drunkHandles = nil; + }; + case 0.1: + { + [(rmx_var_drunkHandles select 0), _speed, [-1,0.0144629,0,1,0,-0.551644,0.0309715,0.202484,0,0,-0.161139,0,0,1,1]] call epoch_postprocessAdjust; + }; + case 0.2: + { + [(rmx_var_drunkHandles select 0), _speed, [-1,0.0144629,0,1,0,-0.551644,0.0309715,0.390503,0,0,-0.161139,0,0,1,1]] call epoch_postprocessAdjust; + }; + case 0.3: + { + [(rmx_var_drunkHandles select 0), _speed, [-1,0.0144629,0,1,0,-0.53718,-0.157049,0.390503,-1,0,-0.161139,0,0,1,1]] call epoch_postprocessAdjust; + }; + case 0.4: + { + [(rmx_var_drunkHandles select 0), _speed, [-1,0.0144629,0,1,0,-0.53718,-0.157049,0.390503,-1,1,-0.161139,0,0,1,1]] call epoch_postprocessAdjust; + }; + case 0.5: + { + [(rmx_var_drunkHandles select 0), _speed, [1,0.0144616,0.0144629,1,0,-0.53718,-0.157049,0.390503,-1,1,-0.161139,0,0,1,1]] call epoch_postprocessAdjust; + [(rmx_var_drunkHandles select 1), _speed, [0.146676]] call epoch_postprocessAdjust; + }; + case 0.6: + { + [(rmx_var_drunkHandles select 0), _speed, [1,0.0144616,0.0144629,1,0,-0.53718,-0.157049,0.390503,-1,1,-0.161139,0,0,1,1]] call epoch_postprocessAdjust; + [(rmx_var_drunkHandles select 1), _speed, [0.334697]] call epoch_postprocessAdjust; + }; + case 0.7: + { + [(rmx_var_drunkHandles select 0), _speed, [1,0.0144616,0.0289258,1,0,-0.53718,-0.157049,0.390503,-1,1,-0.161139,0,0,1,1]] call epoch_postprocessAdjust; + [(rmx_var_drunkHandles select 1), _speed, [0.334697]] call epoch_postprocessAdjust; + }; + case 0.8: + { + [(rmx_var_drunkHandles select 0), _speed, [1,0.0289245,0.0289258,1,0,-0.53718,-0.157049,0.390503,-1,1,-0.161139,0,0,1,1]] call epoch_postprocessAdjust; + [(rmx_var_drunkHandles select 1), _speed, [0.334697]] call epoch_postprocessAdjust; + }; + case 0.9: + { + [(rmx_var_drunkHandles select 0), _speed, [1,0,-0.0867792,0.435939,-0.592987,-0.739664,-1,0.144629,-1,0.103286,0.247918,0,0,1,-0.378086]] call epoch_postprocessAdjust; + [(rmx_var_drunkHandles select 1), _speed, [0.0940112]] call epoch_postprocessAdjust; + }; + case 1: + { + [(rmx_var_drunkHandles select 0), _speed, [1,0.0723131,-0.0433885,1,-0.592987,-0.811979,-1,0.882248,-1,1,1,0,0,0.373996,-1]] call epoch_postprocessAdjust; + [(rmx_var_drunkHandles select 1), _speed, [0.151864]] call epoch_postprocessAdjust; + }; +}; \ No newline at end of file diff --git a/Sources/epoch_code/init/both_init.sqf b/Sources/epoch_code/init/both_init.sqf index c3776a76..53f618f1 100644 --- a/Sources/epoch_code/init/both_init.sqf +++ b/Sources/epoch_code/init/both_init.sqf @@ -1,7 +1,7 @@ // Init Custom vars EPOCH_customVars = []; EPOCH_defaultVars = []; -_customVarsDefaults = [ +EPOCH_customVarsDefaults = [ ["Temp",98.6], ["Hunger",5000], ["Thirst",2500], @@ -15,9 +15,12 @@ _customVarsDefaults = [ ["Crypto",0], ["HitPoints",[0,0,0,0]], ["BloodP",100], - ["SpawnArray",[]] + ["SpawnArray",[]], + ["Karma",0], + ["Alcohol",0], + ["Radiation",0] ]; -_customVarsInit = ["CfgEpochClient", "customVarsDefaults", _customVarsDefaults] call EPOCH_fnc_returnConfigEntryV2; +_customVarsInit = ["CfgEpochClient", "customVarsDefaults", EPOCH_customVarsDefaults] call EPOCH_fnc_returnConfigEntryV2; { EPOCH_customVars pushBack (_x select 0); EPOCH_defaultVars pushBack (_x select 1); diff --git a/Sources/epoch_code/init/client_init.sqf b/Sources/epoch_code/init/client_init.sqf index 3da00ad6..4ec06a4a 100644 --- a/Sources/epoch_code/init/client_init.sqf +++ b/Sources/epoch_code/init/client_init.sqf @@ -11,6 +11,7 @@ EPOCH_group_level_img = ["x\addons\a3_epoch_code\data\owner.paa", "x\addons\a3_e if (isNil 'EPOCH_diag_fps') then { EPOCH_diag_fps = 0; }; +EPOCH_playerIsSwimming = false; EPOCH_lastTrash = diag_tickTime; EPOCH_tradeDone = false; EPOCH_bankBalance = 0; diff --git a/Sources/epoch_config/Configs/CfgBaseBuilding.hpp b/Sources/epoch_config/Configs/CfgBaseBuilding.hpp index 62f214c2..8e09d6c8 100644 --- a/Sources/epoch_config/Configs/CfgBaseBuilding.hpp +++ b/Sources/epoch_config/Configs/CfgBaseBuilding.hpp @@ -34,8 +34,13 @@ class CfgBaseBuilding { }; class WoodFloor_EPOCH : Default { + upgradeBuilding[] = { { "MetalFloor_EPOCH", { { "ItemCorrugatedLg", 2 } } } }; removeParts[] = { { "PartPlankPack", 2 } }; }; + class MetalFloor_EPOCH : Default + { + removeParts[] = { { "ItemCorrugatedLg", 2 } }; + }; class CinderWallGarage_EPOCH : Default { removeParts[] = { { "CinderBlocks", 4 }, { "ItemCorrugatedLg", 1 }, { "CircuitParts", 1 } }; diff --git a/Sources/epoch_config/Configs/CfgEpochClient.hpp b/Sources/epoch_config/Configs/CfgEpochClient.hpp index ae70fb94..d5925148 100644 --- a/Sources/epoch_config/Configs/CfgEpochClient.hpp +++ b/Sources/epoch_config/Configs/CfgEpochClient.hpp @@ -38,7 +38,10 @@ class CfgEpochClient {"Crypto",0}, {"HitPoints",{0,0,0,0}}, {"BloodP",100}, - {"SpawnArray",{}} + {"SpawnArray",{}}, + {"Karma",0}, + {"Alcohol",0}, + {"Radiation",0} }; // controls max group limit and cost @@ -63,7 +66,7 @@ class CfgEpochClient { "cabinetPos", "Cabinet_EPOCH", false } }; - + #include "CfgEpochClient\takistan.hpp" #include "CfgEpochClient\australia.hpp" #include "CfgEpochClient\ProvingGrounds_PMC.hpp" diff --git a/Sources/epoch_config/Configs/CfgMasterLoop.hpp b/Sources/epoch_config/Configs/CfgMasterLoop.hpp new file mode 100644 index 00000000..5b8a54c8 --- /dev/null +++ b/Sources/epoch_config/Configs/CfgMasterLoop.hpp @@ -0,0 +1,42 @@ +class CfgMasterLoop +{ + class Init + { + file = "\x\addons\a3_epoch_code\compile\setup\masterLoop\init.sqf"; + }; + + class Events + { + condition = "alive player"; + file = "\x\addons\a3_epoch_code\compile\setup\masterLoop"; + + class Event1 + { + delay = 1; // in seconds + }; + class Event2 + { + delay = 10; + }; + class Event3 + { + delay = 15; + }; + class Event4 + { + delay = 30; + }; + class Event5 + { + delay = 60; + }; + class Event6 + { + delay = 300; + }; + class Event7 + { + delay = 600; + }; + }; +}; diff --git a/Sources/epoch_config/Configs/CfgVehicles.hpp b/Sources/epoch_config/Configs/CfgVehicles.hpp index 05fcc7e7..192c3084 100644 --- a/Sources/epoch_config/Configs/CfgVehicles.hpp +++ b/Sources/epoch_config/Configs/CfgVehicles.hpp @@ -2709,6 +2709,21 @@ class CfgVehicles energyCost = 0.2; slingLoadCargoMemoryPoints[] = { "N", "S", "E", "W" }; }; + class MetalFloor_SIM_EPOCH : Constructions_modular_F + { + scope = 2; + model = "\x\addons\a3_epoch_assets_1\models\metal_floor.p3d"; + displayName = "Metal Floor"; + simulClass = "MetalFloor_SIM_EPOCH"; + staticClass = "MetalFloor_EPOCH"; + GhostPreview = "MetalFloor_Ghost_EPOCH"; + snapPointsPara[] = { "NF", "SF", "EF", "WF", "C", "CB" }; + snapPointsPerp[] = { "N", "S", "E", "W", "CinN", "CinS", "CinE", "CinW" }; + allowedSnapPoints[] = { "NF", "SF", "EF", "WF", "C" }; + allowedSnapObjects[] = { "Const_floors_static_F", "Constructions_foundation_F" }; + energyCost = 0.5; + slingLoadCargoMemoryPoints[] = { "N", "S", "E", "W" }; + }; class WoodLargeWall_SIM_EPOCH: Constructions_modular_F { @@ -4064,7 +4079,19 @@ class CfgVehicles snapPointsPerp[] = {"N","S","E","W","CinN","CinS","CinE","CinW"}; allowedSnapPoints[] = {"NF","SF","EF","WF","C"}; energyCost = 0.2; - removeParts[] = { { "PartPlankPack", 2 } }; + }; + class MetalFloor_EPOCH : Const_floors_static_F + { + scope = 2; + model = "\x\addons\a3_epoch_assets_1\models\metal_floor.p3d"; + displayName = "Metal Floor"; + simulClass = "MetalFloor_SIM_EPOCH"; + staticClass = "MetalFloor_EPOCH"; + GhostPreview = "MetalFloor_Ghost_EPOCH"; + snapPointsPara[] = { "NF", "SF", "EF", "WF", "C", "CB" }; + snapPointsPerp[] = { "N", "S", "E", "W", "CinN", "CinS", "CinE", "CinW" }; + allowedSnapPoints[] = { "NF", "SF", "EF", "WF", "C" }; + energyCost = 0.5; }; // Wood wall seed item lvl 0 @@ -4140,6 +4167,20 @@ class CfgVehicles ladders[] = {}; }; + class MetalFloor_Ghost_EPOCH : Const_Ghost_EPOCH + { + scope = 2; + model = "\x\addons\a3_epoch_assets_1\models\metal_floor_ghost.p3d"; + displayName = "Metal Floor Ghost"; + staticClass = "MetalFloor_EPOCH"; + + snapPointsPara[] = { "NF", "SF", "EF", "WF", "C", "CB" }; + snapPointsPerp[] = { "N", "S", "E", "W", "CinN", "CinS", "CinE", "CinW" }; + allowedSnapPoints[] = { "NF", "SF", "EF", "WF", "C" }; + allowedSnapObjects[] = { "Const_floors_static_F", "Constructions_foundation_F" }; + + ladders[] = {}; + }; class WoodLadder_Ghost_EPOCH : Const_Ghost_EPOCH { diff --git a/Sources/epoch_config/config.cpp b/Sources/epoch_config/config.cpp index 1b1019f3..324b8a70 100644 --- a/Sources/epoch_config/config.cpp +++ b/Sources/epoch_config/config.cpp @@ -40,6 +40,7 @@ class CfgAddons #include "\x\addons\a3_epoch_config\Configs\cfgCrafting.hpp" #include "\x\addons\a3_epoch_config\Configs\cfgPricing.hpp" #include "\x\addons\a3_epoch_config\Configs\CfgEpochClient.hpp" +#include "\x\addons\a3_epoch_config\Configs\CfgMasterLoop.hpp" #include "\x\addons\a3_epoch_config\Configs\CfgBaseBuilding.hpp" #include "\x\addons\a3_epoch_config\Configs\CfgBuildingLootPos.hpp" #include "\x\addons\a3_epoch_config\Configs\CfgActionMenu\CfgActionMenu_core.hpp" @@ -103,7 +104,7 @@ class CfgAnimationSourceSounds class CfgCommands { // allowedHTMLLoadURIs[] += // think this adds to an existing array - allowedHTMLLoadURIs[] = + allowedHTMLLoadURIs[] = { "https://raw.githubusercontent.com/epochmodteam/epoch/test/changelog.html" //there are some issues with capitalization used in github links }; diff --git a/Sources/epoch_server/system/server_monitor.fsm b/Sources/epoch_server/system/server_monitor.fsm index 5ffa508c..ad10f30d 100644 --- a/Sources/epoch_server/system/server_monitor.fsm +++ b/Sources/epoch_server/system/server_monitor.fsm @@ -48,7 +48,7 @@ class FSM init = /*%FSM*/"diag_log ""Loaded Server FSM"";" \n "" \n "_serverSettingsConfig = configFile >> ""CfgEpochServer"";" \n - "_ahInitAuthCfg = [_serverSettingsConfig, ""antihack_ahInitAuthCfg"", [0,90]] call EPOCH_fnc_returnConfigEntry;" \n + "_ahInitAuthCfg = [_serverSettingsConfig, ""antihack_ahInitAuthCfg"", [0,180]] call EPOCH_fnc_returnConfigEntry;" \n "_events = [_serverSettingsConfig, ""events"", [[3600, ""CarnivalSpawner""], [2400, ""EarthQuake""], [1800, ""ChangeWeather""], [1200, ""ContainerSpawner""], [300, ""PlantSpawner""]]] call EPOCH_fnc_returnConfigEntry;" \n "_simulationHandler = [_serverSettingsConfig, ""simulationHandler"", false] call EPOCH_fnc_returnConfigEntry;" \n "" \n @@ -464,4 +464,4 @@ class FSM { }; }; -/*%FSM*/ \ No newline at end of file +/*%FSM*/