[Fix] Annoying ass bug with overwriting a pilot that is dead!!
This commit is contained in:
parent
f91505b950
commit
3ff2885fd2
@ -256,7 +256,6 @@ static void player_newMake(void) {
|
||||
// Create the player and start the game.
|
||||
player_newShip(ship, x, y, 0., 0., RNG(0, 359)/180.*M_PI);
|
||||
space_init(system);
|
||||
map_clear(); // Set the map up.
|
||||
|
||||
// Clear the map.
|
||||
map_clear();
|
||||
@ -493,8 +492,9 @@ void player_render(void) {
|
||||
// Pilot is dead, just render her and stop.
|
||||
if(player_isFlag(PLAYER_DESTROYED) || pilot_isFlag(player, PILOT_DEAD)) {
|
||||
if(player_isFlag(PLAYER_DESTROYED)) {
|
||||
if(!toolkit && (SDL_GetTicks() > player_timer))
|
||||
if(!toolkit && (player != NULL) && (SDL_GetTicks() > player_timer)) {
|
||||
menu_death();
|
||||
}
|
||||
} else
|
||||
pilot_render(player);
|
||||
|
||||
@ -1528,6 +1528,7 @@ int player_load(xmlNodePtr parent) {
|
||||
xmlNodePtr node;
|
||||
|
||||
// Some cleanup.
|
||||
player_flags = 0;
|
||||
player_cleanup();
|
||||
var_cleanup();
|
||||
missions_cleanup();
|
||||
|
Loading…
Reference in New Issue
Block a user