[Fix] Bug with no death window apearing after cinematic view.
This commit is contained in:
parent
05ed57907f
commit
d6f266323f
@ -282,6 +282,7 @@ void pilot_hit(Pilot* p, const Solid* w, const unsigned int shooter,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void pilot_dead(Pilot* p) {
|
void pilot_dead(Pilot* p) {
|
||||||
|
if(pilot_isFlag(p, PILOT_DEAD)) return; // She's already dead.
|
||||||
// Basically just set the timers..
|
// Basically just set the timers..
|
||||||
if(p->id == PLAYER_ID) player_dead();
|
if(p->id == PLAYER_ID) player_dead();
|
||||||
p->timer[0] = SDL_GetTicks(); // No need for AI anymore.
|
p->timer[0] = SDL_GetTicks(); // No need for AI anymore.
|
||||||
|
@ -488,8 +488,7 @@ void player_render(void) {
|
|||||||
glColour* c;
|
glColour* c;
|
||||||
glFont* f;
|
glFont* f;
|
||||||
|
|
||||||
if(player == NULL) return;
|
// Pilot is dead, just render her and stop.
|
||||||
|
|
||||||
if(player_isFlag(PLAYER_DESTROYED) || pilot_isFlag(player, PILOT_DEAD)) {
|
if(player_isFlag(PLAYER_DESTROYED) || pilot_isFlag(player, PILOT_DEAD)) {
|
||||||
if(player_isFlag(PLAYER_DESTROYED)) {
|
if(player_isFlag(PLAYER_DESTROYED)) {
|
||||||
if(!toolkit && (SDL_GetTicks() > player_timer))
|
if(!toolkit && (SDL_GetTicks() > player_timer))
|
||||||
@ -503,6 +502,7 @@ void player_render(void) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(player == NULL) return;
|
||||||
// Render the player target graphics.
|
// Render the player target graphics.
|
||||||
if(player_target != PLAYER_ID) p = pilot_get(player_target);
|
if(player_target != PLAYER_ID) p = pilot_get(player_target);
|
||||||
else p = NULL;
|
else p = NULL;
|
||||||
@ -1361,6 +1361,8 @@ void player_dead(void) {
|
|||||||
|
|
||||||
// Player blew up in a nice fireball.
|
// Player blew up in a nice fireball.
|
||||||
void player_destroyed(void) {
|
void player_destroyed(void) {
|
||||||
|
if(player_isFlag(PLAYER_DESTROYED)) return;
|
||||||
|
|
||||||
vectcpy(&player_cam, &player->solid->pos);
|
vectcpy(&player_cam, &player->solid->pos);
|
||||||
gl_bindCamera(&player_cam);
|
gl_bindCamera(&player_cam);
|
||||||
player_setFlag(PLAYER_DESTROYED);
|
player_setFlag(PLAYER_DESTROYED);
|
||||||
|
Loading…
Reference in New Issue
Block a user