VoltMod
C++23 framework for CS2 server plugins
Loading...
Searching...
No Matches
Clock.cpp
Go to the documentation of this file.
3#include <globalvars.h>
4
5namespace VoltMod
6{
7
9
11{
12 return _interfaces.Engine ? _interfaces.Engine->GetServerGlobals() : nullptr;
13}
14
15int Clock::Tick() const
16{
17 auto* globals = Globals();
18 return globals ? globals->tickcount : 0;
19}
20
21float Clock::Time() const
22{
23 auto* globals = Globals();
24 return globals ? globals->curtime : 0.0f;
25}
26
27} // namespace VoltMod
float Time() const
Definition Clock.cpp:21
int Tick() const
Definition Clock.cpp:15
Clock(Interfaces &interfaces)
Definition Clock.cpp:8
CGlobalVars * Globals() const
Definition Clock.cpp:10
static std::string ReadFile(const std::filesystem::path &path)
Definition Loader.cpp:56
Centralized holder for all HL2SDK interface pointers.
IVEngineServer2 * Engine