Cavestory Mod API
|
Cavestory Networking. More...
Functions | |
CAVESTORY_MOD_API void | CaveNet_CreateTeam (int iTeamId, bool bClientSide, void *pOut) |
Create a team object. More... | |
CAVESTORY_MOD_API unsigned int | CaveNet_Client_GetGlobalTimerOffset () |
Get the global timer. More... | |
CAVESTORY_MOD_API bool | CaveNet_Client_IsInGui () |
Check if we're in a GUI. More... | |
CAVESTORY_MOD_API bool | CaveNet_Client_IsConnected () |
Check if we're connected to a server. More... | |
CAVESTORY_MOD_API int | CaveNet_Client_GetGhostId () |
Get our ghost ID. More... | |
CAVESTORY_MOD_API CaveNet::DataStructures::NetClient * | CaveNet_Client_ClientGroup_GetClient (int index) |
Get a client object. More... | |
CAVESTORY_MOD_API CaveNet::DataStructures::NetClient * | CaveNet_Client_ClientGroup_GetClientByGhostId (int ghost_id) |
Get a client object by their ghost id. More... | |
CAVESTORY_MOD_API int | CaveNet_Client_ClientGroup_GetClientCount () |
Get the amount of clients currently cached. More... | |
CAVESTORY_MOD_API unsigned int | CaveNet_Server_GetGlobalTimerOffset () |
Get the server-side global timer. More... | |
CAVESTORY_MOD_API bool | CaveNet_Server_IsHosting () |
Check if we're hosting a server. More... | |
CAVESTORY_MOD_API bool | CaveNet_Server_InLobby () |
Check if we're in the lobby. More... | |
CAVESTORY_MOD_API void | CaveNet_Server_EnterLobby () |
Enter the lobby. | |
CAVESTORY_MOD_API CaveNet::DataStructures::NetClient * | CaveNet_Server_ClientGroup_AddBot (const char *pBotName=NULL, const char *pCharName=NULL, unsigned char iColorR=0, unsigned char iColorG=0, unsigned char iColorB=0, bool bRandomColor=false) |
Create a bot. More... | |
CAVESTORY_MOD_API CaveNet::DataStructures::NetClient * | CaveNet_Server_ClientGroup_GetClient (int index) |
Get a client object. More... | |
CAVESTORY_MOD_API CaveNet::DataStructures::NetClient * | CaveNet_Server_ClientGroup_GetClientByGhostId (int ghost_id) |
Get a client object by their ghost id. More... | |
CAVESTORY_MOD_API int | CaveNet_Server_ClientGroup_GetClientCount () |
Get the amount of clients currently cached. More... | |
CAVESTORY_MOD_API void | CaveNet_Server_ClientGroup_TransmitSystemMessage (const char *pFormat,...) |
Transmit a system message. More... | |
CAVESTORY_MOD_API void | CaveNet_Server_ClientGroup_ReviveAllDeadPlayers () |
Revive all dead players. | |
CAVESTORY_MOD_API unsigned int | CaveNet_GetGlobalTimerOffset () |
Get the best global timer. More... | |
CAVESTORY_MOD_API void | CaveNet_ProcessNet (int type=-1) |
Process networking. More... | |
CAVESTORY_MOD_API char * | CaveNet_BuildDisconnectReasonString (char *pBuffer=NULL, unsigned int iBufferSize=0, CaveNet::NetDisconnectReason eDisconnectReason=CaveNet::NetDisconnectReason::NET_DISCONNECT_REASON_UNKNOWN, const char *pCustomReason=NULL, CaveNet::DataStructures::NetClient *pResponsibleClient=NULL) |
Build a disconnect reason string. More... | |
CAVESTORY_MOD_API bool | CSM_CaveNet_ConnectedAsClient () |
Check to see whether we're connected to a server or not. More... | |
CAVESTORY_MOD_API bool | CSM_CaveNet_IsHosting () |
Check to see whether we're hosting a server. More... | |
CAVESTORY_MOD_API int | CSM_CaveNet_GetClientCount () |
Get how many clients are currently connected to the server. More... | |
CAVESTORY_MOD_API int | CSM_CaveNet_GetRealClientCount () |
Get how many clients are currently connected to the server, excluding AI players. More... | |
CAVESTORY_MOD_API BOOL | CSM_CaveNet_SendUserCmdToClient (CaveNet::DataStructures::NetClient *pClient, int iArg1=0, int iArg2=0, int iArg3=0, int iArg4=0, int iArg5=0, int iArg6=0, const char *pString1=NULL) |
Send a user command to a connected client. More... | |
CAVESTORY_MOD_API BOOL | CSM_CaveNet_SendUserCmdToServer (int iArg1=0, int iArg2=0, int iArg3=0, int iArg4=0, int iArg5=0, int iArg6=0, const char *pString1=NULL) |
Send a user command to the server we're connected to. More... | |
Cavestory Networking.
Cavestory Multiplayer Backend
CAVESTORY_MOD_API char* CaveNet_BuildDisconnectReasonString | ( | char * | pBuffer = NULL , |
unsigned int | iBufferSize = 0 , |
||
CaveNet::NetDisconnectReason | eDisconnectReason = CaveNet::NetDisconnectReason::NET_DISCONNECT_REASON_UNKNOWN , |
||
const char * | pCustomReason = NULL , |
||
CaveNet::DataStructures::NetClient * | pResponsibleClient = NULL |
||
) |
Build a disconnect reason string.
pBuffer | The buffer that will hold the built string. Can be NULL to use a global buffer. Do not use this in any non-main thread. |
iBufferSize | The size of the buffer. |
eDisconnectReason | The reason for the disconnect. |
pCustomReason | The custom reason, if applicable to the disconnect reason. Can be NULL. |
pResponsibleClient | The client responsible for this disconnect. Can be NULL. |
CAVESTORY_MOD_API CaveNet::DataStructures::NetClient* CaveNet_Client_ClientGroup_GetClient | ( | int | index | ) |
Get a client object.
int | index The index of the client. |
CAVESTORY_MOD_API CaveNet::DataStructures::NetClient* CaveNet_Client_ClientGroup_GetClientByGhostId | ( | int | ghost_id | ) |
Get a client object by their ghost id.
int | ghost_id The ghost ID. |
CAVESTORY_MOD_API int CaveNet_Client_ClientGroup_GetClientCount | ( | ) |
Get the amount of clients currently cached.
CAVESTORY_MOD_API int CaveNet_Client_GetGhostId | ( | ) |
Get our ghost ID.
CAVESTORY_MOD_API unsigned int CaveNet_Client_GetGlobalTimerOffset | ( | ) |
Get the global timer.
CAVESTORY_MOD_API bool CaveNet_Client_IsConnected | ( | ) |
Check if we're connected to a server.
CAVESTORY_MOD_API bool CaveNet_Client_IsInGui | ( | ) |
Check if we're in a GUI.
CAVESTORY_MOD_API void CaveNet_CreateTeam | ( | int | iTeamId, |
bool | bClientSide, | ||
void * | pOut | ||
) |
Create a team object.
CAVESTORY_MOD_API unsigned int CaveNet_GetGlobalTimerOffset | ( | ) |
Get the best global timer.
If a server is being hosted in this game instance, it will return the server's global timer. Otherwise, it will return the client-side global timer.
CAVESTORY_MOD_API void CaveNet_ProcessNet | ( | int | type = -1 | ) |
Process networking.
type | The type of networking to process. Just use -1. |
CAVESTORY_MOD_API CaveNet::DataStructures::NetClient* CaveNet_Server_ClientGroup_AddBot | ( | const char * | pBotName = NULL , |
const char * | pCharName = NULL , |
||
unsigned char | iColorR = 0 , |
||
unsigned char | iColorG = 0 , |
||
unsigned char | iColorB = 0 , |
||
bool | bRandomColor = false |
||
) |
Create a bot.
pBotName | The name for this bot. |
pCharName | The character name for this bot. Leave as 'NULL' to pick a random character. |
iColorR | The bot's custom red value. |
iColorG | The bot's custom green value. |
iColorB | The bot's custom blue value. |
bRandomColor | Whether to use a random color. |
CAVESTORY_MOD_API CaveNet::DataStructures::NetClient* CaveNet_Server_ClientGroup_GetClient | ( | int | index | ) |
Get a client object.
int | index The index of the client. |
CAVESTORY_MOD_API CaveNet::DataStructures::NetClient* CaveNet_Server_ClientGroup_GetClientByGhostId | ( | int | ghost_id | ) |
Get a client object by their ghost id.
int | ghost_id The ghost ID. |
CAVESTORY_MOD_API int CaveNet_Server_ClientGroup_GetClientCount | ( | ) |
Get the amount of clients currently cached.
CAVESTORY_MOD_API void CaveNet_Server_ClientGroup_TransmitSystemMessage | ( | const char * | pFormat, |
... | |||
) |
Transmit a system message.
pFormat | The format of the message. |
... | Additional arguments. |
CAVESTORY_MOD_API unsigned int CaveNet_Server_GetGlobalTimerOffset | ( | ) |
Get the server-side global timer.
CAVESTORY_MOD_API bool CaveNet_Server_InLobby | ( | ) |
Check if we're in the lobby.
CAVESTORY_MOD_API bool CaveNet_Server_IsHosting | ( | ) |
Check if we're hosting a server.
CAVESTORY_MOD_API bool CSM_CaveNet_ConnectedAsClient | ( | ) |
Check to see whether we're connected to a server or not.
CAVESTORY_MOD_API int CSM_CaveNet_GetClientCount | ( | ) |
Get how many clients are currently connected to the server.
CAVESTORY_MOD_API int CSM_CaveNet_GetRealClientCount | ( | ) |
Get how many clients are currently connected to the server, excluding AI players.
CAVESTORY_MOD_API bool CSM_CaveNet_IsHosting | ( | ) |
Check to see whether we're hosting a server.
CAVESTORY_MOD_API BOOL CSM_CaveNet_SendUserCmdToClient | ( | CaveNet::DataStructures::NetClient * | pClient, |
int | iArg1 = 0 , |
||
int | iArg2 = 0 , |
||
int | iArg3 = 0 , |
||
int | iArg4 = 0 , |
||
int | iArg5 = 0 , |
||
int | iArg6 = 0 , |
||
const char * | pString1 = NULL |
||
) |
Send a user command to a connected client.
pClient | The recipient. |
iArg1 | Optional data to be sent. |
iArg2 | Optional data to be sent. |
iArg3 | Optional data to be sent. |
iArg4 | Optional data to be sent. |
iArg5 | Optional data to be sent. |
iArg6 | Optional data to be sent. |
pString1 | Optional data to be sent. |
CAVESTORY_MOD_API BOOL CSM_CaveNet_SendUserCmdToServer | ( | int | iArg1 = 0 , |
int | iArg2 = 0 , |
||
int | iArg3 = 0 , |
||
int | iArg4 = 0 , |
||
int | iArg5 = 0 , |
||
int | iArg6 = 0 , |
||
const char * | pString1 = NULL |
||
) |
Send a user command to the server we're connected to.
iArg1 | Optional data to be sent. |
iArg2 | Optional data to be sent. |
iArg3 | Optional data to be sent. |
iArg4 | Optional data to be sent. |
iArg5 | Optional data to be sent. |
iArg6 | Optional data to be sent. |
pString1 | Optional data to be sent. |