ViewVC Help
View File | Revision Log | View Changeset | Root Listing
root/Oni2/Daodan/MSVC/Flatline.h
(Generate patch)

Comparing Daodan/MSVC/Flatline.h (file contents):
Revision 579 by gumby, Thu Jan 13 01:02:52 2011 UTC vs.
Revision 580 by gumby, Fri Jan 14 07:39:14 2011 UTC

# Line 128 | Line 128 | typedef struct {
128          int Kills;
129          int Damage;
130          int Deaths;
131 <
131 >        uint16_t Ping;
132   } player_data;
133  
134   //todo, move health in...
# Line 161 | Line 161 | typedef struct {
161                  rare_sync_data  rare_sync_data;
162                  uint16_t                sync_request;
163                  flatline_event  flatline_event;
164 +                uint32_t                ping;
165          };
166   } flatline_packet;
167   #define FLATLINE_HEADER (sizeof(flatline_packet)-sizeof(char)*1080)
# Line 186 | Line 187 | enum {
187          RARE_SYNC_DATA,
188          RARE_SYNC_DATA_REQUEST,
189          FLATLINE_EVENT,
190 +        PK_PING,
191 +        PK_PONG,
192   };
193  
194   enum FlatlineEvent {
# Line 227 | Line 230 | typedef struct {
230          uint16_t state;
231          int flags;
232          int DeathTime;
233 +        uint32_t Ping;
234 +        bool DataApplied;
235   } player_info;
236  
237   player_info * FLr_FindEmptySlot();
# Line 234 | Line 239 | uint16_t FLr_FindEmptyListSlot();
239   void * ONICALL FLrInput_Update_Keys(void);
240  
241   void NetCatchError();
242 < #define MAX_PLAYERS 128
242 > #define MAX_PLAYERS 32
243   #define CONNECTION_TIMEOUT 15
244   #define MAX_CONNECTIONS 32
245   #define NetTCPSocket_Send NetUDPSocket_Send
# Line 245 | Line 250 | extern sockaddr_in client_address;
250   extern sockaddr_in address;
251   extern player_info Players[];
252   extern player_info * PlayerList[];
253 +
254   int UDPServer_SendToAll(void* packet, int size);
255 +
256   extern bool client_connected;
257   extern bool server_started;
258   extern char player_name[];
259 +
260   void FLrRun_Scores();
261   void FLrPlayerDisconnect( int Player );
262   void FLrPlayerRespawn( int Player );
263   int FLrEvent_GetNumArgs( int eventIndex );
264 +
265 + extern unsigned int lastPingTime;
266   #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)