Skip to content

Commit

Permalink
Fix #4964
Browse files Browse the repository at this point in the history
  • Loading branch information
CodingJellyfish committed Oct 19, 2024
1 parent df724af commit a1f78ef
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/items/attachment_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,10 @@ void AttachmentManager::loadModels()
+ iat[i].icon_file);
m_all_icons[iat[i].attachment] =
material_manager->getMaterial(full_icon_path,
/* full_path */ true,
/*make_permanent */ true);
/*full_path*/ true,
/*make_permanent*/ true,
/*complain_if_not_found*/ true,
/*strip_path*/ false);
}
if (GUIEngine::isNoGraphics())
mesh->freeMeshVertexBuffer();
Expand Down
6 changes: 6 additions & 0 deletions src/states_screens/options/options_screen_ui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include "config/player_manager.hpp"
#include "font/font_manager.hpp"
#include "graphics/irr_driver.hpp"
#include "items/attachment_manager.hpp"
#include "items/powerup_manager.hpp"
#include "modes/world.hpp"
#include "states_screens/dialogs/custom_camera_settings.hpp"
Expand Down Expand Up @@ -640,9 +641,14 @@ void OptionsScreenUI::reloadGUIEngine()
if (reload_skin)
{
irr_driver->setMaxTextureSize();

delete powerup_manager;
powerup_manager = new PowerupManager();
powerup_manager->loadPowerupsModels();

delete attachment_manager;
attachment_manager = new AttachmentManager();
attachment_manager->loadModels();
}
OptionsScreenUI::getInstance()->m_reload_option = nullptr;
} // reloadGUIEngine
Expand Down

0 comments on commit a1f78ef

Please sign in to comment.