|
VoltMod
C++23 framework for CS2 server plugins
|
The engine hooks, installed once for the whole process. More...
#include <EngineHooks.hpp>
Public Member Functions | |
| EngineHooks (PluginRegistry ®istry, const EngineInterfaces &engine, std::function< void()> beforeFrame, std::function< void()> beforeServerStartup, std::function< void(int64_t)> beforeClientConnected, std::function< void(int64_t)> afterClientDisconnected) | |
| EngineHooks (const EngineHooks &)=delete | |
| EngineHooks & | operator= (const EngineHooks &)=delete |
The engine hooks, installed once for the whole process.
Each one raises the matching event on PluginRegistry, which calls every loaded plugin in load order. Game thread only, like everything downstream of it.
Definition at line 21 of file EngineHooks.hpp.
| VoltMod::EngineHooks::EngineHooks | ( | PluginRegistry & | registry, |
| const EngineInterfaces & | engine, | ||
| std::function< void()> | beforeFrame, | ||
| std::function< void()> | beforeServerStartup, | ||
| std::function< void(int64_t)> | beforeClientConnected, | ||
| std::function< void(int64_t)> | afterClientDisconnected | ||
| ) |
| beforeFrame | Runs at the start of every frame, before the frame reaches the plugins. |
| beforeServerStartup | Runs on every map change, before the plugins hear about it. |
| beforeClientConnected | Runs with each connecting client's SteamID, before the plugins hear about it. |
| afterClientDisconnected | Runs with the SteamID of each client that left, not one moved by a map change. |
Definition at line 81 of file EngineHooks.cpp.
References VoltMod::Subscriptions::Add(), VoltMod::AdmitClient(), VoltMod::ClientAddress(), VoltMod::Log::Error(), VoltMod::HookInterface(), VoltMod::HookSessionManifest(), VoltMod::Log::Info(), VoltMod::PluginRegistry::IsConnected(), VoltMod::IsValidSlot(), VoltMod::PluginRegistry::RaiseCheckTransmit(), VoltMod::PluginRegistry::RaiseClientDisconnected(), VoltMod::PluginRegistry::RaiseClientFullyConnected(), VoltMod::PluginRegistry::RaiseClientSettingsChanged(), VoltMod::PluginRegistry::RaiseFrame(), VoltMod::PluginRegistry::RaiseServerStartup(), VoltMod::ReadFile(), VoltMod::RunCommand(), and VoltMod::Text.
|
delete |
|
delete |