r5sdk/r5dev/common/protocol.h
Kawe Mazidjatari e14934d244 Fix persistence state for s0/s1 builds
CVEngineServer::IsPersistenceAvailable() is inline with Persistence_SetXP in S0 and S1. the virtual function never gets fired.
The approach for S0/S1 will call CVEngineServer::IsPersistenceAvailable() when Persistence_SetXP() is ran (the first function to ever use pClient->m_nPersistenceState after the SendServerInfo query).
2022-07-08 23:42:28 +02:00

32 lines
1.4 KiB
C

#pragma once
/*-----------------------------------------------------------------------------
* _protocol.h
*-----------------------------------------------------------------------------*/
enum class SIGNONSTATE : int
{
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_GETTING_DATA = 5, // getting persistence data.
SIGNONSTATE_SPAWN = 6, // ready to receive entity packets.
SIGNONSTATE_FIRST_SNAP = 7, // received baseline snapshot.
SIGNONSTATE_FULL = 8, // we are fully connected; first non-delta packet received.
SIGNONSTATE_CHANGELEVEL = 9, // server is changing level; please wait.
};
enum class PERSISTENCE : int
{
PERSISTENCE_NONE = 0, // no persistence data for this client yet.
PERSISTENCE_PENDING = 1, // pending or processing persistence data.
PERSISTENCE_AVAILABLE = 2, // persistence is available for this client.
#if defined (GAMEDLL_S0) || defined (GAMEDLL_S1) || defined (GAMEDLL_S2)
PERSISTENCE_READY = 3 // persistence is ready for this client.
#else
PERSISTENCE_READY = 5 // persistence is ready for this client.
#endif
};