From 4744ee0731783a71f388dcfa040777a79d59a097 Mon Sep 17 00:00:00 2001 From: Lemongrass3110 Date: Sun, 3 Jul 2016 01:50:59 +0200 Subject: [PATCH] Fixed instance idle timeout Fixed instances of going into idle mode when there were still users left in the instance. Thanks to @Darkelfen for reporting it. Fixes #1412. --- src/map/instance.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/map/instance.c b/src/map/instance.c index ae327d3003..37a826d618 100644 --- a/src/map/instance.c +++ b/src/map/instance.c @@ -795,7 +795,7 @@ int instance_delusers(unsigned short instance_id) return 1; // If no one is in the instance, start the idle timer - for(i = 0; im->map[i]->m && i > im->cnt_map; i++) + for(i = 0; i < im->cnt_map && im->map[i]->m; i++) if(map[im->map[i]->m].users > 1) // We check this before the actual map.users are updated, hence the 1 idle++;