Don't display target arrow if engine.targetIndex is invalid.

This commit is contained in:
Guus Sliepen 2011-08-29 13:08:55 +02:00
parent 2ddeb41360
commit 4e1316054a
1 changed files with 3 additions and 0 deletions

View File

@ -87,6 +87,9 @@ void setRadioMessage(signed char face, const char *in, int priority)
static void doTargetArrow() static void doTargetArrow()
{ {
if (engine.targetIndex < 0)
return;
if ((engine.targetArrowTimer == 0) || (enemy[engine.targetIndex].shield < 1)) if ((engine.targetArrowTimer == 0) || (enemy[engine.targetIndex].shield < 1))
return; return;