[Add] Warn the player when a missile is locked onto her.
This commit is contained in:
parent
f7c10bf329
commit
7a6f27da43
@ -878,6 +878,7 @@ void pilot_init(Pilot* pilot, Ship* ship, char* name, int faction,
|
|||||||
pilot->ai = ai;
|
pilot->ai = ai;
|
||||||
pilot->tcontrol = 0;
|
pilot->tcontrol = 0;
|
||||||
pilot->flags = 0;
|
pilot->flags = 0;
|
||||||
|
pilot->lockons = 0;
|
||||||
|
|
||||||
/* Solid. */
|
/* Solid. */
|
||||||
pilot->solid = solid_create(ship->mass, dir, pos, vel);
|
pilot->solid = solid_create(ship->mass, dir, pos, vel);
|
||||||
|
@ -622,6 +622,11 @@ void player_render(void) {
|
|||||||
/* Render the player. */
|
/* Render the player. */
|
||||||
pilot_render(player);
|
pilot_render(player);
|
||||||
|
|
||||||
|
/* Lockon warning. */
|
||||||
|
if(player->lockons > 0)
|
||||||
|
gl_printMid(NULL, SCREEN_W, 0., SCREEN_H-gl_defFont.h-25.,
|
||||||
|
&cRed, "LOCKON DETECTED");
|
||||||
|
|
||||||
/* GUI! */
|
/* GUI! */
|
||||||
/* -- Frame. */
|
/* -- Frame. */
|
||||||
gl_blitStatic(gui.gfx_frame, gui.frame.x, gui.frame.y, NULL);
|
gl_blitStatic(gui.gfx_frame, gui.frame.x, gui.frame.y, NULL);
|
||||||
|
Loading…
Reference in New Issue
Block a user