|
VoltMod
C++23 framework for CS2 server plugins
|
#include <IPluginEvents.hpp>
Public Types | |
| using | FrameFn = void (*)(void* context) |
| using | ServerStartupFn = void (*)(void* context, std::string_view mapName) |
| using | ClientConnectingFn |
| using | ClientConnectedFn |
| using | ClientDisconnectedFn = void (*)(void* context, int slot) |
| using | ClientFullyConnectedFn = void (*)(void* context, int slot) |
| using | ClientSettingsChangedFn = void (*)(void* context, int slot) |
| using | ConsoleCommandFn = bool (*)(void* context, std::string_view name, std::string_view arguments, int slot) |
| using | CheckTransmitFn = void (*)(void* context, CCheckTransmitInfo** infoList, int infoCount) |
| using | BuildGameSessionManifestFn = void (*)(void* context, IEntityResourceManifest* manifest) |
| using | PlayerCommandFn = void (*)(void* context, int slot, const PlayerInput& input) |
| using | ButtonPressFn = void (*)(void* context, int slot, std::string_view buttonId) |
Public Member Functions | |
| virtual uint64_t | OnFrame (FrameFn callback, void *context)=0 |
| virtual uint64_t | OnServerStartup (ServerStartupFn callback, void *context)=0 |
| virtual uint64_t | OnClientConnecting (ClientConnectingFn callback, void *context)=0 |
| virtual uint64_t | OnClientConnected (ClientConnectedFn callback, void *context)=0 |
| virtual uint64_t | OnClientDisconnected (ClientDisconnectedFn callback, void *context)=0 |
| virtual uint64_t | OnClientFullyConnected (ClientFullyConnectedFn callback, void *context)=0 |
| virtual uint64_t | OnClientSettingsChanged (ClientSettingsChangedFn callback, void *context)=0 |
| virtual uint64_t | OnConsoleCommand (ConsoleCommandFn callback, void *context)=0 |
| virtual uint64_t | OnCheckTransmit (CheckTransmitFn callback, void *context)=0 |
| virtual uint64_t | OnBuildGameSessionManifest (BuildGameSessionManifestFn callback, void *context)=0 |
| virtual uint64_t | OnPlayerCommand (PlayerCommandFn callback, void *context)=0 |
| virtual uint64_t | OnPlayerCommandDone (PlayerCommandFn callback, void *context)=0 |
| virtual uint64_t | OnButtonPress (ButtonPressFn callback, void *context)=0 |
| virtual void | Unsubscribe (uint64_t token)=0 |
Protected Member Functions | |
| ~IPluginEvents ()=default | |
Engine events, raised on every plugin in load order. Game thread only; a callback must not throw across the module boundary.
Definition at line 14 of file IPluginEvents.hpp.
| using VoltMod::IPluginEvents::BuildGameSessionManifestFn = void (*)(void* context, IEntityResourceManifest* manifest) |
The next map's resource manifest, which only takes resources during this call.
Definition at line 31 of file IPluginEvents.hpp.
| using VoltMod::IPluginEvents::ButtonPressFn = void (*)(void* context, int slot, std::string_view buttonId) |
A custom HUD button press, raised on the frame after it arrived. buttonId is client text.
Definition at line 35 of file IPluginEvents.hpp.
| using VoltMod::IPluginEvents::CheckTransmitFn = void (*)(void* context, CCheckTransmitInfo** infoList, int infoCount) |
Definition at line 29 of file IPluginEvents.hpp.
Definition at line 22 of file IPluginEvents.hpp.
True refuses the player: later plugins are not asked, and the engine shows reason, which the callback fills with at most reasonSize bytes including the terminator.
Definition at line 20 of file IPluginEvents.hpp.
| using VoltMod::IPluginEvents::ClientDisconnectedFn = void (*)(void* context, int slot) |
Definition at line 24 of file IPluginEvents.hpp.
| using VoltMod::IPluginEvents::ClientFullyConnectedFn = void (*)(void* context, int slot) |
Definition at line 25 of file IPluginEvents.hpp.
| using VoltMod::IPluginEvents::ClientSettingsChangedFn = void (*)(void* context, int slot) |
Definition at line 26 of file IPluginEvents.hpp.
| using VoltMod::IPluginEvents::ConsoleCommandFn = bool (*)(void* context, std::string_view name, std::string_view arguments, int slot) |
True when this plugin answered it: later plugins do not see it and the engine call is blocked.
Definition at line 28 of file IPluginEvents.hpp.
| using VoltMod::IPluginEvents::FrameFn = void (*)(void* context) |
Definition at line 16 of file IPluginEvents.hpp.
| using VoltMod::IPluginEvents::PlayerCommandFn = void (*)(void* context, int slot, const PlayerInput& input) |
A player's command, decoded once for every plugin.
Definition at line 33 of file IPluginEvents.hpp.
| using VoltMod::IPluginEvents::ServerStartupFn = void (*)(void* context, std::string_view mapName) |
Definition at line 17 of file IPluginEvents.hpp.
|
protecteddefault |
|
pure virtual |
Implemented in VoltMod::PluginContext.
|
pure virtual |
Implemented in VoltMod::PluginContext.
Referenced by VoltMod::WatchPresses().
|
pure virtual |
Implemented in VoltMod::PluginContext.
|
pure virtual |
Implemented in VoltMod::PluginContext.
|
pure virtual |
Before the engine admits a player, and before OnClientConnected.
Implemented in VoltMod::PluginContext.
|
pure virtual |
Implemented in VoltMod::PluginContext.
|
pure virtual |
Implemented in VoltMod::PluginContext.
|
pure virtual |
Implemented in VoltMod::PluginContext.
|
pure virtual |
Implemented in VoltMod::PluginContext.
|
pure virtual |
Implemented in VoltMod::PluginContext.
|
pure virtual |
Before the engine runs a player's command. Commands are decoded only while one is subscribed.
Implemented in VoltMod::PluginContext.
Referenced by VoltMod::WatchCommands().
|
pure virtual |
After the engine ran it.
Implemented in VoltMod::PluginContext.
Referenced by VoltMod::WatchCommands().
|
pure virtual |
Implemented in VoltMod::PluginContext.
|
pure virtual |
Takes the token a subscription returned, which is never zero. Safe during a dispatch.
Implemented in VoltMod::PluginContext.
Referenced by VoltMod::Internal::HostSubscription().