|
VoltMod
C++23 framework for CS2 server plugins
|
A player turned into a nameless spectator nobody else sees, who sees every player through walls. More...
#include <HiddenPlayer.hpp>
Public Member Functions | |
| HiddenPlayer (EntitySystem &entities, Visibility &visibility, int slot) | |
| ~HiddenPlayer () | |
| HiddenPlayer (const HiddenPlayer &)=delete | |
| HiddenPlayer & | operator= (const HiddenPlayer &)=delete |
| void | UpdateGlow () |
| void | Show () |
Public Attributes | |
| int | Slot = -1 |
| int | ControllerIndex = -1 |
| CEntityInstance * | Pawn = nullptr |
| int | IndexCount = 0 |
| std::array< int, MaxIndicesPerPlayer > | PawnIndices {} |
A player turned into a nameless spectator nobody else sees, who sees every player through walls.
Show, or destroying this, gives back the name and the team; a team picked meanwhile wins. Call UpdateGlow every GlowVision::RefreshIntervalMs.
Definition at line 18 of file HiddenPlayer.hpp.
| VoltMod::HiddenPlayer::HiddenPlayer | ( | EntitySystem & | entities, |
| Visibility & | visibility, | ||
| int | slot ) |
Hides slot now. Both services must outlive this.
Definition at line 7 of file HiddenPlayer.cpp.
References VoltMod::Controller::ChangeTeam(), VoltMod::Controller::Controller(), and VoltMod::Spectator.
Referenced by HiddenPlayer(), and operator=().
|
inline |
Definition at line 23 of file HiddenPlayer.hpp.
References Show().
|
delete |
References HiddenPlayer().
|
delete |
References HiddenPlayer(), and VoltMod::None.
| void VoltMod::HiddenPlayer::Show | ( | ) |
Shows the player again; later calls do nothing.
Definition at line 29 of file HiddenPlayer.cpp.
References VoltMod::Controller::ChangeTeam(), VoltMod::Controller::Controller(), VoltMod::IsPlaying(), and VoltMod::Spectator.
Referenced by ~HiddenPlayer().
| void VoltMod::HiddenPlayer::UpdateGlow | ( | ) |
Rebuilds the glow across rounds, spawns and deaths.
Definition at line 21 of file HiddenPlayer.cpp.
| int VoltMod::HiddenPlayer::ControllerIndex = -1 |
Definition at line 24 of file Visibility.cpp.
Referenced by VoltMod::CollectHiddenPlayer().
| int VoltMod::HiddenPlayer::IndexCount = 0 |
Definition at line 26 of file Visibility.cpp.
Referenced by VoltMod::AddIndex().
| CEntityInstance* VoltMod::HiddenPlayer::Pawn = nullptr |
Definition at line 25 of file Visibility.cpp.
Referenced by VoltMod::CollectHiddenPlayer().
| std::array<int, MaxIndicesPerPlayer> VoltMod::HiddenPlayer::PawnIndices {} |
Definition at line 27 of file Visibility.cpp.
Referenced by VoltMod::AddIndex().
| int VoltMod::HiddenPlayer::Slot = -1 |
Definition at line 23 of file Visibility.cpp.
Referenced by VoltMod::CollectHiddenPlayer().