|
VoltMod
C++23 framework for CS2 server plugins
|
What each player, or everyone, was last sent on one screen, so an unchanged write is skipped. More...
#include <WriteCache.hpp>
Public Member Functions | |
| bool | Changed (int slot, WriteKind kind, std::string_view elementId, std::string_view name, std::string_view value) |
| bool | CursorChanged (int slot, bool shown) |
| bool | IsFirstFailure (int slot) |
| void | Invalidate (int slot) |
| void | RemoveSlot (int slot) |
| void | Clear () |
What each player, or everyone, was last sent on one screen, so an unchanged write is skipped.
A networked layout stays on screen without re-sending, so this turns a full redraw into writes for only what changed. SDK-free for its tests.
Definition at line 26 of file WriteCache.hpp.
| bool VoltMod::WriteCache::Changed | ( | int | slot, |
| WriteKind | kind, | ||
| std::string_view | elementId, | ||
| std::string_view | name, | ||
| std::string_view | value | ||
| ) |
True when value differs from what slot (or EveryoneSlot) was last sent, remembering it.
Definition at line 28 of file WriteCache.cpp.
References VoltMod::ReadFile().
Referenced by VoltMod::ScreenEntity::WriteClass(), and VoltMod::ScreenEntity::WriteText().
| void VoltMod::WriteCache::Clear | ( | ) |
A new entity has been told nothing.
Definition at line 94 of file WriteCache.cpp.
References VoltMod::PerSlot< T >::ResetAll().
Referenced by VoltMod::ScreenEntity::Remove().
True when shown differs from the cursor state slot was last sent, remembering it.
Definition at line 53 of file WriteCache.cpp.
References VoltMod::ReadFile().
Referenced by VoltMod::ScreenEntity::WriteCursor().
After a failed write, so the next one goes through. The failure still logs once.
Definition at line 77 of file WriteCache.cpp.
References VoltMod::ReadFile().
True the first time it is asked for slot, so a failure that repeats every frame logs once.
Definition at line 65 of file WriteCache.cpp.
References VoltMod::ReadFile().
Another player took slot.
Definition at line 89 of file WriteCache.cpp.
References VoltMod::ReadFile(), and VoltMod::PerSlot< T >::Reset().
Referenced by VoltMod::ScreenEntity::ScreenEntity().