Merge branch 'testing'
This commit is contained in:
commit
aa58ab2ef1
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) {
|
void player_render(void) {
|
||||||
Pilot* p;
|
Pilot* p;
|
||||||
glColour* c;
|
glColour* c;
|
||||||
@ -805,7 +810,13 @@ void player_renderGUI(void) {
|
|||||||
else if(hyperspace_target >= 0) {
|
else if(hyperspace_target >= 0) {
|
||||||
/* Hyperspace target. */
|
/* Hyperspace target. */
|
||||||
sys = &systems_stack[cur_system->jumps[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,
|
gl_printMid(NULL, (int)gui.nav.w, gui.nav.x, gui.nav.y - 5,
|
||||||
c, "Hyperspace");
|
c, "Hyperspace");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user