VoltMod
C++23 framework for CS2 server plugins
Loading...
Searching...
No Matches
VoltMod::EngineHooks Class Reference

The engine hooks, installed once for the whole process. More...

#include <EngineHooks.hpp>

Public Member Functions

 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)
 
 EngineHooks (const EngineHooks &)=delete
 
EngineHooks & operator= (const EngineHooks &)=delete
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ EngineHooks() [1/2]

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 
)
Parameters
beforeFrameRuns at the start of every frame, before the frame reaches the plugins.
beforeServerStartupRuns on every map change, before the plugins hear about it.
beforeClientConnectedRuns with each connecting client's SteamID, before the plugins hear about it.
afterClientDisconnectedRuns 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.

◆ EngineHooks() [2/2]

VoltMod::EngineHooks::EngineHooks ( const EngineHooks &  )
delete

Member Function Documentation

◆ operator=()

EngineHooks & VoltMod::EngineHooks::operator= ( const EngineHooks &  )
delete

The documentation for this class was generated from the following files: