[Add] Audio noise when player enters jump-safe zone.
This commit is contained in:
parent
fc3276464a
commit
2533439f1b
BIN
snd/sounds/jump.wav
Normal file
BIN
snd/sounds/jump.wav
Normal file
Binary file not shown.
15
src/player.c
15
src/player.c
@ -673,7 +673,12 @@ void player_renderBG(void) {
|
||||
}
|
||||
}
|
||||
|
||||
/* Render the player. */
|
||||
/**
|
||||
* @fn void player_render(void)
|
||||
*
|
||||
* @brief Render the player.
|
||||
*/
|
||||
static int can_jump = 0; /**< Store whether or not the player is able to jump. */
|
||||
void player_render(void) {
|
||||
Pilot* p;
|
||||
glColour* c;
|
||||
@ -805,7 +810,13 @@ void player_renderGUI(void) {
|
||||
else if(hyperspace_target >= 0) {
|
||||
/* Hyperspace target. */
|
||||
sys = &systems_stack[cur_system->jumps[hyperspace_target]];
|
||||
c = space_canHyperspace(player) ? &cConsole : NULL;
|
||||
|
||||
i = space_canHyperspace(player);
|
||||
if((i != 0) && (i != can_jump))
|
||||
player_playSound(snd_jump, 1);
|
||||
can_jump = i;
|
||||
|
||||
c = can_jump ? &cConsole : NULL;
|
||||
gl_printMid(NULL, (int)gui.nav.w, gui.nav.x, gui.nav.y - 5,
|
||||
c, "Hyperspace");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user