From ea8d746c711dd32b73d851beb2284ef63432505e Mon Sep 17 00:00:00 2001 From: vbawol Date: Fri, 29 Mar 2013 09:09:44 -0500 Subject: [PATCH] 1.0.0.1 + [FIXED] Crafting removed item counter was incorrect. --- dayz_code/actions/player_craftItem.sqf | 11 +++++++---- dayz_code/config.cpp | 2 +- dayz_code/rscTitles.hpp | 2 +- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/dayz_code/actions/player_craftItem.sqf b/dayz_code/actions/player_craftItem.sqf index 34744ad33..2fd3073e7 100644 --- a/dayz_code/actions/player_craftItem.sqf +++ b/dayz_code/actions/player_craftItem.sqf @@ -2,7 +2,7 @@ * Crafting by [VB]AWOL * usage: spawn player_craftitem; */ -private ["_onLadder","_canDo","_selectedRecipeOutput","_proceed","_itemIn","_countIn","_missing","_missingQty","_qty","_itemOut","_countOut","_started","_finished","_animState","_isMedic","_removed","_tobe_removed_total","_textCreate","_text","_id","_textMissing","_selectedRecipeInput"]; +private ["_onLadder","_canDo","_selectedRecipeOutput","_proceed","_itemIn","_countIn","_missing","_missingQty","_qty","_itemOut","_countOut","_started","_finished","_animState","_isMedic","_removed","_tobe_removed_total","_textCreate","_id","_textMissing","_selectedRecipeInput","_num_removed","_removed_total","_temp_removed_array","_isFireNear"]; if(TradeInprogress) exitWith { cutText ["Crafting already in progress." , "PLAIN DOWN"]; }; TradeInprogress = true; @@ -152,9 +152,12 @@ if (_isFireNear >= 1 and _canDo) then { { if( (_removed < _countIn) && ((_x == _itemIn) || configName(inheritsFrom(configFile >> "cfgMagazines" >> _x)) == _itemIn)) then { - _removed = _removed + ([player,_x] call BIS_fnc_invRemove); - _removed_total = _removed_total + _removed; - _temp_removed_array set [count _temp_removed_array,_x]; + _num_removed = ([player,_x] call BIS_fnc_invRemove); + _removed = _removed + _num_removed; + _removed_total = _removed_total + _num_removed; + if(_num_removed >= 1) then { + _temp_removed_array set [count _temp_removed_array,_x]; + }; }; } forEach magazines player; diff --git a/dayz_code/config.cpp b/dayz_code/config.cpp index 156e0ea7f..56488fb17 100644 --- a/dayz_code/config.cpp +++ b/dayz_code/config.cpp @@ -40,7 +40,7 @@ class CfgMods hidePicture = 0; hideName = 0; action = "http://www.dayzepoch.com"; - version = "1.0"; + version = "1.0.0.1"; hiveVersion = 0.96; //0.93 }; }; diff --git a/dayz_code/rscTitles.hpp b/dayz_code/rscTitles.hpp index e5eaa824d..dac32ecd1 100644 --- a/dayz_code/rscTitles.hpp +++ b/dayz_code/rscTitles.hpp @@ -137,7 +137,7 @@ class RscDisplayMain : RscStandardDisplay class DAYZ_Version : CA_Version { idc = -1; - text = "DayZ Epoch 1.0 (1.7.6.1)"; + text = "DayZ Epoch 1.0.0.1 (1.7.6.1)"; y = "(SafeZoneH + SafeZoneY) - (1 - 0.95)"; }; delete CA_TitleMainMenu;