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 next message

Registered:February 2006


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

Re: Typo in Items.cc[message #262149] Fri, 10 September 2010 23:14 Go to previous messageGo to next message

Registered:December 2007
Location: France
Without the fix, the game indeed chooses the wrong clip of the right caliber, like 9mm SMG mags for 9mm pistols or .357 speed loaders for the Desert Eagle.

Re: Typo in Items.cc[message #316009] Wed, 06 March 2013 18:06 Go to previous message

Registered:March 2013
Location: Russia
Applied to JA2-Stracciatella Continued

[Updated on: Wed, 06 March 2013 18:07] by Moderator

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

Current Time: Sun Nov 01 02:33:54 EET 2020

Total time taken to generate the page: 0.01347 seconds