rem: if (i == SPATHI_DEFINED || i == SUPOX_DEFINED)
add: if (race_enc == SPATHI_DEFINED || race_enc == SUPOX_DEFINED)
context: BuildGroups (void){	BYTE Index, BestIndex;	COUNT BestPercent;	POINT universe;	HSTARSHIP hTemplate, hNextShip;	BYTE HomeWorld[] =	{		0,                /* ARILOU_SHIP */		0,                /* CHMMR_SHIP */		0,                /* HUMAN_SHIP */		ORZ_DEFINED,      /* ORZ_SHIP */		PKUNK_DEFINED,    /* PKUNK_SHIP */		0,                /* SHOFIXTI_SHIP */		SPATHI_DEFINED,   /* SPATHI_SHIP */		SUPOX_DEFINED,    /* SUPOX_SHIP */		THRADD_DEFINED,   /* THRADDASH_SHIP */		UTWIG_DEFINED,    /* UTWIG_SHIP */		VUX_DEFINED,      /* VUX_SHIP */		YEHAT_DEFINED,    /* YEHAT_SHIP */		0,                /* MELNORME_SHIP */		DRUUGE_DEFINED,   /* DRUUGE_SHIP */		ILWRATH_DEFINED,  /* ILWRATH_SHIP */		MYCON_DEFINED,    /* MYCON_SHIP */		0,                /* SLYLANDRO_SHIP */		UMGAH_DEFINED,    /* UMGAH_SHIP */		0,                /* URQUAN_SHIP */		ZOQFOT_DEFINED,   /* ZOQFOTPIK_SHIP */		0,                /* SYREEN_SHIP */		0,                /* BLACK_URQUAN_SHIP */		0,                /* YEHAT_REBEL_SHIP */	};	BYTE EncounterPercent[] =	{		RACE_INTERPLANETARY_PERCENT	};	EncounterPercent[SLYLANDRO_SHIP] *= GET_GAME_STATE (SLYLANDRO_MULTIPLIER);	Index = GET_GAME_STATE (UTWIG_SUPOX_MISSION);	if (Index > 1 && Index < 5)		HomeWorld[UTWIG_SHIP] = HomeWorld[SUPOX_SHIP] = 0;	BestPercent = 0;	universe = CurStarDescPtr->star_pt;	for (hTemplate = GetHeadLink (&GLOBAL (avail_race_q)), Index = 0;			hTemplate; hTemplate = hNextShip, ++Index)	{		COUNT i, encounter_radius;		EXTENDED_SHIP_FRAGMENTPTR TemplatePtr;		TemplatePtr = (EXTENDED_SHIP_FRAGMENTPTR)LockStarShip (				&GLOBAL (avail_race_q), hTemplate);		hNextShip = _GetSuccLink (TemplatePtr);		if ((encounter_radius = TemplatePtr->ShipInfo.actual_strength)				&& (i = EncounterPercent[Index]))		{			SIZE dx, dy;			DWORD d_squared;			// XXX: BUG: i is redefined in the line below, so the assignment			//      to i a few lines ago is useless.			//      EncounterPercent is never used in practice.			//      BestIndex may be used uninitialised. - SvdB			if ((i = HomeWorld[Index]) && CurStarDescPtr->Index == (BYTE)i)			{				BestIndex = Index;				BestPercent = 70;				if (i == SPATHI_DEFINED || i == SUPOX_DEFINED)					BestPercent = 2;				hNextShip = 0;				goto FoundHome;			}			if (encounter_radius == (COUNT)~0)				encounter_radius = (MAX_X_UNIVERSE + 1) << 1;			else				encounter_radius =						(encounter_radius * SPHERE_RADIUS_INCREMENT) >> 1;			if ((dx = universe.x - TemplatePtr->ShipInfo.loc.x) < 0)				dx = -dx;			if ((dy = universe.y - TemplatePtr->ShipInfo.loc.y) < 0)				dy = -dy;			if ((COUNT)dx < encounter_radius					&& (COUNT)dy < encounter_radius					&& (d_squared = (DWORD)dx * dx + (DWORD)dy * dy) <					(DWORD)encounter_radius * encounter_radius)			{				DWORD rand_val;				if (TemplatePtr->ShipInfo.actual_strength != (COUNT)~0)				{					i = 70 - (COUNT)((DWORD)square_root (d_squared)							* 60L / encounter_radius);				}				rand_val = TFB_Random ();				if ((int)(LOWORD (rand_val) % 100) < (int)i						&& (BestPercent == 0						|| (HIWORD (rand_val) % (i + BestPercent)) < i))				{					if (TemplatePtr->ShipInfo.actual_strength == (COUNT)~0)					{						// XXX: BUG: This code is never reached.						//      When actual_strength == ~0, i is always 0.						i = 4;					}					BestPercent = i;					BestIndex = Index;				}			}		}FoundHome:		UnlockStarShip (&GLOBAL (avail_race_q), hTemplate);	}	if (BestPercent)	{		BYTE which_group, num_groups;		BYTE EncounterMakeup[] =		{			RACE_ENCOUNTER_MAKEUP		};		which_group = 0;		num_groups = ((COUNT)TFB_Random () % (BestPercent >> 1)) + 1;		if (num_groups > (MAX_BATTLE_GROUPS >> 1))			num_groups = (MAX_BATTLE_GROUPS >> 1);		else if (num_groups < 5				&& (Index = HomeWorld[BestIndex])				&& CurStarDescPtr->Index == Index)			num_groups = 5;		do		{			for (Index = HINIBBLE (EncounterMakeup[BestIndex]); Index;					--Index)			{				if (Index <= LONIBBLE (EncounterMakeup[BestIndex])						|| (COUNT)TFB_Random () % 100 < 50)					CloneShipFragment (BestIndex, &GLOBAL (npc_built_ship_q),							0);			}			PutGroupInfo (0L, ++which_group);			ReinitQueue (&GLOBAL (npc_built_ship_q));		} while (--num_groups);	}	GetGroupInfo (0L, (BYTE)~0);}