From 414fd7e1b7a152272adbbd140b61ac4f913a8bfa Mon Sep 17 00:00:00 2001 From: ebaydayz Date: Mon, 14 Nov 2016 20:25:26 -0500 Subject: [PATCH] Add auto open chute option to HALO --- SQF/dayz_code/compile/BIS_fnc/fn_halo.sqf | 22 +++++++++++-- SQF/dayz_code/configVariables.sqf | 32 +++++++++++-------- SQF/dayz_code/init/publicEH.sqf | 2 +- SQF/dayz_server/compile/server_playerDied.sqf | 2 +- 4 files changed, 41 insertions(+), 17 deletions(-) diff --git a/SQF/dayz_code/compile/BIS_fnc/fn_halo.sqf b/SQF/dayz_code/compile/BIS_fnc/fn_halo.sqf index 93a7b875e..89ca38b83 100644 --- a/SQF/dayz_code/compile/BIS_fnc/fn_halo.sqf +++ b/SQF/dayz_code/compile/BIS_fnc/fn_halo.sqf @@ -110,7 +110,7 @@ if (typename _this == typename objnull) then { [] spawn { _time = time - 0.1; - while {alive player && vehicle player == player && isnil {player getvariable "bis_fnc_halo_terminate"}} do { + while {alive player && vehicle player == player && isnil {player getvariable "bis_fnc_halo_terminate"} && (([player] call FNC_GetPos) select 2) > DZE_HaloOpenChuteHeight} do { //--- FPS counter _fpsCoef = ((time - _time) * 60) / acctime; //Script is optimized for 60 FPS @@ -165,6 +165,17 @@ if (typename _this == typename objnull) then { bis_fnc_halo_ppRadialBlur ppEffectAdjust [0.02,0.02,0.3 - (bis_fnc_halo_vel/7)/_fpsCoef,0.3 - (bis_fnc_halo_vel/7)/_fpsCoef]; bis_fnc_halo_ppRadialBlur ppEffectCommit 0.01; */ + if (DZE_HaloAltitudeMeter && !isNil "Dayz_loginCompleted") then { + titleText [ + format [ + localize "str_halo_altitude_speed", + str(round(([player] call FNC_GetPos) select 2)) + " m", + str(abs(round(speed(vehicle player)))) + " " + localize "str_lib_info_unit_kilometers_per_hour" + ],"PLAIN DOWN",0.01 + ]; + }; + player allowDamage false; //Prevent glitch death when opening chute + uiSleep 0.01; }; //--- End @@ -188,6 +199,11 @@ if (typename _this == typename objnull) then { [objNull, player, rSwitchMove,"adthppnemstpsraswrfldnon_1"] call RE; player switchmove "adthppnemstpsraswrfldnon_1"; player setvelocity [0,0,0]; + } else { + if (DZE_HaloOpenChuteHeight > -1 && isNil "bis_fnc_halo_para_dirAbs") then { + //Auto open chute + [player] spawn BIS_fnc_Halo; + }; }; }; } else { @@ -222,7 +238,7 @@ if (typename _this == typename []) then { if (!local _unit) exitwith {}; //--- Free fall - if (count _this == 2) exitwith { + if (count _this == 2) exitwith { //Fresh spawn calling from player_monitor.fsm _alt = _this select 1; _paraPosition = [_unit] call FNC_GetPos; _unit setpos [(_paraPosition select 0),(_paraPosition select 1),_alt]; @@ -244,6 +260,7 @@ if (typename _this == typename []) then { _para lock false; bis_fnc_halo_para_dirAbs = direction _para; + player allowDamage true; //--- Key controls if (_unit == player) then { @@ -358,5 +375,6 @@ if (typename _this == typename []) then { bis_fnc_halo_para_keydown_eh = nil; bis_fnc_halo_para_mousemoving_eh = nil; bis_fnc_halo_para_mouseholding_eh = nil; + bis_fnc_halo_para_dirAbs = nil; }; }; diff --git a/SQF/dayz_code/configVariables.sqf b/SQF/dayz_code/configVariables.sqf index 08d5585e8..4b52d7395 100644 --- a/SQF/dayz_code/configVariables.sqf +++ b/SQF/dayz_code/configVariables.sqf @@ -10,23 +10,12 @@ dayz_waterBottleBreaking = false; // Water bottles have a chance to break when b dayz_tameDogs = false; // Allow taming dogs with raw meat dayz_townGenerator = false; // Spawn vanilla map junk instead of Epoch DynamicDebris. Currently only compatible with Chernarus. dayz_townGeneratorBlackList = []; // Town generator will not spawn junk within 150m of these positions. Example for Chernarus trader cities: [[4053,11668,0],[11463,11349,0],[6344,7806,0],[1606,7803,0],[12944,12766,0],[5075,9733,0],[12060,12638,0]] - -DynamicVehicleDamageLow = 0; // Min damage random vehicles can spawn with -DynamicVehicleDamageHigh = 100; // Max damage random vehicles can spawn with -DynamicVehicleFuelLow = 0; // Min fuel random vehicles can spawn with -DynamicVehicleFuelHigh = 100; // Max fuel random vehicles can spawn with - DZE_NoVehicleExplosions = false; //Disable vehicle explosions to prevent damage to objects by ramming - doesn't work with amphibious pook which you should not use due to other issues DZE_TempVars = [7, 15, 4, 4, 2, 6, 3, 2, 0.25, 0.75, 0.5]; //[vehicle, fire, building, moving, sun, heatpack, water, standing, rain, wind, night] water, standing, rain, wind and night factors have a negative impact on temperature, the greater they are the quicker the player gets cold DZE_WeatherVariables = [10, 20, 5, 10, 0, 0.2, 0, 0.7, 0, 0.6, 0, 8, 25, 30, 0, false]; //See DynamicWeatherEffects.sqf for info on these values DZE_TwoPrimaries = 2; // 0 do not allow primary weapon on back. 1 allow primary weapon on back, but not when holding a primary weapon in hand. 2 allow player to hold two primary weapons, one on back and one in their hands. DZE_AntiWallLimit = 3; // Number of activations before player_antiWall kills player for glitching attempt. Lower is stricter, but may result in false positives. DZE_DamageBeforeMaint = 0.09; // Minimum damage built items must have before they can be maintained -DZE_DeathMsgChat = "none"; //"none","global","side","system" Display death messages in selected chat channel. -DZE_DeathMsgDynamicText = false; // Display death messages as dynamicText in the top left with weapon icons. -DZE_DeathMsgCutText = false; // Display death messages as cutText -DZE_DeathScreen = true; // True=Use Epoch death screen (Trade city obituaries have been amended) False=Use DayZ death screen (You are dead) -DZE_HaloJump = true; // Enable halo jumping out of air vehicles above 400m DZE_NameTags = 0; // Name displays when looking at player up close 0 = Off, 1= On, 2 = Player choice DZE_ForceNameTagsInTrader = false; // Force name display when looking at player up close in traders. Overrides player choice. DZE_HumanityTargetDistance = 25; // Distance to show name tags (red for bandit, blue for hero, green for friend) @@ -35,8 +24,6 @@ DZE_HeliLift = true; // Enable Epoch heli lift system DZE_RestrictSkins = []; // Clothes that players are not allowed to wear. i.e. ["Skin_GUE_Soldier_CO_DZ","Skin_GUE_Soldier_2_DZ"] etc. DZE_UI = "vanilla"; //"vanilla","epoch","dark" UI status icons style. Dark accommodates color blind people. DZE_VanillaUICombatIcon = true; //Display or hide combat UI icon if using DZE_UI = "vanilla"; otherwise it has no affect. -MaxAmmoBoxes = 3; // Max number of random Supply_Crate_DZE filled with vehicle ammo to spawn around the map -MaxMineVeins = 50; // Max number of random mine veins to spawn around the map timezoneswitch = 0; // Changes murderMenu times with this offset in hours. DZE_SafeZonePosArray = []; //Prevent players in safeZones from being killed if their vehicle is destroyed. Format is [[[3D POS], RADIUS],[[3D POS], RADIUS]]; Ex. DZE_SafeZonePosArray = [[[6325.6772,7807.7412,0],150],[[4063.4226,11664.19,0],150]]; DZE_SafeZoneNoBuildItems = []; // Array of object class names not allowed to build near the safe zones listed above. i.e ["VaultStorageLocked","LockboxStorageLocked","Plastic_Pole_EP1_DZ"] etc. @@ -47,6 +34,25 @@ DZE_GemOccurance = [["ItemTopaz",10], ["ItemObsidian",8], ["ItemSapphire",6], [" DZE_GodModeBaseExclude = []; //Array of object class names excluded from the god mode bases feature DZE_salvageLocked = true; //Enable or disable salvaging of locked vehicles, useful for stopping griefing on locked vehicles. +// Death Messages +DZE_DeathMsgChat = "none"; //"none","global","side","system" Display death messages in selected chat channel. +DZE_DeathMsgDynamicText = false; // Display death messages as dynamicText in the top left with weapon icons. +DZE_DeathMsgRolling = false; // Display death messages as rolling messages in bottom center of screen. +DZE_DeathScreen = true; // True=Use Epoch death screen (Trade city obituaries have been amended) False=Use DayZ death screen (You are dead) + +// Dynamic Vehicles +DynamicVehicleDamageLow = 0; // Min damage random vehicles can spawn with +DynamicVehicleDamageHigh = 100; // Max damage random vehicles can spawn with +DynamicVehicleFuelLow = 0; // Min fuel random vehicles can spawn with +DynamicVehicleFuelHigh = 100; // Max fuel random vehicles can spawn with +MaxAmmoBoxes = 3; // Max number of random Supply_Crate_DZE filled with vehicle ammo to spawn around the map +MaxMineVeins = 50; // Max number of random mine veins to spawn around the map + +// HALO Jump +DZE_HaloAltitudeMeter = false; // Display altitude and speed on screen while in halo jump. +DZE_HaloOpenChuteHeight = 180; // Automatically open chute at specified height. Set to -1 to disable this feature. +DZE_HaloJump = true; // Enable halo jumping out of air vehicles above 400m + // Trader Menu DZE_ConfigTrader = true; // Use config files for traders instead of database. Loads faster and uses less network traffic. False enables database traders with legacy trader menu. DZE_serverLogTrades = true; // Log trades to server RPT (sent with publicVariableServer on every trade) diff --git a/SQF/dayz_code/init/publicEH.sqf b/SQF/dayz_code/init/publicEH.sqf index 44d971e40..d4b4f6b02 100644 --- a/SQF/dayz_code/init/publicEH.sqf +++ b/SQF/dayz_code/init/publicEH.sqf @@ -359,7 +359,7 @@ if (!isDedicated) then { case "side": {BIS_functions_mainscope sideChat _message;}; case "system": {systemChat _message;}; }; - if (DZE_DeathMsgCutText) then {_message call dayz_rollingMessages;}; + if (DZE_DeathMsgRolling) then {_message call dayz_rollingMessages;}; diag_log format["DeathMessage: %1",_message]; }; diff --git a/SQF/dayz_server/compile/server_playerDied.sqf b/SQF/dayz_server/compile/server_playerDied.sqf index 5709ccbb6..7fb8bafa0 100644 --- a/SQF/dayz_server/compile/server_playerDied.sqf +++ b/SQF/dayz_server/compile/server_playerDied.sqf @@ -61,7 +61,7 @@ if (_method in ["explosion","melee","shot","shothead","shotheavy"] && !(_method }; if (_playerName != "unknown" or _sourceName != "unknown") then { - if (toLower DZE_DeathMsgChat != "none" or DZE_DeathMsgCutText or DZE_DeathMsgDynamicText) then { + if (toLower DZE_DeathMsgChat != "none" or DZE_DeathMsgRolling or DZE_DeathMsgDynamicText) then { PVDZE_deathMessage = _message; //Don't use regular PV here since JIP clients don't need it {