Proper Subversion configuration.
[newkind] / swat.c
diff --git a/swat.c b/swat.c
index af795f3..104277f 100644 (file)
--- a/swat.c
+++ b/swat.c
@@ -18,6 +18,7 @@
  * Special Weapons And Tactics.
  */
 
+#include <stdio.h>
 #include <math.h>
 #include <stdlib.h>
 #include <string.h>
@@ -321,7 +322,12 @@ void make_angry (int un)
                universe[un].flags |= FLG_ANGRY;
                return;
        }
-       
+
+       if (!(universe[un].flags & FLG_TARGET) &&
+           (universe[1].type == SHIP_CORIOLIS ||
+            universe[1].type == SHIP_DODEC))
+         universe[1].flags |= FLG_ANGRY;         
+
        if (type > SHIP_ROCK)
        {
                universe[un].rotx = 4;
@@ -350,7 +356,8 @@ void explode_object (int un)
 void check_target (int un, struct univ_object *flip)
 {
        struct univ_object *univ;
-       
+       char buf[80];
+
        univ = &universe[un];
        
        if (in_target (univ->type, flip->location.x, flip->location.y, flip->location.z))
@@ -358,7 +365,9 @@ void check_target (int un, struct univ_object *flip)
                if ((missile_target == MISSILE_ARMED) && (univ->type >= 0))
                {
                        missile_target = un;
-                       info_message ("Target Locked");
+                       sprintf(buf, "Target Locked (%s)",
+                               ship_list[univ->type]->name);
+                       info_message (buf);
                        snd_play_sample (SND_BEEP);
                }
        
@@ -713,7 +722,7 @@ void tactics (int un)
        {
                if (cmdr.legal_status >= 64)
                {
-                       flags |= FLG_ANGRY;
+                       flags |= FLG_ANGRY | FLG_TARGET;
                        ship->flags = flags;
                }
        }
@@ -1145,7 +1154,7 @@ void check_for_cops (void)
        
        if (newship != -1)
        {
-               universe[newship].flags |= FLG_ANGRY;
+               universe[newship].flags |= FLG_ANGRY | FLG_TARGET;
                if (rand255() > 245)
                        universe[newship].flags |= FLG_HAS_ECM;