Browse files

Fixed up cooldown abort while braking.

  • Loading branch information...
1 parent 950df10 commit 79f7d9172002b8da350c281d38ce479c8266f354 @Deiz committed Apr 4, 2012
Showing with 9 additions and 1 deletion.
  1. +5 −0 src/pilot.c
  2. +2 −1 src/player.c
  3. +2 −0 src/player_autonav.c
View
5 src/pilot.c
@@ -702,6 +702,11 @@ void pilot_cooldown( Pilot *p )
*/
void pilot_cooldownEnd( Pilot *p, const char *reason )
{
+ if (pilot_isFlag(p, PILOT_COOLDOWN_BRAKE)) {
+ pilot_rmFlag(p, PILOT_COOLDOWN_BRAKE);
+ return;
+ }
+
/* Send message to player. */
if (p->id == PLAYER_ID) {
if (p->ctimer < 0.)
View
3 src/player.c
@@ -2084,7 +2084,8 @@ void player_toggleCooldown(void)
if (pilot_isFlag(player.p, PILOT_TAKEOFF))
return;
- if (!pilot_isFlag(player.p, PILOT_COOLDOWN))
+ if ((!pilot_isFlag(player.p, PILOT_COOLDOWN)) &&
+ (!pilot_isFlag(player.p, PILOT_COOLDOWN_BRAKE)))
pilot_cooldown( player.p );
else
pilot_cooldownEnd(player.p, NULL);
View
2 src/player_autonav.c
@@ -220,6 +220,8 @@ void player_autonavAbort( const char *reason )
/* Reset time compression. */
player_autonavEnd();
}
+ else if (pilot_isFlag(player.p, PILOT_COOLDOWN_BRAKE))
+ pilot_cooldownEnd(player.p, NULL);
else if (pilot_isFlag(player.p, PILOT_COOLDOWN))
pilot_cooldownEnd(player.p, reason);
}

0 comments on commit 79f7d91

Please sign in to comment.