Home » PLAYER'S HQ 1.13 » JA2 Complete Mods & Sequels » Stracciatella Project (Platform Independent JA2) » Typo in Items.cc
Typo in Items.cc[message #260297] Sun, 22 August 2010 19:34 Go to previous message
public1983 is currently offline public1983

 
Messages:125
Registered:February 2006

Hi,

I encountered a bug in normal guns mode introduced after Liquorice. The ammo items of mercs with tons-of-guns-weapons are not properly replaced. It seems to be a typo in items.cc marked with a comment below:

static UINT16 FindReplacementMagazine(AmmoKind const calibre, UINT8 const mag_size, UINT8 const ammo_type)
{
	UINT16 default_mag = NOTHING;
	for (UINT8 i = 0;; i++)
	{
		MAGTYPE const& mag = Magazine[i];
		if (mag.ubCalibre == NOAMMO)   break;
		if (mag.ubCalibre != calibre)  continue;
		if (mag.ubMagSize == mag_size) continue; //Typo: must be != so it is == when the item is returned

		if (mag.ubAmmoType == ammo_type) return MagazineClassIndexToItemType(i);

		if (default_mag == NOTHING)
		{ // Store this one to use if all else fails
			default_mag = MagazineClassIndexToItemType(i);
		}
	}
	return default_mag;
}

[Updated on: Sun, 22 August 2010 19:35] by Moderator

Report message to a moderator

Sergeant
 
Read Message
Read Message
Read Message
Previous Topic: JA 2 Stracciatella for OS X 10.8 troubleshooting
Next Topic: Typo in Hourly_Update.cc
Goto Forum:
  


Current Time: Sun Jan 12 20:40:47 GMT+2 2025

Total time taken to generate the page: 0.00841 seconds