|
VoltMod
C++23 framework for CS2 server plugins
|
Which clients receive which entities, filtered after CheckTransmit. More...
#include <Visibility.hpp>
Public Member Functions | |
| Visibility (EntitySystem &entities, SlotEvents &slots) | |
| Visibility (const Visibility &)=delete | |
| Visibility & | operator= (const Visibility &)=delete |
| void | SetPawnHidden (int slot, bool hidden) |
| void | SetControllerHidden (int slot, bool hidden) |
| bool | IsPawnHidden (int slot) const |
| void | ShowOnlyTo (EntityRef entity, int slot) |
| void | ShowOnlyToTeam (EntityRef entity, Team team) |
| void | HideFromTeam (EntityRef entity, Team team) |
| void | ShowToEveryone (EntityRef entity) |
| std::shared_ptr< GlowVision > | CreateGlow (int viewerSlot, GlowConfig config={}) |
| std::shared_ptr< GlowVision > | CreateGlow (Team viewerTeam, GlowConfig config={}) |
| void | OnCheckTransmit (CCheckTransmitInfo **infoList, int infoCount) |
Which clients receive which entities, filtered after CheckTransmit.
A hidden pawn takes its weapons, wearables and shadow with it but stays visible to whoever spectates it; a hidden controller loses its scoreboard row and chat attribution. Sounds are networked separately and are unaffected.
Definition at line 36 of file Visibility.hpp.
| VoltMod::Visibility::Visibility | ( | EntitySystem & | entities, |
| SlotEvents & | slots ) |
slots resets a slot's hiding when it changes hands. Both must outlive this.
Definition at line 99 of file Visibility.cpp.
References VoltMod::SlotEvents::Changed, and VoltMod::IsValidSlot().
Referenced by operator=(), and Visibility().
|
delete |
References Visibility().
| std::shared_ptr< GlowVision > VoltMod::Visibility::CreateGlow | ( | int | viewerSlot, |
| GlowConfig | config = {} ) |
A GlowVision for viewerSlot alone; its clones go with the last owner.
Definition at line 180 of file Visibility.cpp.
| std::shared_ptr< GlowVision > VoltMod::Visibility::CreateGlow | ( | Team | viewerTeam, |
| GlowConfig | config = {} ) |
A GlowVision the whole of viewerTeam shares.
Definition at line 185 of file Visibility.cpp.
Keep entity from every client on team. Calling again moves it.
Definition at line 152 of file Visibility.cpp.
References VoltMod::IsPlaying().
| bool VoltMod::Visibility::IsPawnHidden | ( | int | slot | ) | const |
Definition at line 127 of file Visibility.cpp.
References VoltMod::IsValidSlot().
| void VoltMod::Visibility::OnCheckTransmit | ( | CCheckTransmitInfo ** | infoList, |
| int | infoCount ) |
Definition at line 203 of file Visibility.cpp.
References VoltMod::CollectHiddenPlayer(), VoltMod::Entity::Index(), VoltMod::MaxPlayers, and VoltMod::ObserverTarget().
|
delete |
References Visibility().
| void VoltMod::Visibility::SetControllerHidden | ( | int | slot, |
| bool | hidden ) |
Hide or show slot's controller from every other client.
Definition at line 119 of file Visibility.cpp.
References VoltMod::IsValidSlot().
| void VoltMod::Visibility::SetPawnHidden | ( | int | slot, |
| bool | hidden ) |
Hide or show slot's pawn from every other client.
Definition at line 111 of file Visibility.cpp.
References VoltMod::IsValidSlot().
| void VoltMod::Visibility::ShowOnlyTo | ( | EntityRef | entity, |
| int | slot ) |
Network entity to slot alone. Calling again moves it to another slot.
Definition at line 132 of file Visibility.cpp.
References VoltMod::IsValidSlot().
Network entity to team alone, spectators excluded. Calling again moves it.
Definition at line 142 of file Visibility.cpp.
References VoltMod::IsPlaying().
| void VoltMod::Visibility::ShowToEveryone | ( | EntityRef | entity | ) |
Undo the calls above; a removed entity needs no call.
Definition at line 175 of file Visibility.cpp.