17 return std::unexpected(
Error::NotReady(
"IGameResourceService not available"));
21 return std::unexpected(
Error::Unsupported(
"the GameEntitySystem offset did not bind"));
25 return std::unexpected(
Error::Unsupported(
"CreateEntityByName or DispatchSpawn did not bind"));
54 if (!
prop.Skin.empty())
58 if (!
prop.CastsShadow)
73 entity.AcceptInput(
"DisableCollision");
Entity Create(std::string_view className)
Entity SpawnProp(const PropSpec &prop)
Entity SpawnBeam(const Vector &from, const Vector &to, float width, Color color)
Entity Spawn(std::string_view className, KeyValues &values)
Entity SpawnLine(std::string_view effect, const Vector &from, EntityRef end)
Entity SpawnParticle(std::string_view effect, const Vector &origin, const QAngle &angles={0.0f, 0.0f, 0.0f})
A live entity, valid for this frame only.
Spawn keyvalues such as "origin", "spawnflags" or "effect_name".
KeyValues & Set(std::string_view key, std::string_view value)
void SetWidth(float value) const
void SetControlPointRef(size_t index, EntityRef value) const
static std::string ReadFile(const std::filesystem::path &path)
static constexpr int SolidNone
std::expected< void, Error > Status
static constexpr int SolidVPhysics
Fn< void(CEntityInstance *, CEntityKeyValues *)> DispatchSpawn
Fn< CEntityInstance *(const char *, int)> CreateEntityByName
Offset< CGameEntitySystem * > GameEntitySystem
An RGBA color in the engine's byte order, as m_clrRender and glow colors hold it.
static Error Unsupported(std::string detail)
static Error NotReady(std::string detail)
IGameResourceService * GameResourceService