diff --git a/CHANGE LOG 1.0.6.1.txt b/CHANGE LOG 1.0.6.1.txt index cdd7cc8cf..46664b47d 100644 --- a/CHANGE LOG 1.0.6.1.txt +++ b/CHANGE LOG 1.0.6.1.txt @@ -9,5 +9,7 @@ [FIXED] Issue where Arma cheats could still be entered under certain conditions without pressing LeftShift at the same time as NumPadMinus. @ebayShopper [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 [INFO] See Documents\CHANGE LOG 1.0.6.txt for the full list of 1.0.5.1 --> 1.0.6 changes. \ No newline at end of file diff --git a/SQF/dayz_code/actions/salvage_vehicle.sqf b/SQF/dayz_code/actions/salvage_vehicle.sqf index 9894de69d..617ba0542 100644 --- a/SQF/dayz_code/actions/salvage_vehicle.sqf +++ b/SQF/dayz_code/actions/salvage_vehicle.sqf @@ -56,11 +56,13 @@ if (_is6WheelType) then { //get every damaged part no matter how tiny damage is! _damagePercent = str(round(_damage * 100))+"% Damage"; - if (_damage < 1 && {_damage > 0}) then { //Tempfix for issue where certain hitpoints on some vehicles do not get damaged and allow infinite removal - 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 + if (_damage < 1 && _damage > 0) then { //Tempfix for issue where certain hitpoints on some vehicles do not get damaged and allow infinite removal + _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 + }; _string = format[localize "str_actions_repair_01",_cmpt,_damagePercent]; _string = format["%2",_color,_string]; //Remove - Part _handle = dayz_myCursorTarget addAction [_string, "\z\addons\dayz_code\actions\salvage.sqf",[_vehicle,_part,_x], 0, false, true];