Skip to content

Commit

Permalink
Regenerate the player's ship list when removing a ship
Browse files Browse the repository at this point in the history
  • Loading branch information
Deiz committed Mar 24, 2015
1 parent 9fd2a7d commit 3465106
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/player.c
Expand Up @@ -665,7 +665,7 @@ credits_t player_shipPrice( char* shipname )
*/
void player_rmShip( char* shipname )
{
int i;
int i, w;

for (i=0; i<player_nstack; i++) {
/* Not the ship we are looking for. */
Expand All @@ -684,6 +684,12 @@ void player_rmShip( char* shipname )
player_stack = realloc( player_stack,
sizeof(PlayerShip_t) * (player_nstack) );
}

/* Update ship list if landed. */
if (landed) {
w = land_getWid( LAND_WINDOW_EQUIPMENT );
equipment_regenLists( w, 0, 1 );
}
}


Expand Down

0 comments on commit 3465106

Please sign in to comment.