2004-02-20 05:37:47 +00:00
|
|
|
/*
|
2005-06-09 03:07:13 +00:00
|
|
|
client.h
|
2004-02-20 05:37:47 +00:00
|
|
|
|
2005-06-09 03:07:13 +00:00
|
|
|
quakeworld client processing
|
2004-02-20 05:37:47 +00:00
|
|
|
|
2005-06-09 03:07:13 +00:00
|
|
|
Copyright (C) 2004 Bill Currie <bill@taniwha.org>
|
2004-02-20 05:37:47 +00:00
|
|
|
|
2005-06-09 03:07:13 +00:00
|
|
|
Author: Bill Currie
|
|
|
|
Date: 2004/02/20
|
2004-02-20 05:37:47 +00:00
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU General Public License
|
|
|
|
as published by the Free Software Foundation; either version 2
|
|
|
|
of the License, or (at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
|
|
|
|
See the GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to:
|
|
|
|
|
|
|
|
Free Software Foundation, Inc.
|
|
|
|
59 Temple Place - Suite 330
|
|
|
|
Boston, MA 02111-1307, USA
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __client_h
|
|
|
|
#define __client_h
|
|
|
|
|
|
|
|
#include "netchan.h"
|
2004-02-22 06:19:38 +00:00
|
|
|
#include "qw/msg_backbuf.h"
|
2004-02-20 05:37:47 +00:00
|
|
|
|
2005-05-08 10:41:11 +00:00
|
|
|
#include "server.h"
|
|
|
|
|
2004-02-20 05:37:47 +00:00
|
|
|
typedef struct client_s {
|
2005-05-08 00:48:21 +00:00
|
|
|
// list of clients connected to a server
|
2005-05-07 13:57:07 +00:00
|
|
|
struct client_s *next;
|
|
|
|
struct client_s **prev;
|
2005-05-08 00:48:21 +00:00
|
|
|
// list of clients in general
|
|
|
|
struct client_s *clnext;
|
2004-02-20 05:37:47 +00:00
|
|
|
struct info_s *userinfo;
|
2004-02-21 05:09:02 +00:00
|
|
|
struct connection_s *con;
|
2005-05-08 06:35:46 +00:00
|
|
|
const char *name;
|
2004-02-21 05:09:02 +00:00
|
|
|
int drop;
|
2004-02-20 05:37:47 +00:00
|
|
|
netchan_t netchan;
|
2004-02-22 06:19:38 +00:00
|
|
|
backbuf_t backbuf;
|
2005-05-07 13:57:07 +00:00
|
|
|
sizebuf_t datagram;
|
|
|
|
byte datagram_buf[MAX_DATAGRAM];
|
2023-06-13 09:06:11 +00:00
|
|
|
bool send_message;
|
2005-05-08 10:41:11 +00:00
|
|
|
frame_t frames[UPDATE_BACKUP];
|
2007-05-07 14:58:53 +00:00
|
|
|
entity_state_t packet_entities[UPDATE_BACKUP][MAX_PACKET_ENTITIES];
|
2005-05-08 10:41:11 +00:00
|
|
|
|
|
|
|
int delta_sequence;
|
2005-05-07 13:57:07 +00:00
|
|
|
|
|
|
|
struct server_s *server;
|
2005-05-09 14:49:54 +00:00
|
|
|
unsigned spec_track;
|
2005-05-08 00:48:21 +00:00
|
|
|
|
|
|
|
int connected;
|
2005-05-08 06:35:46 +00:00
|
|
|
|
|
|
|
plent_state_t state;
|
|
|
|
usercmd_t lastcmd;
|
2004-02-20 05:37:47 +00:00
|
|
|
} client_t;
|
|
|
|
|
2004-02-21 05:09:02 +00:00
|
|
|
typedef struct challenge_s {
|
|
|
|
int challenge;
|
|
|
|
double time;
|
|
|
|
} challenge_t;
|
2004-02-20 05:37:47 +00:00
|
|
|
|
|
|
|
void Client_Init (void);
|
2004-02-21 05:09:02 +00:00
|
|
|
void Client_NewConnection (void);
|
2010-01-13 06:52:15 +00:00
|
|
|
void Client_SendMessages (client_t *cl);
|
2005-05-08 00:48:21 +00:00
|
|
|
void Client_New (client_t *cl);
|
|
|
|
void Client_Frame (void);
|
|
|
|
|
2010-12-21 09:15:31 +00:00
|
|
|
extern int client_count;
|
|
|
|
|
2004-02-20 05:37:47 +00:00
|
|
|
#endif//__client_h
|