[Fix] Fuel loads properly now.

This commit is contained in:
Allanis 2013-07-06 14:46:06 +01:00
parent 26211ee1f5
commit 7a66419f7c

View File

@ -1762,7 +1762,7 @@ static int player_parseShip(xmlNodePtr parent, int is_player) {
if(!is_player == 0) xmlr_str(node, "location", loc);
/* Get fuel. */
xmlr_float(node, "fuel", ship->fuel);
xmlr_float(node, "fuel", fuel);
if(xml_isNode(node, "outfits")) {
cur = node->xmlChildrenNode;
@ -1796,6 +1796,10 @@ static int player_parseShip(xmlNodePtr parent, int is_player) {
} while(xml_nextNode(node));
}
} while(xml_nextNode(node));
/* Set fuel. */
if(fuel != 0)
ship->fuel = MIN(ship->fuel_max, fuel);
/* Add it to the stack if it's not what the player is in. */
if(is_player == 0) {