2015-05-15 03:36:57 +02:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
enum constants
|
|
|
|
{
|
|
|
|
// was 5
|
|
|
|
NETMSG_TYPE_BITS = 6, // 2^NETMSG_TYPE_BITS > SVC_LASTMSG
|
|
|
|
|
|
|
|
// was 96000
|
|
|
|
NET_MAX_PAYLOAD = 288000, // largest message size in bytes
|
|
|
|
|
2015-05-15 07:15:11 +02:00
|
|
|
NET_MAX_PAYLOAD_BITS_OLD = 17, // for old demos
|
|
|
|
NET_MAX_PAYLOAD_BITS = 19, // 2^NET_MAX_PAYLOAD_BITS > NET_MAX_PAYLOAD
|
2015-05-15 03:36:57 +02:00
|
|
|
|
|
|
|
// table index is sent in log2(MAX_TABLES) bits
|
|
|
|
MAX_TABLES = 32, // Table id is 4 bits
|
|
|
|
|
|
|
|
// How many bits to use to encode an edict.
|
|
|
|
MAX_EDICT_BITS = 11, // # of bits needed to represent max edicts
|
|
|
|
|
|
|
|
// Max # of edicts in a level
|
|
|
|
MAX_EDICTS = (1 << MAX_EDICT_BITS),
|
|
|
|
MAX_DECAL_INDEX_BITS = 9,
|
2017-05-28 01:17:46 +02:00
|
|
|
|
|
|
|
SP_MODEL_INDEX_BITS_OLD = 11,
|
|
|
|
SP_MODEL_INDEX_BITS = 13,
|
|
|
|
|
2015-05-15 03:36:57 +02:00
|
|
|
MAX_SERVER_CLASS_BITS = 9,
|
|
|
|
|
|
|
|
MAX_EVENT_NAME_LENGTH = 32,
|
|
|
|
MAX_EVENT_BITS = 9,
|
|
|
|
MAX_EVENT_NUMBER = (1 << MAX_EVENT_BITS),
|
|
|
|
MAX_EVENT_BYTES = 1024,
|
|
|
|
|
|
|
|
DELTASIZE_BITS = 20, // must be: 2^DELTASIZE_BITS > (NET_MAX_PAYLOAD * 8)
|
|
|
|
EVENT_INDEX_BITS = 8,
|
2015-05-15 07:24:24 +02:00
|
|
|
|
|
|
|
MAX_SOUND_INDEX_BITS_OLD = 13,
|
|
|
|
MAX_SOUND_INDEX_BITS = 14,
|
2015-05-15 03:36:57 +02:00
|
|
|
|
|
|
|
MAX_USER_MSG_DATA = 255,
|
|
|
|
|
|
|
|
SIGNONSTATE_NONE = 0, // no state yet, about to connect
|
|
|
|
SIGNONSTATE_CHALLENGE = 1, // client challenging server, all OOB packets
|
|
|
|
SIGNONSTATE_CONNECTED = 2, // client is connected to server, netchans ready
|
|
|
|
SIGNONSTATE_NEW = 3, // just got serverinfo and string tables
|
|
|
|
SIGNONSTATE_PRESPAWN = 4, // received signon buffers
|
|
|
|
SIGNONSTATE_SPAWN = 5, // ready to receive entity packets
|
|
|
|
SIGNONSTATE_FULL = 6, // we are fully connected, first non-delta packet received
|
2015-05-28 04:58:53 +02:00
|
|
|
SIGNONSTATE_CHANGELEVEL = 7, // server is changing level, please wait
|
|
|
|
|
2021-05-01 18:38:37 +02:00
|
|
|
MAX_STRINGTABLE_DATA = 2 * 524288, // 2^19
|
|
|
|
|
|
|
|
NUM_NETWORKED_EHANDLE_SERIAL_NUMBER_BITS = 10
|
2015-05-15 03:36:57 +02:00
|
|
|
};
|