[Fix] It's a seldom bug, but this will stop us from exploding while entering into hyperspace.
This commit is contained in:
parent
2a76ee4d42
commit
2e5606b845
@ -266,6 +266,13 @@ void pilot_dead(Pilot* p) {
|
||||
p->timer[0] = SDL_GetTicks(); // No need for AI anymore.
|
||||
p->ptimer = p->timer[0] + 1000 + (unsigned int)sqrt(10*p->armour_max*p->shield_max);
|
||||
p->timer[1] = p->timer[0]; // Explosion timer.
|
||||
|
||||
// Flag cleanup - fixes some issues.
|
||||
if(pilot_isFlag(p, PILOT_HYP_PREP)) pilot_rmFlag(p, PILOT_HYP_PREP);
|
||||
if(pilot_isFlag(p, PILOT_HYP_BEGIN)) pilot_rmFlag(p, PILOT_HYP_BEGIN);
|
||||
if(pilot_isFlag(p, PILOT_HYPERSPACE)) pilot_rmFlag(p, PILOT_HYPERSPACE);
|
||||
|
||||
// Our pilot is now deadz.
|
||||
pilot_setFlag(p, PILOT_DEAD);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user