-
Notifications
You must be signed in to change notification settings - Fork 968
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ad5aa75
commit 9da59db
Showing
49 changed files
with
864 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#pragma once | ||
|
||
#include "C_CSPlayerPawn.h" | ||
|
||
namespace cs2 | ||
{ | ||
|
||
struct C_CSGO_PreviewPlayer : C_CSPlayerPawn { | ||
}; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#pragma once | ||
|
||
#include <CS2/Classes/EntitySystem/CEntityHandle.h> | ||
#include <CS2/Classes/CUtlVector.h> | ||
|
||
#include "CPanel2D.h" | ||
|
||
namespace cs2 | ||
{ | ||
|
||
struct CUI_MapPlayerPreviewPanel : CPanel2D { | ||
using EntityHandles = CUtlVector<CEntityHandle>; | ||
}; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#pragma once | ||
|
||
#include <CS2/Classes/Entities/C_CSGO_PreviewPlayer.h> | ||
#include "BaseEntity.h" | ||
|
||
template <typename HookContext> | ||
class PreviewPlayer { | ||
public: | ||
using RawType = cs2::C_CSGO_PreviewPlayer; | ||
|
||
PreviewPlayer(HookContext& hookContext, cs2::C_CSGO_PreviewPlayer* previewPlayer) noexcept | ||
: hookContext{hookContext} | ||
, previewPlayer{previewPlayer} | ||
{ | ||
} | ||
|
||
[[nodiscard]] decltype(auto) baseEntity() const noexcept | ||
{ | ||
return hookContext.template make<BaseEntity>(previewPlayer); | ||
} | ||
|
||
[[nodiscard]] operator cs2::C_CSGO_PreviewPlayer*() const noexcept | ||
{ | ||
return previewPlayer; | ||
} | ||
|
||
private: | ||
HookContext& hookContext; | ||
cs2::C_CSGO_PreviewPlayer* previewPlayer; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
Source/Features/Visuals/ModelGlow/Preview/BaseEntityForModelGlowPreview.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#pragma once | ||
|
||
#include <CS2/Classes/Entities/C_BaseEntity.h> | ||
#include <Entities/BaseEntity.h> | ||
|
||
template <typename HookContext> | ||
class BaseEntityForModelGlowPreview { | ||
public: | ||
BaseEntityForModelGlowPreview(HookContext& hookContext, cs2::C_BaseEntity* baseEntity) noexcept | ||
: hookContext{hookContext} | ||
, baseEntity{baseEntity} | ||
{ | ||
} | ||
|
||
template <typename... Args> | ||
void applySpawnProtectionEffectRecursively(Args&&... args) const noexcept | ||
{ | ||
hookContext.template make<BaseEntity>(baseEntity).applySpawnProtectionEffectRecursively(std::forward<Args>(args)...); | ||
} | ||
|
||
private: | ||
HookContext& hookContext; | ||
cs2::C_BaseEntity* baseEntity; | ||
}; |
21 changes: 21 additions & 0 deletions
21
Source/Features/Visuals/ModelGlow/Preview/PlayerControllerForModelGlowPreview.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#pragma once | ||
|
||
#include <CS2/Classes/Entities/CCSPlayerController.h> | ||
#include <Utils/Optional.h> | ||
|
||
template <typename HookContext> | ||
class PlayerControllerForModelGlowPreview { | ||
public: | ||
explicit PlayerControllerForModelGlowPreview(HookContext& hookContext) noexcept | ||
: hookContext{hookContext} | ||
{ | ||
} | ||
|
||
[[nodiscard]] Optional<cs2::CCSPlayerController::m_iCompTeammateColor> playerColorIndex() const noexcept | ||
{ | ||
return hookContext.playerModelGlowPreviewState().previewPlayerColorIndex; | ||
} | ||
|
||
private: | ||
HookContext& hookContext; | ||
}; |
Oops, something went wrong.