Added property pages to make it easy to change build language (at least with VS2K5)

Added support for Russian city names and Items
Fixed contract length exploit (hire merc for 2 weeks for the price of 1 day)
Fixed insurance emails repeating when you choose "delete" but then say no
Corrected UTF-8 to wide char translation on Windows platforms (Windows doesn't handle mbstowcs correctly)
Moved UTF-8 to Wide Char translation for item descriptions and names so it happens at XML load time (fix bug that Russian has half the description space)
Fix overflow when combining two items with high counts (such as 200-round boxes of ammo)
Path AI fixes
Fixed issues with non-interruptable animations causing infinite clock
Fixed some issues with soldiers not reaching their plotted destination
Fixed escorted players who were cowering, being unable to move after joining party
Only allow militia to climb roofs if their orders allow them to move
Fix bug where AI might climb the wrong roof on the way to the destination roof
Allow AI who have gone outside their patrol grid, to return to the Grid


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1702 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Overhaul
2008-01-09 02:08:39 +00:00
parent 144426e896
commit 6049e8da5a
23 changed files with 621 additions and 407 deletions
+36 -11
View File
@@ -3551,20 +3551,45 @@ BOOLEAN AttachObject( SOLDIERTYPE * pSoldier, OBJECTTYPE * pTargetObj, OBJECTTYP
// count down through # of attaching items and add to status of item in position 0
for (bLoop = pAttachment->ubNumberOfObjects - 1; bLoop >= 0; bLoop--)
{
if (pTargetObj->ItemData.Generic.bStatus[0] + pAttachment->ItemData.Generic.bStatus[bLoop] <= ubLimit)
if ( Item[ pTargetObj->usItem ].usItemClass == IC_AMMO )
{
// consume this one totally and continue
pTargetObj->ItemData.Generic.bStatus[0] += pAttachment->ItemData.Generic.bStatus[bLoop];
RemoveObjFrom( pAttachment, bLoop );
// reset loop limit
bLoop = pAttachment->ubNumberOfObjects; // add 1 to counteract the -1 from the loop
}
// Cast to a bigger int to prevent overflow
UINT32 uiTotal = pTargetObj->ItemData.Ammo.ubShotsLeft[0] + pAttachment->ItemData.Ammo.ubShotsLeft[bLoop];
if ( uiTotal <= ubLimit)
{
// consume this one totally and continue
pTargetObj->ItemData.Ammo.ubShotsLeft[0] = (UINT8) uiTotal;
RemoveObjFrom( pAttachment, bLoop );
// reset loop limit
bLoop = pAttachment->ubNumberOfObjects; // add 1 to counteract the -1 from the loop
}
else
{
// add part of this one and then we're done
pAttachment->ItemData.Ammo.ubShotsLeft[bLoop] = (UINT8) (uiTotal - ubLimit);
pTargetObj->ItemData.Ammo.ubShotsLeft[0] = ubLimit;
break;
}
}
else
{
// add part of this one and then we're done
pAttachment->ItemData.Generic.bStatus[bLoop] -= (ubLimit - pTargetObj->ItemData.Generic.bStatus[0]);
pTargetObj->ItemData.Generic.bStatus[0] = ubLimit;
break;
// Cast to a bigger int to prevent overflow
INT32 iTotal = pTargetObj->ItemData.Generic.bStatus[0] + pAttachment->ItemData.Generic.bStatus[bLoop];
if ( iTotal <= ubLimit)
{
// consume this one totally and continue
pTargetObj->ItemData.Generic.bStatus[0] = (INT8) iTotal;
RemoveObjFrom( pAttachment, bLoop );
// reset loop limit
bLoop = pAttachment->ubNumberOfObjects; // add 1 to counteract the -1 from the loop
}
else
{
// add part of this one and then we're done
pAttachment->ItemData.Generic.bStatus[bLoop] = (INT8) (iTotal - ubLimit);
pTargetObj->ItemData.Generic.bStatus[0] = (INT8) ubLimit;
break;
}
}
}
break;