2004-08-23 00:15:46 +00:00
/*
Copyright ( C ) 1996 - 1997 Id Software , Inc .
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
2005-11-26 03:02:55 +00:00
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE .
2004-08-23 00:15:46 +00:00
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 the Free Software
Foundation , Inc . , 59 Temple Place - Suite 330 , Boston , MA 02111 - 1307 , USA .
*/
// client.h
2005-03-10 03:55:18 +00:00
# include "particles.h"
2014-10-06 17:55:39 +00:00
enum
{
SKIN_NOTLOADED , //not trying to load it. shouldn't really happen, but can.
SKIN_LOADING , //still loading. just do something else for now...
SKIN_LOADED ,
SKIN_FAILED
} ;
2014-09-08 23:47:19 +00:00
typedef struct qwskin_s
2004-08-23 00:15:46 +00:00
{
2006-02-22 23:43:59 +00:00
char name [ 64 ] ;
2014-10-06 17:55:39 +00:00
int loadstate ; // the name isn't a valid skin
//qw skin info
2004-08-23 00:15:46 +00:00
int width ;
int height ;
2014-10-06 17:55:39 +00:00
void * skindata ;
2009-07-17 22:28:16 +00:00
//for hardware 32bit texture overrides
2013-03-12 22:56:10 +00:00
texnums_t textures ;
2014-09-08 23:47:19 +00:00
} qwskin_t ;
2004-08-23 00:15:46 +00:00
// player_state_t is the information needed by a player entity
// to do move prediction and to generate a drawable entity
typedef struct
{
int messagenum ; // all player's won't be updated each frame
double state_time ; // not the same as the packet time,
// because player commands come asyncronously
usercmd_t command ; // last command for prediction
vec3_t origin ;
2011-12-05 15:23:40 +00:00
vec3_t predorigin ; // pre-predicted pos
2004-08-23 00:15:46 +00:00
vec3_t viewangles ; // only for demos, not from server
vec3_t velocity ;
int weaponframe ;
2013-03-12 22:35:33 +00:00
unsigned int modelindex ;
2004-08-23 00:15:46 +00:00
int frame ;
int skinnum ;
int effects ;
# ifdef PEXT_SCALE
float scale ;
# endif
2006-02-27 00:42:25 +00:00
qbyte colourmod [ 3 ] ;
qbyte alpha ;
2004-08-23 00:15:46 +00:00
# ifdef PEXT_FATNESS
float fatness ;
# endif
int flags ; // dead, gib, etc
int pm_type ;
float waterjumptime ;
qboolean onground ;
qboolean jump_held ;
int jump_msec ; // hack for fixing bunny-hop flickering on non-ZQuake servers
2012-02-12 05:18:31 +00:00
vec3_t szmins , szmaxs ;
2012-07-05 19:42:36 +00:00
vec3_t gravitydir ;
2004-08-23 00:15:46 +00:00
float lerpstarttime ;
int oldframe ;
} player_state_t ;
# if defined(Q2CLIENT) || defined(Q2SERVER)
2005-11-26 03:02:55 +00:00
typedef enum
2004-08-23 00:15:46 +00:00
{
// can accelerate and turn
Q2PM_NORMAL ,
Q2PM_SPECTATOR ,
// no acceleration or turning
Q2PM_DEAD ,
Q2PM_GIB , // different bounding box
Q2PM_FREEZE
} q2pmtype_t ;
typedef struct
{ //shared with q2 dll
q2pmtype_t pm_type ;
short origin [ 3 ] ; // 12.3
short velocity [ 3 ] ; // 12.3
qbyte pm_flags ; // ducked, jump_held, etc
qbyte pm_time ; // each unit = 8 ms
short gravity ;
short delta_angles [ 3 ] ; // add to command angles to get view direction
// changed by spawns, rotating objects, and teleporters
} q2pmove_state_t ;
typedef struct
{ //shared with q2 dll
q2pmove_state_t pmove ; // for prediction
// these fields do not need to be communicated bit-precise
vec3_t viewangles ; // for fixed views
vec3_t viewoffset ; // add to pmovestate->origin
vec3_t kick_angles ; // add to view direction to get render angles
// set by weapon kicks, pain effects, etc
vec3_t gunangles ;
vec3_t gunoffset ;
int gunindex ;
int gunframe ;
float blend [ 4 ] ; // rgba full screen effect
2005-11-26 03:02:55 +00:00
2004-08-23 00:15:46 +00:00
float fov ; // horizontal field of view
int rdflags ; // refdef flags
short stats [ Q2MAX_STATS ] ; // fast status bar updates
} q2player_state_t ;
# endif
2008-06-05 07:45:34 +00:00
typedef struct colourised_s {
char name [ 64 ] ;
unsigned int topcolour ;
unsigned int bottomcolour ;
char skin [ 64 ] ;
struct colourised_s * next ;
} colourised_t ;
2005-02-06 02:47:36 +00:00
# define MAX_SCOREBOARDNAME 64
# define MAX_DISPLAYEDNAME 16
2004-08-23 00:15:46 +00:00
typedef struct player_info_s
{
int userid ;
2006-01-21 00:06:49 +00:00
char userinfo [ EXTENDED_INFO_STRING ] ;
2008-11-09 22:29:28 +00:00
char teamstatus [ 128 ] ;
2011-06-16 02:03:57 +00:00
float teamstatustime ;
2004-08-23 00:15:46 +00:00
// scoreboard information
char name [ MAX_SCOREBOARDNAME ] ;
char team [ MAX_INFO_KEY ] ;
float entertime ;
int frags ;
int ping ;
qbyte pl ;
2005-11-30 01:20:53 +00:00
qboolean ignored ;
2010-12-05 02:46:07 +00:00
qboolean vignored ;
2005-11-30 01:20:53 +00:00
2008-06-05 07:45:34 +00:00
colourised_t * colourised ;
2004-08-23 00:15:46 +00:00
// skin information
2008-06-01 22:06:22 +00:00
unsigned int rtopcolor ; //real, according to their userinfo
unsigned int rbottomcolor ;
2004-08-23 00:15:46 +00:00
2008-06-01 22:06:22 +00:00
unsigned int ttopcolor ; //team, according to colour forcing
unsigned int tbottomcolor ;
2004-08-23 00:15:46 +00:00
2014-09-08 23:47:19 +00:00
int spectator ;
qwskin_t * qwskin ;
2014-10-06 17:55:39 +00:00
qwskin_t * lastskin ; //last-known-good skin
2014-09-08 23:47:19 +00:00
skinid_t skinid ;
2004-08-23 00:15:46 +00:00
struct model_s * model ;
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
// unsigned short vweapindex;
2014-09-17 03:04:08 +00:00
# ifdef HEXEN2
2010-08-28 17:14:38 +00:00
unsigned char h2playerclass ;
2014-09-17 03:04:08 +00:00
# endif
2004-08-23 00:15:46 +00:00
int prevcount ;
2004-12-08 04:14:52 +00:00
int stats [ MAX_CL_STATS ] ;
2008-05-25 22:23:43 +00:00
int statsf [ MAX_CL_STATS ] ;
2004-08-23 00:15:46 +00:00
} player_info_t ;
typedef struct
{
2013-03-12 22:53:23 +00:00
double senttime ; // time cmd was sent off
2013-09-06 22:57:44 +00:00
float latency ; // the time the packet was acked. -1=choked, -2=dropped, -3=never sent, -4=reply came back invalid
2013-03-12 22:53:23 +00:00
2004-08-23 00:15:46 +00:00
// generated on client side
2013-03-12 22:53:23 +00:00
usercmd_t cmd [ MAX_SPLITS ] ; // cmd that generated the frame
2013-09-06 22:57:44 +00:00
int cmd_sequence ; //the outgoing move sequence. if not equal to expected, that index was stale and is no longer valid
int server_message_num ; //the inbound frame that was valid when this command was generated
2013-03-12 22:53:23 +00:00
int server_time ;
int client_time ;
} outframe_t ;
typedef struct
{
//this is the sequence we requested for this frame.
int delta_sequence ; // sequence number to delta from, -1 = full update
2004-08-23 00:15:46 +00:00
// received from server
2013-09-06 22:57:44 +00:00
int frameid ; //the sequence number of the frame, so we can easily detect which frames are valid without poking all in advance, etc
int ackframe ; //the outgoing sequence this frame acked (for prediction backlerping).
2004-08-23 00:15:46 +00:00
double receivedtime ; // time message was received, or -1
2011-06-16 02:03:57 +00:00
player_state_t playerstate [ MAX_CLIENTS + MAX_SPLITS ] ; // message received that reflects performing
2013-03-12 22:53:23 +00:00
// the usercmd
2004-08-23 00:15:46 +00:00
packet_entities_t packet_entities ;
qboolean invalid ; // true if the packet_entities delta was invalid
2013-03-12 22:53:23 +00:00
} inframe_t ;
2004-08-23 00:15:46 +00:00
# ifdef Q2CLIENT
typedef struct
{
qboolean valid ; // cleared if delta parsing was invalid
int serverframe ;
int servertime ; // server time the message is valid for (in msec)
int deltaframe ;
qbyte areabits [ MAX_Q2MAP_AREAS / 8 ] ; // portalarea visibility bits
q2player_state_t playerstate ;
int num_entities ;
int parse_entities ; // non-masked index into cl_parse_entities array
} q2frame_t ;
# endif
typedef struct
{
int destcolor [ 3 ] ;
2012-01-17 07:57:46 +00:00
float percent ; // 0-256
2004-08-23 00:15:46 +00:00
} cshift_t ;
# define CSHIFT_CONTENTS 0
# define CSHIFT_DAMAGE 1
# define CSHIFT_BONUS 2
# define CSHIFT_POWERUP 3
# define CSHIFT_SERVER 4
# define NUM_CSHIFTS 5
//
// client_state_t should hold all pieces of the client state
//
2009-11-04 21:16:50 +00:00
//the light array works thusly:
//dlights are allocated DL_LAST downwards to 0, static wlights are allocated DL_LAST+1 to MAX_RTLIGHTS.
//thus to clear the dlights but not rtlights, set the first light to RTL_FIRST
# define DL_LAST (sizeof(unsigned int)*8-1)
# define RTL_FIRST (sizeof(unsigned int)*8)
2005-04-16 16:21:27 +00:00
2011-07-30 14:14:56 +00:00
# define LFLAG_NORMALMODE (1<<0) /*ppl with r_shadow_realtime_dlight*/
# define LFLAG_REALTIMEMODE (1<<1) /*ppl with r_shadow_realtime_world*/
# define LFLAG_LIGHTMAP (1<<2)
# define LFLAG_FLASHBLEND (1<<3)
2009-07-05 18:45:53 +00:00
2011-07-30 14:14:56 +00:00
# define LFLAG_NOSHADOWS (1<<8)
# define LFLAG_SHADOWMAP (1<<9)
2011-12-05 15:23:40 +00:00
# define LFLAG_CREPUSCULAR (1<<10)
2009-07-05 18:45:53 +00:00
2011-07-30 14:14:56 +00:00
# define LFLAG_DYNAMIC (LFLAG_LIGHTMAP | LFLAG_FLASHBLEND | LFLAG_NORMALMODE | LFLAG_REALTIMEMODE)
2005-04-16 16:21:27 +00:00
2004-08-23 00:15:46 +00:00
typedef struct dlight_s
{
int key ; // so entities can reuse same entry
vec3_t origin ;
2009-06-21 17:45:33 +00:00
vec3_t axis [ 3 ] ;
2014-10-05 20:04:11 +00:00
vec3_t rotation ; //cubemap/spotlight rotation
2004-08-23 00:15:46 +00:00
float radius ;
float die ; // stop lighting after this time
float decay ; // drop this each second
float minlight ; // don't add when contributing less
float color [ 3 ] ;
float channelfade [ 3 ] ;
2013-10-08 14:28:11 +00:00
# ifdef RTLIGHTS
2012-01-01 11:22:24 +00:00
vec3_t lightcolourscales ; //ambient, diffuse, specular
2013-10-08 14:28:11 +00:00
# endif
2011-10-27 15:46:36 +00:00
float corona ;
float coronascale ;
2004-11-27 08:16:25 +00:00
2009-07-05 18:45:53 +00:00
unsigned int flags ;
2011-12-26 15:19:13 +00:00
char cubemapname [ 64 ] ;
2009-07-05 18:45:53 +00:00
2009-06-21 17:45:33 +00:00
//the following are used for rendering (client code should clear on create)
Fixes, workarounds, and breakages. Hexen2 should work much better (-hexen2 says no mission pack, -portals says h2mp). Started working on splitting bigcoords per client, far too much work still to go on that. Removed gl_ztrick entirely. Enabled csprogs download by default. Added client support for fitzquake's 666 protocol, needs testing, some cleanup for dp protocols too, no server support, couldn't selectively enable it anyway. Now attempting to cache shadow meshes for explosions and stuff. Played with lightmaps a little, should potentially run a little faster on certain (intel?) cards. Tweeked npfte a little to try to avoid deadlocks and crashes. Fixed sky worldspawn parsing. Added h2mp's model format. Fixed baseline issue in q2 client, made servers generate q2 baselines. MOVETYPE_PUSH will not rotate extra if rotation is forced. Made status command show allowed client types. Changed lighting on weapons - should now be shaded.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/branches/wip@3572 fc73d0e0-1445-4013-8a0c-d673dee63da5
2010-08-11 03:36:31 +00:00
qboolean rebuildcache ;
2004-11-27 08:16:25 +00:00
struct shadowmesh_s * worldshadowmesh ;
2011-12-26 15:19:13 +00:00
texid_t cubetexture ;
2009-06-21 17:45:33 +00:00
struct {
float updatetime ;
} face [ 6 ] ;
2004-12-11 03:39:01 +00:00
int style ; //multiply by style values if > 0
2009-11-04 21:16:50 +00:00
float fov ; //spotlight
2004-11-29 01:21:00 +00:00
struct dlight_s * next ;
2004-08-23 00:15:46 +00:00
} dlight_t ;
typedef struct
{
int length ;
char map [ MAX_STYLESTRING ] ;
2014-06-25 03:53:11 +00:00
vec3_t colours ;
int colourkey ;
2004-08-23 00:15:46 +00:00
} lightstyle_t ;
# define MAX_EFRAGS 512
# define MAX_DEMOS 8
# define MAX_DEMONAME 16
typedef enum {
ca_disconnected , // full screen console with no connection
ca_demostart , // starting up a demo
ca_connected , // netchan_t established, waiting for svc_serverdata
ca_onserver , // processing data lists, donwloading, etc
ca_active // everything is in, so frames can be rendered
} cactive_t ;
typedef enum {
dl_none ,
dl_model ,
dl_sound ,
dl_skin ,
dl_wad ,
dl_single ,
dl_singlestuffed
} dltype_t ; // download type
2014-06-12 23:08:42 +00:00
typedef struct qdownload_s
{
enum { DL_QW , DL_QWCHUNKS , DL_Q3 , DL_DARKPLACES , DL_QWPENDING , DL_HTTP , DL_FTP } method ;
vfsfile_t * file ; // file transfer from server
char dclname [ MAX_OSPATH ] ; //file to read/write the chunklist from, for download resumption.
char tempname [ MAX_OSPATH ] ; //file its currently writing to.
char localname [ MAX_OSPATH ] ; //file its going to be renamed to.
int prefixbytes ; //number of bytes that prefix the above names (ie: package/ or nothing).
char remotename [ MAX_OSPATH ] ; //file its coming from.
float percent ; //for progress indicator.
float starttime ; //for speed info
qofs_t completedbytes ; //number of bytes downloaded, for progress/speed info
qofs_t size ; //total size (may be a guess)
qboolean sizeunknown ; //says that size is a guess
unsigned int filesequence ; //unique file id.
enum fs_relative fsroot ; //where the local+temp file is meant to be relative to.
double ratetime ;
int rate ;
int ratebytes ;
unsigned int flags ;
//chunked downloads uses this
struct dlblock_s
{
qofs_t start ;
qofs_t end ;
enum
{
DLB_MISSING ,
DLB_PENDING ,
DLB_RECEIVED
} state : 16 ;
unsigned int sequence ; //sequence is only valid on pending blocks.
struct dlblock_s * next ;
} * dlblocks ;
} qdownload_t ;
enum qdlabort
{
QDL_FAILED , //delete file, tell server.
QDL_DISCONNECT , //delete file, don't tell server.
QDL_COMPLETED , //rename file, tell server.
} ;
qboolean DL_Begun ( qdownload_t * dl ) ;
void DL_Completed ( qdownload_t * dl , qofs_t start , qofs_t end ) ; //notifies the download logic that a chunk of the file is no longer needed.
void DL_Abort ( qdownload_t * dl , enum qdlabort aborttype ) ; //just frees the download's resources. does not delete the temp file.
//chunked downloads
void DLC_Poll ( qdownload_t * dl ) ;
2004-08-23 00:15:46 +00:00
//
// the client_static_t structure is persistant through an arbitrary number
// of server connections
//
typedef struct
{
// connection information
cactive_t state ;
2005-05-26 12:55:34 +00:00
Fixes, workarounds, and breakages. Hexen2 should work much better (-hexen2 says no mission pack, -portals says h2mp). Started working on splitting bigcoords per client, far too much work still to go on that. Removed gl_ztrick entirely. Enabled csprogs download by default. Added client support for fitzquake's 666 protocol, needs testing, some cleanup for dp protocols too, no server support, couldn't selectively enable it anyway. Now attempting to cache shadow meshes for explosions and stuff. Played with lightmaps a little, should potentially run a little faster on certain (intel?) cards. Tweeked npfte a little to try to avoid deadlocks and crashes. Fixed sky worldspawn parsing. Added h2mp's model format. Fixed baseline issue in q2 client, made servers generate q2 baselines. MOVETYPE_PUSH will not rotate extra if rotation is forced. Made status command show allowed client types. Changed lighting on weapons - should now be shaded.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/branches/wip@3572 fc73d0e0-1445-4013-8a0c-d673dee63da5
2010-08-11 03:36:31 +00:00
/*Specifies which protocol family we're speaking*/
2005-05-26 12:55:34 +00:00
enum {
CP_UNKNOWN ,
CP_QUAKEWORLD ,
CP_NETQUAKE ,
2005-06-04 04:20:20 +00:00
CP_QUAKE2 ,
2005-08-03 23:14:59 +00:00
CP_QUAKE3 ,
CP_PLUGIN
2005-05-26 12:55:34 +00:00
} protocol ;
2004-08-23 00:15:46 +00:00
Fixes, workarounds, and breakages. Hexen2 should work much better (-hexen2 says no mission pack, -portals says h2mp). Started working on splitting bigcoords per client, far too much work still to go on that. Removed gl_ztrick entirely. Enabled csprogs download by default. Added client support for fitzquake's 666 protocol, needs testing, some cleanup for dp protocols too, no server support, couldn't selectively enable it anyway. Now attempting to cache shadow meshes for explosions and stuff. Played with lightmaps a little, should potentially run a little faster on certain (intel?) cards. Tweeked npfte a little to try to avoid deadlocks and crashes. Fixed sky worldspawn parsing. Added h2mp's model format. Fixed baseline issue in q2 client, made servers generate q2 baselines. MOVETYPE_PUSH will not rotate extra if rotation is forced. Made status command show allowed client types. Changed lighting on weapons - should now be shaded.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/branches/wip@3572 fc73d0e0-1445-4013-8a0c-d673dee63da5
2010-08-11 03:36:31 +00:00
/*QuakeWorld protocol flags*/
# ifdef PROTOCOLEXTENSIONS
unsigned long fteprotocolextensions ;
unsigned long fteprotocolextensions2 ;
# endif
unsigned long z_ext ;
/*NQ Protocol flags*/
enum
{
CPNQ_ID ,
2011-06-16 02:03:57 +00:00
CPNQ_PROQUAKE3_4 ,
2012-02-12 05:18:31 +00:00
CPNQ_FITZ666 , /*and rmqe999 protocol*/
Fixes, workarounds, and breakages. Hexen2 should work much better (-hexen2 says no mission pack, -portals says h2mp). Started working on splitting bigcoords per client, far too much work still to go on that. Removed gl_ztrick entirely. Enabled csprogs download by default. Added client support for fitzquake's 666 protocol, needs testing, some cleanup for dp protocols too, no server support, couldn't selectively enable it anyway. Now attempting to cache shadow meshes for explosions and stuff. Played with lightmaps a little, should potentially run a little faster on certain (intel?) cards. Tweeked npfte a little to try to avoid deadlocks and crashes. Fixed sky worldspawn parsing. Added h2mp's model format. Fixed baseline issue in q2 client, made servers generate q2 baselines. MOVETYPE_PUSH will not rotate extra if rotation is forced. Made status command show allowed client types. Changed lighting on weapons - should now be shaded.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/branches/wip@3572 fc73d0e0-1445-4013-8a0c-d673dee63da5
2010-08-11 03:36:31 +00:00
CPNQ_DP5 ,
CPNQ_DP6 ,
CPNQ_DP7
} protocol_nq ;
# define CPNQ_IS_DP (cls.protocol_nq >= CPNQ_DP5)
2004-08-23 00:15:46 +00:00
qboolean resendinfo ;
2005-11-30 01:20:53 +00:00
qboolean findtrack ;
2004-08-23 00:15:46 +00:00
2004-12-29 03:24:21 +00:00
int framecount ;
2006-09-17 00:59:22 +00:00
int realip_ident ;
2008-06-01 22:06:22 +00:00
netadr_t realserverip ;
2006-09-17 00:59:22 +00:00
2004-08-23 00:15:46 +00:00
// network stuff
netchan_t netchan ;
2004-12-15 19:37:30 +00:00
float lastarbiatarypackettime ; //used to mark when packets were sent to prevent mvdsv servers from causing us to disconnect.
2004-08-23 00:15:46 +00:00
// private userinfo for sending to masterless servers
2010-08-14 03:17:33 +00:00
char userinfo [ MAX_SPLITS ] [ EXTENDED_INFO_STRING ] ;
2004-08-23 00:15:46 +00:00
char servername [ MAX_OSPATH ] ; // name of server from original connect
int qport ;
2008-11-09 22:29:28 +00:00
struct ftenet_connections_s * sockets ;
2005-11-30 01:20:53 +00:00
2014-06-12 23:08:42 +00:00
qdownload_t * download ;
2005-08-26 22:56:51 +00:00
2004-08-23 00:15:46 +00:00
// demo loop control
int demonum ; // -1 = don't play demos
char demos [ MAX_DEMOS ] [ MAX_DEMONAME ] ; // when not playing
// demo recording info must be here, because record is started before
// entering a map (and clearing client_state_t)
2013-07-26 17:19:06 +00:00
int demorecording ; //1=QW, 2=NQ
2010-03-14 14:35:56 +00:00
vfsfile_t * demooutfile ;
2008-01-09 00:52:31 +00:00
enum { DPB_NONE , DPB_QUAKEWORLD , DPB_MVD , DPB_EZTV ,
2004-08-23 00:15:46 +00:00
# ifdef NQPROT
DPB_NETQUAKE ,
# endif
# ifdef Q2CLIENT
DPB_QUAKE2
# endif
} demoplayback ;
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
qboolean demoseeking ;
float demoseektime ;
2004-08-23 00:15:46 +00:00
qboolean timedemo ;
2010-03-14 14:35:56 +00:00
vfsfile_t * demoinfile ;
2013-11-28 00:45:22 +00:00
struct dl_download * demoindownload ;
2004-08-23 00:15:46 +00:00
float td_lastframe ; // to meter out one message a frame
int td_startframe ; // host_framecount at start
float td_starttime ; // realtime at second frame of timedemo
2015-04-21 04:12:00 +00:00
float demostarttime ; // the time of the first frame, so we don't get weird results with qw demos
2004-08-23 00:15:46 +00:00
int challenge ;
float latency ; // rolling average
qboolean allow_anyparticles ;
qboolean allow_lightmapgamma ;
qboolean allow_rearview ;
qboolean allow_skyboxes ;
qboolean allow_mirrors ;
2014-08-15 02:20:41 +00:00
qboolean allow_watervis ; //fixme: not checked any more
2005-01-05 07:58:50 +00:00
float allow_fbskins ; //fraction of allowance
2011-10-27 15:46:36 +00:00
qboolean allow_postproc ;
2004-08-23 00:15:46 +00:00
qboolean allow_cheats ;
qboolean allow_semicheats ; //defaults to true, but this allows a server to enforce a strict ruleset (smackdown type rules).
float maxfps ; //server capped
2013-03-12 22:53:23 +00:00
int deathmatch ;
2004-08-23 00:15:46 +00:00
# ifdef NQPROT
int signon ;
# endif
2013-11-29 14:36:47 +00:00
int language ;
2008-06-05 07:45:34 +00:00
colourised_t * colourised ;
2004-08-23 00:15:46 +00:00
} client_static_t ;
extern client_static_t cls ;
typedef struct downloadlist_s {
2009-05-24 10:11:17 +00:00
char rname [ 128 ] ;
2005-08-11 04:14:33 +00:00
char localname [ 128 ] ;
2008-11-09 22:29:28 +00:00
unsigned int size ;
unsigned int flags ;
2014-06-12 23:08:42 +00:00
# define DLLF_VERBOSE (1u<<0) //tell the user that its downloading
# define DLLF_REQUIRED (1u<<1) //means that it won't load models etc until its downloaded (ie: requiredownloads 0 makes no difference)
# define DLLF_OVERWRITE (1u<<2) //overwrite it even if it already exists
# define DLLF_SIZEUNKNOWN (1u<<3) //download's size isn't known
# define DLLF_IGNOREFAILED (1u<<4) //
# define DLLF_NONGAME (1u<<5) //means the requested download filename+localname is gamedir explicit (so id1/foo.txt is distinct from qw/foo.txt)
# define DLLF_TEMPORARY (1u<<6) //download it, but don't actually save it (DLLF_OVERWRITE doesn't actually overwrite, but does ignore any local files)
2014-09-02 02:44:43 +00:00
# define DLLF_USEREXPLICIT (1u<<7) //use explicitly requested it, ignore the cl_downloads cvar.
2014-06-12 23:08:42 +00:00
2014-09-02 02:44:43 +00:00
# define DLLF_BEGUN (1u<<8) //server has confirmed that the file exists, is readable, and we've opened a file. should not be set on new requests.
2004-08-23 00:15:46 +00:00
struct downloadlist_s * next ;
} downloadlist_t ;
typedef struct {
2009-07-18 20:46:42 +00:00
//current persistant state
2005-05-30 04:34:47 +00:00
trailstate_t * trailstate ; //when to next throw out a trail
2005-08-06 22:39:28 +00:00
trailstate_t * emitstate ; //when to next emit
2009-07-18 20:46:42 +00:00
//current origin
vec3_t origin ; //current render position
vec3_t angles ;
2011-04-30 17:21:10 +00:00
//previous rendering frame (for trails)
vec3_t lastorigin ;
qboolean isnew ;
2012-02-12 05:18:31 +00:00
qboolean isplayer ;
2011-04-30 17:21:10 +00:00
2009-07-18 20:46:42 +00:00
//intermediate values for frame lerping
float framelerpdeltatime ;
float newframestarttime ;
int newframe ;
float oldframestarttime ;
int oldframe ;
//intermediate values for origin lerping of stepping things
float orglerpdeltatime ;
float orglerpstarttime ;
2011-04-30 17:21:10 +00:00
vec3_t neworigin ; /*origin that we're lerping towards*/
vec3_t oldorigin ; /*origin that we're lerping away from*/
2009-07-18 20:46:42 +00:00
vec3_t newangle ;
vec3_t oldangle ;
2012-02-17 01:12:37 +00:00
//for further info
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
int skeletalobject ;
int sequence ; /*so csqc code knows that the ent is still valid*/
2012-02-17 01:12:37 +00:00
entity_state_t * entstate ;
2004-08-23 00:15:46 +00:00
} lerpents_t ;
2013-06-23 02:17:02 +00:00
//state associated with each player 'seat' (one for each splitscreen client)
//note that this doesn't include networking inputlog info.
struct playerview_s
{
int playernum ; //cl.players index for this player.
qboolean nolocalplayer ; //inhibit use of qw-style players, predict based on entities.
# ifdef PEXT_SETVIEW
int viewentity ; //view is attached to this entity.
# endif
// information for local display
int stats [ MAX_CL_STATS ] ; // health, etc
float statsf [ MAX_CL_STATS ] ; // health, etc
char * statsstr [ MAX_CL_STATS ] ; // health, etc
float item_gettime [ 32 ] ; // cl.time of aquiring item, for blinking
float faceanimtime ; // use anim frame if cl.time < this
int sb_hexen2_cur_item ; //hexen2 hud
float sb_hexen2_item_time ;
qboolean sb_hexen2_extra_info ; //show the extra stuff
qboolean sb_hexen2_infoplaque ;
// the client maintains its own idea of view angles, which are
// sent to the server each frame. And only reset at level change
// and teleport times
2013-07-26 17:19:06 +00:00
vec3_t viewangles ; //current angles
vec3_t viewanglechange ; //angles set by input code this frame
vec3_t intermissionangles ; //absolute angles for intermission
2013-06-23 02:17:02 +00:00
vec3_t gravitydir ;
// pitch drifting vars
float pitchvel ;
qboolean nodrift ;
float driftmove ;
double laststop ;
2015-04-27 06:19:33 +00:00
int gamerectknown ; //equals cls.framecount if valid
vrect_t gamerect ; //position the player's main view was drawn at this frame.
2013-06-23 02:17:02 +00:00
//prediction state
int pmovetype ;
float entgravity ;
float maxspeed ;
vec3_t simorg ;
vec3_t simvel ;
vec3_t simangles ;
float rollangle ;
2015-04-27 12:51:42 +00:00
float hdr_last ;
2013-06-23 02:17:02 +00:00
float crouch ; // local amount for smoothing stepups
vec3_t oldorigin ; // to track step smoothing
float oldz , extracrouch , crouchspeed ; // to track step smoothing
qboolean onground ;
float viewheight ;
int waterlevel ; //for smartjump
float punchangle ; // temporary view kick from weapon firing
float v_dmg_time ; //various view knockbacks.
float v_dmg_roll ;
float v_dmg_pitch ;
double bobtime ; //sine wave
double bobcltime ; //for tracking time increments
float bob ; //bob height
vec3_t cam_desired_position ; // where the camera wants to be
qboolean cam_locked ; //
int cam_oldbuttons ; //
vec3_t cam_viewangles ; //
double cam_lastviewtime ; //
int cam_spec_track ; // player# of who we are tracking
enum
{
CAM_NONE = 0 ,
CAM_TRACK = 1
} cam_auto ; //
2013-10-08 14:28:11 +00:00
vec3_t vw_axis [ 3 ] ; //weapons should be positioned relative to this
vec3_t vw_origin ; //weapons should be positioned relative to this
// entity_t viewent; // is this not utterly redundant yet?
2014-05-17 15:25:02 +00:00
struct
{
struct model_s * oldmodel ;
float lerptime ;
float oldlerptime ;
float frameduration ;
int prevframe ;
int oldframe ;
} vm ;
2013-06-23 02:17:02 +00:00
} ;
2004-08-23 00:15:46 +00:00
//
// the client_state_t structure is wiped completely at every
// server signon
//
typedef struct
{
2004-09-26 00:30:42 +00:00
int fpd ;
2004-08-23 00:15:46 +00:00
int servercount ; // server identification for prespawns
2005-03-20 02:57:11 +00:00
float gamespeed ;
qboolean csqcdebug ;
2005-05-26 12:55:34 +00:00
qboolean allowsendpacket ;
2005-03-20 02:57:11 +00:00
2004-08-23 00:15:46 +00:00
char serverinfo [ MAX_SERVERINFO_STRING ] ;
2011-10-27 15:46:36 +00:00
char serverpaknames [ 1024 ] ;
char serverpakcrcs [ 1024 ] ;
qboolean serverpakschanged ;
2004-08-23 00:15:46 +00:00
int parsecount ; // server message counter
2004-08-27 00:46:32 +00:00
int oldparsecount ;
2004-08-23 00:15:46 +00:00
int oldvalidsequence ;
2013-03-12 22:53:23 +00:00
int ackedmovesequence ; //in quakeworld/q2 this is always equal to validsequence. nq can differ. may only be updated when validsequence is updated.
2013-07-26 17:19:06 +00:00
int lastackedmovesequence ; //can be higher than ackedmovesequence when the received frame was unusable.
2004-08-23 00:15:46 +00:00
int validsequence ; // this is the sequence number of the last good
// packetentity_t we got. If this is 0, we can't
// render a frame yet
2013-07-26 17:19:06 +00:00
int movesequence ; // client->server frames
2004-08-23 00:15:46 +00:00
int spectator ;
double last_ping_request ; // while showing scoreboard
double last_servermessage ;
2013-03-12 22:35:33 +00:00
//list of ent frames that still need to be acked.
int numackframes ;
int ackframes [ 64 ] ;
2004-08-23 00:15:46 +00:00
# ifdef Q2CLIENT
q2frame_t q2frame ;
q2frame_t q2frames [ Q2UPDATE_BACKUP ] ;
# endif
// sentcmds[cl.netchan.outgoing_sequence & UPDATE_MASK] = cmd
2013-03-12 22:53:23 +00:00
outframe_t outframes [ UPDATE_BACKUP ] ; //user inputs (cl.ackedmovesequence+1 to cl.movesequence are still pending)
inframe_t inframes [ UPDATE_BACKUP ] ; //server state (cl.validsequence is the most recent set)
2005-08-26 22:56:51 +00:00
lerpents_t * lerpents ;
int maxlerpents ; //number of slots allocated.
2012-02-17 01:35:22 +00:00
int lerpentssequence ;
2005-08-26 22:56:51 +00:00
lerpents_t lerpplayers [ MAX_CLIENTS ] ;
2004-08-23 00:15:46 +00:00
2010-03-25 22:56:11 +00:00
cshift_t cshifts [ NUM_CSHIFTS ] ; // color shifts for damage, powerups and content types
2004-08-23 00:15:46 +00:00
2012-07-05 19:42:36 +00:00
//when running splitscreen, we have multiple viewports all active at once
int splitclients ; //we are running this many clients split screen.
2013-06-23 02:17:02 +00:00
playerview_t playerview [ MAX_SPLITS ] ;
2012-07-05 19:42:36 +00:00
// localized movement vars
float bunnyspeedcap ;
2004-08-23 00:15:46 +00:00
// the client simulates or interpolates movement to get these values
double time ; // this is the time value that the client
2005-07-28 15:33:27 +00:00
// is rendering at. always <= realtime
2005-10-01 03:09:17 +00:00
float servertime ; //current server time, bound between gametime and gametimemark
float mtime ; //server time as on the server when we last received a packet. not allowed to decrease.
float oldmtime ; //server time as on the server for the previously received packet.
2004-08-23 00:15:46 +00:00
float gametime ;
float gametimemark ;
2005-06-04 04:20:20 +00:00
float oldgametime ; //used as the old time to lerp cl.time from.
float oldgametimemark ; //if it's 0, cl.time will casually increase.
2004-08-23 00:15:46 +00:00
float minpitch ;
float maxpitch ;
qboolean paused ; // send over by server
int intermission ; // don't change view angle, full screen, etc
2006-04-11 20:09:39 +00:00
float completed_time ; // latched ffrom time at intermission start
# define Q2MAX_VISIBLE_WEAPONS 32 //q2 has about 20.
int numq2visibleweapons ; //q2 sends out visible-on-model weapons in a wierd gender-nutral way.
char * q2visibleweapons [ Q2MAX_VISIBLE_WEAPONS ] ; //model names beginning with a # are considered 'sexed', and are loaded on a per-client basis. yay. :(
2005-11-26 03:02:55 +00:00
2004-08-23 00:15:46 +00:00
//
// information that is static for the entire time connected to a server
//
2009-07-06 01:20:20 +00:00
char model_name_vwep [ MAX_VWEP_MODELS ] [ MAX_QPATH ] ;
2014-09-17 03:04:08 +00:00
char model_name [ MAX_PRECACHE_MODELS ] [ MAX_QPATH ] ;
char sound_name [ MAX_PRECACHE_SOUNDS ] [ MAX_QPATH ] ;
2013-03-12 22:44:00 +00:00
char * particle_ssname [ MAX_SSPARTICLESPRE ] ;
2015-03-03 00:14:43 +00:00
# ifdef Q2CLIENT
char * image_name [ Q2MAX_IMAGES ] ;
char * item_name [ Q2MAX_ITEMS ] ;
short inventory [ Q2MAX_ITEMS ] ;
# endif
2004-08-23 00:15:46 +00:00
2009-07-06 01:20:20 +00:00
struct model_s * model_precache_vwep [ MAX_VWEP_MODELS ] ;
2014-09-17 03:04:08 +00:00
struct model_s * model_precache [ MAX_PRECACHE_MODELS ] ;
struct sfx_s * sound_precache [ MAX_PRECACHE_SOUNDS ] ;
2013-03-12 22:44:00 +00:00
int particle_ssprecache [ MAX_SSPARTICLESPRE ] ; //these are actually 1-based, so 0 can be used to lazy-init them. I cheat.
2004-08-23 00:15:46 +00:00
2013-03-12 22:44:00 +00:00
char model_csqcname [ MAX_CSMODELS ] [ MAX_QPATH ] ;
struct model_s * model_csqcprecache [ MAX_CSMODELS ] ;
char * particle_csname [ MAX_CSPARTICLESPRE ] ;
int particle_csprecache [ MAX_CSPARTICLESPRE ] ; //these are actually 1-based, so we can be lazy and do a simple negate.
2005-02-12 18:56:04 +00:00
2009-03-03 01:52:30 +00:00
qboolean model_precaches_added ;
2013-03-12 22:44:00 +00:00
qboolean particle_ssprecaches ; //says to not try to do any dp-compat hacks.
qboolean particle_csprecaches ; //says to not try to do any dp-compat hacks.
2012-07-05 19:42:36 +00:00
2005-10-16 03:51:40 +00:00
//used for q2 sky/configstrings
2004-08-23 00:15:46 +00:00
char skyname [ MAX_QPATH ] ;
2005-10-16 03:51:40 +00:00
float skyrotate ;
vec3_t skyaxis ;
2012-12-04 19:37:57 +00:00
qboolean fog_locked ;
2014-03-30 08:55:06 +00:00
fogstate_t fog ;
fogstate_t oldfog ;
2011-03-31 02:32:32 +00:00
2004-08-23 00:15:46 +00:00
char levelname [ 40 ] ; // for display on solo scoreboard
// refresh related state
struct model_s * worldmodel ; // cl_entitites[0].model
int num_entities ; // stored bottom up in cl_entities array
int num_statics ; // stored top down in cl_entitiers
// all player information
2011-04-25 03:25:22 +00:00
unsigned int allocated_client_slots ;
2004-08-23 00:15:46 +00:00
player_info_t players [ MAX_CLIENTS ] ;
downloadlist_t * downloadlist ;
downloadlist_t * faileddownloads ;
qboolean gamedirchanged ;
char q2statusbar [ 1024 ] ;
char q2layout [ 1024 ] ;
int parse_entities ;
float lerpfrac ;
vec3_t predicted_origin ;
vec3_t predicted_angles ;
vec3_t prediction_error ;
float predicted_step_time ;
float predicted_step ;
2013-07-26 17:19:06 +00:00
//interpolation+snapshots
float packfrac ;
2011-12-05 15:23:40 +00:00
packet_entities_t * currentpackentities ;
2013-07-26 17:19:06 +00:00
packet_entities_t * previouspackentities ;
2011-12-05 15:23:40 +00:00
float currentpacktime ;
2013-07-26 17:19:06 +00:00
qboolean do_lerp_players ;
2011-12-05 15:23:40 +00:00
2004-08-23 00:15:46 +00:00
int teamplay ;
int deathmatch ;
2004-12-29 03:24:21 +00:00
2012-10-10 22:58:51 +00:00
qboolean teamfortress ; // *sigh*. This is used for teamplay stuff. This sucks.
2008-06-01 22:06:22 +00:00
qboolean hexen2pickups ;
2006-01-04 00:44:34 +00:00
qboolean sendprespawn ;
int contentstage ;
2006-03-06 01:41:09 +00:00
2010-11-21 03:39:12 +00:00
double matchgametime ;
2006-03-06 01:41:09 +00:00
enum {
2010-11-21 03:39:12 +00:00
MATCH_DONTKNOW ,
MATCH_COUNTDOWN ,
MATCH_STANDBY ,
MATCH_INPROGRESS
} matchstate ;
2004-08-23 00:15:46 +00:00
} client_state_t ;
2008-06-01 22:06:22 +00:00
extern unsigned int cl_teamtopcolor ;
extern unsigned int cl_teambottomcolor ;
extern unsigned int cl_enemytopcolor ;
extern unsigned int cl_enemybottomcolor ;
2004-09-26 00:30:42 +00:00
//FPD values
//(commented out ones are ones that we don't support)
2004-12-29 03:24:21 +00:00
# define FPD_NO_FORCE_SKIN 256
2004-09-26 00:30:42 +00:00
# define FPD_NO_FORCE_COLOR 512
2004-12-29 03:24:21 +00:00
# define FPD_LIMIT_PITCH (1 << 14) //limit scripted pitch changes
# define FPD_LIMIT_YAW (1 << 15) //limit scripted yaw changes
2004-08-23 00:15:46 +00:00
//
// cvars
//
extern cvar_t cl_warncmd ;
extern cvar_t cl_upspeed ;
extern cvar_t cl_forwardspeed ;
extern cvar_t cl_backspeed ;
extern cvar_t cl_sidespeed ;
extern cvar_t cl_movespeedkey ;
extern cvar_t cl_yawspeed ;
extern cvar_t cl_pitchspeed ;
extern cvar_t cl_anglespeedkey ;
extern cvar_t cl_shownet ;
extern cvar_t cl_sbar ;
extern cvar_t cl_hudswap ;
extern cvar_t cl_pitchdriftspeed ;
extern cvar_t lookspring ;
extern cvar_t lookstrafe ;
extern cvar_t sensitivity ;
extern cvar_t m_pitch ;
extern cvar_t m_yaw ;
extern cvar_t m_forward ;
extern cvar_t m_side ;
extern cvar_t _windowed_mouse ;
2014-10-05 20:04:11 +00:00
# ifndef SERVERONLY
2004-08-23 00:15:46 +00:00
extern cvar_t name ;
2014-10-05 20:04:11 +00:00
# endif
2004-08-23 00:15:46 +00:00
2007-08-23 21:25:18 +00:00
extern cvar_t ruleset_allow_playercount ;
extern cvar_t ruleset_allow_frj ;
extern cvar_t ruleset_allow_semicheats ;
extern cvar_t ruleset_allow_packet ;
extern cvar_t ruleset_allow_particle_lightning ;
extern cvar_t ruleset_allow_overlongsounds ;
extern cvar_t ruleset_allow_larger_models ;
2008-02-01 15:21:14 +00:00
extern cvar_t ruleset_allow_modified_eyes ;
2014-03-30 08:55:06 +00:00
extern cvar_t ruleset_allow_sensitive_texture_replacements ;
2008-06-08 14:37:57 +00:00
extern cvar_t ruleset_allow_localvolume ;
2009-11-04 21:16:50 +00:00
extern cvar_t ruleset_allow_shaders ;
2007-08-23 21:25:18 +00:00
2013-03-31 04:21:08 +00:00
# ifndef SERVERONLY
2004-08-23 00:15:46 +00:00
extern client_state_t cl ;
2013-03-31 04:21:08 +00:00
# endif
2004-08-23 00:15:46 +00:00
2010-07-11 02:22:39 +00:00
typedef struct
{
entity_t ent ;
2014-10-05 20:04:11 +00:00
entity_state_t state ;
2010-07-11 02:22:39 +00:00
trailstate_t * emit ;
Fixes, workarounds, and breakages. Hexen2 should work much better (-hexen2 says no mission pack, -portals says h2mp). Started working on splitting bigcoords per client, far too much work still to go on that. Removed gl_ztrick entirely. Enabled csprogs download by default. Added client support for fitzquake's 666 protocol, needs testing, some cleanup for dp protocols too, no server support, couldn't selectively enable it anyway. Now attempting to cache shadow meshes for explosions and stuff. Played with lightmaps a little, should potentially run a little faster on certain (intel?) cards. Tweeked npfte a little to try to avoid deadlocks and crashes. Fixed sky worldspawn parsing. Added h2mp's model format. Fixed baseline issue in q2 client, made servers generate q2 baselines. MOVETYPE_PUSH will not rotate extra if rotation is forced. Made status command show allowed client types. Changed lighting on weapons - should now be shaded.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/branches/wip@3572 fc73d0e0-1445-4013-8a0c-d673dee63da5
2010-08-11 03:36:31 +00:00
int mdlidx ; /*negative are csqc indexes*/
2010-07-11 02:22:39 +00:00
pvscache_t pvscache ;
} static_entity_t ;
2004-08-23 00:15:46 +00:00
// FIXME, allocate dynamically
2006-07-24 04:24:41 +00:00
extern entity_state_t * cl_baselines ;
Fixes, workarounds, and breakages. Hexen2 should work much better (-hexen2 says no mission pack, -portals says h2mp). Started working on splitting bigcoords per client, far too much work still to go on that. Removed gl_ztrick entirely. Enabled csprogs download by default. Added client support for fitzquake's 666 protocol, needs testing, some cleanup for dp protocols too, no server support, couldn't selectively enable it anyway. Now attempting to cache shadow meshes for explosions and stuff. Played with lightmaps a little, should potentially run a little faster on certain (intel?) cards. Tweeked npfte a little to try to avoid deadlocks and crashes. Fixed sky worldspawn parsing. Added h2mp's model format. Fixed baseline issue in q2 client, made servers generate q2 baselines. MOVETYPE_PUSH will not rotate extra if rotation is forced. Made status command show allowed client types. Changed lighting on weapons - should now be shaded.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/branches/wip@3572 fc73d0e0-1445-4013-8a0c-d673dee63da5
2010-08-11 03:36:31 +00:00
extern static_entity_t * cl_static_entities ;
extern unsigned int cl_max_static_entities ;
2004-08-23 00:15:46 +00:00
extern lightstyle_t cl_lightstyle [ MAX_LIGHTSTYLES ] ;
2009-11-04 21:16:50 +00:00
extern dlight_t * cl_dlights ;
extern unsigned int cl_maxdlights ;
2004-08-23 00:15:46 +00:00
2009-11-04 21:16:50 +00:00
extern int rtlights_first , rtlights_max ;
2006-07-24 04:24:41 +00:00
extern int cl_baselines_count ;
2006-05-11 03:14:41 +00:00
2004-08-23 00:15:46 +00:00
extern qboolean nomaster ;
extern float server_version ; // version of server we connected to
//=============================================================================
//
// cl_main
//
2009-11-04 21:16:50 +00:00
void CL_InitDlights ( void ) ;
2010-07-13 09:49:38 +00:00
void CL_FreeDlights ( void ) ;
2004-08-23 00:15:46 +00:00
dlight_t * CL_AllocDlight ( int key ) ;
2009-11-04 21:16:50 +00:00
dlight_t * CL_AllocSlight ( void ) ; //allocates a static light
2011-12-27 08:35:19 +00:00
dlight_t * CL_NewDlight ( int key , const vec3_t origin , float radius , float time , float r , float g , float b ) ;
2009-11-04 21:16:50 +00:00
dlight_t * CL_NewDlightRGB ( int key , const vec3_t origin , float radius , float time , float r , float g , float b ) ;
dlight_t * CL_NewDlightCube ( int key , const vec3_t origin , vec3_t angles , float radius , float time , vec3_t colours ) ;
2004-08-23 00:15:46 +00:00
void CL_DecayLights ( void ) ;
2009-11-04 21:16:50 +00:00
2012-02-12 05:18:31 +00:00
void CLQW_ParseDelta ( struct entity_state_s * from , struct entity_state_s * to , int bits , qboolean ) ;
2004-08-23 00:15:46 +00:00
void CL_Init ( void ) ;
void Host_WriteConfiguration ( void ) ;
void CL_CheckServerInfo ( void ) ;
2011-12-05 15:23:40 +00:00
void CL_CheckServerPacks ( void ) ;
2004-08-23 00:15:46 +00:00
void CL_EstablishConnection ( char * host ) ;
void CL_Disconnect ( void ) ;
void CL_Disconnect_f ( void ) ;
2006-02-11 14:51:36 +00:00
void CL_Reconnect_f ( void ) ;
2004-08-23 00:15:46 +00:00
void CL_NextDemo ( void ) ;
2007-08-06 21:13:15 +00:00
void CL_Startdemos_f ( void ) ;
void CL_Demos_f ( void ) ;
void CL_Stopdemo_f ( void ) ;
void CL_Changing_f ( void ) ;
void CL_Reconnect_f ( void ) ;
void CL_ConnectionlessPacket ( void ) ;
2004-08-23 00:15:46 +00:00
qboolean CL_DemoBehind ( void ) ;
2006-02-11 14:51:36 +00:00
void CL_SaveInfo ( vfsfile_t * f ) ;
2010-08-14 03:17:33 +00:00
void CL_SetInfo ( int pnum , char * key , char * value ) ;
2004-08-23 00:15:46 +00:00
2011-06-16 02:03:57 +00:00
void CL_BeginServerConnect ( int port ) ;
2009-11-04 21:16:50 +00:00
char * CL_TryingToConnect ( void ) ;
2004-08-23 00:15:46 +00:00
2013-06-23 02:17:02 +00:00
void CL_ExecInitialConfigs ( char * defaultexec ) ;
2012-11-27 03:23:19 +00:00
2015-03-03 07:54:10 +00:00
extern int cl_framecount ; //number of times the entity lists have been cleared+reset.
2011-04-30 17:21:10 +00:00
extern int cl_numvisedicts ;
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
extern int cl_maxvisedicts ;
extern entity_t * cl_visedicts ;
2004-08-23 00:15:46 +00:00
2009-11-04 21:16:50 +00:00
/*these are for q3 really*/
typedef struct {
struct shader_s * shader ;
int firstvert ;
int firstidx ;
int numvert ;
int numidx ;
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
unsigned int flags ;
2009-11-04 21:16:50 +00:00
} scenetris_t ;
extern scenetris_t * cl_stris ;
2015-03-03 00:14:43 +00:00
extern vecV_t * fte_restrict cl_strisvertv ;
extern vec4_t * fte_restrict cl_strisvertc ;
extern vec2_t * fte_restrict cl_strisvertt ;
extern index_t * fte_restrict cl_strisidx ;
2009-11-04 21:16:50 +00:00
extern unsigned int cl_numstrisidx ;
extern unsigned int cl_maxstrisidx ;
extern unsigned int cl_numstrisvert ;
extern unsigned int cl_maxstrisvert ;
extern unsigned int cl_numstris ;
extern unsigned int cl_maxstris ;
2004-08-23 00:15:46 +00:00
extern char emodel_name [ ] , pmodel_name [ ] , prespawn_name [ ] , modellist_name [ ] , soundlist_name [ ] ;
2014-12-25 02:32:22 +00:00
unsigned int TraceLineN ( vec3_t start , vec3_t end , vec3_t impact , vec3_t normal ) ;
2006-02-11 14:51:36 +00:00
2004-08-23 00:15:46 +00:00
//
// cl_input
//
typedef struct
{
int down [ MAX_SPLITS ] [ 2 ] ; // key nums holding it down
int state [ MAX_SPLITS ] ; // low bit is down state
} kbutton_t ;
extern kbutton_t in_mlook , in_klook ;
extern kbutton_t in_strafe ;
extern kbutton_t in_speed ;
2005-02-28 07:16:19 +00:00
extern float in_sensitivityscale ;
2005-10-07 02:06:33 +00:00
void CL_MakeActive ( char * gamename ) ;
2012-09-30 05:52:03 +00:00
void CL_UpdateWindowTitle ( void ) ;
2005-10-07 02:06:33 +00:00
2004-08-23 00:15:46 +00:00
void CL_InitInput ( void ) ;
2009-05-24 10:11:17 +00:00
void CL_SendCmd ( double frametime , qboolean mainloop ) ;
2004-08-23 00:15:46 +00:00
void CL_SendMove ( usercmd_t * cmd ) ;
# ifdef NQPROT
void CL_ParseTEnt ( qboolean nqprot ) ;
# else
void CL_ParseTEnt ( void ) ;
# endif
void CL_UpdateTEnts ( void ) ;
2005-08-03 23:14:59 +00:00
void CL_AddBeam ( int tent , int ent , vec3_t start , vec3_t end ) ;
2004-08-23 00:15:46 +00:00
void CL_ClearState ( void ) ;
Fixes, workarounds, and breakages. Hexen2 should work much better (-hexen2 says no mission pack, -portals says h2mp). Started working on splitting bigcoords per client, far too much work still to go on that. Removed gl_ztrick entirely. Enabled csprogs download by default. Added client support for fitzquake's 666 protocol, needs testing, some cleanup for dp protocols too, no server support, couldn't selectively enable it anyway. Now attempting to cache shadow meshes for explosions and stuff. Played with lightmaps a little, should potentially run a little faster on certain (intel?) cards. Tweeked npfte a little to try to avoid deadlocks and crashes. Fixed sky worldspawn parsing. Added h2mp's model format. Fixed baseline issue in q2 client, made servers generate q2 baselines. MOVETYPE_PUSH will not rotate extra if rotation is forced. Made status command show allowed client types. Changed lighting on weapons - should now be shaded.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/branches/wip@3572 fc73d0e0-1445-4013-8a0c-d673dee63da5
2010-08-11 03:36:31 +00:00
void CLQ2_ClearState ( void ) ;
2004-08-23 00:15:46 +00:00
void CL_ReadPackets ( void ) ;
void CL_ClampPitch ( int pnum ) ;
int CL_ReadFromServer ( void ) ;
void CL_WriteToServer ( usercmd_t * cmd ) ;
2005-05-26 12:55:34 +00:00
void CL_BaseMove ( usercmd_t * cmd , int pnum , float extra , float wantfps ) ;
2004-08-23 00:15:46 +00:00
2014-04-13 04:23:13 +00:00
float CL_KeyState ( kbutton_t * key , int pnum , qboolean noslowstart ) ;
2004-08-23 00:15:46 +00:00
char * Key_KeynumToString ( int keynum ) ;
2014-03-30 08:55:06 +00:00
int Key_StringToKeynum ( const char * str , int * modifier ) ;
2005-07-08 00:37:52 +00:00
char * Key_GetBinding ( int keynum ) ;
2004-08-23 00:15:46 +00:00
2006-02-11 14:51:36 +00:00
void CL_UseIndepPhysics ( qboolean allow ) ;
void CL_FlushClientCommands ( void ) ;
2009-11-04 21:16:50 +00:00
void VARGS CL_SendClientCommand ( qboolean reliable , char * format , . . . ) LIKEPRINTF ( 2 ) ;
2010-12-05 02:46:07 +00:00
float CL_FilterTime ( double time , float wantfps , qboolean ignoreserver ) ;
2006-02-11 14:51:36 +00:00
int CL_RemoveClientCommands ( char * command ) ;
2005-02-28 07:16:19 +00:00
void CL_AllowIndependantSendCmd ( qboolean allow ) ;
2006-02-11 14:51:36 +00:00
void CL_DrawPrydonCursor ( void ) ;
2004-08-23 00:15:46 +00:00
//
// cl_demo.c
//
void CL_StopPlayback ( void ) ;
qboolean CL_GetMessage ( void ) ;
void CL_WriteDemoCmd ( usercmd_t * pcmd ) ;
2009-11-04 21:16:50 +00:00
void CL_Demo_ClientCommand ( char * commandtext ) ; //for QTV.
2004-08-23 00:15:46 +00:00
void CL_Stop_f ( void ) ;
void CL_Record_f ( void ) ;
void CL_ReRecord_f ( void ) ;
void CL_PlayDemo_f ( void ) ;
2006-03-14 01:25:46 +00:00
void CL_QTVPlay_f ( void ) ;
2007-08-06 21:13:15 +00:00
void CL_QTVPoll ( void ) ;
2006-09-17 00:59:22 +00:00
void CL_QTVList_f ( void ) ;
2007-05-25 22:16:29 +00:00
void CL_QTVDemos_f ( void ) ;
2005-12-21 03:07:33 +00:00
void CL_DemoJump_f ( void ) ;
2006-02-11 14:51:36 +00:00
void CL_ProgressDemoTime ( void ) ;
2004-08-23 00:15:46 +00:00
void CL_TimeDemo_f ( void ) ;
2009-04-01 22:03:56 +00:00
typedef struct
{
enum
{
QTVCT_NONE ,
QTVCT_STREAM ,
QTVCT_CONNECT ,
QTVCT_JOIN ,
QTVCT_OBSERVE ,
2009-04-07 01:26:47 +00:00
QTVCT_MAP
2009-04-01 22:03:56 +00:00
} connectiontype ;
enum
{
QTVCT_NETQUAKE ,
QTVCT_QUAKEWORLD ,
QTVCT_QUAKE2 ,
QTVCT_QUAKE3
} protocol ;
char server [ 256 ] ;
char splashscreen [ 256 ] ;
//char *datafiles;
} qtvfile_t ;
void CL_ParseQTVFile ( vfsfile_t * f , const char * fname , qtvfile_t * result ) ;
2004-08-23 00:15:46 +00:00
//
// cl_parse.c
//
# define NET_TIMINGS 256
# define NET_TIMINGSMASK 255
extern int packet_latency [ NET_TIMINGS ] ;
2014-03-30 08:55:06 +00:00
int CL_CalcNet ( float scale ) ;
2015-04-21 04:12:00 +00:00
float CL_CalcNet2 ( float * ping , float * ping_min , float * ping_max , float * ping_stddev ) ;
2009-11-04 21:16:50 +00:00
void CL_ClearParseState ( void ) ;
2012-07-05 19:42:36 +00:00
void CL_Parse_Disconnected ( void ) ;
2006-02-28 00:46:04 +00:00
void CL_DumpPacket ( void ) ;
2008-12-03 02:42:05 +00:00
void CL_ParseEstablished ( void ) ;
2011-09-03 03:49:43 +00:00
void CLQW_ParseServerMessage ( void ) ;
2004-08-23 00:15:46 +00:00
void CLNQ_ParseServerMessage ( void ) ;
# ifdef Q2CLIENT
void CLQ2_ParseServerMessage ( void ) ;
# endif
void CL_NewTranslation ( int slot ) ;
2009-11-04 21:16:50 +00:00
2014-03-30 08:55:06 +00:00
int CL_IsDownloading ( const char * localname ) ;
qboolean CL_CheckOrEnqueDownloadFile ( const char * filename , const char * localname , unsigned int flags ) ;
qboolean CL_EnqueDownload ( const char * filename , const char * localname , unsigned int flags ) ;
2014-06-12 23:08:42 +00:00
downloadlist_t * CL_DownloadFailed ( const char * name , qdownload_t * qdl ) ;
2009-11-04 21:16:50 +00:00
int CL_DownloadRate ( void ) ;
2014-06-12 23:08:42 +00:00
void CL_GetDownloadSizes ( unsigned int * filecount , qofs_t * totalsize , qboolean * somesizesunknown ) ;
2009-11-04 21:16:50 +00:00
qboolean CL_ParseOOBDownload ( void ) ;
2014-06-12 23:08:42 +00:00
void CL_DownloadFinished ( qdownload_t * dl ) ;
2009-11-04 21:16:50 +00:00
void CL_RequestNextDownload ( void ) ;
void CL_SendDownloadReq ( sizebuf_t * msg ) ;
2014-03-30 08:55:06 +00:00
void Sound_CheckDownload ( const char * s ) ; /*checkorenqueue a sound file*/
2009-11-04 21:16:50 +00:00
2004-08-23 00:15:46 +00:00
qboolean CL_IsUploading ( void ) ;
void CL_NextUpload ( void ) ;
void CL_StartUpload ( qbyte * data , int size ) ;
void CL_StopUpload ( void ) ;
2007-08-06 21:13:15 +00:00
qboolean CL_CheckBaselines ( int size ) ;
2004-08-23 00:15:46 +00:00
//
// view.c
//
2013-06-23 02:17:02 +00:00
void V_StartPitchDrift ( playerview_t * pv ) ;
void V_StopPitchDrift ( playerview_t * pv ) ;
2004-08-23 00:15:46 +00:00
void V_RenderView ( void ) ;
void V_Register ( void ) ;
2013-06-23 02:17:02 +00:00
void V_ParseDamage ( playerview_t * pv ) ;
2004-08-23 00:15:46 +00:00
void V_SetContentsColor ( int contents ) ;
2006-02-11 14:51:36 +00:00
//used directly by csqc
2013-06-23 02:17:02 +00:00
void V_CalcRefdef ( playerview_t * pv ) ;
void V_ClearRefdef ( playerview_t * pv ) ;
void V_ApplyRefdef ( void ) ;
void V_CalcGunPositionAngle ( playerview_t * pv , float bob ) ;
float V_CalcBob ( playerview_t * pv , qboolean queryold ) ;
void DropPunchAngle ( playerview_t * pv ) ;
2006-02-11 14:51:36 +00:00
2004-08-23 00:15:46 +00:00
//
// cl_tent
//
2008-11-09 22:29:28 +00:00
void CL_RegisterParticles ( void ) ;
2004-08-23 00:15:46 +00:00
void CL_InitTEnts ( void ) ;
2012-05-14 01:41:08 +00:00
void CL_InitTEntSounds ( void ) ;
2004-08-23 00:15:46 +00:00
void CL_ClearTEnts ( void ) ;
2011-06-18 12:25:36 +00:00
void CL_ClearTEntParticleState ( void ) ;
2004-08-23 00:15:46 +00:00
void CL_ClearCustomTEnts ( void ) ;
void CL_ParseCustomTEnt ( void ) ;
2004-11-23 01:10:10 +00:00
void CL_ParseEffect ( qboolean effect2 ) ;
2004-08-23 00:15:46 +00:00
2005-03-10 03:55:18 +00:00
void CLNQ_ParseParticleEffect ( void ) ;
void CL_ParseParticleEffect2 ( void ) ;
void CL_ParseParticleEffect3 ( void ) ;
void CL_ParseParticleEffect4 ( void ) ;
2012-07-05 19:42:36 +00:00
int CL_TranslateParticleFromServer ( int sveffect ) ;
void CL_ParseTrailParticles ( void ) ;
void CL_ParsePointParticles ( qboolean compact ) ;
2014-05-10 13:42:13 +00:00
void CL_SpawnSpriteEffect ( vec3_t org , vec3_t dir , vec3_t orientationup , struct model_s * model , int startframe , int framecount , float framerate , float alpha , float randspin , float gravity , int traileffect , unsigned int renderflags ) ; /*called from the particlesystem*/
2008-11-09 22:29:28 +00:00
2004-08-23 00:15:46 +00:00
//
// cl_ents.c
//
2012-02-12 05:18:31 +00:00
void CL_SetSolidPlayers ( void ) ;
2004-08-23 00:15:46 +00:00
void CL_SetUpPlayerPrediction ( qboolean dopred ) ;
2010-07-11 02:22:39 +00:00
void CL_LinkStaticEntities ( void * pvs ) ;
2011-12-05 15:23:40 +00:00
void CL_TransitionEntities ( void ) ; /*call at the start of the frame*/
2004-08-23 00:15:46 +00:00
void CL_EmitEntities ( void ) ;
void CL_ClearProjectiles ( void ) ;
2004-12-08 04:14:52 +00:00
void CL_ParseProjectiles ( int modelindex , qboolean nails2 ) ;
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
void CLQW_ParsePacketEntities ( qboolean delta ) ;
2012-02-12 05:18:31 +00:00
void CLFTE_ParseEntities ( void ) ;
2012-07-05 19:42:36 +00:00
void CLFTE_ParseBaseline ( entity_state_t * es , qboolean numberisimportant ) ;
2004-08-23 00:15:46 +00:00
void CL_SetSolidEntities ( void ) ;
void CL_ParsePlayerinfo ( void ) ;
void CL_ParseClientPersist ( void ) ;
2005-02-12 18:56:04 +00:00
//these last ones are needed for csqc handling of engine-bound ents.
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
void CL_ClearEntityLists ( void ) ;
2014-02-07 08:38:40 +00:00
int CL_EditExternalModels ( int newviewentity , entity_t * viewentities , int maxviewenties ) ;
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
void CL_FreeVisEdicts ( void ) ;
2005-02-12 18:56:04 +00:00
void CL_LinkViewModel ( void ) ;
void CL_LinkPlayers ( void ) ;
void CL_LinkPacketEntities ( void ) ;
void CL_LinkProjectiles ( void ) ;
2011-06-18 12:25:36 +00:00
void CL_ClearLerpEntsParticleState ( void ) ;
2008-12-03 02:42:05 +00:00
qboolean CL_MayLerp ( void ) ;
2005-02-12 18:56:04 +00:00
//
//clq3_parse.c
//
# ifdef Q3CLIENT
2009-11-04 21:16:50 +00:00
void VARGS CLQ3_SendClientCommand ( const char * fmt , . . . ) LIKEPRINTF ( 1 ) ;
2013-05-03 04:28:08 +00:00
void CLQ3_SendAuthPacket ( netadr_t * gameserver ) ;
void CLQ3_SendConnectPacket ( netadr_t * to ) ;
2005-02-12 18:56:04 +00:00
void CLQ3_SendCmd ( usercmd_t * cmd ) ;
qboolean CLQ3_Netchan_Process ( void ) ;
void CLQ3_ParseServerMessage ( void ) ;
2005-11-26 03:02:55 +00:00
struct snapshot_s ;
2005-02-12 18:56:04 +00:00
qboolean CG_FillQ3Snapshot ( int snapnum , struct snapshot_s * snapshot ) ;
void CG_InsertIntoGameState ( int num , char * str ) ;
void CG_Restart_f ( void ) ;
2005-08-26 22:56:51 +00:00
char * CG_GetConfigString ( int num ) ;
2005-02-12 18:56:04 +00:00
# endif
//
//pr_csqc.c
//
# ifdef CSQC_DAT
2011-09-03 03:49:43 +00:00
qboolean CSQC_Inited ( void ) ;
2012-07-05 19:42:36 +00:00
void CSQC_RendererRestarted ( void ) ;
2013-03-12 22:53:23 +00:00
qboolean CSQC_UnconnectedOkay ( qboolean inprinciple ) ;
qboolean CSQC_UnconnectedInit ( void ) ;
2012-10-13 00:56:31 +00:00
qboolean CSQC_Init ( qboolean anycsqc , qboolean csdatenabled , unsigned int checksum ) ;
qboolean CSQC_ConsoleLink ( char * text , char * info ) ;
2006-02-11 14:51:36 +00:00
void CSQC_RegisterCvarsAndThings ( void ) ;
2013-12-29 22:48:28 +00:00
qboolean CSQC_SetupToRenderPortal ( int entnum ) ;
2005-02-12 18:56:04 +00:00
qboolean CSQC_DrawView ( void ) ;
2014-12-11 16:26:26 +00:00
qboolean CSQC_UseGamecodeLoadingScreen ( void ) ;
2005-02-12 18:56:04 +00:00
void CSQC_Shutdown ( void ) ;
2010-07-11 02:22:39 +00:00
qboolean CSQC_StuffCmd ( int lplayernum , char * cmd , char * cmdend ) ;
2008-11-09 22:29:28 +00:00
qboolean CSQC_LoadResource ( char * resname , char * restype ) ;
2009-11-04 21:16:50 +00:00
qboolean CSQC_ParsePrint ( char * message , int printlevel ) ;
qboolean CSQC_ParseGamePacket ( void ) ;
2008-11-28 20:34:51 +00:00
qboolean CSQC_CenterPrint ( int lplayernum , char * cmd ) ;
2015-03-03 00:14:43 +00:00
qboolean CSQC_Parse_Damage ( float save , float take , vec3_t source ) ;
2008-11-28 20:34:51 +00:00
void CSQC_Input_Frame ( int lplayernum , usercmd_t * cmd ) ;
2008-11-09 22:29:28 +00:00
void CSQC_WorldLoaded ( void ) ;
2014-03-30 08:55:06 +00:00
qboolean CSQC_ParseTempEntity ( void ) ;
2005-06-14 04:52:10 +00:00
qboolean CSQC_ConsoleCommand ( char * cmd ) ;
2012-02-12 05:18:31 +00:00
qboolean CSQC_KeyPress ( int key , int unicode , qboolean down , int devid ) ;
qboolean CSQC_MouseMove ( float xdelta , float ydelta , int devid ) ;
qboolean CSQC_MousePosition ( float xabs , float yabs , int devid ) ;
2014-06-27 16:10:10 +00:00
qboolean CSQC_JoystickAxis ( int axis , float value , int devid ) ;
2012-02-12 05:18:31 +00:00
qboolean CSQC_Accelerometer ( float x , float y , float z ) ;
2013-03-12 22:35:33 +00:00
int CSQC_StartSound ( int entnum , int channel , char * soundname , vec3_t pos , float vol , float attenuation , float pitchmod ) ;
2005-08-03 23:14:59 +00:00
void CSQC_ParseEntities ( void ) ;
2014-10-05 20:04:11 +00:00
void CSQC_ResetTrails ( void ) ;
2009-04-06 00:34:32 +00:00
qboolean CSQC_DeltaPlayer ( int playernum , player_state_t * state ) ;
void CSQC_DeltaStart ( float time ) ;
qboolean CSQC_DeltaUpdate ( entity_state_t * src ) ;
void CSQC_DeltaEnd ( void ) ;
2011-05-20 04:10:46 +00:00
void CSQC_CvarChanged ( cvar_t * var ) ;
2013-03-12 22:59:16 +00:00
# else
# define CSQC_UnconnectedOkay(inprinciple) false
# define CSQC_UnconnectedInit() false
2014-12-11 16:26:26 +00:00
# define CSQC_UseGamecodeLoadingScreen() false
2005-02-12 18:56:04 +00:00
# endif
2004-08-23 00:15:46 +00:00
//
// cl_pred.c
//
void CL_InitPrediction ( void ) ;
void CL_PredictMove ( void ) ;
2012-04-24 07:59:11 +00:00
void CL_PredictUsercmd ( int pnum , int entnum , player_state_t * from , player_state_t * to , usercmd_t * u ) ;
2004-08-23 00:15:46 +00:00
# ifdef Q2CLIENT
void CLQ2_CheckPredictionError ( void ) ;
# endif
2006-02-11 14:51:36 +00:00
void CL_CalcClientTime ( void ) ;
2004-08-23 00:15:46 +00:00
//
// cl_cam.c
//
2013-06-23 02:17:02 +00:00
qboolean Cam_DrawViewModel ( playerview_t * pv ) ;
int Cam_TrackNum ( playerview_t * pv ) ;
void Cam_Unlock ( playerview_t * pv ) ;
void Cam_Lock ( playerview_t * pv , int playernum ) ;
void Cam_SelfTrack ( playerview_t * pv ) ;
void Cam_Track ( playerview_t * pv , usercmd_t * cmd ) ;
void Cam_TrackCrosshairedPlayer ( playerview_t * pv ) ;
2009-11-04 21:16:50 +00:00
void Cam_SetAutoTrack ( int userid ) ;
2013-06-23 02:17:02 +00:00
void Cam_FinishMove ( playerview_t * pv , usercmd_t * cmd ) ;
2004-08-23 00:15:46 +00:00
void Cam_Reset ( void ) ;
2013-06-23 02:17:02 +00:00
void Cam_TrackPlayer ( int seat , char * cmdname , char * plrarg ) ;
void Cam_Lock ( playerview_t * pv , int playernum ) ;
2004-08-23 00:15:46 +00:00
void CL_InitCam ( void ) ;
2011-10-27 15:46:36 +00:00
void QDECL vectoangles ( vec3_t fwd , vec3_t ang ) ;
2006-02-11 14:51:36 +00:00
2004-10-13 06:32:14 +00:00
//
//zqtp.c
//
2005-09-08 08:10:06 +00:00
# define TPM_UNKNOWN 0
# define TPM_NORMAL 1
# define TPM_TEAM 2
# define TPM_SPECTATOR 4
# define TPM_FAKED 16
2008-11-09 22:29:28 +00:00
# define TPM_OBSERVEDTEAM 32
2005-09-08 08:10:06 +00:00
2007-10-05 19:10:43 +00:00
void CL_Say ( qboolean team , char * extra ) ;
int TP_CategorizeMessage ( char * s , int * offset , player_info_t * * plr ) ;
void TP_CheckPickupSound ( char * s , vec3_t org ) ;
qboolean TP_CheckSoundTrigger ( char * str ) ;
int TP_CountPlayers ( void ) ;
char * TP_EnemyName ( void ) ;
char * TP_EnemyTeam ( void ) ;
void TP_ExecTrigger ( char * s ) ;
qboolean TP_FilterMessage ( char * s ) ;
void TP_Init ( void ) ;
char * TP_LocationName ( vec3_t location ) ;
char * TP_MapName ( void ) ;
void TP_NewMap ( void ) ;
void TP_ParsePlayerInfo ( player_state_t * oldstate , player_state_t * state , player_info_t * info ) ;
2009-11-04 21:16:50 +00:00
qboolean TP_IsPlayerVisible ( vec3_t origin ) ;
2007-10-05 19:10:43 +00:00
char * TP_PlayerName ( void ) ;
char * TP_PlayerTeam ( void ) ;
void TP_SearchForMsgTriggers ( char * s , int level ) ;
qboolean TP_SoundTrigger ( char * message ) ;
void TP_StatChanged ( int stat , int value ) ;
qboolean TP_SuppressMessage ( char * buf ) ;
2008-11-09 22:29:28 +00:00
colourised_t * TP_FindColours ( char * name ) ;
2009-11-04 21:16:50 +00:00
void TP_UpdateAutoStatus ( void ) ;
2006-02-11 14:51:36 +00:00
2004-08-23 00:15:46 +00:00
//
// skin.c
//
typedef struct
{
char manufacturer ;
char version ;
char encoding ;
char bits_per_pixel ;
unsigned short xmin , ymin , xmax , ymax ;
unsigned short hres , vres ;
unsigned char palette [ 48 ] ;
char reserved ;
char color_planes ;
unsigned short bytes_per_line ;
unsigned short palette_type ;
char filler [ 58 ] ;
// unsigned char data; // unbounded
} pcx_t ;
2006-02-11 14:51:36 +00:00
qbyte * ReadPCXData ( qbyte * buf , int length , int width , int height , qbyte * result ) ;
2004-08-23 00:15:46 +00:00
2014-09-08 23:47:19 +00:00
qwskin_t * Skin_Lookup ( char * fullname ) ;
2004-12-29 03:24:21 +00:00
char * Skin_FindName ( player_info_t * sc ) ;
2004-08-23 00:15:46 +00:00
void Skin_Find ( player_info_t * sc ) ;
2014-09-08 23:47:19 +00:00
qbyte * Skin_Cache8 ( qwskin_t * skin ) ;
2004-08-23 00:15:46 +00:00
void Skin_Skins_f ( void ) ;
void Skin_FlushSkin ( char * name ) ;
void Skin_AllSkins_f ( void ) ;
void Skin_NextDownload ( void ) ;
2005-01-24 23:47:32 +00:00
void Skin_FlushPlayers ( void ) ;
2013-03-12 22:53:23 +00:00
void Skin_FlushAll ( void ) ;
2004-08-23 00:15:46 +00:00
# define RSSHOT_WIDTH 320
# define RSSHOT_HEIGHT 200
//valid.c
2007-09-18 01:08:49 +00:00
void RulesetLatch ( cvar_t * cvar ) ;
void Validation_Apply_Ruleset ( void ) ;
2004-08-23 00:15:46 +00:00
void Validation_FlushFileList ( void ) ;
void Validation_CheckIfResponse ( char * text ) ;
2007-09-18 01:08:49 +00:00
void Validation_DelatchRulesets ( void ) ;
2004-08-23 00:15:46 +00:00
void InitValidation ( void ) ;
2005-07-09 15:47:20 +00:00
void Validation_IncludeFile ( char * filename , char * file , int filelen ) ;
2007-09-17 20:35:39 +00:00
void Validation_Auto_Response ( int playernum , char * s ) ;
2004-08-23 00:15:46 +00:00
extern qboolean f_modified_particles ;
extern qboolean care_f_modified ;
2004-10-13 06:32:14 +00:00
//random files (fixme: clean up)
2004-08-23 00:15:46 +00:00
# ifdef Q2CLIENT
void CLQ2_ParseTEnt ( void ) ;
void CLQ2_AddEntities ( void ) ;
void CLQ2_ParseBaseline ( void ) ;
2013-10-08 14:28:11 +00:00
void CLQ2_ClearParticleState ( void ) ;
2004-08-23 00:15:46 +00:00
void CLQ2_ParseFrame ( void ) ;
2005-03-18 06:14:07 +00:00
void CLQ2_RunMuzzleFlash2 ( int ent , int flash_number ) ;
2004-08-23 00:15:46 +00:00
int CLQ2_RegisterTEntModels ( void ) ;
# endif
2012-07-05 19:42:36 +00:00
# ifdef HLCLIENT
//networking
void CLHL_LoadClientGame ( void ) ;
int CLHL_ParseGamePacket ( void ) ;
int CLHL_AnimateViewEntity ( entity_t * ent ) ;
//screen
int CLHL_DrawHud ( void ) ;
//inputs
int CLHL_GamecodeDoesMouse ( void ) ;
int CLHL_MouseEvent ( unsigned int buttonmask ) ;
void CLHL_SetMouseActive ( int activate ) ;
int CLHL_BuildUserInput ( int msecs , usercmd_t * cmd ) ;
# endif
2009-11-04 21:16:50 +00:00
# ifdef NQPROT
void CLNQ_ParseEntity ( unsigned int bits ) ;
2005-03-10 03:55:18 +00:00
void NQ_P_ParseParticleEffect ( void ) ;
2004-08-23 00:15:46 +00:00
void CLNQ_SignonReply ( void ) ;
void NQ_BeginConnect ( char * to ) ;
void NQ_ContinueConnect ( char * to ) ;
int CLNQ_GetMessage ( void ) ;
2009-11-04 21:16:50 +00:00
# endif
2004-08-23 00:15:46 +00:00
void CL_BeginServerReconnect ( void ) ;
void SV_User_f ( void ) ; //called by client version of the function
void SV_Serverinfo_f ( void ) ;
2014-03-30 08:55:06 +00:00
void SV_ConSay_f ( void ) ;
2004-08-23 00:15:46 +00:00
# ifdef TEXTEDITOR
extern qboolean editoractive ;
extern qboolean editormodal ;
void Editor_Draw ( void ) ;
void Editor_Init ( void ) ;
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
struct pubprogfuncs_s ;
void Editor_ProgsKilled ( struct pubprogfuncs_s * dead ) ;
2004-08-23 00:15:46 +00:00
# endif
2006-03-11 00:35:56 +00:00
void SCR_StringToRGB ( char * rgbstring , float * rgb , float rgbinputscale ) ;
2004-10-13 06:32:14 +00:00
2009-07-06 01:20:20 +00:00
struct model_s ;
void CL_AddVWeapModel ( entity_t * player , struct model_s * model ) ;
2004-08-23 00:15:46 +00:00
2010-07-11 02:22:39 +00:00
/*q2 cinematics*/
struct cinematics_s ;
void CIN_StopCinematic ( struct cinematics_s * cin ) ;
struct cinematics_s * CIN_PlayCinematic ( char * arg ) ;
int CIN_RunCinematic ( struct cinematics_s * cin , qbyte * * outdata , int * outwidth , int * outheight , qbyte * * outpalette ) ;
2004-08-23 00:15:46 +00:00
2011-12-06 00:37:14 +00:00
typedef struct cin_s cin_t ;
2011-12-05 15:23:40 +00:00
# ifdef NOMEDIA
2011-12-23 03:12:29 +00:00
# define Media_Playing() false
# define Media_Init() 0
# define Media_PlayingFullScreen() false
2013-05-03 04:28:08 +00:00
# define Media_PlayFilm(n,e) false
2013-05-04 04:38:48 +00:00
# define Media_StopFilm(a) true
2011-12-05 15:23:40 +00:00
# else
2010-07-11 02:22:39 +00:00
/*media playing system*/
2006-03-06 01:41:09 +00:00
qboolean Media_PlayingFullScreen ( void ) ;
2004-08-23 00:15:46 +00:00
void Media_Init ( void ) ;
2013-05-03 04:28:08 +00:00
qboolean Media_PlayFilm ( char * name , qboolean enqueue ) ;
qboolean Media_StopFilm ( qboolean all ) ;
2006-03-06 01:41:09 +00:00
struct cin_s * Media_StartCin ( char * name ) ;
2011-10-27 15:46:36 +00:00
texid_tf Media_UpdateForShader ( cin_t * cin ) ;
2006-03-06 01:41:09 +00:00
void Media_ShutdownCin ( cin_t * cin ) ;
2011-12-05 15:23:40 +00:00
# endif
2014-03-30 08:55:06 +00:00
qboolean Media_BackgroundTrack ( const char * initialtrack , const char * looptrack ) ; //new background music interface
2013-10-08 16:13:18 +00:00
void Media_NumberedTrack ( unsigned int initialtrack , unsigned int looptrack ) ; //legacy cd interface for protocols that only support numbered tracks.
void Media_EndedTrack ( void ) ; //cd is no longer running, media code needs to pick a new track (cd track or faketrack)
2006-03-06 01:41:09 +00:00
2008-11-09 22:29:28 +00:00
//these accept NULL for cin to mean the current fullscreen video
2014-03-30 08:55:06 +00:00
void Media_Send_Command ( cin_t * cin , const char * command ) ;
2008-11-09 22:29:28 +00:00
void Media_Send_MouseMove ( cin_t * cin , float x , float y ) ;
void Media_Send_Resize ( cin_t * cin , int x , int y ) ;
2015-02-02 08:01:53 +00:00
void Media_Send_GetSize ( cin_t * cin , int * x , int * y , float * aspect ) ;
2009-07-25 11:05:06 +00:00
void Media_Send_KeyEvent ( cin_t * cin , int button , int unicode , int event ) ;
2014-05-23 02:02:51 +00:00
void Media_Send_Reset ( cin_t * cin ) ;
2015-02-02 08:01:53 +00:00
void Media_Send_GetPositions ( cin_t * cin , qboolean * active , float * curtime , float * duration ) ;
2008-11-09 22:29:28 +00:00
2004-08-23 00:15:46 +00:00
void MVD_Interpolate ( void ) ;
2004-09-13 03:11:44 +00:00
2007-08-06 21:13:15 +00:00
int Stats_GetKills ( int playernum ) ;
int Stats_GetTKills ( int playernum ) ;
int Stats_GetDeaths ( int playernum ) ;
int Stats_GetTouches ( int playernum ) ;
int Stats_GetCaptures ( int playernum ) ;
qboolean Stats_HaveFlags ( void ) ;
qboolean Stats_HaveKills ( void ) ;
2009-11-04 21:16:50 +00:00
void VARGS Stats_Message ( char * msg , . . . ) LIKEPRINTF ( 1 ) ;
2007-08-06 21:13:15 +00:00
int qm_strcmp ( char * s1 , char * s2 ) ;
int qm_stricmp ( char * s1 , char * s2 ) ;
2015-04-14 23:12:17 +00:00
qboolean Stats_ParsePrintLine ( char * line ) ;
2007-08-06 21:13:15 +00:00
void Stats_NewMap ( void ) ;
2014-10-05 20:04:11 +00:00
void Stats_Clear ( void ) ;
2006-02-11 14:51:36 +00:00
2012-04-24 07:59:11 +00:00
enum uploadfmt ;
typedef struct
{
2013-07-26 17:19:06 +00:00
char * drivername ;
2012-04-24 07:59:11 +00:00
void * ( VARGS * createdecoder ) ( char * name ) ;
void * ( VARGS * decodeframe ) ( void * ctx , qboolean nosound , enum uploadfmt * fmt , int * width , int * height ) ;
void ( VARGS * doneframe ) ( void * ctx , void * img ) ;
void ( VARGS * shutdown ) ( void * ctx ) ;
void ( VARGS * rewind ) ( void * ctx ) ;
//these are any interactivity functions you might want...
void ( VARGS * cursormove ) ( void * ctx , float posx , float posy ) ; //pos is 0-1
void ( VARGS * key ) ( void * ctx , int code , int unicode , int event ) ;
qboolean ( VARGS * setsize ) ( void * ctx , int width , int height ) ;
void ( VARGS * getsize ) ( void * ctx , int * width , int * height ) ;
2014-03-30 08:55:06 +00:00
void ( VARGS * changestream ) ( void * ctx , const char * streamname ) ;
2012-04-24 07:59:11 +00:00
} media_decoder_funcs_t ;
2012-11-27 03:23:19 +00:00
typedef struct {
2013-07-26 17:19:06 +00:00
char * drivername ;
2012-11-27 03:23:19 +00:00
void * ( VARGS * capture_begin ) ( char * streamname , int videorate , int width , int height , int * sndkhz , int * sndchannels , int * sndbits ) ;
void ( VARGS * capture_video ) ( void * ctx , void * data , int frame , int width , int height ) ;
void ( VARGS * capture_audio ) ( void * ctx , void * data , int bytes ) ;
void ( VARGS * capture_end ) ( void * ctx ) ;
} media_encoder_funcs_t ;
2012-04-24 07:59:11 +00:00
extern struct plugin_s * currentplug ;
qboolean Media_RegisterDecoder ( struct plugin_s * plug , media_decoder_funcs_t * funcs ) ;
qboolean Media_UnregisterDecoder ( struct plugin_s * plug , media_decoder_funcs_t * funcs ) ;
2012-11-27 03:23:19 +00:00
qboolean Media_RegisterEncoder ( struct plugin_s * plug , media_encoder_funcs_t * funcs ) ;
qboolean Media_UnregisterEncoder ( struct plugin_s * plug , media_encoder_funcs_t * funcs ) ;