From cadb414b27ba0f5cf44c953b2fc1990eff9ecebb Mon Sep 17 00:00:00 2001 From: Christopher F Date: Thu, 26 Feb 2015 03:12:05 +0100 Subject: [PATCH] Fire callback CB_MAPQUEUE_CHANGED on /replay Needed this for to fix some weird behaviours "NextMap" widget in Plugin BWP\InfoWidgets and think it's useful for all plugin developers. --- core/Maps/MapQueue.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/Maps/MapQueue.php b/core/Maps/MapQueue.php index 2386f41b..2ae0ad32 100644 --- a/core/Maps/MapQueue.php +++ b/core/Maps/MapQueue.php @@ -223,8 +223,8 @@ class MapQueue implements CallbackListener, CommandListener { if (array_key_exists($map->uid, $this->queuedMaps)) { unset($this->queuedMaps[$map->uid]); } - array_unshift($this->queuedMaps, array($player, $map, true)); + $this->maniaControl->callbackManager->triggerCallback(self::CB_MAPQUEUE_CHANGED, array('add', $map)); } }