From 7496ef5d5cd01eea811261c110fb61120c300b96 Mon Sep 17 00:00:00 2001 From: ebaydayz Date: Sat, 24 Dec 2016 20:17:08 -0500 Subject: [PATCH] Fix undefined color error in repair_vehicle.sqf Same color error as f92b751 . Also same issue in salvage_vehicle.sqf as described in #1828 Added setVariable exceptions for tank hit points. --- CHANGE LOG 1.0.6.1.txt | 3 ++- SQF/dayz_code/actions/repair_vehicle.sqf | 13 ++++++++----- SQF/dayz_code/actions/salvage_vehicle.sqf | 2 +- Server Files/Battleye/setvariable.txt | 2 +- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/CHANGE LOG 1.0.6.1.txt b/CHANGE LOG 1.0.6.1.txt index cd5c4c5ec..d18d77afb 100644 --- a/CHANGE LOG 1.0.6.1.txt +++ b/CHANGE LOG 1.0.6.1.txt @@ -11,7 +11,8 @@ [FIXED] Tag friendly still showing after player accepts and related issue with BackpackAntiTheft. #1807 @oiad [FIXED] Undefined variable dayz_clientPreload error on main menu during intro.sqs. #1810 @ndavalos @ebayShopper [FIXED] Giving pain killers to another player no longer removes pain from the player giving the pain killers. -[FIXED] Occasional undefined error for text color attribute when salvaging vehicles. @ebayShopper +[FIXED] Occasional undefined error for text color attribute when repairing and salvaging vehicles. @ebayShopper +[FIXED] Unable to repair or salvage tank tracks with scrap metal. #1828 @ndavalos [FIXED] M24 ammo prices are now 1/4 of DMR ammo prices, so no profit can be made by combining M24 rounds. @looter809 @ebayShopper [FIXED] Full cinderblock walls now work properly with vector building #1813. @DeVloek @icomrade [FIXED] Death message showing incorrectly when players suicide under certain conditions. @oiad @ebayShopper diff --git a/SQF/dayz_code/actions/repair_vehicle.sqf b/SQF/dayz_code/actions/repair_vehicle.sqf index 085255eca..2b8b23977 100644 --- a/SQF/dayz_code/actions/repair_vehicle.sqf +++ b/SQF/dayz_code/actions/repair_vehicle.sqf @@ -17,15 +17,18 @@ _hitpoints = _vehicle call vehicle_getHitpoints; _configVeh = configFile >> "cfgVehicles" >> "RepairParts" >> _x; _part = getText(_configVeh >> "part"); - if ((isNil "_part") || (_part == "")) then { _part = "PartGeneric"; }; + if (_part == "") then { _part = "PartGeneric"; }; // get every damaged part no matter how tiny damage is! _damagePercent = str(round(_damage * 100))+"% Damage"; if (_damage > 0) then { - if ((_damage >= 0) and (_damage <= 0.25)) then {_color = "color='#00ff00'";}; //green - if ((_damage >= 0.26) and (_damage <= 0.50)) then {_color = "color='#ffff00'";}; //yellow - if ((_damage >= 0.51) and (_damage <= 0.75)) then {_color = "color='#ff8800'";}; //orange - if ((_damage >= 0.76) and (_damage <= 1)) then {_color = "color='#ff0000'";}; //red + _color = switch true do { + case (_damage >= 0 && _damage <= 0.25): {"color='#00ff00'"}; //green + case (_damage > 0.25 && _damage <= 0.50): {"color='#ffff00'"}; //yellow + case (_damage > 0.50 && _damage <= 0.75): {"color='#ff8800'"}; //orange + case (_damage > 0.75 && _damage <= 1): {"color='#ff0000'"}; //red + }; + _cmpt = format[localize "str_actions_medical_09",_cmpt,_damagePercent]; _string = format["%2",_color,_cmpt]; //Repair - Part diff --git a/SQF/dayz_code/actions/salvage_vehicle.sqf b/SQF/dayz_code/actions/salvage_vehicle.sqf index 617ba0542..d1f114d66 100644 --- a/SQF/dayz_code/actions/salvage_vehicle.sqf +++ b/SQF/dayz_code/actions/salvage_vehicle.sqf @@ -52,7 +52,7 @@ if (_is6WheelType) then { _configVeh = configFile >> "cfgVehicles" >> "RepairParts" >> _x; _part = getText(_configVeh >> "part"); - if (isNil "_part") then { _part = "PartGeneric"; }; + if (_part == "") then { _part = "PartGeneric"; }; //get every damaged part no matter how tiny damage is! _damagePercent = str(round(_damage * 100))+"% Damage"; diff --git a/Server Files/Battleye/setvariable.txt b/Server Files/Battleye/setvariable.txt index 78281bcf7..06376c9f7 100644 --- a/Server Files/Battleye/setvariable.txt +++ b/Server Files/Battleye/setvariable.txt @@ -3,7 +3,7 @@ 5 ^USEC_!=USEC_(BloodQty|infected|injured|inPain|isCardiac|isDead|lowBlood|Sepsis) 5 ^NORRN_ !=NORRN_(LoadVcl|unconscious|unit_dragged) 5 ^bis_ !=bis_greeted(by(evil|languages|people|times)|languages|people|times) !=BIS_noCoreConversations -5 ^hit_ !=hit_(Pelvis|aimpoint|lelbow|relbow|RightFoot|LeftFoot|neck|pilot|hands|svetlo|vez|zbran) !=hit_(hands|legs) !=hit_arms !="hit_(elektronika|engine|fueltank|glass[0-9]+|karoserie|(mala|velka) vrtule|motor|munice|netrup|palivo)" !="hit_(pravy (predni|zadni) tlumic|[lp] svetlo|sklo predni [lp]|svetlo l|wheel_[12]_[1-4]_steering|wheel_[12]_damper)" !=hit_telo !="hit_\?" !="hit_(light_nav_(right|top|left|back)|light_1_(1_dir|1_pos|2_dir|2_pos)|LandLeft|LandRight|pas_l)" +5 ^hit_ !=hit_(Pelvis|aimpoint|lelbow|relbow|RightFoot|LeftFoot|neck|pilot|hands|svetlo|vez|zbran) !=hit_(hands|legs) !=hit_arms !="hit_(elektronika|engine|fueltank|glass[0-9]+|karoserie|(mala|velka) vrtule|motor|munice|netrup|palivo)" !="hit_(pravy (predni|zadni) tlumic|[lp] svetlo|sklo predni [lp]|svetlo l|wheel_[12]_[1-4]_steering|wheel_[12]_damper)" !=hit_telo !="hit_\?" !="hit_(light_nav_(right|top|left|back)|light_1_(1_dir|1_pos|2_dir|2_pos)|LandLeft|LandRight)" !="hit_(NEmotor|NEtelo|pas_L|pas_P)" 1=hit_(Pelvis|aimpoint|lelbow|relbow|RightFoot|LeftFoot|neck|pilot) // Bleeding Limbs (optional) 1=hit_(hands|legs) // Breaking Limbs (optional) 1 USEC_