|
VoltMod
C++23 framework for CS2 server plugins
|
runtime.Rounds: the running round's timer, and ending the round with the engine's own win panel and round_end, even with mp_ignore_round_win_conditions on. Team scores are not changed. More...
#include <Rounds.hpp>
Public Member Functions | |
| Rounds (EntitySystem &entities, const Bindings &bindings, const Clock &clock) | |
| Rounds (const Rounds &)=delete | |
| Rounds & | operator= (const Rounds &)=delete |
| Status | Available () const |
| Status | End (RoundEndReason reason, float delaySeconds) const |
| Status | SetTime (int seconds) const |
| std::optional< float > | TimeLeft () const |
runtime.Rounds: the running round's timer, and ending the round with the engine's own win panel and round_end, even with mp_ignore_round_win_conditions on. Team scores are not changed.
Game-thread only.
Definition at line 32 of file Rounds.hpp.
|
inline |
All three must outlive this service.
Definition at line 36 of file Rounds.hpp.
Referenced by operator=(), and Rounds().
|
delete |
References Rounds().
| Status VoltMod::Rounds::Available | ( | ) | const |
Whether End works: unsupported when the TerminateRound signature did not bind.
Definition at line 20 of file Rounds.cpp.
References VoltMod::Error::Unsupported().
Referenced by End().
| Status VoltMod::Rounds::End | ( | RoundEndReason | reason, |
| float | delaySeconds ) const |
End the round for reason; the next one starts after delaySeconds.
Definition at line 29 of file Rounds.cpp.
References Available(), VoltMod::Schema::View::Base(), VoltMod::GameRules(), and VoltMod::NoGameRules().
| Status VoltMod::Rounds::SetTime | ( | int | seconds | ) | const |
Sets the running round to last seconds from its start, whatever mp_roundtime says; the round timer shows it at once. The next round starts from mp_roundtime again.
Definition at line 45 of file Rounds.cpp.
References VoltMod::GameRules(), VoltMod::NoGameRules(), and VoltMod::Schema::CCSGameRules::SetRoundTime().
| std::optional< float > VoltMod::Rounds::TimeLeft | ( | ) | const |
Seconds until the round timer runs out, below 0 once it has; empty when no map is running.
Definition at line 56 of file Rounds.cpp.
References VoltMod::GameRules(), VoltMod::Schema::CCSGameRules::RoundStartTime(), and VoltMod::Schema::CCSGameRules::RoundTime().