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
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
Re: Typo in Items.cc[message #262149] Fri, 10 September 2010 23:14 Go to previous messageGo to next message
mgl is currently offline mgl

 
Messages:255
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.

Report message to a moderator

Master Sergeant
Re: Typo in Items.cc[message #316009] Wed, 06 March 2013 18:06 Go to previous message
Gennady is currently offline Gennady

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

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

Report message to a moderator

Private
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:53:29 GMT+2 2025

Total time taken to generate the page: 0.01099 seconds