diff --git a/sc2/src/sc2code/build.c b/sc2/src/sc2code/build.c index 2f1eea591..1da8b7e96 100644 --- a/sc2/src/sc2code/build.c +++ b/sc2/src/sc2code/build.c @@ -274,9 +274,7 @@ ActivateStarShip (COUNT which_ship, SIZE state) StarShipPtr = (SHIP_FRAGMENT*) LockStarShip ( &GLOBAL (built_ship_q), hOldShip); - // XXX: hack; escort window is not group loc, - // should just use queue index (already var2) - win_loc = GET_GROUP_LOC (StarShipPtr); + win_loc = StarShipPtr->ShipInfo.var2; UnlockStarShip (&GLOBAL (built_ship_q), hOldShip); if (which_window <= win_loc) break; @@ -284,9 +282,7 @@ ActivateStarShip (COUNT which_ship, SIZE state) StarShipPtr = (SHIP_FRAGMENT*) LockStarShip ( &GLOBAL (built_ship_q), hStarShip); - // XXX: hack; escort window is not group loc, - // should just use queue index (already var2) - SET_GROUP_LOC (StarShipPtr, which_window - 1); + StarShipPtr->ShipInfo.var2 = which_window - 1; UnlockStarShip (&GLOBAL (built_ship_q), hStarShip); InsertQueue (&GLOBAL (built_ship_q), hStarShip, hOldShip); diff --git a/sc2/src/sc2code/shipyard.c b/sc2/src/sc2code/shipyard.c index adf1cb6b1..b3346b9c1 100644 --- a/sc2/src/sc2code/shipyard.c +++ b/sc2/src/sc2code/shipyard.c @@ -370,7 +370,7 @@ ShowCombatShip (COUNT which_window, SHIP_FRAGMENT *YankedStarShipPtr) { StarShipPtr = (SHIP_FRAGMENT*) LockStarShip ( &GLOBAL (built_ship_q), hStarShip); - if (GET_GROUP_LOC (StarShipPtr) > which_window) + if (StarShipPtr->ShipInfo.var2 > which_window) { UnlockStarShip (&GLOBAL (built_ship_q), hStarShip); break; @@ -385,9 +385,7 @@ ShowCombatShip (COUNT which_window, SHIP_FRAGMENT *YankedStarShipPtr) hStarShip = hTailShip; StarShipPtr = (SHIP_FRAGMENT*) LockStarShip ( &GLOBAL (built_ship_q), hStarShip); - // XXX: hack; escort window is not group loc, - // should just use queue index (already var2) - SET_GROUP_LOC (StarShipPtr, which_window); + StarShipPtr->ShipInfo.var2 = which_window; UnlockStarShip (&GLOBAL (built_ship_q), hStarShip); } @@ -656,9 +654,7 @@ DoModifyShips (MENU_STATE *pMS) StarShipPtr = (SHIP_FRAGMENT*) LockStarShip ( &GLOBAL (built_ship_q), hStarShip); - // XXX: hack; escort window is not group loc, - // should just use queue index (already var2) - if (GET_GROUP_LOC (StarShipPtr) == pMS->CurState) + if (StarShipPtr->ShipInfo.var2 == pMS->CurState) { UnlockStarShip (&GLOBAL (built_ship_q), hStarShip); break;