Browse Source

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.
Lemongrass3110 9 years ago
parent
commit
4744ee0731
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/map/instance.c

+ 1 - 1
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++;