VoltMod
C++23 framework for CS2 server plugins
Loading...
Searching...
No Matches
Slot.hpp
Go to the documentation of this file.
1#pragma once
2
3namespace VoltMod
4{
5
6/** Maximum player slots on a CS2 server (slots 0..MaxPlayers-1). */
7inline constexpr int MaxPlayers = 64;
8
9/** The slot value meaning everyone: a layout's global state rather than one player's. */
10inline constexpr int EveryoneSlot = -1;
11
12/** True if @p slot is a valid player-slot index. */
13inline constexpr bool IsValidSlot(int slot)
14{
15 return slot >= 0 && slot < MaxPlayers;
16}
17
18} // namespace VoltMod
static std::string ReadFile(const std::filesystem::path &path)
Definition Loader.cpp:56
constexpr bool IsValidSlot(int slot)
Definition Slot.hpp:13
constexpr int EveryoneSlot
Definition Slot.hpp:10
constexpr int MaxPlayers
Definition Slot.hpp:7