2004-02-20 05:37:47 +00:00
|
|
|
/*
|
|
|
|
#FILENAME#
|
|
|
|
|
|
|
|
#DESCRIPTION#
|
|
|
|
|
|
|
|
Copyright (C) 2004 #AUTHOR#
|
|
|
|
|
|
|
|
Author: #AUTHOR#
|
|
|
|
Date: #DATE#
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
$Id$
|
|
|
|
*/
|
|
|
|
|
|
|
|
#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];
|
2005-05-08 00:48:21 +00:00
|
|
|
qboolean send_message;
|
2005-05-08 10:41:11 +00:00
|
|
|
frame_t frames[UPDATE_BACKUP];
|
|
|
|
entity_state_t packet_entities[UPDATE_BACKUP][MAX_PACKET_ENTITIES];
|
|
|
|
|
|
|
|
int delta_sequence;
|
2005-05-07 13:57:07 +00:00
|
|
|
|
|
|
|
struct server_s *server;
|
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);
|
2004-02-20 05:37:47 +00:00
|
|
|
|
2005-05-08 00:48:21 +00:00
|
|
|
void Client_New (client_t *cl);
|
|
|
|
void Client_Frame (void);
|
|
|
|
|
2004-02-20 05:37:47 +00:00
|
|
|
#endif//__client_h
|