diff --git a/src/player.c b/src/player.c index dd6a9b9..854a970 100644 --- a/src/player.c +++ b/src/player.c @@ -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) {