Fixed wrong Sa-Matra guards icons; bug #1001
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@2806 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
+15
-15
@@ -452,18 +452,8 @@ FlushGroupInfo (GROUP_HEADER* pGH, DWORD offset, BYTE which_group, void *fp)
|
|||||||
}
|
}
|
||||||
else if (which_group > pGH->NumGroups)
|
else if (which_group > pGH->NumGroups)
|
||||||
{ /* Group not present yet -- add it */
|
{ /* Group not present yet -- add it */
|
||||||
HSHIPFRAG hStarShip;
|
|
||||||
SHIP_FRAGMENT *FragPtr;
|
|
||||||
|
|
||||||
pGH->NumGroups = which_group;
|
pGH->NumGroups = which_group;
|
||||||
pGH->GroupOffset[which_group] = LengthStateFile (fp);
|
pGH->GroupOffset[which_group] = LengthStateFile (fp);
|
||||||
|
|
||||||
/* The first ship in a group defines the alien race */
|
|
||||||
hStarShip = GetHeadLink (&GLOBAL (npc_built_ship_q));
|
|
||||||
FragPtr = LockShipFrag (&GLOBAL (npc_built_ship_q), hStarShip);
|
|
||||||
SeekStateFile (fp, pGH->GroupOffset[which_group], SEEK_SET);
|
|
||||||
swrite_8 (fp, FragPtr->race_id);
|
|
||||||
UnlockShipFrag (&GLOBAL (npc_built_ship_q), hStarShip);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SeekStateFile (fp, offset, SEEK_SET);
|
SeekStateFile (fp, offset, SEEK_SET);
|
||||||
@@ -479,7 +469,6 @@ FlushGroupInfo (GROUP_HEADER* pGH, DWORD offset, BYTE which_group, void *fp)
|
|||||||
{
|
{
|
||||||
/* Write out ip_group_q as group 0 */
|
/* Write out ip_group_q as group 0 */
|
||||||
HIPGROUP hGroup, hNextGroup;
|
HIPGROUP hGroup, hNextGroup;
|
||||||
// XXX: will use ip_group_q here
|
|
||||||
BYTE NumGroups = CountLinks (&GLOBAL (ip_group_q));
|
BYTE NumGroups = CountLinks (&GLOBAL (ip_group_q));
|
||||||
|
|
||||||
SeekStateFile (fp, pGH->GroupOffset[0], SEEK_SET);
|
SeekStateFile (fp, pGH->GroupOffset[0], SEEK_SET);
|
||||||
@@ -516,12 +505,23 @@ FlushGroupInfo (GROUP_HEADER* pGH, DWORD offset, BYTE which_group, void *fp)
|
|||||||
/* Write out npc_built_ship_q as 'which_group' group */
|
/* Write out npc_built_ship_q as 'which_group' group */
|
||||||
HSHIPFRAG hStarShip, hNextShip;
|
HSHIPFRAG hStarShip, hNextShip;
|
||||||
BYTE NumShips = CountLinks (&GLOBAL (npc_built_ship_q));
|
BYTE NumShips = CountLinks (&GLOBAL (npc_built_ship_q));
|
||||||
|
BYTE RaceType = 0;
|
||||||
/* Do not change RaceType of the group (skip it) */
|
|
||||||
SeekStateFile (fp, pGH->GroupOffset[which_group] + 1, SEEK_SET);
|
|
||||||
swrite_8 (fp, NumShips);
|
|
||||||
|
|
||||||
hStarShip = GetHeadLink (&GLOBAL (npc_built_ship_q));
|
hStarShip = GetHeadLink (&GLOBAL (npc_built_ship_q));
|
||||||
|
if (NumShips > 0)
|
||||||
|
{
|
||||||
|
SHIP_FRAGMENT *FragPtr;
|
||||||
|
|
||||||
|
/* The first ship in a group defines the alien race */
|
||||||
|
FragPtr = LockShipFrag (&GLOBAL (npc_built_ship_q), hStarShip);
|
||||||
|
RaceType = FragPtr->race_id;
|
||||||
|
UnlockShipFrag (&GLOBAL (npc_built_ship_q), hStarShip);
|
||||||
|
}
|
||||||
|
|
||||||
|
SeekStateFile (fp, pGH->GroupOffset[which_group], SEEK_SET);
|
||||||
|
swrite_8 (fp, RaceType);
|
||||||
|
swrite_8 (fp, NumShips);
|
||||||
|
|
||||||
for ( ; NumShips; --NumShips, hStarShip = hNextShip)
|
for ( ; NumShips; --NumShips, hStarShip = hNextShip)
|
||||||
{
|
{
|
||||||
SHIP_FRAGMENT *FragPtr;
|
SHIP_FRAGMENT *FragPtr;
|
||||||
|
|||||||
Reference in New Issue
Block a user