From 1ba7a3eaf768dbad93fa141fcbb214325592da18 Mon Sep 17 00:00:00 2001 From: danij Date: Thu, 12 Dec 2013 14:35:19 +0000 Subject: [PATCH] Resources: Clear all materials when a new game is loaded It is presently necessary to clear all materials from the resource system when loading a new game. Todo for later: It should only be necessary to clear the "runtime" (i.e., game) materials rather than all of them. --- doomsday/client/src/dd_main.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doomsday/client/src/dd_main.cpp b/doomsday/client/src/dd_main.cpp index 38403e54b9..a799a9b5f4 100644 --- a/doomsday/client/src/dd_main.cpp +++ b/doomsday/client/src/dd_main.cpp @@ -1413,6 +1413,9 @@ bool App_ChangeGame(Game &game, bool allowReload) FI_Shutdown(); titleFinale = 0; // If the title finale was in progress it isn't now. + /// @todo The entire material collection should not be destroyed during a reload. + App_ResourceSystem().clearAllMaterialSchemes(); + if(!game.isNull()) { LOG_VERBOSE("Selecting game '%s'...") << Str_Text(game.identityKey());