mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
-upsized loop variable in FindReplacementMagazine in Items.xml from a UINT8 to a UINT16
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@389 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+2
-2
@@ -23,12 +23,12 @@ INT16 zVersionLabel[256] = { L"Beta v. 0.98" };
|
||||
#else
|
||||
|
||||
//RELEASE BUILD VERSION
|
||||
INT16 zVersionLabel[256] = { L"Release v1.13.386" };
|
||||
INT16 zVersionLabel[256] = { L"Release v1.13.389" };
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
INT8 czVersionNumber[16] = { "Build 06.07.31" };
|
||||
INT8 czVersionNumber[16] = { "Build 06.08.01" };
|
||||
INT16 zTrackingNumber[16] = { L"Z" };
|
||||
|
||||
|
||||
|
||||
+10
-10
@@ -4432,32 +4432,32 @@ UINT16 DefaultMagazine( UINT16 usItem )
|
||||
|
||||
UINT16 FindReplacementMagazine( UINT8 ubCalibre, UINT8 ubMagSize, UINT8 ubAmmoType )
|
||||
{
|
||||
UINT8 ubLoop;
|
||||
UINT16 usLoop;
|
||||
UINT16 usDefault;
|
||||
|
||||
ubLoop = 0;
|
||||
usLoop = 0;
|
||||
usDefault = NOTHING;
|
||||
DebugMsg(TOPIC_JA2,DBG_LEVEL_3,String("FindReplacementMagazine: calibre = %d, Mag size = %d, ammo type = %d",ubCalibre,ubMagSize,ubAmmoType));
|
||||
|
||||
while ( Magazine[ubLoop].ubCalibre != NOAMMO )
|
||||
while ( Magazine[usLoop].ubCalibre != NOAMMO )
|
||||
{
|
||||
if (Magazine[ubLoop].ubCalibre == ubCalibre &&
|
||||
Magazine[ubLoop].ubMagSize == ubMagSize )
|
||||
if (Magazine[usLoop].ubCalibre == ubCalibre &&
|
||||
Magazine[usLoop].ubMagSize == ubMagSize )
|
||||
{
|
||||
if ( Magazine[ubLoop].ubAmmoType == ubAmmoType )
|
||||
if ( Magazine[usLoop].ubAmmoType == ubAmmoType )
|
||||
{
|
||||
DebugMsg(TOPIC_JA2,DBG_LEVEL_3,String("FindReplacementMagazine: returning item = %d",MagazineClassIndexToItemType( ubLoop )));
|
||||
return( MagazineClassIndexToItemType( ubLoop ) );
|
||||
DebugMsg(TOPIC_JA2,DBG_LEVEL_3,String("FindReplacementMagazine: returning item = %d",MagazineClassIndexToItemType( usLoop )));
|
||||
return( MagazineClassIndexToItemType( usLoop ) );
|
||||
}
|
||||
else if ( usDefault == NOTHING )
|
||||
{
|
||||
// store this one to use if all else fails
|
||||
usDefault = MagazineClassIndexToItemType( ubLoop );
|
||||
usDefault = MagazineClassIndexToItemType( usLoop );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ubLoop++;
|
||||
usLoop++;
|
||||
}
|
||||
|
||||
DebugMsg(TOPIC_JA2,DBG_LEVEL_3,String("FindReplacementMagazine: returning default item = %d",usDefault));
|
||||
|
||||
Reference in New Issue
Block a user