[Add] Autonav now makes engine noises.
This commit is contained in:
parent
97944d44b3
commit
4e1fee762b
14
src/player.c
14
src/player.c
@ -1495,12 +1495,15 @@ void player_startAutonav(void) {
|
|||||||
void player_abortAutonav(void) {
|
void player_abortAutonav(void) {
|
||||||
if(player_isFlag(PLAYER_AUTONAV)) {
|
if(player_isFlag(PLAYER_AUTONAV)) {
|
||||||
player_message("Autonav aborted!");
|
player_message("Autonav aborted!");
|
||||||
player_acc = 0.; /* Might be acceling. */
|
|
||||||
player_rmFlag(PLAYER_AUTONAV);
|
player_rmFlag(PLAYER_AUTONAV);
|
||||||
|
|
||||||
|
/* Get rid of acceleration. */
|
||||||
|
player_accelOver();
|
||||||
|
|
||||||
|
/* Break possible hyperspacing. */
|
||||||
if(pilot_isFlag(player, PILOT_HYP_PREP)) {
|
if(pilot_isFlag(player, PILOT_HYP_PREP)) {
|
||||||
pilot_hyperspaceAbort(player);
|
pilot_hyperspaceAbort(player);
|
||||||
player_message("Aborting hyperspace sequence.");
|
player_message("Aborting hyperspace sequence.");
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1526,11 +1529,11 @@ void player_think(Pilot* pplayer) {
|
|||||||
player_abortAutonav();
|
player_abortAutonav();
|
||||||
|
|
||||||
if(space_canHyperspace(pplayer)) {
|
if(space_canHyperspace(pplayer)) {
|
||||||
player_acc = 0.;
|
|
||||||
player_jump();
|
player_jump();
|
||||||
} else {
|
} else {
|
||||||
pilot_face(pplayer, VANGLE(pplayer->solid->pos));
|
pilot_face(pplayer, VANGLE(pplayer->solid->pos));
|
||||||
player_acc = 1.;
|
if(player_acc < 1.)
|
||||||
|
player_accel(1.);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1786,6 +1789,9 @@ void player_jump(void) {
|
|||||||
player_message("You do not have enough fuel to hyperspace jump.");
|
player_message("You do not have enough fuel to hyperspace jump.");
|
||||||
else {
|
else {
|
||||||
player_message("Preparing for hyperspace.");
|
player_message("Preparing for hyperspace.");
|
||||||
|
/* Stop acceleration noise. */
|
||||||
|
player_accelOver();
|
||||||
|
/* Stop possible shooting. */
|
||||||
pilot_shootStop(player, 0);
|
pilot_shootStop(player, 0);
|
||||||
pilot_shootStop(player, 1);
|
pilot_shootStop(player, 1);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user