Skip to content

Commit d2de4ab

Browse files
Remove FeatureHelpers struct
1 parent 9979c4f commit d2de4ab

File tree

12 files changed

+18
-35
lines changed

12 files changed

+18
-35
lines changed

Source/Endpoints.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ void ViewRenderHook_onRenderStart_cpp(cs2::CViewRender* thisptr) noexcept
2222
fullContext.hooks.viewRenderHook.getOriginalOnRenderStart()(thisptr);
2323

2424
HookDependencies dependencies{fullContext};
25-
SoundWatcher<decltype(dependencies)> soundWatcher{fullContext.featureHelpers.soundWatcherState, dependencies};
25+
SoundWatcher<decltype(dependencies)> soundWatcher{fullContext.soundWatcherState, dependencies};
2626
soundWatcher.update();
2727
fullContext.features(dependencies).soundFeatures().runOnViewMatrixUpdate();
2828

Source/FeatureHelpers/FeatureHelpers.h

Lines changed: 0 additions & 13 deletions
This file was deleted.

Source/Features/Features.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,8 @@
1010

1111
template <typename HookContext>
1212
struct Features {
13-
Features(FeaturesStates& states, FeatureHelpers& helpers, Hooks& hooks, HookContext& hookContext) noexcept
13+
Features(FeaturesStates& states, Hooks& hooks, HookContext& hookContext) noexcept
1414
: states{states}
15-
, helpers{helpers}
1615
, hooks{hooks}
1716
, hookContext{hookContext}
1817
{
@@ -25,7 +24,7 @@ struct Features {
2524

2625
[[nodiscard]] auto soundFeatures() const noexcept
2726
{
28-
return SoundFeatures{states.soundFeaturesStates, helpers, hooks.viewRenderHook, hookContext};
27+
return SoundFeatures{states.soundFeaturesStates, hookContext.soundWatcherState(), hooks.viewRenderHook, hookContext};
2928
}
3029

3130
[[nodiscard]] auto visualFeatures() const noexcept
@@ -34,7 +33,6 @@ struct Features {
3433
}
3534

3635
FeaturesStates& states;
37-
FeatureHelpers& helpers;
3836
Hooks& hooks;
3937
HookContext& hookContext;
4038
};

Source/Features/Hud/HudFeatures.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#pragma once
22

3-
#include <FeatureHelpers/FeatureHelpers.h>
4-
53
#include "BombTimer/BombTimer.h"
64
#include "BombTimer/BombTimerContext.h"
75
#include "BombTimer/BombTimerToggle.h"

Source/Features/Sound/SoundFeatures.h

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,14 @@
77
#include "SoundFeaturesStates.h"
88
#include "WeaponReloadVisualizer.h"
99
#include "WeaponScopeVisualizer.h"
10+
#include <FeatureHelpers/Sound/SoundWatcherState.h>
1011
#include <Hooks/ViewRenderHook.h>
1112

1213
template <typename HookContext>
1314
struct SoundFeatures {
14-
SoundFeatures(SoundFeaturesStates& states, FeatureHelpers& helpers, ViewRenderHook& viewRenderHook, HookContext& hookContext) noexcept
15+
SoundFeatures(SoundFeaturesStates& states, SoundWatcherState& soundWatcherState, ViewRenderHook& viewRenderHook, HookContext& hookContext) noexcept
1516
: states{states}
16-
, helpers{helpers}
17+
, soundWatcherState{soundWatcherState}
1718
, viewRenderHook{viewRenderHook}
1819
, hookContext{hookContext}
1920
{
@@ -90,7 +91,7 @@ struct SoundFeatures {
9091
}
9192

9293
SoundFeaturesStates& states;
93-
FeatureHelpers& helpers;
94+
SoundWatcherState& soundWatcherState;
9495
ViewRenderHook& viewRenderHook;
9596
HookContext& hookContext;
9697

@@ -102,7 +103,7 @@ struct SoundFeatures {
102103
state,
103104
hookContext,
104105
viewRenderHook,
105-
SoundWatcher<HookContext>{helpers.soundWatcherState, hookContext},
106+
SoundWatcher<HookContext>{soundWatcherState, hookContext},
106107
};
107108
}
108109

@@ -112,7 +113,7 @@ struct SoundFeatures {
112113
return SoundVisualizationFeatureToggle<HookContext, SoundType>{
113114
state,
114115
hookContext,
115-
SoundWatcher<HookContext>{helpers.soundWatcherState, hookContext},
116+
SoundWatcher<HookContext>{soundWatcherState, hookContext},
116117
viewRenderHook,
117118
};
118119
}

Source/Features/Visuals/PlayerInfoInWorld/PlayerInfoPanel.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#pragma once
22

33
#include <CS2/Panorama/CUIPanel.h>
4+
#include <FeatureHelpers/ViewToProjectionMatrix.h>
5+
#include <FeatureHelpers/WorldToClipSpaceConverter.h>
46
#include <GameClasses/PanoramaUiPanel.h>
57
#include "PlayerInfoInWorldState.h"
68
#include "PlayerInfoPanelTypes.h"

Source/Features/Visuals/VisualFeatures.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#pragma once
22

3-
#include <FeatureHelpers/FeatureHelpers.h>
43
#include "ModelGlow/ModelGlowToggle.h"
54
#include "PlayerInfoInWorld/PlayerInfoInWorld.h"
65
#include "OutlineGlow/DefuseKitOutlineGlow/DefuseKitOutlineGlowToggle.h"

Source/GlobalContext/FullGlobalContext.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#include <GameDependencies/GameDependencies.h>
55
#include <GameDLLs/Tier0Dll.h>
66
#include <FeatureHelpers/EntityClassifier.h>
7-
#include <FeatureHelpers/FeatureHelpers.h>
7+
#include <FeatureHelpers/HudInWorldPanelContainer.h>
88
#include <FeatureHelpers/RenderingHookEntityLoop.h>
99
#include <FeatureHelpers/Sound/SoundWatcher.h>
1010
#include <Features/Features.h>
@@ -55,7 +55,7 @@ struct FullGlobalContext {
5555

5656
[[nodiscard]] auto features(auto& dependencies) noexcept
5757
{
58-
return Features{featuresStates, featureHelpers, hooks, dependencies};
58+
return Features{featuresStates, hooks, dependencies};
5959
}
6060

6161
PatternSearchResults<decltype(kClientPatterns)> clientPatternSearchResults;
@@ -66,7 +66,7 @@ struct FullGlobalContext {
6666
PatternSearchResults<decltype(kPanoramaPatterns)> panoramaPatternSearchResults;
6767
GameDependencies gameDependencies;
6868
Hooks hooks;
69-
FeatureHelpers featureHelpers;
69+
SoundWatcherState soundWatcherState;
7070
FeaturesStates featuresStates;
7171
PanoramaGuiState panoramaGuiState;
7272
BombStatusPanelState bombStatusPanelState;

Source/HookDependencies/HookDependencies.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include <GameClasses/PlayerController.h>
1212
#include <GameClasses/GlobalVars.h>
1313
#include <GameClasses/GameRules.h>
14+
#include <Helpers/PanoramaTransformFactory.h>
1415

1516
struct BombStatusPanelState;
1617
struct FeaturesStates;
@@ -61,9 +62,9 @@ struct HookDependencies {
6162
return fullGlobalContext.gameDependencies;
6263
}
6364

64-
[[nodiscard]] FeatureHelpers& getFeatureHelpers() const noexcept
65+
[[nodiscard]] SoundWatcherState& soundWatcherState() const noexcept
6566
{
66-
return fullGlobalContext.featureHelpers;
67+
return fullGlobalContext.soundWatcherState;
6768
}
6869

6970
[[nodiscard]] BombStatusPanelState& bombStatusPanelState() const noexcept

Source/Osiris.vcxproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@
9393
<ClInclude Include="FeatureHelpers\ConVarAccessor.h" />
9494
<ClInclude Include="FeatureHelpers\ConVarFinder.h" />
9595
<ClInclude Include="FeatureHelpers\EntityClassifier.h" />
96-
<ClInclude Include="FeatureHelpers\FeatureHelpers.h" />
9796
<ClInclude Include="FeatureHelpers\FeatureToggle.h" />
9897
<ClInclude Include="FeatureHelpers\HudInWorldPanelContainer.h" />
9998
<ClInclude Include="FeatureHelpers\HudInWorldPanelIndex.h" />

0 commit comments

Comments
 (0)