diff --git a/CHANGE LOG 1.0.6.2.txt b/CHANGE LOG 1.0.6.2.txt index 891926b01..e1e7704ed 100644 --- a/CHANGE LOG 1.0.6.2.txt +++ b/CHANGE LOG 1.0.6.2.txt @@ -48,6 +48,7 @@ [FIXED] Readded crossbow reload sound [FIXED] Using setDamage or setHit to kill a player via script will no longer cause a double death. [FIXED] The dramatic recoil camera shake effect from a nearby bullet hit is now reset correctly instead of remaining permanent. +[FIXED] Melee and tranquilizer bolt knockouts were usually instant or far shorter than the intended time of 20s-80s. [NOTE] Fixes below are included in the mission file and server pbo as part of server package 1.0.6.1A (March 10th 2017) [FIXED] Fixed food and drink going down 10x faster from melee and other "working" actions. diff --git a/SQF/dayz_code/compile/fn_damageHandler.sqf b/SQF/dayz_code/compile/fn_damageHandler.sqf index 06417bfb6..79960097a 100644 --- a/SQF/dayz_code/compile/fn_damageHandler.sqf +++ b/SQF/dayz_code/compile/fn_damageHandler.sqf @@ -138,14 +138,11 @@ if (_unit == player) then { if (_ammo == "tranquiliser_bolt") then { r_player_timeout = 20 + round(random 60); [_unit] spawn { - private ["_unit"]; _unit = _this select 0; localize "str_player_tranquilized" call dayz_rollingMessages; [_unit,0.01] call fnc_usec_damageUnconscious; _unit setVariable ["NORRN_unconscious", true, true]; - r_player_unconscious = true; player setVariable["medForceUpdate",true,true]; - player setVariable ["unconsciousTime", r_player_timeout, true]; }; }; @@ -154,13 +151,11 @@ if (_unit == player) then { if ((_isHeadHit) && (_ammo in ["Crowbar_Swing_Ammo","Bat_Swing_Ammo","Sledge_Swing_Ammo"])) then { r_player_timeout = 20 + round(random 60); [_unit] spawn { - _unit = _this select 0; + _unit = _this select 0; localize "str_actions_medical_knocked_out" call dayz_rollingMessages; [_unit,0.01] call fnc_usec_damageUnconscious; _unit setVariable ["NORRN_unconscious", true, true]; - r_player_unconscious = true; player setVariable["medForceUpdate",true,true]; - player setVariable ["unconsciousTime", r_player_timeout, true]; }; }; }; diff --git a/SQF/dayz_code/compile/fn_unconscious.sqf b/SQF/dayz_code/compile/fn_unconscious.sqf index a8c0b3296..7a5e21367 100644 --- a/SQF/dayz_code/compile/fn_unconscious.sqf +++ b/SQF/dayz_code/compile/fn_unconscious.sqf @@ -1,6 +1,6 @@ // (c) facoptere@gmail.com, licensed to DayZMod for the community -private ["_count","_anim","_weapon","_sprint","_stance","_transmove","_start","_timeout","_short","_sandLevel","_disableHdlr","_speed"]; +private ["_count","_anim","_weapon","_sprint","_stance","_transmove","_start","_timeout","_short","_sandLevel","_speed"]; if (r_player_unconsciousInProgress) exitWith {}; r_player_unconsciousInProgress = true; diff --git a/SQF/dayz_code/medical/setup_functions_med.sqf b/SQF/dayz_code/medical/setup_functions_med.sqf index b630b582e..877e474fc 100644 --- a/SQF/dayz_code/medical/setup_functions_med.sqf +++ b/SQF/dayz_code/medical/setup_functions_med.sqf @@ -32,21 +32,6 @@ fnc_usec_pitchWhine = { }; }; -/* -//Old system 1.8.6 -fnc_usec_damageUnconscious1 = { - private["_unit","_damage"]; - _unit = _this select 0; - _damage = _this select 1; - - diag_log format["fnc_usec_damageUnconscious: %1,%2,%3",_unit,_damage, player]; - - if (_unit == player) then { - r_player_timeout = 120 min (round((((random 2) max 0.1) * _damage) * 20)); - r_player_unconscious = true; - }; -}; -*/ fnc_usec_damageUnconscious = { private["_unit","_damage"]; _unit = _this select 0; @@ -56,7 +41,9 @@ fnc_usec_damageUnconscious = { _inVehicle = (vehicle _unit != _unit); if (_unit == player) then { - r_player_timeout = 120 min (round((((random 2) max 0.1) * _damage) * 20)); + if (r_player_timeout <= 0) then { + r_player_timeout = 120 min (round((((random 2) max 0.1) * _damage) * 20)); + }; r_player_unconscious = true; player setVariable["medForceUpdate",true];