| 128 |
|
int Kills; |
| 129 |
|
int Damage; |
| 130 |
|
int Deaths; |
| 131 |
< |
|
| 131 |
> |
uint16_t Ping; |
| 132 |
|
} player_data; |
| 133 |
|
|
| 134 |
|
//todo, move health in... |
| 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) |
| 187 |
|
RARE_SYNC_DATA, |
| 188 |
|
RARE_SYNC_DATA_REQUEST, |
| 189 |
|
FLATLINE_EVENT, |
| 190 |
+ |
PK_PING, |
| 191 |
+ |
PK_PONG, |
| 192 |
|
}; |
| 193 |
|
|
| 194 |
|
enum FlatlineEvent { |
| 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(); |
| 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 |
| 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 |