From 4e1316054acf4ab6315170a8dc18f271c38ef823 Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Mon, 29 Aug 2011 13:08:55 +0200 Subject: [PATCH] Don't display target arrow if engine.targetIndex is invalid. --- code/misc.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/misc.cpp b/code/misc.cpp index 9b98a81..0eaf4b3 100644 --- a/code/misc.cpp +++ b/code/misc.cpp @@ -87,6 +87,9 @@ void setRadioMessage(signed char face, const char *in, int priority) static void doTargetArrow() { + if (engine.targetIndex < 0) + return; + if ((engine.targetArrowTimer == 0) || (enemy[engine.targetIndex].shield < 1)) return;