VoltMod
C++23 framework for CS2 server plugins
Loading...
Searching...
No Matches
Notify.hpp
Go to the documentation of this file.
1#pragma once
2
4#include <cstdint>
5
6namespace VoltMod::Schema
7{
8
9/** Dirty the field at @p offset on @p entity for the next snapshot. */
10void NotifyEntity(::CEntityInstance* entity, int32_t offset);
11
12/**
13 * Dirty the field at @p offset on a component whose owner link (the engine's `__m_pChainEntity`)
14 * sits at @p ownerLinkOffset.
15 *
16 * The engine wants the link's path index alongside the offset, and the entity to notify is the
17 * one the link points at - usually the component's own entity, but not always.
18 */
20
21/** The entity that owns @p component, read through its owner link; nullptr when unset. */
22::CEntityInstance* ComponentOwner(const void* component, int32_t ownerLinkOffset);
23
24} // namespace VoltMod::Schema
void NotifyComponentOwner(void *component, int32_t ownerLinkOffset, int32_t offset)
Definition Notify.cpp:30
void NotifyEntity(CEntityInstance *entity, int32_t offset)
Definition Notify.cpp:20
CEntityInstance * ComponentOwner(const void *component, int32_t ownerLinkOffset)
Definition Notify.cpp:46
static std::string ReadFile(const std::filesystem::path &path)
Definition Loader.cpp:56