From 8252af65a45213c08b39a5cd0230ad1ed6be81dd Mon Sep 17 00:00:00 2001 From: Wanne Date: Wed, 29 Feb 2012 00:52:37 +0000 Subject: [PATCH] Reverted the merged bugfix from revision 4920, because it is a development trunk only bugfix git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@4975 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- Tactical/Turn Based Input.cpp | 38 ++--------------------------------- Utils/Text.h | 2 -- Utils/_ChineseText.cpp | 1 - Utils/_DutchText.cpp | 1 - Utils/_EnglishText.cpp | 1 - Utils/_FrenchText.cpp | 1 - Utils/_GermanText.cpp | 1 - Utils/_ItalianText.cpp | 1 - Utils/_PolishText.cpp | 1 - Utils/_RussianText.cpp | 1 - Utils/_TaiwaneseText.cpp | 1 - 11 files changed, 2 insertions(+), 47 deletions(-) diff --git a/Tactical/Turn Based Input.cpp b/Tactical/Turn Based Input.cpp index 29acce246..5ffa17273 100644 --- a/Tactical/Turn Based Input.cpp +++ b/Tactical/Turn Based Input.cpp @@ -3278,50 +3278,16 @@ void GetKeyboardInput( UINT32 *puiNewEvent ) BOOLEAN slingFit = (CanItemFitInPosition(pSoldier, &pSoldier->inv[GUNSLINGPOCKPOS], HANDPOS, FALSE) || pSoldier->inv[GUNSLINGPOCKPOS].exists() == false); if(Item[pSoldier->inv[GUNSLINGPOCKPOS].usItem].twohanded && pSoldier->inv[SECONDHANDPOS].exists() == true) handFit = FALSE; - if( handFit == TRUE && slingFit == TRUE) { - if (gGameOptions.fInventoryCostsAP) - { - UINT8 APCost = 0; - if (pSoldier->inv[GUNSLINGPOCKPOS].exists()) - { - APCost += ( APBPConstants [ AP_INV_FROM_SLING ] + APBPConstants [ AP_INV_TO_HANDS ] ); - if (gGameExternalOptions.uWeightDivisor != 0) - APCost += DynamicAdjustAPConstants((int)((Item[pSoldier->inv[GUNSLINGPOCKPOS].usItem].ubWeight) / gGameExternalOptions.uWeightDivisor),(int)((Item[pSoldier->inv[GUNSLINGPOCKPOS].usItem].ubWeight) / gGameExternalOptions.uWeightDivisor)); - } - if (pSoldier->inv[HANDPOS].exists()) - { - APCost += ( APBPConstants [ AP_INV_TO_SLING ] + APBPConstants [ AP_INV_FROM_HANDS ] ); - if (gGameExternalOptions.uWeightDivisor != 0) - APCost += DynamicAdjustAPConstants((int)((Item[pSoldier->inv[HANDPOS].usItem].ubWeight) / gGameExternalOptions.uWeightDivisor),(int)((Item[pSoldier->inv[HANDPOS].usItem].ubWeight) / gGameExternalOptions.uWeightDivisor)); - } - APCost = __min(APCost, APBPConstants[AP_INV_MAX_COST]); - if (pSoldier->bActionPoints >= APCost) - { - pSoldier->bActionPoints -= APCost; - SwapObjs(&pSoldier->inv[HANDPOS], &pSoldier->inv[GUNSLINGPOCKPOS]); - HandleTacticalEffectsOfEquipmentChange(pSoldier, HANDPOS, pSoldier->inv[GUNSLINGPOCKPOS].usItem, pSoldier->inv[HANDPOS].usItem); - } - else - { - CHAR16 zOutputString[512]; - swprintf( zOutputString, New113Message[MSG113_INVENTORY_APS_INSUFFICIENT], APCost, pSoldier->bActionPoints); - ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, zOutputString ); - } - } - else - { - SwapObjs(&pSoldier->inv[HANDPOS], &pSoldier->inv[GUNSLINGPOCKPOS]); - HandleTacticalEffectsOfEquipmentChange(pSoldier, HANDPOS, pSoldier->inv[GUNSLINGPOCKPOS].usItem, pSoldier->inv[HANDPOS].usItem); - } + SwapObjs(&pSoldier->inv[HANDPOS], &pSoldier->inv[GUNSLINGPOCKPOS]); + HandleTacticalEffectsOfEquipmentChange(pSoldier, HANDPOS, pSoldier->inv[GUNSLINGPOCKPOS].usItem, pSoldier->inv[HANDPOS].usItem); } fCharacterInfoPanelDirty = TRUE; fInterfacePanelDirty = DIRTYLEVEL2; } break; - case INSERT: GoIntoOverheadMap(); break; diff --git a/Utils/Text.h b/Utils/Text.h index 1a8d07bd0..fc654f555 100644 --- a/Utils/Text.h +++ b/Utils/Text.h @@ -2077,8 +2077,6 @@ enum MSG113_ENEMY_FOUND_DEAD_BODY, MSG113_AMMO_SPEC_STRING, - MSG113_INVENTORY_APS_INSUFFICIENT, - TEXT_NUM_MSG113, }; diff --git a/Utils/_ChineseText.cpp b/Utils/_ChineseText.cpp index 788b78d24..1f68f3081 100644 --- a/Utils/_ChineseText.cpp +++ b/Utils/_ChineseText.cpp @@ -6068,7 +6068,6 @@ STR16 New113Message[] = ////////////////////////////////////////////////////////////////////////////////////// L"注意: 敌人尸体被发现!!!", L"%s [%d rnds]\n%s %1.1f %s", - L"AP不够!需要%d,你只有%d。", //L"Insufficient AP Points! Cost %d, you have %d.", }; STR16 New113HAMMessage[] = diff --git a/Utils/_DutchText.cpp b/Utils/_DutchText.cpp index 488fb2562..fd3aa338f 100644 --- a/Utils/_DutchText.cpp +++ b/Utils/_DutchText.cpp @@ -6067,7 +6067,6 @@ STR16 New113Message[] = ////////////////////////////////////////////////////////////////////////////////////// L"Warning: enemy corpse found!!!", L"%s [%d rnds]\n%s %1.1f %s", - L"Insufficient AP Points! Cost %d, you have %d.", // TODO.Translate }; // TODO.Translate diff --git a/Utils/_EnglishText.cpp b/Utils/_EnglishText.cpp index ab8cd5782..8771613a8 100644 --- a/Utils/_EnglishText.cpp +++ b/Utils/_EnglishText.cpp @@ -6066,7 +6066,6 @@ STR16 New113Message[] = ////////////////////////////////////////////////////////////////////////////////////// L"Warning: enemy corpse found!!!", L"%s [%d rnds]\n%s %1.1f %s", - L"Insufficient AP Points! Cost %d, you have %d.", }; STR16 New113HAMMessage[] = diff --git a/Utils/_FrenchText.cpp b/Utils/_FrenchText.cpp index 1d1b83139..64587e7ff 100644 --- a/Utils/_FrenchText.cpp +++ b/Utils/_FrenchText.cpp @@ -6049,7 +6049,6 @@ STR16 New113Message[] = ////////////////////////////////////////////////////////////////////////////////////// L"Attention: Cadavre ennemi trouvé !!!", L"%s [%d rnds]\n%s %1.1f %s", - L"Insufficient AP Points! Cost %d, you have %d.", // TODO.Translate }; STR16 New113HAMMessage[] = diff --git a/Utils/_GermanText.cpp b/Utils/_GermanText.cpp index fc37552ef..d5d5d4441 100644 --- a/Utils/_GermanText.cpp +++ b/Utils/_GermanText.cpp @@ -5897,7 +5897,6 @@ STR16 New113Message[] = ////////////////////////////////////////////////////////////////////////////////////// L"Warning: enemy corpse found!!!", L"%s [%d rnds]\n%s %1.1f %s", - L"Zu wenig APs! Es werden %d APs benötigt, Sie haben aber nur %d APs.", // TODO.Translate }; STR16 New113HAMMessage[] = diff --git a/Utils/_ItalianText.cpp b/Utils/_ItalianText.cpp index efc5297df..b34c7ba4b 100644 --- a/Utils/_ItalianText.cpp +++ b/Utils/_ItalianText.cpp @@ -6057,7 +6057,6 @@ STR16 New113Message[] = ////////////////////////////////////////////////////////////////////////////////////// L"Warning: enemy corpse found!!!", L"%s [%d rnds]\n%s %1.1f %s", - L"Insufficient AP Points! Cost %d, you have %d.", // TODO.Translate }; // TODO.Translate diff --git a/Utils/_PolishText.cpp b/Utils/_PolishText.cpp index e9bd8ede1..4d6b6d2d5 100644 --- a/Utils/_PolishText.cpp +++ b/Utils/_PolishText.cpp @@ -6063,7 +6063,6 @@ STR16 New113Message[] = ////////////////////////////////////////////////////////////////////////////// L"Warning: enemy corpse found!!!", L"%s [%d rnds]\n%s %1.1f %s", - L"Insufficient AP Points! Cost %d, you have %d.", // TODO.Translate }; STR16 New113HAMMessage[] = diff --git a/Utils/_RussianText.cpp b/Utils/_RussianText.cpp index e35e732ac..a14573b47 100644 --- a/Utils/_RussianText.cpp +++ b/Utils/_RussianText.cpp @@ -6040,7 +6040,6 @@ STR16 New113Message[] = ///// L"Внимание: враг обнаружил труп!!!", L"%s [%d патр.]\n%s %1.1f %s", - L"Insufficient AP Points! Cost %d, you have %d.", // TODO.Translate }; STR16 New113HAMMessage[] = diff --git a/Utils/_TaiwaneseText.cpp b/Utils/_TaiwaneseText.cpp index 833c1851d..efa28cd06 100644 --- a/Utils/_TaiwaneseText.cpp +++ b/Utils/_TaiwaneseText.cpp @@ -6070,7 +6070,6 @@ STR16 New113Message[] = ////////////////////////////////////////////////////////////////////////////////////// L"Warning: enemy corpse found!!!", L"%s [%d rnds]\n%s %1.1f %s", - L"Insufficient AP Points! Cost %d, you have %d.", // TODO.Translate }; // TODO.Translate