From 73e66042017a6421234d2a8293d0d5c2ca10055b Mon Sep 17 00:00:00 2001 From: Chuck Miller Date: Fri, 26 Mar 2010 15:11:38 -0400 Subject: Reduce the amount of "Unable to unequip item" when changing outfits. It will still do it at times because of lag. But this reduced it for me by about 80% Reviewed-by: Jared Adams --- src/gui/outfitwindow.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/gui/outfitwindow.cpp b/src/gui/outfitwindow.cpp index c7a22fd6..89bf47da 100644 --- a/src/gui/outfitwindow.cpp +++ b/src/gui/outfitwindow.cpp @@ -162,6 +162,9 @@ void OutfitWindow::action(const gcn::ActionEvent &event) void OutfitWindow::wearOutfit(int outfit) { + if (mItemsUnequip[outfit]) + unequipNotInOutfit(outfit); + Item *item; for (int i = 0; i < OUTFIT_ITEM_COUNT; i++) { @@ -172,11 +175,6 @@ void OutfitWindow::wearOutfit(int outfit) Net::getInventoryHandler()->equipItem(item); } } - - if (mItemsUnequip[outfit]) - { - unequipNotInOutfit(outfit); - } } void OutfitWindow::copyOutfit(int outfit) -- cgit v1.2.3-70-g09d2