blob: c17c9d10e1cd421ae22fa7021f32a0cf0e41274f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
/*
* PARSEC HEADER: net_game_peer.h
*/
#ifndef _NET_GAME_PEER_H_
#define _NET_GAME_PEER_H_
// net_game_peer.c implements the following functions
// --------------------------------------------------
// size_t NETs_RmEvList_GetMaxSize();
// void NETs_UpdateKillStats( RE_KillStats* killstats );
// external functions ---------------------------------------------------------
//
// declare prototypes when we do not compile for shared lib gamecode support --
//
int NET_AcquireRemoteSlot ( node_t *node );
int NET_AddSlotRequest ( node_t *node, char *name, int timetag );
int NET_DelSlotRequest ( node_t *node );
int NET_MergeSlotRequests ( NetPacket_PEER* gamepacket, int timetag );
void NET_ResetSlotReqQueue ();
void NET_RmEvSinglePlayerTable ( NetPacket_PEER* gamepacket );
void NET_RmEvSingleConnectQueue ( NetPacket_PEER* gamepacket );
void NET_SetPacketKillStats ( NetPacket_PEER* gamepacket );
void NET_Translate_PKTP_JOIN ( NetPacket_PEER* gamepacket, RE_PlayerAndShipStatus* pShipStatus );
void NET_Translate_PKTP_GAME_STATE ( NetPacket_PEER* gamepacket, RE_PlayerAndShipStatus* pShipStatus, RE_KillStats* pKillStats );
void NET_Translate_PKTP_UNJOIN ( NetPacket_PEER* gamepacket, RE_PlayerAndShipStatus* pShipStatus, RE_KillStats* pKillStats );
void NET_Translate_PKTP_NODE_ALIVE ( NetPacket_PEER* gamepacket, RE_PlayerAndShipStatus* pShipStatus, RE_KillStats* pKillStats );
// special slotrequest timetags -----------------------------------------------
//
#define TIMETAG_LOCALHOST -1
#define TIMETAG_REPLYNOW -2
// slot request structure (entry in slot request queue) -----------------------
//
struct slotrequest_s {
int slotid;
int timetag;
node_t node;
char name[ MAX_PLAYER_NAME + 1 ];
};
// external variables ---------------------------------------------------------
//
extern int NumSlotRequests;
extern slotrequest_s SlotReqQueue[];
#endif // _NET_PEER_H_
|