mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
MERGED bugfixes from revision: 4919
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@4974 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -3278,20 +3278,51 @@ 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)
|
||||
{
|
||||
SwapObjs(&pSoldier->inv[HANDPOS], &pSoldier->inv[GUNSLINGPOCKPOS]);
|
||||
HandleTacticalEffectsOfEquipmentChange(pSoldier, HANDPOS, pSoldier->inv[GUNSLINGPOCKPOS].usItem, pSoldier->inv[HANDPOS].usItem);
|
||||
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);
|
||||
}
|
||||
}
|
||||
fCharacterInfoPanelDirty = TRUE;
|
||||
fInterfacePanelDirty = DIRTYLEVEL2;
|
||||
}
|
||||
break;
|
||||
|
||||
case INSERT:
|
||||
|
||||
// WANNE: Commented this out, because the interface panel is not correctly redrawn!
|
||||
// I do not know the bug ;(
|
||||
case INSERT:
|
||||
GoIntoOverheadMap();
|
||||
break;
|
||||
|
||||
|
||||
@@ -2077,6 +2077,8 @@ enum
|
||||
MSG113_ENEMY_FOUND_DEAD_BODY,
|
||||
MSG113_AMMO_SPEC_STRING,
|
||||
|
||||
MSG113_INVENTORY_APS_INSUFFICIENT,
|
||||
|
||||
TEXT_NUM_MSG113,
|
||||
};
|
||||
|
||||
|
||||
@@ -6068,6 +6068,7 @@ 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[] =
|
||||
|
||||
@@ -6067,7 +6067,7 @@ 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
|
||||
|
||||
@@ -6066,6 +6066,7 @@ 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[] =
|
||||
|
||||
@@ -6049,7 +6049,7 @@ 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[] =
|
||||
|
||||
@@ -5897,7 +5897,7 @@ 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[] =
|
||||
|
||||
@@ -6057,7 +6057,7 @@ 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
|
||||
|
||||
@@ -6063,7 +6063,7 @@ 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[] =
|
||||
|
||||
@@ -6040,7 +6040,7 @@ STR16 New113Message[] =
|
||||
/////
|
||||
L"Внимание: враг обнаружил труп!!!",
|
||||
L"%s [%d патр.]\n%s %1.1f %s",
|
||||
|
||||
L"Insufficient AP Points! Cost %d, you have %d.", // TODO.Translate
|
||||
};
|
||||
|
||||
STR16 New113HAMMessage[] =
|
||||
|
||||
@@ -6070,7 +6070,7 @@ 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
|
||||
|
||||
Reference in New Issue
Block a user