From b9c39db08e6187cc33ae9f308118249a5a33ba64 Mon Sep 17 00:00:00 2001
From: Christian Heller <c.heller@plomlompom.de>
Date: Sun, 7 Dec 2014 04:39:26 +0100
Subject: [PATCH] Server: Fix doubling of items listed via THINGS_HERE.

---
 src/server/run.c | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/src/server/run.c b/src/server/run.c
index 9f6afbb..6f24f46 100644
--- a/src/server/run.c
+++ b/src/server/run.c
@@ -234,14 +234,17 @@ static uint8_t parse_command_meta(char * tok0)
                     }
                 }
             }
-            struct ThingInMemory * t_mem;
-            for (t_mem = player->t_mem; t_mem; t_mem = t_mem->next)
+            else
             {
-                if (t_mem->pos.y == atoi(tok1) && t_mem->pos.x == atoi(tok2))
+                struct ThingInMemory * t_mem;
+                for (t_mem = player->t_mem; t_mem; t_mem = t_mem->next)
                 {
-                    struct ThingType * tt = get_thing_type(t_mem->type);
-                    send_to_outfile(tt->name, 0);
-                    send_to_outfile("\n", 1);
+                    if (t_mem->pos.y == atoi(tok1) && t_mem->pos.x == atoi(tok2))
+                    {
+                        struct ThingType * tt = get_thing_type(t_mem->type);
+                        send_to_outfile(tt->name, 0);
+                        send_to_outfile("\n", 1);
+                    }
                 }
             }
             send_to_outfile("THINGS_HERE END\n", 1);
-- 
2.30.2