mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-05-23 07:23:05 +00:00
Keep network player limit as an int constant
This commit is contained in:
parent
50693bfc20
commit
85208b12b7
|
|
@ -1,4 +1,8 @@
|
|||
|
||||
#pragma once
|
||||
#include <cstdint>
|
||||
#include <limits>
|
||||
|
||||
const int MINECRAFT_NET_MAX_PLAYERS = 8;
|
||||
constexpr int MINECRAFT_NET_MAX_PLAYERS = 8;
|
||||
|
||||
static_assert(MINECRAFT_NET_MAX_PLAYERS <= std::numeric_limits<std::uint8_t>::max(),
|
||||
"MINECRAFT_NET_MAX_PLAYERS must fit in the 8-bit network protocol");
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@
|
|||
#include <stdarg.h>
|
||||
#include <string>
|
||||
#include <functional>
|
||||
#include <cstdint>
|
||||
#include <limits>
|
||||
|
||||
#include "../../../Minecraft.Client/Rendering/Models/SkinBox.h"
|
||||
|
||||
|
|
@ -17,12 +19,15 @@ const int XUSER_INDEX_FOCUS = 254;
|
|||
|
||||
#ifdef __PSVITA__
|
||||
const int XUSER_MAX_COUNT = 1;
|
||||
const int MINECRAFT_NET_MAX_PLAYERS = 4;
|
||||
constexpr int MINECRAFT_NET_MAX_PLAYERS = 4;
|
||||
#else
|
||||
const int XUSER_MAX_COUNT = 4;
|
||||
const int MINECRAFT_NET_MAX_PLAYERS = 8;
|
||||
constexpr int MINECRAFT_NET_MAX_PLAYERS = 8;
|
||||
#endif
|
||||
|
||||
static_assert(MINECRAFT_NET_MAX_PLAYERS <= std::numeric_limits<std::uint8_t>::max(),
|
||||
"MINECRAFT_NET_MAX_PLAYERS must fit in the 8-bit network protocol");
|
||||
|
||||
#ifdef __ORBIS__
|
||||
#include <net.h>
|
||||
#include <np/np_npid.h>
|
||||
|
|
|
|||
Loading…
Reference in a new issue