Skip to content

Commit

Permalink
Fix model glow not being removed after disabling
Browse files Browse the repository at this point in the history
  • Loading branch information
danielkrupinski committed Jan 27, 2025
1 parent 1bd2723 commit d1370d7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
1 change: 1 addition & 0 deletions Source/FeatureHelpers/RenderingHookEntityLoop.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class RenderingHookEntityLoop {
void run() const noexcept
{
hookContext.template make<EntitySystem>().forEachEntityIdentity([this](const auto& entityIdentity) { handleEntityIdentity(entityIdentity); });
hookContext.template make<ModelGlow>().onEntityListTraversed();
}

private:
Expand Down
3 changes: 1 addition & 2 deletions Source/GlobalContext/GlobalContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,7 @@ class GlobalContext {

UnloadFlag unloadFlag;
dependencies.make<PanoramaGUI>().run(fullContext().features(dependencies), unloadFlag);
dependencies.make<ModelGlow>().onEntityListTraversed();


if (unloadFlag) {
FeaturesUnloadHandler{dependencies, fullContext().featuresStates}.handleUnload();
BombStatusPanelUnloadHandler{dependencies}.handleUnload();
Expand Down
10 changes: 5 additions & 5 deletions Source/UI/Panorama/PanoramaGUI.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,16 +145,16 @@ class PanoramaGUI {
if (!playerModelGlowPreview.isPreviewPlayerSetCT())
playerModelGlowPreview.setPreviewPlayerCT(guiPanel.findChildInLayoutFile("ModelGlowPreviewPlayerCT").clientPanel().template as<MapPlayerPreviewPanel>().findPreviewPlayer());

const auto cmdSymbol = uiEngine().makeSymbol(0, "cmd");
const auto cmd = guiPanel.getAttributeString(cmdSymbol, "");
PanoramaCommandDispatcher{cmd, features, unloadFlag}();
guiPanel.setAttributeString(cmdSymbol, "");

hookContext.template make<PlayerModelGlowPreview>().hookPreviewPlayersSceneObjectUpdaters();
hookContext.template make<PlayerModelGlowPreview>().update();

hookContext.template make<PlayerModelGlowPreviewPanel>(uiEngine().getPanelFromHandle(state().modelGlowPreviewPlayerLabelHandleTT), TeamNumber::TT).update();
hookContext.template make<PlayerModelGlowPreviewPanel>(uiEngine().getPanelFromHandle(state().modelGlowPreviewPlayerLabelHandleCT), TeamNumber::CT).update();

const auto cmdSymbol = uiEngine().makeSymbol(0, "cmd");
const auto cmd = guiPanel.getAttributeString(cmdSymbol, "");
PanoramaCommandDispatcher{cmd, features, unloadFlag}();
guiPanel.setAttributeString(cmdSymbol, "");
}

private:
Expand Down

0 comments on commit d1370d7

Please sign in to comment.