VoltMod
C++23 framework for CS2 server plugins
Loading...
Searching...
No Matches
Loader.cpp File Reference
#include "Loader/Loader.hpp"
#include "Host/LoaderHandoff.hpp"
#include "Loader/GameSearchPaths.hpp"
#include "Loader/KHookForwarder.hpp"
#include <cstring>
#include <engine2/isource2server.h>
#include <engine2/isource2serverconfig.h>
#include <filesystem>
#include <fstream>
#include <iterator>
#include <khook.hpp>
#include <khook/memory.hpp>
#include <string>
#include <system_error>
#include <tier0/dbg.h>
#include <tier0/icommandline.h>
#include <utility>

Go to the source code of this file.

Namespaces

namespace  VoltMod

Functions

template<class Fn>
static Fn VoltMod::SwapSlot (void *object, int index, Fn replacement)
static std::filesystem::path VoltMod::GameDir ()
static std::string VoltMod::ReadFile (const std::filesystem::path &path)
static InterfaceFactory VoltMod::LoadNextServer ()
static InterfaceFactory VoltMod::FindNextFactory ()
static void VoltMod::StartHost ()
static bool VoltMod::OnConnect (void *config, InterfaceFactory engineFactory)
static InitReturnVal_t VoltMod::OnInit (void *server)
static void VoltMod::StopHost ()
static void VoltMod::OnShutdown (void *server)
static void VoltMod::OnDisconnect (void *config)
static void VoltMod::Patch (const char *name, void *object)
void * CreateInterface (const char *name, int *returnCode)

Variables

static KHookForwarder VoltMod::g_dispatcher
static std::string VoltMod::g_gameDir
static LoaderHandoff VoltMod::g_start {.HookDispatcher = &g_dispatcher}
static HostStopFn VoltMod::g_stopHost = nullptr
static bool(* VoltMod::g_connect )(void *config, InterfaceFactory engineFactory) = nullptr
static void(* VoltMod::g_disconnect )(void *config) = nullptr
static InitReturnVal_t(* VoltMod::g_init )(void *server) = nullptr
static void(* VoltMod::g_shutdown )(void *server) = nullptr

Function Documentation

◆ CreateInterface()

void * CreateInterface ( const char * name,
int * returnCode )

The engine loads this module as server_valve and asks it for the game server's interfaces.

Definition at line 208 of file Loader.cpp.

References VoltMod::FindNextFactory(), and VoltMod::Patch.