11 const Entity proxy = entities.
Find(
"cs_gamerules");
17 return std::unexpected(
Error::NotReady(
"no game rules: is a map running?"));
22 if (!_bindings.TerminateRound)
24 return std::unexpected(
Error::Unsupported(
"the CCSGameRules::TerminateRound signature did not bind"));
41 _bindings.TerminateRound(rules.
Base(), delaySeconds,
static_cast<uint32_t
>(reason),
nullptr);
runtime.Entities: finds and creates entities. Everything it returns is valid for this frame only; see...
Entity Find(std::string_view className)
A live entity, valid for this frame only.
CEntityInstance * Raw() const noexcept
Status SetTime(int seconds) const
Status End(RoundEndReason reason, float delaySeconds) const
std::optional< float > TimeLeft() const
CCSGameRules GameRules() const
void SetRoundTime(int32_t value) const
int32_t RoundTime() const
float RoundStartTime() const
void * Base() const noexcept
std::expected< void, Error > Status
static Schema::CCSGameRules GameRules(EntitySystem &entities)
static Status NoGameRules()
static Error Unsupported(std::string detail)
static Error NotReady(std::string detail)