VoltMod
C++23 framework for CS2 server plugins
Loading...
Searching...
No Matches
Team.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <cstdint>
4
5
namespace
VoltMod
6
{
7
8
/** Engine team indices, as `m_iTeamNum` holds them. SDK-free so command parsing can share them. */
9
enum class
Team
:
uint8_t
10
{
11
None
= 0,
12
Spectator
= 1,
13
T
= 2,
14
CT
= 3,
15
};
16
17
/** True for the two teams that play a round. */
18
constexpr
bool
IsPlaying
(
Team
team
)
19
{
20
return
team
==
Team::T
||
team
==
Team::CT
;
21
}
22
23
/** The other playing team; @ref Team::None for a team that does not play. */
24
constexpr
Team
Opposite
(
Team
team
)
25
{
26
switch
(
team
)
27
{
28
case
Team::T
:
29
return
Team::CT
;
30
case
Team::CT
:
31
return
Team::T
;
32
default
:
33
return
Team::None
;
34
}
35
}
36
37
}
// namespace VoltMod
VoltMod
Definition
Options.hpp:13
VoltMod::Team
Team
Definition
Team.hpp:10
VoltMod::Team::CT
@ CT
VoltMod::Team::Spectator
@ Spectator
VoltMod::Team::None
@ None
VoltMod::Team::T
@ T
VoltMod::IsPlaying
constexpr bool IsPlaying(Team team)
Definition
Team.hpp:18
VoltMod::ReadFile
static std::string ReadFile(const std::filesystem::path &path)
Definition
Loader.cpp:56
VoltMod::Opposite
constexpr Team Opposite(Team team)
Definition
Team.hpp:24
include
VoltMod
Engine
Team.hpp
Generated by
1.9.8