From: <Mee...@us...> - 2011-12-31 02:55:03
|
Revision: 3728 http://sc2.svn.sourceforge.net/sc2/?rev=3728&view=rev Author: Meep-Eep Date: 2011-12-31 02:54:57 +0000 (Sat, 31 Dec 2011) Log Message: ----------- A few more comments. Modified Paths: -------------- trunk/sc2/src/uqm/shipyard.c Modified: trunk/sc2/src/uqm/shipyard.c =================================================================== --- trunk/sc2/src/uqm/shipyard.c 2011-12-31 02:40:15 UTC (rev 3727) +++ trunk/sc2/src/uqm/shipyard.c 2011-12-31 02:54:57 UTC (rev 3728) @@ -889,8 +889,10 @@ crew_delta = 0; if (dy < 0) { + // Buy crew if (hStarShip == 0) { + // Buy crew for the flagship. if (GetCPodCapacity (&r.corner) > GetCrewCount () && GLOBAL_SIS (ResUnits) >= (DWORD)GLOBAL (CrewCost)) @@ -911,6 +913,7 @@ } else { + // Buy crew for an escort ship. HFLEETINFO hTemplate; FLEET_INFO *TemplatePtr; @@ -952,11 +955,13 @@ } else if (dy > 0) { + // Dismiss crew. crew_bought = (SIZE)MAKE_WORD ( GET_GAME_STATE (CREW_PURCHASED0), GET_GAME_STATE (CREW_PURCHASED1)); if (hStarShip == 0) { + // Dismiss crew from the flagship. if (GetCrewCount ()) { DeltaSISGauges (-1, 0, GLOBAL (CrewCost) @@ -980,15 +985,25 @@ } else { + // Dismiss crew from an escort ship. if (StarShipPtr->crew_level > 0) { if (StarShipPtr->crew_level > 1) + { + // The ship was not at 'scrap'. + // Give one crew member worth of RU. DeltaSISGauges (0, 0, GLOBAL (CrewCost) - (crew_bought == CREW_EXPENSE_THRESHOLD ? 2 : 0)); + } else + { + // With the last crew member, the ship + // will be scrapped. + // Give RU for the ship. DeltaSISGauges (0, 0, (COUNT)ShipCost[ StarShipPtr->race_id]); + } crew_delta = -1; --StarShipPtr->crew_level; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |