[Fix] FFS. Wasn't incrementing number of outfits while trying to add it.
This commit is contained in:
parent
a037112f72
commit
c2d44ebb74
@ -278,6 +278,7 @@ static void outfits_buy(char* str) {
|
||||
|
||||
q = outfits_getMod();
|
||||
|
||||
// Can player actually fit the outfit?
|
||||
if((player_freeSpace() - outfit->mass) < 0) {
|
||||
toolkit_alert("No enough free space (you need %d more slots).",
|
||||
outfit->mass - player_freeSpace());
|
||||
@ -288,7 +289,7 @@ static void outfits_buy(char* str) {
|
||||
toolkit_alert("You can only carry %d of this outfit.", outfit->max);
|
||||
return;
|
||||
}
|
||||
|
||||
// Not enough.
|
||||
else if(q*(int)outfit->price >= player_credits) {
|
||||
credits2str(buf, q*outfit->price - player_credits, 2);
|
||||
toolkit_alert("You need %s more SCred.", buf);
|
||||
|
@ -158,6 +158,10 @@ const char* outfit_typename[] = {
|
||||
"Modification"
|
||||
};
|
||||
|
||||
const char* outfit_getType(const Outfit* o) {
|
||||
return outfit_typename[o->type];
|
||||
}
|
||||
|
||||
// Return the broad outfit type.
|
||||
const char* outfit_typenamebroad[] = {
|
||||
"NULL",
|
||||
@ -179,10 +183,6 @@ const char* outfit_getTypeBroad(const Outfit* o) {
|
||||
return outfit_typenamebroad[i];
|
||||
}
|
||||
|
||||
const char* outfit_getType(const Outfit* o) {
|
||||
return outfit_typename[o->type];
|
||||
}
|
||||
|
||||
// Parses the specific area for a weapon and loads it into outfit.
|
||||
static void outfit_parseSWeapon(Outfit* tmp, const xmlNodePtr parent) {
|
||||
xmlNodePtr cur, node;
|
||||
|
@ -454,6 +454,7 @@ int pilot_addOutfit(Pilot* pilot, Outfit* outfit, int quantity) {
|
||||
pilot->outfits[i].quantity = outfit->max;
|
||||
}
|
||||
pilot->outfits[pilot->noutfits].timer = 0;
|
||||
(pilot->noutfits)++;
|
||||
|
||||
if(outfit_isTurret(outfit))
|
||||
// Used to speed up AI.
|
||||
|
Loading…
Reference in New Issue
Block a user