Crew retrieved from space after the end of an encounter will no longer set the number of crew to larger than the ship's maximum.
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@2274 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
@@ -1,4 +1,6 @@
|
|||||||
Changes towards version 0.6:
|
Changes towards version 0.6:
|
||||||
|
- Crew retrieved from space after the end of an encounter will no
|
||||||
|
longer set the crew larger than the ship's maximum. - SvdB
|
||||||
- Flagship crew numbers are no longer continuously synchronised during
|
- Flagship crew numbers are no longer continuously synchronised during
|
||||||
melee, but only at the beginning and end of the battle. - SvdB
|
melee, but only at the beginning and end of the battle. - SvdB
|
||||||
- Various small cleanups. - SvdB
|
- Various small cleanups. - SvdB
|
||||||
|
|||||||
+12
-2
@@ -232,11 +232,21 @@ UninitShips (void)
|
|||||||
STARSHIPPTR StarShipPtr;
|
STARSHIPPTR StarShipPtr;
|
||||||
|
|
||||||
GetElementStarShip (ElementPtr, &StarShipPtr);
|
GetElementStarShip (ElementPtr, &StarShipPtr);
|
||||||
|
|
||||||
// There should only be one ship left in battle.
|
// There should only be one ship left in battle.
|
||||||
// He gets the crew still floating in space.
|
// He gets the crew still floating in space.
|
||||||
if (StarShipPtr->RaceDescPtr->ship_info.crew_level)
|
if (StarShipPtr->RaceDescPtr->ship_info.crew_level)
|
||||||
StarShipPtr->RaceDescPtr->ship_info.crew_level +=
|
{
|
||||||
crew_retrieved;
|
if (crew_retrieved >=
|
||||||
|
StarShipPtr->RaceDescPtr->ship_info.max_crew -
|
||||||
|
StarShipPtr->RaceDescPtr->ship_info.crew_level)
|
||||||
|
StarShipPtr->RaceDescPtr->ship_info.crew_level =
|
||||||
|
StarShipPtr->RaceDescPtr->ship_info.max_crew;
|
||||||
|
else
|
||||||
|
StarShipPtr->RaceDescPtr->ship_info.crew_level +=
|
||||||
|
crew_retrieved;
|
||||||
|
}
|
||||||
|
|
||||||
if (StarShipPtr->RaceDescPtr->uninit_func != NULL)
|
if (StarShipPtr->RaceDescPtr->uninit_func != NULL)
|
||||||
(*StarShipPtr->RaceDescPtr->uninit_func) (
|
(*StarShipPtr->RaceDescPtr->uninit_func) (
|
||||||
StarShipPtr->RaceDescPtr);
|
StarShipPtr->RaceDescPtr);
|
||||||
|
|||||||
Reference in New Issue
Block a user