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-12-21 03:07:33 +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 .
*/
// server.h
# define QW_SERVER
typedef enum {
ss_dead , // no map loaded
2014-03-30 08:55:06 +00:00
ss_clustermode ,
2004-08-23 00:15:46 +00:00
ss_loading , // spawning level edicts
ss_active , // actively running
ss_cinematic
} server_state_t ;
// some qc commands are only valid before the server has finished
// initializing (precache commands, static sounds / objects, etc)
# ifdef SVCHAT
typedef struct chatvar_s {
char varname [ 64 ] ;
float value ;
struct chatvar_s * next ;
} chatvar_t ;
typedef struct {
qboolean active ;
char filename [ 64 ] ;
edict_t * edict ;
char maintext [ 1024 ] ;
struct
{
float tag ;
char text [ 256 ] ;
} option [ 6 ] ;
int options ;
chatvar_t * vars ;
float time ;
} svchat_t ;
# endif
typedef struct {
int netstyle ;
char particleeffecttype [ 64 ] ;
char stain [ 3 ] ;
qbyte radius ;
qbyte dlightrgb [ 3 ] ;
qbyte dlightradius ;
qbyte dlighttime ;
2004-08-30 06:07:13 +00:00
qbyte dlightcfade [ 3 ] ;
2004-08-23 00:15:46 +00:00
} svcustomtents_t ;
2007-08-30 20:45:01 +00:00
typedef struct laggedpacket_s
{
double time ;
struct laggedpacket_s * next ;
int length ;
2012-02-12 05:18:31 +00:00
unsigned char data [ MAX_QWMSGLEN + 10 ] ;
2007-08-30 20:45:01 +00:00
} laggedpacket_t ;
2004-12-08 04:14:52 +00:00
typedef struct
{
vec3_t origin ;
2005-01-25 05:01:30 +00:00
char angles [ 3 ] ;
2004-12-08 04:14:52 +00:00
qbyte modelindex ;
qbyte frame ;
qbyte colormap ;
qbyte skinnum ;
qbyte effects ;
qbyte scale ;
qbyte trans ;
2005-01-25 05:01:30 +00:00
char fatness ;
2004-12-08 04:14:52 +00:00
} mvdentity_state_t ;
2015-04-14 23:12:17 +00:00
typedef struct
{
vec3_t position ;
unsigned short soundnum ;
qbyte volume ;
qbyte attenuation ;
} staticsound_state_t ;
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 entity_state_t * sv_staticentities ;
extern int sv_max_staticentities ;
2015-04-14 23:12:17 +00:00
extern staticsound_state_t * sv_staticsounds ;
extern int sv_max_staticsounds ;
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
2022-03-08 05:31:34 +00:00
typedef struct server_s
2004-08-23 00:15:46 +00:00
{
qboolean active ; // false when server is going down
server_state_t state ; // precache commands are only valid during load
2005-03-20 02:57:11 +00:00
float gamespeed ; //time progression multiplier, fixed per-level.
2008-05-25 22:23:43 +00:00
unsigned int csqcchecksum ;
2007-03-04 19:17:16 +00:00
qboolean mapchangelocked ;
2005-03-20 02:57:11 +00:00
2018-08-04 07:05:20 +00:00
# ifdef SAVEDGAMES
2018-09-01 04:18:08 +00:00
char loadgame_on_restart [ MAX_QPATH ] ; //saved game to load on map_restart
2016-01-18 05:22:07 +00:00
double autosave_time ;
2018-08-04 07:05:20 +00:00
# endif
2022-03-08 05:31:34 +00:00
double time ; //time passed since map (re)start
double starttime ; //Sys_DoubleTime at the start of the map
double restarttime ; //for delayed map restarts - map will restart once sv.time reaches this stamp
2004-08-23 00:15:46 +00:00
int framenum ;
2014-03-30 08:55:06 +00:00
int logindatabase ;
2005-12-21 03:07:33 +00:00
2016-08-25 00:12:14 +00:00
enum
{
PAUSE_EXPLICIT = 1 , //someone hit pause
PAUSE_SERVICE = 2 , //we're running as a service and someone paused us rather than killing us.
PAUSE_AUTO = 4 //console is down in a singleplayer game.
2018-10-23 07:09:06 +00:00
} paused , oldpaused ;
2016-08-25 00:12:14 +00:00
float pausedstart ;
2004-08-23 00:15:46 +00:00
//check player/eyes models for hacks
unsigned model_player_checksum ;
unsigned eyes_player_checksum ;
2005-12-21 03:07:33 +00:00
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
// char name[64]; // file map name (moved to svs, for restart)
char mapname [ 256 ] ; // text description of the map
2004-08-23 00:15:46 +00:00
char modelname [ MAX_QPATH ] ; // maps/<name>.bsp, for model_precache[0]
2009-11-04 21:16:50 +00:00
world_t world ;
2004-08-23 00:15:46 +00:00
2005-03-20 02:57:11 +00:00
union {
# ifdef Q2SERVER
struct {
2016-01-18 05:22:07 +00:00
const char * configstring [ Q2MAX_CONFIGSTRINGS ] ;
const char * q2_extramodels [ MAX_PRECACHE_MODELS ] ; // NULL terminated
const char * q2_extrasounds [ MAX_PRECACHE_SOUNDS ] ; // NULL terminated
2005-03-20 02:57:11 +00:00
} ;
# endif
struct {
2019-04-16 22:40:05 +00:00
# ifdef HAVE_LEGACY
2016-01-18 05:22:07 +00:00
const char * vw_model_precache [ 32 ] ;
2018-09-01 04:18:08 +00:00
# endif
2014-09-17 03:04:08 +00:00
const char * model_precache [ MAX_PRECACHE_MODELS ] ; // NULL terminated
2016-01-18 05:22:07 +00:00
const char * particle_precache [ MAX_SSPARTICLESPRE ] ; // NULL terminated
const char * sound_precache [ MAX_PRECACHE_SOUNDS ] ; // NULL terminated
2005-03-20 02:57:11 +00:00
} ;
2016-01-18 05:22:07 +00:00
const char * ptrs [ 1 ] ;
2006-02-17 02:51:59 +00:00
} strings ;
2016-01-18 05:22:07 +00:00
qboolean stringsalloced ; //if true, we need to free the string pointers safely rather than just memsetting them to 0
2019-09-10 15:40:04 +00:00
struct
{
const char * str ; //double dynamic. urgh, but allows it to be nice and long.
vec3_t colours ;
} * lightstyles ;
size_t maxlightstyles ; //limited to MAX_NET_LIGHTSTYLES
2016-01-18 05:22:07 +00:00
2018-09-01 04:18:08 +00:00
# ifdef HEXEN2
2014-06-21 17:58:17 +00:00
char h2miditrack [ MAX_QPATH ] ;
2010-09-05 10:42:23 +00:00
qbyte h2cdtrack ;
2018-09-01 04:18:08 +00:00
# endif
2004-08-23 00:15:46 +00:00
2020-06-27 19:32:49 +00:00
pvec3_t skyroom_pos ; //parsed from world._skyroom
2019-07-29 05:28:20 +00:00
qboolean skyroom_pos_known ;
2004-08-23 00:15:46 +00:00
int allocated_client_slots ; //number of slots available. (used mostly to stop single player saved games cacking up)
2012-01-17 07:57:46 +00:00
int spawned_client_slots ; //number of PLAYER slots which are active (ie: putclientinserver was called)
2013-03-12 22:35:33 +00:00
int spawned_observer_slots ;
2004-08-23 00:15:46 +00:00
2014-09-17 03:04:08 +00:00
model_t * models [ MAX_PRECACHE_MODELS ] ;
2004-08-23 00:15:46 +00:00
2014-03-30 08:55:06 +00:00
struct client_s * skipbprintclient ; //SV_BroadcastPrint skips this client
2004-08-23 00:15:46 +00:00
// added to every client's unreliable buffer each frame, then cleared
sizebuf_t datagram ;
qbyte datagram_buf [ MAX_DATAGRAM ] ;
// added to every client's reliable buffer each frame, then cleared
sizebuf_t reliable_datagram ;
qbyte reliable_datagram_buf [ MAX_QWMSGLEN ] ;
2005-12-21 03:07:33 +00:00
// the multicast buffer is used to send a message to a set of clients
2004-08-23 00:15:46 +00:00
sizebuf_t multicast ;
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
qbyte multicast_buf [ MAX_QWMSGLEN ] ;
2004-08-23 00:15:46 +00:00
# ifdef NQPROT
sizebuf_t nqdatagram ;
qbyte nqdatagram_buf [ MAX_NQDATAGRAM ] ;
sizebuf_t nqreliable_datagram ;
qbyte nqreliable_datagram_buf [ MAX_NQMSGLEN ] ;
sizebuf_t nqmulticast ;
qbyte nqmulticast_buf [ MAX_NQMSGLEN ] ;
# endif
2018-03-04 14:41:16 +00:00
# ifdef Q2SERVER
2004-08-23 00:15:46 +00:00
sizebuf_t q2datagram ;
qbyte q2datagram_buf [ MAX_Q2DATAGRAM ] ;
sizebuf_t q2reliable_datagram ;
qbyte q2reliable_datagram_buf [ MAX_Q2MSGLEN ] ;
sizebuf_t q2multicast ;
qbyte q2multicast_buf [ MAX_Q2MSGLEN ] ;
2018-03-04 14:41:16 +00:00
# endif
2004-08-23 00:15:46 +00:00
// the master buffer is used for building log packets
sizebuf_t master ;
qbyte master_buf [ MAX_DATAGRAM ] ;
// the signon buffer will be sent to each client as they connect
2011-12-05 15:23:40 +00:00
// traditionally includes the entity baselines, the static entities, etc
2005-12-21 03:07:33 +00:00
// large levels will have >MAX_DATAGRAM sized signons, so
2004-08-23 00:15:46 +00:00
// multiple signon messages are kept
2011-12-05 15:23:40 +00:00
// fte only stores writebyted stuff in here. everything else is regenerated based upon the client's extensions.
2004-08-23 00:15:46 +00:00
sizebuf_t signon ;
2019-09-17 19:49:39 +00:00
int used_signon_space ;
qbyte signon_buffer [ MAX_OVERALLMSGLEN ] ; //flushed after every 512 bytes (two leading bytes says the size of the buffer).
2004-08-23 00:15:46 +00:00
qboolean gamedirchanged ;
2022-06-26 08:08:43 +00:00
# ifdef QUAKESTATS
2014-03-30 08:55:06 +00:00
qboolean haveitems2 ; //use items2 field instead of serverflags for the high bits of STAT_ITEMS
2022-06-26 08:08:43 +00:00
# endif
2014-03-30 08:55:06 +00:00
2004-08-23 00:15:46 +00:00
2018-09-01 04:18:08 +00:00
# ifdef MVD_RECORDING
2004-08-23 00:15:46 +00:00
qboolean mvdrecording ;
2018-09-01 04:18:08 +00:00
# endif
2004-08-23 00:15:46 +00:00
2004-12-08 04:14:52 +00:00
//====================================================
2018-09-01 04:18:08 +00:00
//this lot is for serverside playback of mvds. Use QTV instead.
2009-11-07 13:29:15 +00:00
# ifdef SERVER_DEMO_PLAYBACK
2004-08-23 00:15:46 +00:00
qboolean mvdplayback ;
float realtime ;
2005-12-21 03:07:33 +00:00
vfsfile_t * demofile ; //also signifies playing the thing.
2004-08-23 00:15:46 +00:00
int lasttype ;
int lastto ;
2004-12-08 04:14:52 +00:00
//playback spikes (svc_nails/nails2)
2004-08-23 00:15:46 +00:00
int numdemospikes ;
struct {
vec3_t org ;
qbyte id ;
qbyte pitch ;
qbyte yaw ;
qbyte modelindex ;
} demospikes [ 255 ] ;
2004-12-08 04:14:52 +00:00
//playback of entities (svc_nails/nails2)
mvdentity_state_t * demostate ;
mvdentity_state_t * demobaselines ;
int demomaxents ;
2004-08-23 00:15:46 +00:00
qboolean demostatevalid ;
2004-12-08 04:14:52 +00:00
//players
2004-08-23 00:15:46 +00:00
struct {
int stats [ MAX_CL_STATS ] ;
int pl ;
int ping ;
int frags ;
int userid ;
int weaponframe ;
char userinfo [ MAX_INFO_STRING ] ;
2005-01-26 03:39:47 +00:00
vec3_t oldorg ;
vec3_t oldang ;
2004-08-23 00:15:46 +00:00
float updatetime ;
} recordedplayer [ MAX_CLIENTS ] ;
2004-12-08 04:14:52 +00:00
//gamestate
char demoinfo [ MAX_SERVERINFO_STRING ] ;
2004-08-23 00:15:46 +00:00
char demmodel_precache [ MAX_MODELS ] [ MAX_QPATH ] ; // NULL terminated
char demsound_precache [ MAX_SOUNDS ] [ MAX_QPATH ] ; // NULL terminated
char demgamedir [ 64 ] ;
char demname [ 64 ] ; // map name
2004-12-08 04:14:52 +00:00
qboolean democausesreconnect ; //this makes current clients go through the connection process (and when the demo ends too)
2004-08-23 00:15:46 +00:00
sizebuf_t demosignon ;
int num_demosignon_buffers ;
int demosignon_buffer_size [ MAX_SIGNON_BUFFERS ] ;
qbyte demosignon_buffers [ MAX_SIGNON_BUFFERS ] [ MAX_DATAGRAM ] ;
char demfullmapname [ 64 ] ;
char * demolightstyles [ MAX_LIGHTSTYLES ] ;
2009-11-07 13:29:15 +00:00
# endif
2004-12-08 04:14:52 +00:00
//====================================================
2004-08-23 00:15:46 +00:00
// movevars_t demomovevars; //FIXME:!
//end this lot... (demo playback)
2010-09-05 10:42:23 +00:00
int num_static_entities ;
2015-04-14 23:12:17 +00:00
int num_static_sounds ;
2010-09-05 10:42:23 +00:00
2004-08-23 00:15:46 +00:00
svcustomtents_t customtents [ 255 ] ;
2005-02-28 07:16:19 +00:00
2013-04-04 08:08:49 +00:00
int * csqcentversion ; //prevents ent versions from going backwards
2004-08-23 00:15:46 +00:00
} server_t ;
2016-01-18 05:22:07 +00:00
void SV_WipeServerState ( void ) ;
2004-08-23 00:15:46 +00:00
2017-05-18 10:24:09 +00:00
/*
# define CS_EMPTY 0
# define CS_ZOMBIE (1u<<0) //just stops the slot from being reused for a bit.
# define CS_CLUSTER (1u<<1) //is managed by the cluster host (and will appear on scoreboards).
# define CS_SPAWNED (1u<<2) //has an active entity.
# define CS_ACTIVE (1u<<3) //has a connection
# define cs_free (CS_EMPTY)
# define cs_zombie (CS_ZOMBIE)
# define cs_loadzombie (CS_SPAWNED)
# define cs_connected (CS_ACTIVE)
# define cs_spawned (CS_ACTIVE|CS_SPAWNED)
*/
2004-08-23 00:15:46 +00:00
typedef enum
{
cs_free , // can be reused for a new connection
2014-03-30 08:55:06 +00:00
cs_zombie , // client has been disconnected, but don't reuse connection for a couple seconds. entity was already cleared.
cs_loadzombie , // slot reserved for a client. the player's entity may or may not be known (istobeloaded says that state). parms _ARE_ known.
2005-12-21 03:07:33 +00:00
cs_connected , // has been assigned to a client_t, but not in game yet
2004-08-23 00:15:46 +00:00
cs_spawned // client is fully in game
} client_conn_state_t ;
typedef struct
{
// received from client
// reply
2018-12-28 00:04:36 +00:00
double senttime ; //time we sent this frame to the client, for ping calcs (realtime)
2012-02-12 05:18:31 +00:00
int sequence ; //the outgoing sequence - without mask, meaning we know if its current or stale
2013-09-06 22:57:44 +00:00
float ping_time ; //how long it took for the client to ack it, may be negative
2012-02-27 12:23:15 +00:00
float move_msecs ; //
2012-02-12 05:18:31 +00:00
int packetsizein ; //amount of data received for this frame
int packetsizeout ; //amount of data that was sent in the frame
2017-05-28 15:42:32 +00:00
packet_entities_t qwentities ; //package containing entity states that were sent in this frame, for deltaing
2016-07-12 00:40:13 +00:00
struct resendinfo_s
{
unsigned int entnum ;
2017-05-28 15:42:32 +00:00
unsigned int bits ; //delta (fte or dpp5+)
2021-10-05 05:04:59 +00:00
quint64_t flags ; //csqc
2016-07-12 00:40:13 +00:00
} * resend ;
2017-05-28 15:42:32 +00:00
unsigned int numresend ;
unsigned int maxresend ;
2015-01-21 18:18:37 +00:00
unsigned short resendstats [ 32 ] ; //the number of each entity that was sent in this frame
unsigned int numresendstats ; //the bits of each entity that were sent in this frame
playdemo accepts https urls now. will start playing before the file has finished downloading, to avoid unnecessary delays.
reworked network addresses to separate address family and connection type. this should make banning people more reliable, as well as simplifying a whole load of logic (no need to check for ipv4 AND ipv6).
tcpconnect will keep trying to connect even if the connection wasn't instant, instead of giving up instantly.
rewrote tcp connections quite a bit. sv_port_tcp now handles qtv+qizmo+http+ws+rtcbroker+tls equivalents.
qtv_streamport is now a legacy cvar and now acts equivalently to sv_port_tcp (but still separate).
rewrote screenshot and video capture code to use strides. this solves image-is-upside down issues with vulkan.
ignore alt key in browser port. oh no! no more red text! oh no! no more alt-being-wrongly-down-and-being-unable-to-type-anything-without-forcing-alt-released!
reworked audio decoder interface. now has clearly defined success/unavailable/end-of-file results. this should solve a whole load of issues with audio streaming.
fixed various openal audio streaming issues too. openal also got some workarounds for emscripten's poor emulation.
fixed ogg decoder to retain sync properly if seeked.
updated menu_media a bit. now reads vorbis comments/id3v1 tags to get proper track names. also saves the playlist so you don't have to manually repopulate the list so it might actually be usable now (after how many years?)
r_stains now defaults to 0, and is no longer enabled by presets. use decals if you want that sort of thing.
added fs_noreexec cvar, so configs will not be reexeced on gamedir change. this also means defaults won't be reapplied, etc.
added 'nvvk' renderer on windows, using nvidia's vulkan-inside-opengl gl extension. mostly just to see how much slower it is.
fixed up the ftp server quite a lot. more complete, more compliant, and should do ipv6 properly to-boot. file transfers also threaded.
fixed potential crash inside runclientphys.
experimental sv_antilag=3 setting. totally untested. the aim is to avoid missing due to lagged knockbacks. may be expensive for the server.
browser port's websockets support fixed. experimental support for webrtc ('works for me', requires a broker server).
updated avplug(renamed to ffmpeg so people know what it is) to use ffmpeg 3.2.4 properly, with its new encoder api. should be much more robust... also added experimental audio decoder for game music etc (currently doesn't resample, so playback rates are screwed, disabled by cvar).
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5097 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-05-10 02:08:58 +00:00
2021-08-04 21:16:57 +00:00
short baseangles [ MAX_SPLITS ] [ 3 ] ;
unsigned int baseanglelocked [ MAX_SPLITS ] ;
playdemo accepts https urls now. will start playing before the file has finished downloading, to avoid unnecessary delays.
reworked network addresses to separate address family and connection type. this should make banning people more reliable, as well as simplifying a whole load of logic (no need to check for ipv4 AND ipv6).
tcpconnect will keep trying to connect even if the connection wasn't instant, instead of giving up instantly.
rewrote tcp connections quite a bit. sv_port_tcp now handles qtv+qizmo+http+ws+rtcbroker+tls equivalents.
qtv_streamport is now a legacy cvar and now acts equivalently to sv_port_tcp (but still separate).
rewrote screenshot and video capture code to use strides. this solves image-is-upside down issues with vulkan.
ignore alt key in browser port. oh no! no more red text! oh no! no more alt-being-wrongly-down-and-being-unable-to-type-anything-without-forcing-alt-released!
reworked audio decoder interface. now has clearly defined success/unavailable/end-of-file results. this should solve a whole load of issues with audio streaming.
fixed various openal audio streaming issues too. openal also got some workarounds for emscripten's poor emulation.
fixed ogg decoder to retain sync properly if seeked.
updated menu_media a bit. now reads vorbis comments/id3v1 tags to get proper track names. also saves the playlist so you don't have to manually repopulate the list so it might actually be usable now (after how many years?)
r_stains now defaults to 0, and is no longer enabled by presets. use decals if you want that sort of thing.
added fs_noreexec cvar, so configs will not be reexeced on gamedir change. this also means defaults won't be reapplied, etc.
added 'nvvk' renderer on windows, using nvidia's vulkan-inside-opengl gl extension. mostly just to see how much slower it is.
fixed up the ftp server quite a lot. more complete, more compliant, and should do ipv6 properly to-boot. file transfers also threaded.
fixed potential crash inside runclientphys.
experimental sv_antilag=3 setting. totally untested. the aim is to avoid missing due to lagged knockbacks. may be expensive for the server.
browser port's websockets support fixed. experimental support for webrtc ('works for me', requires a broker server).
updated avplug(renamed to ffmpeg so people know what it is) to use ffmpeg 3.2.4 properly, with its new encoder api. should be much more robust... also added experimental audio decoder for game music etc (currently doesn't resample, so playback rates are screwed, disabled by cvar).
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5097 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-05-10 02:08:58 +00:00
//antilag
//these are to recalculate the player's origin without old knockbacks nor teleporters, to give more accurate weapon start positions (post-command).
vec3_t pmorigin ;
vec3_t pmvelocity ;
int pmtype ;
unsigned int pmjumpheld : 1 ;
unsigned int pmonladder : 1 ;
float pmwaterjumptime ;
usercmd_t cmd ;
//these are old positions of players, to give more accurate victim positions
2018-12-28 00:04:36 +00:00
laggedentinfo_t laggedplayer [ MAX_CLIENTS ] ;
unsigned int numlaggedplayers ;
float laggedtime ; //sv.time of when this frame was sent
2004-08-23 00:15:46 +00:00
} client_frame_t ;
# ifdef Q2SERVER
typedef struct //merge?
{
int areabytes ;
qbyte areabits [ MAX_Q2MAP_AREAS / 8 ] ; // portalarea visibility bits
2016-01-18 05:22:07 +00:00
q2player_state_t ps [ MAX_SPLITS ] ; //yuck
int clientnum [ MAX_SPLITS ] ;
2004-08-23 00:15:46 +00:00
int num_entities ;
int first_entity ; // into the circular sv_packet_entities[]
int senttime ; // for ping calculations
2013-03-12 22:53:23 +00:00
float ping_time ;
2004-08-23 00:15:46 +00:00
} q2client_frame_t ;
# endif
2004-08-31 23:58:18 +00:00
# define MAX_BACK_BUFFERS 16
2004-08-23 00:15:46 +00:00
------------------------------------------------------------------------
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
enum
{
PRESPAWN_INVALID = 0 ,
2017-05-28 15:42:32 +00:00
PRESPAWN_PROTOCOLSWITCH , //nq drops unreliables until reliables are acked. this gives us a chance to drop any clc_move packets with formats from the previous map
------------------------------------------------------------------------
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
PRESPAWN_SERVERINFO ,
2018-09-01 04:18:08 +00:00
# ifdef MVD_RECORDING
2017-11-16 22:20:40 +00:00
PRESPAWN_CSPROGS , //demos contain a copy of the csprogs.
2018-09-01 04:18:08 +00:00
# endif
2017-11-16 22:20:40 +00:00
PRESPAWN_SOUNDLIST , //nq skips these
2019-04-16 22:40:05 +00:00
# ifdef HAVE_LEGACY
2017-11-16 22:20:40 +00:00
PRESPAWN_VWEPMODELLIST , //qw ugly extension.
2018-09-01 04:18:08 +00:00
# endif
------------------------------------------------------------------------
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
PRESPAWN_MODELLIST ,
2017-11-16 22:20:40 +00:00
PRESPAWN_MAPCHECK , //wait for old prespawn command
2013-03-12 22:44:00 +00:00
PRESPAWN_PARTICLES ,
------------------------------------------------------------------------
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
PRESPAWN_CUSTOMTENTS ,
PRESPAWN_SIGNON_BUF ,
PRESPAWN_SPAWNSTATIC ,
2015-04-14 23:12:17 +00:00
PRESPAWN_AMBIENTSOUND ,
------------------------------------------------------------------------
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
PRESPAWN_BASELINES ,
2016-07-15 12:26:24 +00:00
PRESPAWN_SPAWN ,
PRESPAWN_BRUSHES ,
PRESPAWN_COMPLETED
------------------------------------------------------------------------
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
} ;
2014-12-02 02:00:41 +00:00
enum
{ //'soft' limits that result in warnings if the client's protocol is too limited.
PLIMIT_ENTITIES = 1u < < 0 ,
PLIMIT_MODELS = 1u < < 1 ,
PLIMIT_SOUNDS = 1u < < 2
} ;
2015-01-21 18:18:37 +00:00
//client_t->spec_print + sv_specprint
# define SPECPRINT_CENTERPRINT 0x1
# define SPECPRINT_SPRINT 0x2
# define SPECPRINT_STUFFCMD 0x4
2015-10-27 15:20:15 +00:00
# define STUFFCMD_IGNOREINDEMO ( 1<<0) // do not put in mvd demo
# define STUFFCMD_DEMOONLY ( 1<<1) // put in mvd demo only
2017-05-18 10:24:09 +00:00
# define STUFFCMD_BROADCAST ( 1<<2) // everyone sees it.
2017-08-14 16:38:44 +00:00
# define STUFFCMD_UNRELIABLE ( 1<<3) // someone might not see it. oh well.
2015-10-27 15:20:15 +00:00
2020-04-30 14:33:58 +00:00
# define FIXANGLE_NO 0 //don't override anything
# define FIXANGLE_AUTO 1 //guess (initial=fixed, spammed=fixed, sporadic=relative)
# define FIXANGLE_DELTA 2 //send a relative change
# define FIXANGLE_FIXED 3 //send a absolute angle.
2019-07-02 04:12:20 +00:00
enum serverprotocols_e
{
SCP_BAD , //don't send (a bot)
SCP_QUAKEWORLD ,
SCP_QUAKE2 ,
SCP_QUAKE3 ,
//all the below are considered netquake clients.
SCP_NETQUAKE ,
//bjp1, bjp2
SCP_BJP3 , //16bit angles,model+sound indexes. nothing else (assume raised ent limits too).
SCP_FITZ666 ,
//dp5
SCP_DARKPLACES6 ,
SCP_DARKPLACES7 //extra prediction stuff
//note, nq is nq+
} ;
2004-08-23 00:15:46 +00:00
typedef struct client_s
{
client_conn_state_t state ;
------------------------------------------------------------------------
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 prespawn_stage ;
unsigned int prespawn_idx ;
2016-07-15 12:26:24 +00:00
unsigned int prespawn_idx2 ;
2015-04-14 23:12:17 +00:00
qboolean prespawn_allow_modellist ;
qboolean prespawn_allow_soundlist ;
------------------------------------------------------------------------
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
2004-08-23 00:15:46 +00:00
int spectator ; // non-interactive
2017-05-23 07:03:07 +00:00
int redirect ; //1=redirected because full, 2=cluster transfer
2004-08-23 00:15:46 +00:00
qboolean sendinfo ; // at end of frame, send info to all
// this prevents malicious multiple broadcasts
float lastnametime ; // time of last name change
int lastnamecount ; // time of last name change
unsigned checksum ; // checksum for calcs
qboolean drop ; // lose this guy next opportunity
int lossage ; // loss percentage
2018-07-05 16:21:44 +00:00
int challenge ;
int userid ; // identifying number
infobuf_t userinfo ; // all of the user's various settings
infosync_t infosync ; // information about the infos that the client still doesn't know (server and multiple clients).
2015-11-18 07:37:39 +00:00
char * transfer ;
2004-08-23 00:15:46 +00:00
2021-08-04 21:16:57 +00:00
unsigned int baseanglelock ; // lock the player angles to base (until baseangle sequence is acked)
short baseangles [ 3 ] ; // incoming angle inputs are relative to this value.
2004-08-23 00:15:46 +00:00
usercmd_t lastcmd ; // for filling in big drops and partial predictions
double localtime ; // of last message
qboolean jump_held ;
2020-10-26 06:30:35 +00:00
unsigned int lockanglesseq ; //mod is spamming angle changes, don't do relative changes. outgoing sequence. v_angles isn't really known until netchan.incoming_acknowledged>=lockangles
2004-08-23 00:15:46 +00:00
float maxspeed ; // localized maxspeed
float entgravity ; // localized ent gravity
2019-06-05 20:48:06 +00:00
int viewent ; //fake the entity positioning.
int clientcamera ; //cache for dp_sv_clientcamera.
2005-12-21 03:07:33 +00:00
2004-08-23 00:15:46 +00:00
edict_t * edict ; // EDICT_NUM(clientnum+1)
2009-03-03 01:52:30 +00:00
//additional game modes use additional edict pointers. this ensures that references are crashes.
2004-08-23 00:15:46 +00:00
# ifdef Q2SERVER
q2edict_t * q2edict ; // EDICT_NUM(clientnum+1)
# endif
2009-03-03 01:52:30 +00:00
# ifdef HLSERVER
struct hledict_s * hledict ;
# endif
2004-08-23 00:15:46 +00:00
2005-08-26 22:56:51 +00:00
int playercolor ;
2004-08-23 00:15:46 +00:00
int playerclass ;
2005-05-17 02:36:54 +00:00
char teambuf [ 32 ] ;
char * team ;
char * name ;
char namebuf [ 32 ] ; // for printing to other people
2004-08-23 00:15:46 +00:00
// extracted from userinfo
2014-03-30 08:55:06 +00:00
char guid [ 64 ] ; /*+2 for split+pad*/
2004-08-23 00:15:46 +00:00
int messagelevel ; // for filtering printed messages
2019-12-10 14:50:47 +00:00
int autoaimdot ; //smallest dotproduct allowed for autoaim
2019-04-16 22:40:05 +00:00
# ifdef HAVE_LEGACY
2017-08-29 02:29:06 +00:00
float * dp_ping ;
float * dp_pl ;
# endif
2004-08-23 00:15:46 +00:00
// the datagram is written to after every frame, but only cleared
// when it is sent out to the client. overflow is tolerated.
sizebuf_t datagram ;
2012-09-30 05:52:03 +00:00
qbyte datagram_buf [ MAX_OVERALLMSGLEN / 2 ] ;
2004-08-23 00:15:46 +00:00
// back buffers for client reliable data
sizebuf_t backbuf ;
int num_backbuf ;
int backbuf_size [ MAX_BACK_BUFFERS ] ;
qbyte backbuf_data [ MAX_BACK_BUFFERS ] [ MAX_BACKBUFLEN ] ;
double connection_started ; // or time of disconnect for zombies
qboolean send_message ; // set on frames a datagram arived on
2009-11-13 16:54:21 +00:00
laggedentinfo_t laggedents [ MAX_CLIENTS ] ;
unsigned int laggedents_count ;
float laggedents_frac ;
2018-12-28 00:04:36 +00:00
float laggedents_time ;
2009-11-04 21:16:50 +00:00
2004-08-23 00:15:46 +00:00
// spawn parms are carried from level to level
float spawn_parms [ NUM_SPAWN_PARMS ] ;
2017-05-28 15:42:32 +00:00
char * spawn_parmstring ; //qc-specified data.
char * spawninfo ; //entity-formatted data (for hexen2's ClientReEnter)
2004-08-23 00:15:46 +00:00
float spawninfotime ;
added r_meshpitch cvar that allows for fixing the unfixable mesh pitch bug from vanilla... needs a better name... do note that this will break pretty much any mod, so this is really only for TCs designed to use it. Its likely that I missed places.
nqsv: added support for spectators with nq clients. the angles are a bit rough, but hey. need to do something about frags so nq clients know who's a spectator. use 'cmd observe' to get an nq client to spectate on an fte server (then attack/jump behave the same as in qw clients).
nqsv: rewrote EF_MUZZLEFLASH handling, so svc_muzzleflash is now translated properly to EF_MUZZLEFLASH, and vice versa. No more missing muzzleflashes!
added screenshot_cubemap, so you can actually pre-generate cubemaps with fte (which can be used for reflections or whatever).
misc fixes (server crash, a couple of other less important ones).
external files based on a model's name will now obey r_replacemodels properly, instead of needing to use foo.mdl_0.skin for foo.md3.
identify <playernum> should now use the correct masked ip, instead of abrubtly failing (reported by kt)
vid_toggle console command should now obey vid_width and vid_height when switching to fullscreen, but only if vid_fullscreen is actually set, which should make it seem better behaved (reported by kt).
qcc: cleaned up sym->symboldata[sym->ofs] to be more consistent at all stages.
qcc: typedef float vec4[4]; now works to define a float array with 4 elements (however, it will be passed by-value rather than by-reference).
qcc: cleaned up optional vs __out ordering issues.
qccgui: shift+f3 searches backwards
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5064 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-02-27 09:34:35 +00:00
float nextservertimeupdate ; //next time to send STAT_TIME
float lastoutgoingphysicstime ; //sv.world.physicstime of the last outgoing message.
2004-08-23 00:15:46 +00:00
2005-12-21 03:07:33 +00:00
// client known data for deltas
2004-08-23 00:15:46 +00:00
int old_frags ;
2005-12-21 03:07:33 +00:00
2015-01-21 18:18:37 +00:00
unsigned int pendingstats [ ( ( MAX_CL_STATS * 2 ) + 31 ) > > 5 ] ; //these are the stats that have changed and that need sending/resending
2008-05-25 22:23:43 +00:00
int statsi [ MAX_CL_STATS ] ;
float statsf [ MAX_CL_STATS ] ;
char * statss [ MAX_CL_STATS ] ;
2010-08-21 22:12:43 +00:00
char * centerprintstring ;
2004-08-23 00:15:46 +00:00
2023-01-09 05:11:34 +00:00
struct
{
qboolean active ;
char * header ;
double nextsend ; //qex is a one-off, other clients need spam.
size_t numopts , maxopts , selected ;
struct
{
char * text ;
int impulse ;
} * opt ;
int oldmove [ 2 ] ;
} prompt ;
2004-08-23 00:15:46 +00:00
union { //save space
2005-05-26 12:55:34 +00:00
client_frame_t * frames ; // updates can be deltad from here
2004-08-23 00:15:46 +00:00
# ifdef Q2SERVER
2005-05-26 12:55:34 +00:00
q2client_frame_t * q2frames ;
2005-03-07 08:58:26 +00:00
# endif
# ifdef Q3SERVER
2022-03-08 05:31:34 +00:00
void * q3frames ;
2004-08-23 00:15:46 +00:00
# endif
2006-02-17 02:51:59 +00:00
} frameunion ;
2012-02-12 05:18:31 +00:00
packet_entities_t sentents ;
2016-07-12 00:40:13 +00:00
unsigned int * pendingdeltabits ;
2021-10-05 05:04:59 +00:00
quint64_t * pendingcsqcbits ;
2017-03-04 19:36:06 +00:00
unsigned int nextdeltaindex ; //splurged round-robin to deal with overflows
unsigned int nextcsqcindex ; //splurged round-robin
2021-10-05 05:04:59 +00:00
# define SENDFLAGS_PRESENT 0x1u //this entity is present on that client
# define SENDFLAGS_REMOVED 0x2u //to handle remove packetloss
# define SENDFLAGS_RESERVED (SENDFLAGS_PRESENT|SENDFLAGS_REMOVED)
# define SENDFLAGS_SHIFT 2u
# define SENDFLAGS_USABLE (~(quint64_t)SENDFLAGS_RESERVED) //this number of bits are actually safe in a float. not all together, but otherwise safe.
2007-06-20 00:02:54 +00:00
2019-04-16 22:40:05 +00:00
# ifdef HAVE_LEGACY
2019-03-12 05:04:27 +00:00
char * dlqueue ; //name\name delimited list of files to ask the client to download.
# endif
2008-11-09 22:29:28 +00:00
char downloadfn [ MAX_QPATH ] ;
2005-12-21 03:07:33 +00:00
vfsfile_t * download ; // file being downloaded
2014-06-24 03:02:32 +00:00
qofs_t downloadsize ; // total bytes
qofs_t downloadcount ; // bytes sent
2004-08-23 00:15:46 +00:00
2019-06-06 18:03:01 +00:00
# ifdef NQPROT
2014-06-24 03:02:32 +00:00
qofs_t downloadacked ; //DP-specific
qofs_t downloadstarted ; //DP-specific
2019-06-06 18:03:01 +00:00
# endif
2007-06-20 00:02:54 +00:00
2004-08-23 00:15:46 +00:00
int spec_track ; // entnum of player tracking
2015-01-21 18:18:37 +00:00
unsigned int spec_print ; //bitfield for things this spectator should see that were directed to the player that they're tracking.
2005-03-07 08:58:26 +00:00
# ifdef Q3SERVER
int gamestatesequence ; //the sequence number the initial gamestate was sent in.
2019-01-29 07:18:07 +00:00
2005-03-07 08:58:26 +00:00
int last_client_command_num ;
char last_client_command [ 1024 ] ;
2019-01-29 07:18:07 +00:00
//quake3 does reliables only via this mechanism. basically just like q1's stuffcmds.
int server_command_ack ; //number known to have been received.
int server_command_sequence ; //number available.
2022-03-08 05:31:34 +00:00
char server_commands [ 256 ] [ 1024 ] ; //the commands, to deal with resends
2005-03-07 08:58:26 +00:00
# endif
2005-02-28 07:16:19 +00:00
2004-08-23 00:15:46 +00:00
//true/false/persist
2014-06-25 03:53:11 +00:00
unsigned int penalties ;
2020-04-19 01:23:32 +00:00
qbyte istobeloaded ; //spawnparms are known.
qboolean spawned ; //gamecode knows about it.
2004-08-23 00:15:46 +00:00
2006-05-29 06:12:12 +00:00
double floodprotmessage ;
double lastspoke ;
2004-08-23 00:15:46 +00:00
double lockedtill ;
2014-08-24 17:16:12 +00:00
float joinobservelockeduntil ;
2004-08-23 00:15:46 +00:00
qboolean upgradewarn ; // did we warn him?
2005-12-21 03:07:33 +00:00
vfsfile_t * upload ;
2004-08-23 00:15:46 +00:00
char uploadfn [ MAX_QPATH ] ;
netadr_t snap_from ;
qboolean remote_snap ;
2005-12-21 03:07:33 +00:00
2004-08-23 00:15:46 +00:00
//===== NETWORK ============
int chokecount ;
2009-05-24 10:11:17 +00:00
qboolean waschoked ;
2004-08-23 00:15:46 +00:00
int delta_sequence ; // -1 = no compression
2017-08-29 02:29:06 +00:00
int last_sequence ; //last inputframe sequence received
2004-08-23 00:15:46 +00:00
netchan_t netchan ;
2005-06-22 17:10:13 +00:00
qboolean isindependant ;
2004-08-23 00:15:46 +00:00
2012-02-12 05:18:31 +00:00
int lastsequence_acknowledged ;
2005-02-28 07:16:19 +00:00
2010-12-05 02:46:07 +00:00
# ifdef VOICECHAT
unsigned int voice_read ; /*place in ring*/
2013-06-23 02:17:02 +00:00
unsigned char voice_mute [ ( MAX_CLIENTS + 7 ) / 8 ] ;
2010-11-15 02:40:31 +00:00
qboolean voice_active ;
2010-12-05 02:46:07 +00:00
enum
{
/*note - when recording an mvd, only 'all' will be received by non-spectating viewers. all other chat will only be heard when spectating the receiver(or sender) of said chat*/
/*should we add one to respond to the last speaker? or should that be an automagic +voip_reply instead?*/
VT_TEAM ,
VT_ALL ,
VT_NONMUTED , /*cheap, but allows custom private channels with no external pesters*/
2014-04-27 23:16:07 +00:00
VT_SPECSELF , /*sends to self, audiable to people spectating self*/
2010-12-05 02:46:07 +00:00
VT_PLAYERSLOT0
/*player0+...*/
} voice_target ;
# endif
2004-08-23 00:15:46 +00:00
# ifdef SVCHAT
svchat_t chat ;
# endif
# ifdef SVRANKING
int rankid ;
int kills ;
int deaths ;
double stats_started ;
# endif
2005-03-10 03:55:18 +00:00
qboolean csqcactive ;
2016-07-16 13:21:23 +00:00
qboolean pextknown ;
2013-03-12 22:47:42 +00:00
unsigned int fteprotocolextensions ;
unsigned int fteprotocolextensions2 ;
2019-03-23 07:06:37 +00:00
unsigned int ezprotocolextensions1 ;
2013-03-12 22:47:42 +00:00
unsigned int zquake_extensions ;
2016-07-16 13:21:23 +00:00
unsigned int max_net_ents ; /*highest entity number the client can receive (limited by either protocol or client's buffer size)*/
2017-07-04 05:07:51 +00:00
unsigned int max_net_staticents ; /*limit to the number of static ents supported by the client*/
2013-06-23 02:17:02 +00:00
unsigned int max_net_clients ; /*max number of player slots supported by the client */
2011-07-30 14:14:56 +00:00
unsigned int maxmodels ; /*max models supported by whatever the protocol is*/
2005-05-26 12:55:34 +00:00
2019-07-02 04:12:20 +00:00
enum serverprotocols_e protocol ;
2016-07-12 00:40:13 +00:00
unsigned int supportedprotocols ;
qboolean proquake_angles_hack ; //expect 16bit client->server angles .
2022-01-16 18:41:44 +00:00
qboolean qex ; //qex sends strange clc inputs and needs workarounds for its prediction. it also favours fitzquake's protocol but violates parts of it.
2004-08-23 00:15:46 +00:00
2015-02-07 22:34:22 +00:00
unsigned int lastruncmd ; //for non-qw physics. timestamp they were last run, so switching between physics modes isn't a (significant) cheat
2004-08-23 00:15:46 +00:00
//speed cheat testing
2015-01-21 18:18:37 +00:00
# define NEWSPEEDCHEATPROT
2017-08-29 02:29:06 +00:00
float msecs ;
2015-01-21 18:18:37 +00:00
# ifndef NEWSPEEDCHEATPROT
2004-08-23 00:15:46 +00:00
int msec_cheating ;
float last_check ;
2015-01-21 18:18:37 +00:00
# endif
2004-08-23 00:15:46 +00:00
qboolean gibfilter ;
int trustlevel ;
2005-01-26 03:39:47 +00:00
vec3_t specorigin ; //mvds need to use a different origin from the one QC has.
vec3_t specvelocity ;
2004-08-23 00:15:46 +00:00
int language ; //the clients language
------------------------------------------------------------------------
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 {
// qbyte vweap;
// } otherclientsknown[MAX_CLIENTS]; //updated as needed. Flag at a time, or all flags.
2004-08-23 00:15:46 +00:00
2010-12-23 03:55:10 +00:00
struct client_s * controller ; /*first in splitscreen chain, NULL=nosplitscreen*/
struct client_s * controlled ; /*next in splitscreen chain*/
2020-04-30 14:33:58 +00:00
qbyte seat ;
2004-10-19 16:10:14 +00:00
2012-02-27 12:23:15 +00:00
/*these are the current rates*/
float ratetime ;
float inrate ;
float outrate ;
2005-03-10 03:55:18 +00:00
2004-10-19 16:10:14 +00:00
int rate ;
int drate ;
2006-09-17 00:59:22 +00:00
netadr_t realip ;
int realip_status ;
int realip_num ;
int realip_ping ;
2015-06-16 23:53:58 +00:00
char * reversedns ;
2007-08-30 20:45:01 +00:00
2014-12-02 02:00:41 +00:00
unsigned int plimitwarned ;
2007-08-30 20:45:01 +00:00
float delay ;
laggedpacket_t * laggedpacket ;
laggedpacket_t * laggedpacket_last ;
2019-03-23 07:06:37 +00:00
2020-06-12 23:29:58 +00:00
size_t lastseen_count ;
float * lastseen_time ; //timer for cullentities_trace, so we can get away with fewer traces per test
2019-03-23 07:06:37 +00:00
# ifdef VM_Q1
int hideentity ;
qboolean hideplayers ;
# endif
2004-08-23 00:15:46 +00:00
} client_t ;
added r_meshpitch cvar that allows for fixing the unfixable mesh pitch bug from vanilla... needs a better name... do note that this will break pretty much any mod, so this is really only for TCs designed to use it. Its likely that I missed places.
nqsv: added support for spectators with nq clients. the angles are a bit rough, but hey. need to do something about frags so nq clients know who's a spectator. use 'cmd observe' to get an nq client to spectate on an fte server (then attack/jump behave the same as in qw clients).
nqsv: rewrote EF_MUZZLEFLASH handling, so svc_muzzleflash is now translated properly to EF_MUZZLEFLASH, and vice versa. No more missing muzzleflashes!
added screenshot_cubemap, so you can actually pre-generate cubemaps with fte (which can be used for reflections or whatever).
misc fixes (server crash, a couple of other less important ones).
external files based on a model's name will now obey r_replacemodels properly, instead of needing to use foo.mdl_0.skin for foo.md3.
identify <playernum> should now use the correct masked ip, instead of abrubtly failing (reported by kt)
vid_toggle console command should now obey vid_width and vid_height when switching to fullscreen, but only if vid_fullscreen is actually set, which should make it seem better behaved (reported by kt).
qcc: cleaned up sym->symboldata[sym->ofs] to be more consistent at all stages.
qcc: typedef float vec4[4]; now works to define a float array with 4 elements (however, it will be passed by-value rather than by-reference).
qcc: cleaned up optional vs __out ordering issues.
qccgui: shift+f3 searches backwards
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5064 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-02-27 09:34:35 +00:00
# if defined(NQPROT) || defined(Q2SERVER) || defined(Q3SERVER)
2005-05-26 12:55:34 +00:00
# define ISQWCLIENT(cl) ((cl)->protocol == SCP_QUAKEWORLD)
# define ISQ2CLIENT(cl) ((cl)->protocol == SCP_QUAKE2)
2008-11-09 22:29:28 +00:00
# define ISQ3CLIENT(cl) ((cl)->protocol == SCP_QUAKE3)
2005-05-27 05:41:07 +00:00
# define ISNQCLIENT(cl) ((cl)->protocol >= SCP_NETQUAKE)
2008-11-09 22:29:28 +00:00
# define ISDPCLIENT(cl) ((cl)->protocol >= SCP_DARKPLACES6)
added r_meshpitch cvar that allows for fixing the unfixable mesh pitch bug from vanilla... needs a better name... do note that this will break pretty much any mod, so this is really only for TCs designed to use it. Its likely that I missed places.
nqsv: added support for spectators with nq clients. the angles are a bit rough, but hey. need to do something about frags so nq clients know who's a spectator. use 'cmd observe' to get an nq client to spectate on an fte server (then attack/jump behave the same as in qw clients).
nqsv: rewrote EF_MUZZLEFLASH handling, so svc_muzzleflash is now translated properly to EF_MUZZLEFLASH, and vice versa. No more missing muzzleflashes!
added screenshot_cubemap, so you can actually pre-generate cubemaps with fte (which can be used for reflections or whatever).
misc fixes (server crash, a couple of other less important ones).
external files based on a model's name will now obey r_replacemodels properly, instead of needing to use foo.mdl_0.skin for foo.md3.
identify <playernum> should now use the correct masked ip, instead of abrubtly failing (reported by kt)
vid_toggle console command should now obey vid_width and vid_height when switching to fullscreen, but only if vid_fullscreen is actually set, which should make it seem better behaved (reported by kt).
qcc: cleaned up sym->symboldata[sym->ofs] to be more consistent at all stages.
qcc: typedef float vec4[4]; now works to define a float array with 4 elements (however, it will be passed by-value rather than by-reference).
qcc: cleaned up optional vs __out ordering issues.
qccgui: shift+f3 searches backwards
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5064 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-02-27 09:34:35 +00:00
# else
# define ISQWCLIENT(cl) ((cl)->protocol != SCP_BAD)
# define ISQ2CLIENT(cl) false
# define ISQ3CLIENT(cl) false
# define ISNQCLIENT(cl) false
# define ISDPCLIENT(cl) false
# endif
2005-05-26 12:55:34 +00:00
2004-08-23 00:15:46 +00:00
// a client can leave the server in one of four ways:
// dropping properly by quiting or disconnecting
// timing out if no valid messages are received for timeout.value seconds
// getting kicked off by the server operator
// a program error, like an overflowed reliable buffer
//=============================================================================
//mvd stuff
2018-09-01 04:18:08 +00:00
# ifdef MVD_RECORDING
2004-08-23 00:15:46 +00:00
# define MSG_BUF_SIZE 8192
typedef struct
{
vec3_t origin ;
vec3_t angles ;
int weaponframe ;
int skinnum ;
int model ;
int effects ;
} demoinfo_t ;
typedef struct
{
demoinfo_t info ;
float sec ;
int parsecount ;
qboolean fixangle ;
vec3_t angle ;
float cmdtime ;
int flags ;
int frame ;
} demo_client_t ;
typedef struct {
qbyte type ;
qbyte full ;
int to ;
int size ;
qbyte data [ 1 ] ; //gcc doesn't allow [] (?)
2018-09-01 04:18:08 +00:00
} mvd_header_t ;
2004-08-23 00:15:46 +00:00
typedef struct
{
2010-11-20 22:01:16 +00:00
sizebuf_t sb ;
2004-08-23 00:15:46 +00:00
int bufsize ;
2018-09-01 04:18:08 +00:00
mvd_header_t * h ;
2004-08-23 00:15:46 +00:00
} demobuf_t ;
typedef struct
{
demo_client_t clients [ MAX_CLIENTS ] ;
double time ;
demobuf_t buf ;
} demo_frame_t ;
typedef struct {
qbyte * data ;
int start , end , last ;
int maxsize ;
} dbuffer_t ;
2016-09-08 19:04:35 +00:00
# define DEMO_FRAMES 64 //why is this not just 2?
2004-08-23 00:15:46 +00:00
# define DEMO_FRAMES_MASK (DEMO_FRAMES - 1)
typedef struct
{
2012-08-04 01:35:52 +00:00
// demobuf_t *dbuf;
// dbuffer_t dbuffer;
2004-08-23 00:15:46 +00:00
sizebuf_t datagram ;
qbyte datagram_data [ MSG_BUF_SIZE ] ;
int lastto ;
int lasttype ;
double time , pingtime ;
2011-08-16 04:12:15 +00:00
int statsi [ MAX_CLIENTS ] [ MAX_CL_STATS ] ; // ouch!
float statsf [ MAX_CLIENTS ] [ MAX_CL_STATS ] ; // ouch!
char * statss [ MAX_CLIENTS ] [ MAX_CL_STATS ] ; // ouch!
2004-08-23 00:15:46 +00:00
client_t recorder ;
2014-12-02 02:00:41 +00:00
qboolean playerreset [ MAX_CLIENTS ] ; //will ensure that the model etc is written when this player is next written.
2004-08-23 00:15:46 +00:00
qboolean fixangle [ MAX_CLIENTS ] ;
float fixangletime [ MAX_CLIENTS ] ;
vec3_t angles [ MAX_CLIENTS ] ;
2016-09-08 19:04:35 +00:00
qboolean resetdeltas ;
2004-08-23 00:15:46 +00:00
int parsecount ;
int lastwritten ;
demo_frame_t frames [ DEMO_FRAMES ] ;
demoinfo_t info [ MAX_CLIENTS ] ;
qbyte buffer [ 20 * MAX_QWMSGLEN ] ;
int bufsize ;
int forceFrame ;
2004-12-10 21:34:42 +00:00
struct mvddest_s * dest ;
2004-08-23 00:15:46 +00:00
} demo_t ;
2018-09-01 04:18:08 +00:00
# endif
2004-08-23 00:15:46 +00:00
//=============================================================================
2015-10-27 15:20:15 +00:00
# define SVSTATS_PERIOD 10
2004-08-23 00:15:46 +00:00
typedef struct
{
double active ;
double idle ;
int count ;
int packets ;
2015-10-27 15:20:15 +00:00
double maxresponse ; //longest (active) frame time within the current period
int maxpackets ; //max packet count in a single frame
2004-08-23 00:15:46 +00:00
2015-10-27 15:20:15 +00:00
double latched_time ; //time that the current period ends
double latched_active ; //active time in the last period
2004-08-23 00:15:46 +00:00
double latched_idle ;
2015-10-27 15:20:15 +00:00
int latched_count ;
2004-08-23 00:15:46 +00:00
int latched_packets ;
2015-10-27 15:20:15 +00:00
int latched_maxpackets ;
double latched_maxresponse ;
2004-08-23 00:15:46 +00:00
} svstats_t ;
// MAX_CHALLENGES is made large to prevent a denial
// of service attack that could cycle all of them
// out before legitimate users connected
# define MAX_CHALLENGES 1024
typedef struct
{
netadr_t adr ;
int challenge ;
int time ;
} challenge_t ;
typedef struct bannedips_s {
2014-03-30 08:55:06 +00:00
unsigned int banflags ;
2004-08-23 00:15:46 +00:00
struct bannedips_s * next ;
netadr_t adr ;
2006-05-22 22:51:14 +00:00
netadr_t adrmask ;
2014-03-30 08:55:06 +00:00
time_t expiretime ;
2006-05-25 04:47:03 +00:00
char reason [ 1 ] ;
2004-08-23 00:15:46 +00:00
} bannedips_t ;
2005-03-07 08:58:26 +00:00
typedef enum {
GT_PROGS , //q1, qw, h2 are similar enough that we consider it only one game mode. (We don't support the h2 protocol)
2007-09-02 19:55:17 +00:00
GT_Q1QVM ,
2009-03-03 01:52:30 +00:00
GT_HALFLIFE ,
2005-03-07 08:58:26 +00:00
GT_QUAKE2 , //q2 servers run from a q2 game dll
2005-03-18 06:13:11 +00:00
GT_QUAKE3 , //q3 servers run off the q3 qvm api
2018-08-23 06:03:31 +00:00
# ifdef VM_LUA
GT_LUA , //for the luls
# endif
2005-03-18 06:13:11 +00:00
GT_MAX
2005-03-07 08:58:26 +00:00
} gametype_e ;
2005-03-18 06:13:11 +00:00
typedef struct levelcache_s {
struct levelcache_s * next ;
char * mapname ;
gametype_e gametype ;
2018-08-23 06:03:31 +00:00
unsigned char savedplayers [ ( MAX_CLIENTS + 7 ) > > 3 ] ; //bitmask to say which players are actually stored in the cache. so that restarts can restore.
2005-03-18 06:13:11 +00:00
} levelcache_t ;
2005-11-30 01:20:53 +00:00
# ifdef TCPCONNECT
typedef struct svtcpstream_s {
int socketnum ;
int inlen ;
qboolean waitingforprotocolconfirmation ;
char inbuffer [ 1500 ] ;
float timeouttime ;
netadr_t remoteaddr ;
struct svtcpstream_s * next ;
} svtcpstream_t ;
# endif
2022-03-08 05:31:34 +00:00
typedef struct server_static_s
2004-08-23 00:15:46 +00:00
{
2005-03-07 08:58:26 +00:00
gametype_e gametype ;
2004-08-23 00:15:46 +00:00
int spawncount ; // number of servers spawned since start,
// used to check late spawns
2006-12-26 18:19:35 +00:00
int framenum ; //physics frame number for out-of-sequence thinks (fix for slow rockets)
2014-03-30 08:55:06 +00:00
int clusterserverid ; // which server we are in the cluster. for gamecode to track with stats.
2004-08-23 00:15:46 +00:00
2008-11-09 22:29:28 +00:00
struct ftenet_connections_s * sockets ;
2005-11-30 01:20:53 +00:00
2013-12-02 14:30:30 +00:00
int allocated_client_slots ; //number of entries in the clients array
client_t * clients ; //[svs.allocated_client_slots]
2004-08-23 00:15:46 +00:00
int serverflags ; // episode completion information
2005-12-21 03:07:33 +00:00
2004-08-23 00:15:46 +00:00
double last_heartbeat ;
int heartbeat_sequence ;
svstats_t stats ;
2018-07-05 16:21:44 +00:00
infobuf_t info ;
infobuf_t localinfo ;
2004-08-23 00:15:46 +00:00
// log messages are used so that fraglog processes can get stats
int logsequence ; // the message currently being filled
double logtime ; // time of last swap
2014-04-24 01:53:01 +00:00
# define FRAGLOG_BUFFERS 8
sizebuf_t log [ FRAGLOG_BUFFERS ] ;
qbyte log_buf [ FRAGLOG_BUFFERS ] [ MAX_DATAGRAM ] ;
2004-08-23 00:15:46 +00:00
challenge_t challenges [ MAX_CHALLENGES ] ; // to prevent invalid IPs from connecting
bannedips_t * bannedips ;
2014-10-05 20:04:11 +00:00
char progsnames [ MAX_PROGS ] [ MAX_QPATH ] ;
2004-08-23 00:15:46 +00:00
progsnum_t progsnum [ MAX_PROGS ] ;
int numprogs ;
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
struct netprim_s netprim ;
2004-08-23 00:15:46 +00:00
2007-08-30 20:45:01 +00:00
laggedpacket_t * free_lagged_packet ;
2012-02-12 05:18:31 +00:00
packet_entities_t entstatebuffer ; /*just a temp buffer*/
2004-08-23 00:15:46 +00:00
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
char name [ 64 ] ; // map name (base filename). static because of restart command after disconnecting.
2004-08-23 00:15:46 +00:00
levelcache_t * levcache ;
2017-05-23 07:03:07 +00:00
struct frameendtasks_s
{
struct frameendtasks_s * next ;
void ( * callback ) ( struct frameendtasks_s * task ) ;
void * ctxptr ;
intptr_t ctxint ;
char data [ 1 ] ;
} * frameendtasks ;
2004-08-23 00:15:46 +00:00
} server_static_t ;
//=============================================================================
2016-01-18 05:22:07 +00:00
/*
2004-08-23 00:15:46 +00:00
// edict->movetype values
# define MOVETYPE_NONE 0 // never moves
# define MOVETYPE_ANGLENOCLIP 1
# define MOVETYPE_ANGLECLIP 2
# define MOVETYPE_WALK 3 // gravity
# define MOVETYPE_STEP 4 // gravity, special edge handling
# define MOVETYPE_FLY 5
# define MOVETYPE_TOSS 6 // gravity
# define MOVETYPE_PUSH 7 // no clip to world, push and crush
# define MOVETYPE_NOCLIP 8
# define MOVETYPE_FLYMISSILE 9 // extra size to monsters
# define MOVETYPE_BOUNCE 10
# define MOVETYPE_BOUNCEMISSILE 11 // bounce w/o gravity
# define MOVETYPE_FOLLOW 12 // track movement of aiment
2010-08-11 23:55:35 +00:00
# define MOVETYPE_H2PUSHPULL 13 // pushable/pullable object
# define MOVETYPE_H2SWIM 14 // should keep the object in water
2009-11-04 21:16:50 +00:00
# define MOVETYPE_PHYSICS 32
2015-03-03 00:14:43 +00:00
# define MOVETYPE_FLY_WORLDONLY 33
2004-08-23 00:15:46 +00:00
// edict->solid values
# define SOLID_NOT 0 // no interaction with other objects
# define SOLID_TRIGGER 1 // touch on edge, but not blocking
# define SOLID_BBOX 2 // touch on edge, block
# define SOLID_SLIDEBOX 3 // touch on edge, but not an onground
# define SOLID_BSP 4 // bsp clip, touch on edge, block
# define SOLID_PHASEH2 5
2004-11-23 15:13:32 +00:00
# define SOLID_CORPSE 5
2014-02-07 08:38:40 +00:00
# define SOLID_LADDER 20 //dmw. touch on edge, not blocking. Touching players have different physics. Otherwise a SOLID_TRIGGER. deprecated. use solid_bsp and skin=-16
2004-08-23 00:15:46 +00:00
# define DAMAGE_NO 0
# define DAMAGE_YES 1
# define DAMAGE_AIM 2
2016-01-18 05:22:07 +00:00
*/
2004-08-23 00:15:46 +00:00
2008-05-25 22:23:43 +00:00
# define PVSF_NORMALPVS 0x0
# define PVSF_NOTRACECHECK 0x1
# define PVSF_USEPHS 0x2
# define PVSF_IGNOREPVS 0x3
# define PVSF_MODE_MASK 0x3
# define PVSF_NOREMOVE 0x80
2004-08-23 00:15:46 +00:00
// entity effects
//define EF_BRIGHTFIELD 1
//define EF_MUZZLEFLASH 2
2011-10-27 16:16:29 +00:00
//#define EF_BRIGHTLIGHT (1<<2)
//#define EF_DIMLIGHT (1<<4)
2004-08-23 00:15:46 +00:00
2011-10-27 16:16:29 +00:00
//#define EF_FULLBRIGHT 512
2004-08-23 00:15:46 +00:00
2009-11-04 21:16:50 +00:00
# define SPAWNFLAG_NOT_EASY (1<<8)
# define SPAWNFLAG_NOT_MEDIUM (1<<9)
# define SPAWNFLAG_NOT_HARD (1<<10)
# define SPAWNFLAG_NOT_DEATHMATCH (1<<11)
2004-08-23 00:15:46 +00:00
2009-11-04 21:16:50 +00:00
# define SPAWNFLAG_NOT_H2PALADIN (1<<8)
# define SPAWNFLAG_NOT_H2CLERIC (1<<9)
# define SPAWNFLAG_NOT_H2NECROMANCER (1<<10)
# define SPAWNFLAG_NOT_H2THEIF (1<<11)
# define SPAWNFLAG_NOT_H2EASY (1<<12)
# define SPAWNFLAG_NOT_H2MEDIUM (1<<13)
# define SPAWNFLAG_NOT_H2HARD (1<<14)
# define SPAWNFLAG_NOT_H2DEATHMATCH (1<<15)
# define SPAWNFLAG_NOT_H2COOP (1<<16)
# define SPAWNFLAG_NOT_H2SINGLE (1<<17)
2004-08-23 00:15:46 +00:00
#if 0 //ndef Q2SERVER
typedef enum multicast_e
{
MULTICAST_ALL ,
MULTICAST_PHS ,
MULTICAST_PVS ,
MULTICAST_ALL_R ,
MULTICAST_PHS_R ,
MULTICAST_PVS_R
} multicast_t ;
# endif
2005-02-28 07:16:19 +00:00
//shared with qc
2005-05-08 17:03:19 +00:00
# define MSG_PRERELONE -100
2005-02-28 07:16:19 +00:00
# define MSG_BROADCAST 0 // unreliable to all
# define MSG_ONE 1 // reliable to one (msg_entity)
# define MSG_ALL 2 // reliable to all
# define MSG_INIT 3 // write to the init string
# define MSG_MULTICAST 4 // for multicast()
# define MSG_CSQC 5 // for writing csqc entities
2004-08-23 00:15:46 +00:00
//============================================================================
2009-11-15 03:20:17 +00:00
extern cvar_t sv_mintic , sv_maxtic , sv_limittics ;
2004-08-23 00:15:46 +00:00
extern cvar_t sv_maxspeed ;
2009-11-04 21:16:50 +00:00
extern cvar_t sv_antilag ;
2009-11-13 16:54:21 +00:00
extern cvar_t sv_antilag_frac ;
2004-08-23 00:15:46 +00:00
2014-12-23 15:26:42 +00:00
void SV_Master_ReResolve ( void ) ;
void SV_Master_Shutdown ( void ) ;
void SV_Master_Heartbeat ( void ) ;
2021-04-14 05:21:04 +00:00
qboolean SV_Master_AddressIsMaster ( netadr_t * adr ) ;
void SV_Master_HeartbeatResponse ( netadr_t * adr , const char * challenge ) ;
extern cvar_t sv_antilag_frac ;
2004-08-23 00:15:46 +00:00
2011-10-27 16:16:29 +00:00
extern cvar_t pr_ssqc_progs ;
2020-09-08 05:11:09 +00:00
extern cvar_t sv_csqcdebug ;
2004-08-23 00:15:46 +00:00
extern cvar_t spawn ;
extern cvar_t teamplay ;
extern cvar_t deathmatch ;
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 cvar_t coop ;
2004-08-23 00:15:46 +00:00
extern cvar_t fraglimit ;
extern cvar_t timelimit ;
extern server_static_t svs ; // persistant server info
extern server_t sv ; // local server
extern client_t * host_client ;
extern edict_t * sv_player ;
2014-09-17 03:04:08 +00:00
//extern char localmodels[MAX_MODELS][5]; // inline model names for precache
2004-08-23 00:15:46 +00:00
2005-12-21 03:07:33 +00:00
extern vfsfile_t * sv_fraglogfile ;
2004-08-23 00:15:46 +00:00
//===========================================================
------------------------------------------------------------------------
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 SV_AddDebugPolygons ( void ) ;
2019-07-16 02:59:12 +00:00
const char * SV_CheckRejectConnection ( netadr_t * adr , const char * uinfo , unsigned int protocol , unsigned int pext1 , unsigned int pext2 , unsigned int ezpext1 , char * guid ) ;
------------------------------------------------------------------------
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
2016-07-12 00:40:13 +00:00
//
//sv_ccmds.c
//
char * SV_BannedReason ( netadr_t * a ) ;
void SV_EvaluatePenalties ( client_t * cl ) ;
void SV_AutoAddPenalty ( client_t * cl , unsigned int banflag , int duration , char * reason ) ;
Too many changes, sorry.
Change revision displays, use the SVN commit date instead of using __DATE__ (when there's no local changes). This should allow reproducible builds.
Added s_al_disable cvar, to block openal and all the various problems people have had with it, without having to name an explicit fallback (which would vary by system).
Add mastervolume cvar (for ss).
Add r_shadows 2 (aka fake shadows - for ss).
Add scr_loadingscreen_aspect -1 setting, to disable levelshots entirely, also disables the progress bar (for ss).
Better support for some effectinfo hacks (for ss).
Added dpcompat_nocsqcwarnings (because of lazy+buggy mods like ss).
Rework the dpcsqc versions of project+unproject builtins for better compat (for ss).
Added dpcompat_csqcinputeventtypes to block unexpected csqc input events (for ss).
Better compat with DP's loadfont console command (for ss).
Added dpcompat_smallerfonts cvar to replicate a DP bug (for ss).
Detect dp's m_draw extension, to work around it (for ss).
Cvar dpcompat_ignoremodificationtimes added. A value of 0 favour the most recently modified file, 1 will use DP-like alphabetically sorted preferences (for ss).
loadfont builtin can now accept outline=1 in the sizes arg for slightly more readable fonts.
Fix bbox calcs for rotated entities, fix needed for r_ignorenetpvs 0.
Hackily parse emoji.json to provide :poop: etc suggestions.
Skip prediction entirely when there's no local entity info. This fixes stair-smoothing in xonotic.
screenshot_cubemap will now capture half-float images when saving to ktx or dds files.
Fix support for xcf files larger than 4gb, mostly to avoid compiler warnings.
Fixed size of gfx/loading.lmp when replacement textures are used.
Added mipmap support for rg8 and l8a8 textures.
r_hdr_framebuffer cvar updated to support format names instead of random negative numbers. Description updated to name some interesting ones.
Perform autoupdate _checks_ ONLY with explicit user confirmation (actual updating already needed user confirmation, but this extra step should reduce the chances of us getting wrongly accused of exfiltrating user data if we're run in a sandbox - we ONLY ever included the updating engine's version in the checks, though there's nothing we can do to avoid sending the user's router's IP).
Removed the 'summon satan all over your harddrive' quit message, in case paranoid security researchers are idiots and don't bother doing actual research.
Removed the triptohell.info and fte.triptohell.info certificates, they really need to stop being self-signed. The updates domain is still self-signed for autoupdates.
Video drivers are now able to report supported video resolutions, visible to menuqc. Currently only works with SDL2 builds.
Added setmousepos builtin. Should work with glx+win32 build.
VF_SKYROOM_CAMERA can now accept an extra two args, setviewprop(VF_SKYROOM_CAMERA, org, axis, degrees).
Removed v_skyroom_origin+v_skyroom_orientation cvars in favour just v_skyroom, which should make it behave more like the 'fog' command (used when csqc isn't overriding).
Added R_EndPolygonRibbon builtin to make it faster+easier to generate textured ribbon/cable/etc wide lines (for TW).
sdl: Fix up sys_sdl.c's file enumeration to support wildcards in directories.
edit command now displays end1.bin/end2.bin correctly, because we can.
Finally add support for f_modified - though ruleset_allow_larger_models and ruleset_allow_overlong_sounds generally make it redundant.
Fix threading race condition in sha1 lookups.
Updated f_ruleset to include the same extra flags reported by ezquake.
A mod's default.fmf file can now contain an eg 'mainconfig config.cfg' line (to explicitly set the main config saved with cfg_save_auto 1 etc).
fmf: basegame steam:GameName/GameDir can be used to try to load a mod directory from an installed steam game. The resulting gamedir will be read-only.
HOMEDIR CHANGE: use homedirs only if the basedir cannot be written or a homedir already exists, which should further reduce the probability of microsoft randomly uploading our data to their cloud (but mostly because its annoying to never know where your data is written).
Fixed buf_cvarlist, should work in xonotic now, and without segfaults.
Added an extra arg to URI_Get_Callback calls - the response size, also changed the tempstring to contain all bytes of the response, you need to be careful about nulls though.
Try to work around nvidia's forced-panning bug on x11 when changing video modes. This might screw with other programs.
sdl: support custom icons.
sdl: support choosing a specific display.
Added some documentation to menuqc builtins.
menusys: use outlines for slightly more readable fonts.
menusys: switch vid_width and vid_height combos into a single video mode combo to set both according to reported video modes.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5581 fc73d0e0-1445-4013-8a0c-d673dee63da5
2019-11-20 03:09:50 +00:00
//note: not all penalties are actually penalties, but they can still expire.
2016-07-12 00:40:13 +00:00
# define BAN_BAN (1u<<0) //user is banned from the server
Too many changes, sorry.
Change revision displays, use the SVN commit date instead of using __DATE__ (when there's no local changes). This should allow reproducible builds.
Added s_al_disable cvar, to block openal and all the various problems people have had with it, without having to name an explicit fallback (which would vary by system).
Add mastervolume cvar (for ss).
Add r_shadows 2 (aka fake shadows - for ss).
Add scr_loadingscreen_aspect -1 setting, to disable levelshots entirely, also disables the progress bar (for ss).
Better support for some effectinfo hacks (for ss).
Added dpcompat_nocsqcwarnings (because of lazy+buggy mods like ss).
Rework the dpcsqc versions of project+unproject builtins for better compat (for ss).
Added dpcompat_csqcinputeventtypes to block unexpected csqc input events (for ss).
Better compat with DP's loadfont console command (for ss).
Added dpcompat_smallerfonts cvar to replicate a DP bug (for ss).
Detect dp's m_draw extension, to work around it (for ss).
Cvar dpcompat_ignoremodificationtimes added. A value of 0 favour the most recently modified file, 1 will use DP-like alphabetically sorted preferences (for ss).
loadfont builtin can now accept outline=1 in the sizes arg for slightly more readable fonts.
Fix bbox calcs for rotated entities, fix needed for r_ignorenetpvs 0.
Hackily parse emoji.json to provide :poop: etc suggestions.
Skip prediction entirely when there's no local entity info. This fixes stair-smoothing in xonotic.
screenshot_cubemap will now capture half-float images when saving to ktx or dds files.
Fix support for xcf files larger than 4gb, mostly to avoid compiler warnings.
Fixed size of gfx/loading.lmp when replacement textures are used.
Added mipmap support for rg8 and l8a8 textures.
r_hdr_framebuffer cvar updated to support format names instead of random negative numbers. Description updated to name some interesting ones.
Perform autoupdate _checks_ ONLY with explicit user confirmation (actual updating already needed user confirmation, but this extra step should reduce the chances of us getting wrongly accused of exfiltrating user data if we're run in a sandbox - we ONLY ever included the updating engine's version in the checks, though there's nothing we can do to avoid sending the user's router's IP).
Removed the 'summon satan all over your harddrive' quit message, in case paranoid security researchers are idiots and don't bother doing actual research.
Removed the triptohell.info and fte.triptohell.info certificates, they really need to stop being self-signed. The updates domain is still self-signed for autoupdates.
Video drivers are now able to report supported video resolutions, visible to menuqc. Currently only works with SDL2 builds.
Added setmousepos builtin. Should work with glx+win32 build.
VF_SKYROOM_CAMERA can now accept an extra two args, setviewprop(VF_SKYROOM_CAMERA, org, axis, degrees).
Removed v_skyroom_origin+v_skyroom_orientation cvars in favour just v_skyroom, which should make it behave more like the 'fog' command (used when csqc isn't overriding).
Added R_EndPolygonRibbon builtin to make it faster+easier to generate textured ribbon/cable/etc wide lines (for TW).
sdl: Fix up sys_sdl.c's file enumeration to support wildcards in directories.
edit command now displays end1.bin/end2.bin correctly, because we can.
Finally add support for f_modified - though ruleset_allow_larger_models and ruleset_allow_overlong_sounds generally make it redundant.
Fix threading race condition in sha1 lookups.
Updated f_ruleset to include the same extra flags reported by ezquake.
A mod's default.fmf file can now contain an eg 'mainconfig config.cfg' line (to explicitly set the main config saved with cfg_save_auto 1 etc).
fmf: basegame steam:GameName/GameDir can be used to try to load a mod directory from an installed steam game. The resulting gamedir will be read-only.
HOMEDIR CHANGE: use homedirs only if the basedir cannot be written or a homedir already exists, which should further reduce the probability of microsoft randomly uploading our data to their cloud (but mostly because its annoying to never know where your data is written).
Fixed buf_cvarlist, should work in xonotic now, and without segfaults.
Added an extra arg to URI_Get_Callback calls - the response size, also changed the tempstring to contain all bytes of the response, you need to be careful about nulls though.
Try to work around nvidia's forced-panning bug on x11 when changing video modes. This might screw with other programs.
sdl: support custom icons.
sdl: support choosing a specific display.
Added some documentation to menuqc builtins.
menusys: use outlines for slightly more readable fonts.
menusys: switch vid_width and vid_height combos into a single video mode combo to set both according to reported video modes.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5581 fc73d0e0-1445-4013-8a0c-d673dee63da5
2019-11-20 03:09:50 +00:00
# define BAN_PERMIT (1u<<1) //+user can evade block bans or filterban
2016-07-12 00:40:13 +00:00
# define BAN_CUFF (1u<<2) //can't shoot/use impulses
Too many changes, sorry.
Change revision displays, use the SVN commit date instead of using __DATE__ (when there's no local changes). This should allow reproducible builds.
Added s_al_disable cvar, to block openal and all the various problems people have had with it, without having to name an explicit fallback (which would vary by system).
Add mastervolume cvar (for ss).
Add r_shadows 2 (aka fake shadows - for ss).
Add scr_loadingscreen_aspect -1 setting, to disable levelshots entirely, also disables the progress bar (for ss).
Better support for some effectinfo hacks (for ss).
Added dpcompat_nocsqcwarnings (because of lazy+buggy mods like ss).
Rework the dpcsqc versions of project+unproject builtins for better compat (for ss).
Added dpcompat_csqcinputeventtypes to block unexpected csqc input events (for ss).
Better compat with DP's loadfont console command (for ss).
Added dpcompat_smallerfonts cvar to replicate a DP bug (for ss).
Detect dp's m_draw extension, to work around it (for ss).
Cvar dpcompat_ignoremodificationtimes added. A value of 0 favour the most recently modified file, 1 will use DP-like alphabetically sorted preferences (for ss).
loadfont builtin can now accept outline=1 in the sizes arg for slightly more readable fonts.
Fix bbox calcs for rotated entities, fix needed for r_ignorenetpvs 0.
Hackily parse emoji.json to provide :poop: etc suggestions.
Skip prediction entirely when there's no local entity info. This fixes stair-smoothing in xonotic.
screenshot_cubemap will now capture half-float images when saving to ktx or dds files.
Fix support for xcf files larger than 4gb, mostly to avoid compiler warnings.
Fixed size of gfx/loading.lmp when replacement textures are used.
Added mipmap support for rg8 and l8a8 textures.
r_hdr_framebuffer cvar updated to support format names instead of random negative numbers. Description updated to name some interesting ones.
Perform autoupdate _checks_ ONLY with explicit user confirmation (actual updating already needed user confirmation, but this extra step should reduce the chances of us getting wrongly accused of exfiltrating user data if we're run in a sandbox - we ONLY ever included the updating engine's version in the checks, though there's nothing we can do to avoid sending the user's router's IP).
Removed the 'summon satan all over your harddrive' quit message, in case paranoid security researchers are idiots and don't bother doing actual research.
Removed the triptohell.info and fte.triptohell.info certificates, they really need to stop being self-signed. The updates domain is still self-signed for autoupdates.
Video drivers are now able to report supported video resolutions, visible to menuqc. Currently only works with SDL2 builds.
Added setmousepos builtin. Should work with glx+win32 build.
VF_SKYROOM_CAMERA can now accept an extra two args, setviewprop(VF_SKYROOM_CAMERA, org, axis, degrees).
Removed v_skyroom_origin+v_skyroom_orientation cvars in favour just v_skyroom, which should make it behave more like the 'fog' command (used when csqc isn't overriding).
Added R_EndPolygonRibbon builtin to make it faster+easier to generate textured ribbon/cable/etc wide lines (for TW).
sdl: Fix up sys_sdl.c's file enumeration to support wildcards in directories.
edit command now displays end1.bin/end2.bin correctly, because we can.
Finally add support for f_modified - though ruleset_allow_larger_models and ruleset_allow_overlong_sounds generally make it redundant.
Fix threading race condition in sha1 lookups.
Updated f_ruleset to include the same extra flags reported by ezquake.
A mod's default.fmf file can now contain an eg 'mainconfig config.cfg' line (to explicitly set the main config saved with cfg_save_auto 1 etc).
fmf: basegame steam:GameName/GameDir can be used to try to load a mod directory from an installed steam game. The resulting gamedir will be read-only.
HOMEDIR CHANGE: use homedirs only if the basedir cannot be written or a homedir already exists, which should further reduce the probability of microsoft randomly uploading our data to their cloud (but mostly because its annoying to never know where your data is written).
Fixed buf_cvarlist, should work in xonotic now, and without segfaults.
Added an extra arg to URI_Get_Callback calls - the response size, also changed the tempstring to contain all bytes of the response, you need to be careful about nulls though.
Try to work around nvidia's forced-panning bug on x11 when changing video modes. This might screw with other programs.
sdl: support custom icons.
sdl: support choosing a specific display.
Added some documentation to menuqc builtins.
menusys: use outlines for slightly more readable fonts.
menusys: switch vid_width and vid_height combos into a single video mode combo to set both according to reported video modes.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5581 fc73d0e0-1445-4013-8a0c-d673dee63da5
2019-11-20 03:09:50 +00:00
# define BAN_MUTE (1u<<3) //can't use say/say_team/voip
2016-07-12 00:40:13 +00:00
# define BAN_CRIPPLED (1u<<4) //can't move
# define BAN_DEAF (1u<<5) //can't see say/say_team
# define BAN_LAGGED (1u<<6) //given an extra 200ms
Too many changes, sorry.
Change revision displays, use the SVN commit date instead of using __DATE__ (when there's no local changes). This should allow reproducible builds.
Added s_al_disable cvar, to block openal and all the various problems people have had with it, without having to name an explicit fallback (which would vary by system).
Add mastervolume cvar (for ss).
Add r_shadows 2 (aka fake shadows - for ss).
Add scr_loadingscreen_aspect -1 setting, to disable levelshots entirely, also disables the progress bar (for ss).
Better support for some effectinfo hacks (for ss).
Added dpcompat_nocsqcwarnings (because of lazy+buggy mods like ss).
Rework the dpcsqc versions of project+unproject builtins for better compat (for ss).
Added dpcompat_csqcinputeventtypes to block unexpected csqc input events (for ss).
Better compat with DP's loadfont console command (for ss).
Added dpcompat_smallerfonts cvar to replicate a DP bug (for ss).
Detect dp's m_draw extension, to work around it (for ss).
Cvar dpcompat_ignoremodificationtimes added. A value of 0 favour the most recently modified file, 1 will use DP-like alphabetically sorted preferences (for ss).
loadfont builtin can now accept outline=1 in the sizes arg for slightly more readable fonts.
Fix bbox calcs for rotated entities, fix needed for r_ignorenetpvs 0.
Hackily parse emoji.json to provide :poop: etc suggestions.
Skip prediction entirely when there's no local entity info. This fixes stair-smoothing in xonotic.
screenshot_cubemap will now capture half-float images when saving to ktx or dds files.
Fix support for xcf files larger than 4gb, mostly to avoid compiler warnings.
Fixed size of gfx/loading.lmp when replacement textures are used.
Added mipmap support for rg8 and l8a8 textures.
r_hdr_framebuffer cvar updated to support format names instead of random negative numbers. Description updated to name some interesting ones.
Perform autoupdate _checks_ ONLY with explicit user confirmation (actual updating already needed user confirmation, but this extra step should reduce the chances of us getting wrongly accused of exfiltrating user data if we're run in a sandbox - we ONLY ever included the updating engine's version in the checks, though there's nothing we can do to avoid sending the user's router's IP).
Removed the 'summon satan all over your harddrive' quit message, in case paranoid security researchers are idiots and don't bother doing actual research.
Removed the triptohell.info and fte.triptohell.info certificates, they really need to stop being self-signed. The updates domain is still self-signed for autoupdates.
Video drivers are now able to report supported video resolutions, visible to menuqc. Currently only works with SDL2 builds.
Added setmousepos builtin. Should work with glx+win32 build.
VF_SKYROOM_CAMERA can now accept an extra two args, setviewprop(VF_SKYROOM_CAMERA, org, axis, degrees).
Removed v_skyroom_origin+v_skyroom_orientation cvars in favour just v_skyroom, which should make it behave more like the 'fog' command (used when csqc isn't overriding).
Added R_EndPolygonRibbon builtin to make it faster+easier to generate textured ribbon/cable/etc wide lines (for TW).
sdl: Fix up sys_sdl.c's file enumeration to support wildcards in directories.
edit command now displays end1.bin/end2.bin correctly, because we can.
Finally add support for f_modified - though ruleset_allow_larger_models and ruleset_allow_overlong_sounds generally make it redundant.
Fix threading race condition in sha1 lookups.
Updated f_ruleset to include the same extra flags reported by ezquake.
A mod's default.fmf file can now contain an eg 'mainconfig config.cfg' line (to explicitly set the main config saved with cfg_save_auto 1 etc).
fmf: basegame steam:GameName/GameDir can be used to try to load a mod directory from an installed steam game. The resulting gamedir will be read-only.
HOMEDIR CHANGE: use homedirs only if the basedir cannot be written or a homedir already exists, which should further reduce the probability of microsoft randomly uploading our data to their cloud (but mostly because its annoying to never know where your data is written).
Fixed buf_cvarlist, should work in xonotic now, and without segfaults.
Added an extra arg to URI_Get_Callback calls - the response size, also changed the tempstring to contain all bytes of the response, you need to be careful about nulls though.
Try to work around nvidia's forced-panning bug on x11 when changing video modes. This might screw with other programs.
sdl: support custom icons.
sdl: support choosing a specific display.
Added some documentation to menuqc builtins.
menusys: use outlines for slightly more readable fonts.
menusys: switch vid_width and vid_height combos into a single video mode combo to set both according to reported video modes.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5581 fc73d0e0-1445-4013-8a0c-d673dee63da5
2019-11-20 03:09:50 +00:00
# define BAN_VIP (1u<<7) //+mods might give the user special rights, via the *VIP infokey. the engine itself currently does not do anything but track it.
2016-07-12 00:40:13 +00:00
# define BAN_BLIND (1u<<8) //player's pvs is wiped.
# define BAN_SPECONLY (1u<<9) //player is forced to spectate
# define BAN_STEALTH (1u<<10) //player is not told of their bans
# define BAN_USER1 (1u<<11) //mod-specified
# define BAN_USER2 (1u<<12) //mod-specified
# define BAN_USER3 (1u<<13) //mod-specified
# define BAN_USER4 (1u<<14) //mod-specified
# define BAN_USER5 (1u<<15) //mod-specified
# define BAN_USER6 (1u<<16) //mod-specified
# define BAN_USER7 (1u<<17) //mod-specified
# define BAN_USER8 (1u<<18) //mod-specified
Too many changes, sorry.
Change revision displays, use the SVN commit date instead of using __DATE__ (when there's no local changes). This should allow reproducible builds.
Added s_al_disable cvar, to block openal and all the various problems people have had with it, without having to name an explicit fallback (which would vary by system).
Add mastervolume cvar (for ss).
Add r_shadows 2 (aka fake shadows - for ss).
Add scr_loadingscreen_aspect -1 setting, to disable levelshots entirely, also disables the progress bar (for ss).
Better support for some effectinfo hacks (for ss).
Added dpcompat_nocsqcwarnings (because of lazy+buggy mods like ss).
Rework the dpcsqc versions of project+unproject builtins for better compat (for ss).
Added dpcompat_csqcinputeventtypes to block unexpected csqc input events (for ss).
Better compat with DP's loadfont console command (for ss).
Added dpcompat_smallerfonts cvar to replicate a DP bug (for ss).
Detect dp's m_draw extension, to work around it (for ss).
Cvar dpcompat_ignoremodificationtimes added. A value of 0 favour the most recently modified file, 1 will use DP-like alphabetically sorted preferences (for ss).
loadfont builtin can now accept outline=1 in the sizes arg for slightly more readable fonts.
Fix bbox calcs for rotated entities, fix needed for r_ignorenetpvs 0.
Hackily parse emoji.json to provide :poop: etc suggestions.
Skip prediction entirely when there's no local entity info. This fixes stair-smoothing in xonotic.
screenshot_cubemap will now capture half-float images when saving to ktx or dds files.
Fix support for xcf files larger than 4gb, mostly to avoid compiler warnings.
Fixed size of gfx/loading.lmp when replacement textures are used.
Added mipmap support for rg8 and l8a8 textures.
r_hdr_framebuffer cvar updated to support format names instead of random negative numbers. Description updated to name some interesting ones.
Perform autoupdate _checks_ ONLY with explicit user confirmation (actual updating already needed user confirmation, but this extra step should reduce the chances of us getting wrongly accused of exfiltrating user data if we're run in a sandbox - we ONLY ever included the updating engine's version in the checks, though there's nothing we can do to avoid sending the user's router's IP).
Removed the 'summon satan all over your harddrive' quit message, in case paranoid security researchers are idiots and don't bother doing actual research.
Removed the triptohell.info and fte.triptohell.info certificates, they really need to stop being self-signed. The updates domain is still self-signed for autoupdates.
Video drivers are now able to report supported video resolutions, visible to menuqc. Currently only works with SDL2 builds.
Added setmousepos builtin. Should work with glx+win32 build.
VF_SKYROOM_CAMERA can now accept an extra two args, setviewprop(VF_SKYROOM_CAMERA, org, axis, degrees).
Removed v_skyroom_origin+v_skyroom_orientation cvars in favour just v_skyroom, which should make it behave more like the 'fog' command (used when csqc isn't overriding).
Added R_EndPolygonRibbon builtin to make it faster+easier to generate textured ribbon/cable/etc wide lines (for TW).
sdl: Fix up sys_sdl.c's file enumeration to support wildcards in directories.
edit command now displays end1.bin/end2.bin correctly, because we can.
Finally add support for f_modified - though ruleset_allow_larger_models and ruleset_allow_overlong_sounds generally make it redundant.
Fix threading race condition in sha1 lookups.
Updated f_ruleset to include the same extra flags reported by ezquake.
A mod's default.fmf file can now contain an eg 'mainconfig config.cfg' line (to explicitly set the main config saved with cfg_save_auto 1 etc).
fmf: basegame steam:GameName/GameDir can be used to try to load a mod directory from an installed steam game. The resulting gamedir will be read-only.
HOMEDIR CHANGE: use homedirs only if the basedir cannot be written or a homedir already exists, which should further reduce the probability of microsoft randomly uploading our data to their cloud (but mostly because its annoying to never know where your data is written).
Fixed buf_cvarlist, should work in xonotic now, and without segfaults.
Added an extra arg to URI_Get_Callback calls - the response size, also changed the tempstring to contain all bytes of the response, you need to be careful about nulls though.
Try to work around nvidia's forced-panning bug on x11 when changing video modes. This might screw with other programs.
sdl: support custom icons.
sdl: support choosing a specific display.
Added some documentation to menuqc builtins.
menusys: use outlines for slightly more readable fonts.
menusys: switch vid_width and vid_height combos into a single video mode combo to set both according to reported video modes.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5581 fc73d0e0-1445-4013-8a0c-d673dee63da5
2019-11-20 03:09:50 +00:00
# define BAN_MAPPER (1u<<19) //+player is allowed to use the brush/entity editing clc.
# define BAN_VMUTE (1u<<20) //can't use voip (but can still use other forms of chat)
2017-04-18 11:12:17 +00:00
# define BAN_NOLOCALHOST (BAN_BAN|BAN_PERMIT|BAN_SPECONLY) //any attempt to ban localhost is denied, but you can vip, lag, cripple, etc them.
2016-07-12 00:40:13 +00:00
2004-08-23 00:15:46 +00:00
//
// sv_main.c
//
2009-11-04 21:16:50 +00:00
NORETURN void VARGS SV_Error ( char * error , . . . ) LIKEPRINTF ( 1 ) ;
2004-08-23 00:15:46 +00:00
void SV_Shutdown ( void ) ;
2011-06-05 23:53:33 +00:00
float SV_Frame ( void ) ;
2020-02-26 00:37:52 +00:00
void SV_ReadPacket ( void ) ;
2004-08-23 00:15:46 +00:00
void SV_FinalMessage ( char * message ) ;
void SV_DropClient ( client_t * drop ) ;
struct quakeparms_s ;
void SV_Init ( struct quakeparms_s * parms ) ;
2013-06-23 02:17:02 +00:00
void SV_ExecInitialConfigs ( char * defaultexec ) ;
2016-01-18 05:22:07 +00:00
void SV_ArgumentOverrides ( void ) ;
2004-08-23 00:15:46 +00:00
2010-02-06 01:25:04 +00:00
int SV_CalcPing ( client_t * cl , qboolean forcecalc ) ;
2013-03-31 04:21:08 +00:00
void SV_FullClientUpdate ( client_t * client , client_t * to ) ;
2017-02-11 16:14:06 +00:00
char * SV_PlayerPublicAddress ( client_t * cl ) ;
2004-08-23 00:15:46 +00:00
2022-07-28 02:17:27 +00:00
const char * SV_GetProtocolVersionString ( void ) ; //decorate the protocol version field of server queries with extra features...
2017-05-18 10:24:09 +00:00
qboolean SVC_GetChallenge ( qboolean respond_dp ) ;
int SV_NewChallenge ( void ) ;
2019-07-02 04:12:20 +00:00
void SVC_DirectConnect ( int expectedreliablesequence ) ;
typedef struct
{
enum serverprotocols_e protocol ; //protocol used to talk to this client.
# ifdef NQPROT
qboolean proquakeanglehack ; //specifies that the client will expect proquake angles if we give a proquake CCREP_ACCEPT response.
2022-01-08 10:01:15 +00:00
qboolean isqex ; //yay quirks...
2019-07-02 04:12:20 +00:00
unsigned int expectedreliablesequence ; //required for nq connection cookies (like tcp's syn cookies).
unsigned int supportedprotocols ; //1<<SCP_* bitmask
# endif
unsigned int ftepext1 ;
unsigned int ftepext2 ;
2019-07-16 02:59:12 +00:00
unsigned int ezpext1 ;
2019-07-02 04:12:20 +00:00
int qport ; //part of the qw protocol to avoid issues with buggy routers that periodically renumber cl2sv ports.
# ifdef HUFFNETWORK
int huffcrc ; //network compression stuff
# endif
int challenge ; //the challenge used at connect. remembered to make life harder for proxies.
int mtu ; //allowed fragment size (also signifies that it supports fragmented qw packets)
char userinfo [ 2048 ] ; //random userinfo data. no blobs, obviously.
char guid [ 128 ] ; //user's guid data
netadr_t adr ; //the address the connect request came from (so we can check passwords before accepting)
} svconnectinfo_t ;
void SV_DoDirectConnect ( svconnectinfo_t * fte_restrict info ) ;
2017-05-18 10:24:09 +00:00
2014-03-30 08:55:06 +00:00
int SV_ModelIndex ( const char * name ) ;
2004-08-23 00:15:46 +00:00
void SV_WriteClientdataToMessage ( client_t * client , sizebuf_t * msg ) ;
2021-08-04 21:16:57 +00:00
void SVQW_WriteDelta ( entity_state_t * from , entity_state_t * to , sizebuf_t * msg , qboolean force , unsigned int protext , unsigned int ezext ) ;
2004-08-23 00:15:46 +00:00
2015-06-24 17:59:57 +00:00
client_t * SV_AddSplit ( client_t * controller , char * info , int id ) ;
2017-05-28 15:42:32 +00:00
void SV_SpawnParmsToQC ( client_t * client ) ;
void SV_SpawnParmsToClient ( client_t * client ) ;
2014-08-24 17:16:12 +00:00
void SV_GetNewSpawnParms ( client_t * cl ) ;
2014-03-30 08:55:06 +00:00
void SV_SaveSpawnparms ( void ) ;
void SV_SaveSpawnparmsClient ( client_t * client , float * transferparms ) ; //if transferparms, calls SetTransferParms instead, and does not modify the player.
2016-01-18 05:22:07 +00:00
void SV_SaveLevelCache ( const char * savename , qboolean dontharmgame ) ;
void SV_Savegame ( const char * savename , qboolean autosave ) ;
qboolean SV_LoadLevelCache ( const char * savename , const char * level , const char * startspot , qboolean ignoreplayers ) ;
2004-08-23 00:15:46 +00:00
void SV_Physics_Client ( edict_t * ent , int num ) ;
2017-08-14 16:38:44 +00:00
void SV_ExecuteUserCommand ( const char * s , qboolean fromQC ) ;
2004-08-23 00:15:46 +00:00
void SV_InitOperatorCommands ( void ) ;
void SV_SendServerinfo ( client_t * client ) ;
------------------------------------------------------------------------
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 SV_ExtractFromUserinfo ( client_t * cl , qboolean verbose ) ;
2004-08-23 00:15:46 +00:00
2005-12-21 03:07:33 +00:00
void SV_SaveInfos ( vfsfile_t * f ) ;
2004-11-23 00:34:41 +00:00
2018-03-25 09:36:14 +00:00
void SV_FixupName ( const char * in , char * out , unsigned int outlen ) ;
2004-08-23 00:15:46 +00:00
2014-03-30 08:55:06 +00:00
# ifdef SUBSERVERS
//cluster stuff
void SSV_UpdateAddresses ( void ) ;
void SSV_InitiatePlayerTransfer ( client_t * cl , const char * newserver ) ;
void SSV_InstructMaster ( sizebuf_t * cmd ) ;
2016-07-12 00:40:13 +00:00
void SSV_CheckFromMaster ( void ) ;
2014-03-30 08:55:06 +00:00
void SSV_PrintToMaster ( char * s ) ;
void SSV_ReadFromControlServer ( void ) ;
2014-09-02 02:44:43 +00:00
void SSV_SavePlayerStats ( client_t * cl , int reason ) ; //initial, periodic (in case of node crashes), part
2014-09-08 23:47:19 +00:00
void SSV_RequestShutdown ( void ) ; //asks the cluster to not send us new players
2014-03-30 08:55:06 +00:00
2020-04-29 10:43:22 +00:00
vfsfile_t * Sys_ForkServer ( void ) ;
vfsfile_t * Sys_GetStdInOutStream ( void ) ; //obtains a bi-directional pipe for reading/writing via stdin/stdout. make sure the system code won't be using it.
2014-03-30 08:55:06 +00:00
2020-04-29 10:43:22 +00:00
qboolean MSV_NewNetworkedNode ( vfsfile_t * stream , qbyte * reqstart , qbyte * buffered , size_t buffersize , const char * remoteaddr ) ; //call to register a pipe to a newly discovered node.
void SSV_SetupControlPipe ( vfsfile_t * stream ) ; //call to register the pipe.
extern qboolean isClusterSlave ;
2014-03-30 08:55:06 +00:00
# define SSV_IsSubServer() isClusterSlave
2014-09-02 02:44:43 +00:00
void MSV_SubServerCommand_f ( void ) ;
void MSV_MapCluster_f ( void ) ;
2021-07-03 01:46:58 +00:00
void MSV_MapCluster_Setup ( const char * landingmap , qboolean use_database , qboolean singleplyaer ) ;
void MSV_Shutdown ( void ) ;
2014-09-02 02:44:43 +00:00
void SSV_Send ( const char * dest , const char * src , const char * cmd , const char * msg ) ;
2019-07-02 04:12:20 +00:00
qboolean MSV_ClusterLogin ( svconnectinfo_t * info ) ;
2014-09-02 02:44:43 +00:00
void MSV_PollSlaves ( void ) ;
2020-04-19 01:23:32 +00:00
qboolean MSV_ForwardToAutoServer ( void ) ; //forwards console command to a default subserver. ie: whichever one our client is on.
2014-09-02 02:44:43 +00:00
void MSV_Status ( void ) ;
2019-07-02 04:12:20 +00:00
void MSV_OpenUserDatabase ( void ) ;
2014-03-30 08:55:06 +00:00
# else
2016-02-15 06:01:17 +00:00
# define SSV_UpdateAddresses() ((void)0)
2019-07-02 04:12:20 +00:00
# define MSV_ClusterLogin(info) false
2014-03-30 08:55:06 +00:00
# define SSV_IsSubServer() false
2019-07-02 04:12:20 +00:00
# define MSV_OpenUserDatabase()
2020-04-19 03:44:32 +00:00
# define MSV_PollSlaves()
2020-04-19 01:23:32 +00:00
# define MSV_ForwardToAutoServer() false
2014-03-30 08:55:06 +00:00
# endif
2004-08-23 00:15:46 +00:00
//
// sv_init.c
//
2020-04-19 01:23:32 +00:00
void SV_SpawnServer ( const char * server , const char * startspot , qboolean noents , qboolean usecinematic , int playerslots ) ;
2004-08-23 00:15:46 +00:00
void SV_UnspawnServer ( void ) ;
2019-09-17 19:49:39 +00:00
void SV_FlushSignon ( qboolean force ) ;
2014-03-30 08:55:06 +00:00
void SV_UpdateMaxPlayers ( int newmax ) ;
2004-08-23 00:15:46 +00:00
void SV_FilterImpulseInit ( void ) ;
2009-11-04 21:16:50 +00:00
qboolean SV_FilterImpulse ( int imp , int level ) ;
2004-08-23 00:15:46 +00:00
//svq2_game.c
qboolean SVQ2_InitGameProgs ( void ) ;
2005-03-18 06:13:11 +00:00
void VARGS SVQ2_ShutdownGameProgs ( void ) ;
2020-01-10 12:23:25 +00:00
void VARGS PFQ2_Configstring ( int i , const char * val ) ; //for engine cheats.
2004-08-23 00:15:46 +00:00
//svq2_ents.c
2012-02-12 05:18:31 +00:00
void SVQ2_BuildClientFrame ( client_t * client ) ;
void SVQ2_WriteFrameToClient ( client_t * client , sizebuf_t * msg ) ;
2004-08-23 00:15:46 +00:00
# ifdef Q2SERVER
void MSGQ2_WriteDeltaEntity ( q2entity_state_t * from , q2entity_state_t * to , sizebuf_t * msg , qboolean force , qboolean newentity ) ;
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 SVQ2_BuildBaselines ( void ) ;
2004-08-23 00:15:46 +00:00
# endif
//
// sv_send.c
//
2013-06-23 02:17:02 +00:00
void SV_CalcNetRates ( client_t * cl , double * ftime , int * frames , double * minf , double * maxf ) ; //gets received framerate etc info
2005-11-30 01:20:53 +00:00
qboolean SV_ChallengePasses ( int challenge ) ;
2008-01-23 01:31:01 +00:00
void SV_QCStatName ( int type , char * name , int statnum ) ;
void SV_QCStatFieldIdx ( int type , unsigned int fieldindex , int statnum ) ;
2017-08-14 16:38:44 +00:00
void SV_QCStatGlobal ( int type , const char * globalname , int statnum ) ;
2010-08-16 02:03:02 +00:00
void SV_QCStatPtr ( int type , void * ptr , int statnum ) ;
2004-11-23 00:34:41 +00:00
void SV_ClearQCStats ( void ) ;
2004-08-23 00:15:46 +00:00
void SV_SendClientMessages ( void ) ;
2019-09-10 15:40:04 +00:00
void SV_SendLightstyle ( client_t * cl , sizebuf_t * forcemsg , int style , qboolean initial ) ;
2005-03-18 06:13:11 +00:00
void VARGS SV_Multicast ( vec3_t origin , multicast_t to ) ;
2004-08-31 23:58:18 +00:00
# define FULLDIMENSIONMASK 0xffffffff
void SV_MulticastProtExt ( vec3_t origin , multicast_t to , int dimension_mask , int with , int without ) ;
2019-03-23 07:06:37 +00:00
void SV_MulticastCB ( vec3_t origin , multicast_t to , const char * reliableinfokey , int dimension_mask , void ( * callback ) ( client_t * cl , sizebuf_t * msg , void * ctx ) , void * ctx ) ;
2004-08-23 00:15:46 +00:00
2016-07-12 00:40:13 +00:00
void SV_StartSound ( int ent , vec3_t origin , float * velocity , int seenmask , int channel , const char * sample , int volume , float attenuation , float pitchadj , float timeofs , unsigned int flags ) ;
2020-06-27 19:32:49 +00:00
void QDECL SVQ1_StartSound ( vec_t * origin , wedict_t * entity , int channel , const char * sample , int volume , float attenuation , float pitchadj , float timeofs , unsigned int chflags ) ;
2013-11-29 15:59:02 +00:00
void SV_PrintToClient ( client_t * cl , int level , const char * string ) ;
2013-11-29 14:36:47 +00:00
void SV_TPrintToClient ( client_t * cl , int level , const char * string ) ;
2015-01-21 18:18:37 +00:00
void SV_StuffcmdToClient ( client_t * cl , const char * string ) ;
2017-08-14 16:38:44 +00:00
void SV_StuffcmdToClient_Unreliable ( client_t * cl , const char * string ) ;
2016-01-18 05:22:07 +00:00
void VARGS SV_ClientPrintf ( client_t * cl , int level , const char * fmt , . . . ) LIKEPRINTF ( 3 ) ;
2004-08-23 00:15:46 +00:00
void VARGS SV_ClientTPrintf ( client_t * cl , int level , translation_t text , . . . ) ;
2016-01-18 05:22:07 +00:00
void VARGS SV_BroadcastPrintf ( int level , const char * fmt , . . . ) LIKEPRINTF ( 2 ) ;
2023-01-09 05:11:34 +00:00
void SV_BroadcastPrint_QexLoc ( unsigned int flags , int level , const char * * arg , int args ) ;
2022-05-28 17:59:17 +00:00
void SV_BroadcastPrint ( unsigned int flags , int level , const char * text ) ;
//flags exposed to ktx.
# define BPRINT_IGNOREINDEMO (1<<0) // broad cast print will be not put in demo
# define BPRINT_IGNORECLIENTS (1<<1) // broad cast print will not be seen by clients, but may be seen in demo
//#define BPRINT_QTVONLY (1<<2) // if broad cast print goes to demo, then it will be only qtv sream, but not file
# define BPRINT_IGNORECONSOLE (1<<3) // broad cast print will not be put in server console
2004-08-23 00:15:46 +00:00
void VARGS SV_BroadcastTPrintf ( int level , translation_t fmt , . . . ) ;
2016-01-18 05:22:07 +00:00
void VARGS SV_BroadcastCommand ( const char * fmt , . . . ) LIKEPRINTF ( 1 ) ;
2004-08-23 00:15:46 +00:00
void SV_SendMessagesToAll ( void ) ;
void SV_FindModelNumbers ( void ) ;
2020-04-30 14:33:58 +00:00
void SV_SendFixAngle ( client_t * client , sizebuf_t * msg , int fixtype , qboolean roll ) ;
2004-08-23 00:15:46 +00:00
dpp7: Treat 'dropped' c2s packets as choked when using dpp7 protocols. This is because the protocol provides no way to disambiguate, and I don't like false reports of packetloss (only reliables loss can be detected, and that's not frequent enough to be meaningful). Pings can still be determined with dpp7, for those few packets which are acked.
package manager: reworked to enable/disable plugins when downloaded, which can also be present-but-disabled.
package manager: display a confirmation prompt before applying changes. do not allow other changes to be made while applying. prompt may be skipped with 'pkg apply' in dedicated servers.
sv: downloads are no longer forced to lower case.
sv: added sv_demoAutoCompress cvar. set to 1 to directly record to *.mvd.gz
cl: properly support directly playing .mvd.gz files
menus: reworked to separate mouse and keyboard focus. mouse focus becomes keyboard focus only on mouse clicks. tooltips follow mouse cursors.
menus: cleaned up menu heirachy a little. now simpler.
server browser: changed 'hide *' filters to 'show *' instead. I felt it was more logical.
deluxmapping: changed to disabled, load, generate, like r_loadlit is.
render targets api now supports negative formats to mean nearest filtering, where filtering is part of texture state.
drawrotpic fixed, now batches and interacts with drawpic correctly.
drawline fixed, no interacts with draw* correctly, but still does not batch.
fixed saving games.
provide proper userinfo to nq clients, where supported.
qcc: catch string table overflows safely, giving errors instead of crashes. switch to 32bit statements if some over-sized function requires it.
qtv: some bigcoords support tweaks
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5073 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-03-21 05:27:07 +00:00
void SV_BroadcastUserinfoChange ( client_t * about , qboolean isbasic , const char * key , const char * newval ) ;
2023-01-09 05:11:34 +00:00
void SV_Prompt_Resend ( client_t * cl ) ;
void SV_Prompt_Clear ( client_t * cl ) ;
void SV_Prompt_Input ( client_t * cl , usercmd_t * ucmd ) ;
2004-08-23 00:15:46 +00:00
//
// sv_user.c
//
2005-06-14 04:52:10 +00:00
# ifdef NQPROT
void SVNQ_New_f ( void ) ;
void SVNQ_ExecuteClientMessage ( client_t * cl ) ;
# endif
dpp7: Treat 'dropped' c2s packets as choked when using dpp7 protocols. This is because the protocol provides no way to disambiguate, and I don't like false reports of packetloss (only reliables loss can be detected, and that's not frequent enough to be meaningful). Pings can still be determined with dpp7, for those few packets which are acked.
package manager: reworked to enable/disable plugins when downloaded, which can also be present-but-disabled.
package manager: display a confirmation prompt before applying changes. do not allow other changes to be made while applying. prompt may be skipped with 'pkg apply' in dedicated servers.
sv: downloads are no longer forced to lower case.
sv: added sv_demoAutoCompress cvar. set to 1 to directly record to *.mvd.gz
cl: properly support directly playing .mvd.gz files
menus: reworked to separate mouse and keyboard focus. mouse focus becomes keyboard focus only on mouse clicks. tooltips follow mouse cursors.
menus: cleaned up menu heirachy a little. now simpler.
server browser: changed 'hide *' filters to 'show *' instead. I felt it was more logical.
deluxmapping: changed to disabled, load, generate, like r_loadlit is.
render targets api now supports negative formats to mean nearest filtering, where filtering is part of texture state.
drawrotpic fixed, now batches and interacts with drawpic correctly.
drawline fixed, no interacts with draw* correctly, but still does not batch.
fixed saving games.
provide proper userinfo to nq clients, where supported.
qcc: catch string table overflows safely, giving errors instead of crashes. switch to 32bit statements if some over-sized function requires it.
qtv: some bigcoords support tweaks
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5073 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-03-21 05:27:07 +00:00
qboolean SV_UserInfoIsBasic ( const char * infoname ) ; //standard message.
2004-08-23 00:15:46 +00:00
void SV_ExecuteClientMessage ( client_t * cl ) ;
void SVQ2_ExecuteClientMessage ( client_t * cl ) ;
2015-03-03 00:14:43 +00:00
int SV_PMTypeForClient ( client_t * cl , edict_t * ent ) ;
2004-08-23 00:15:46 +00:00
void SV_UserInit ( void ) ;
2006-01-21 00:06:49 +00:00
qboolean SV_TogglePause ( client_t * cl ) ;
2004-08-23 00:15:46 +00:00
2010-11-15 02:40:31 +00:00
# ifdef PEXT2_VOICECHAT
void SV_VoiceInitClient ( client_t * client ) ;
void SV_VoiceSendPacket ( client_t * client , sizebuf_t * buf ) ;
# endif
2021-07-06 00:12:12 +00:00
void SV_SetSSQCInputs ( usercmd_t * ucmd ) ;
2004-08-23 00:15:46 +00:00
void SV_ClientThink ( void ) ;
2020-04-19 01:23:32 +00:00
void SV_Begin_Core ( client_t * split ) ; //sets up the player's gamecode state
void SV_DespawnClient ( client_t * cl ) ; //shuts down the gamecode state.
2004-08-23 00:15:46 +00:00
void VoteFlushAll ( void ) ;
2005-10-07 16:27:20 +00:00
void SV_SetUpClientEdict ( client_t * cl , edict_t * ent ) ;
2006-01-28 02:35:40 +00:00
void SV_UpdateToReliableMessages ( void ) ;
2012-05-09 15:30:53 +00:00
void SV_FlushBroadcasts ( void ) ;
2013-05-09 02:18:15 +00:00
qboolean SV_CanTrack ( client_t * client , int entity ) ;
2004-08-23 00:15:46 +00:00
2019-04-16 22:40:05 +00:00
# ifdef HAVE_LEGACY
2019-03-12 05:04:27 +00:00
void SV_DownloadQueueNext ( client_t * client ) ;
void SV_DownloadQueueClear ( client_t * client ) ;
# endif
2018-11-19 06:37:25 +00:00
# ifdef NQPROT
2007-08-07 00:11:21 +00:00
void SV_DarkPlacesDownloadChunk ( client_t * cl , sizebuf_t * msg ) ;
2018-11-19 06:37:25 +00:00
# endif
2007-08-07 00:11:21 +00:00
void SV_New_f ( void ) ;
2007-10-02 15:25:26 +00:00
void SV_PreRunCmd ( void ) ;
void SV_RunCmd ( usercmd_t * ucmd , qboolean recurse ) ;
void SV_PostRunCmd ( void ) ;
2015-02-02 08:01:53 +00:00
void SV_RunCmdCleanup ( void ) ;
2007-10-02 15:25:26 +00:00
------------------------------------------------------------------------
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 SV_SendClientPrespawnInfo ( client_t * client ) ;
2013-03-12 22:35:33 +00:00
void SV_ClientProtocolExtensionsChanged ( client_t * client ) ;
------------------------------------------------------------------------
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
2004-08-23 00:15:46 +00:00
//sv_master.c
2021-04-14 05:21:04 +00:00
float SVM_Think ( int port ) ;
vfsfile_t * SVM_GenerateIndex ( const char * requesthost , const char * fname , const char * * mimetype , const char * query ) ;
2020-02-11 18:06:10 +00:00
void SVM_AddBrokerGame ( const char * brokerid , const char * info ) ;
void SVM_RemoveBrokerGame ( const char * brokerid ) ;
2004-08-23 00:15:46 +00:00
//
// svonly.c
//
2014-06-24 03:02:32 +00:00
typedef enum { RD_NONE , RD_CLIENT , RD_PACKET , RD_PACKET_LOG , RD_OBLIVION , RD_MASTER } redirect_t ; //oblivion is provided so people can read the output before the buffer is wiped.
2005-01-16 00:59:48 +00:00
void SV_BeginRedirect ( redirect_t rd , int lang ) ;
2004-08-23 00:15:46 +00:00
void SV_EndRedirect ( void ) ;
2018-12-28 00:04:36 +00:00
extern char sv_redirected_buf [ 8000 ] ;
extern redirect_t sv_redirected ;
extern int sv_redirectedlang ;
2004-08-23 00:15:46 +00:00
2006-01-21 00:06:49 +00:00
qboolean PR_GameCodePacket ( char * s ) ;
qboolean PR_GameCodePausedTic ( float pausedtime ) ;
qboolean PR_ShouldTogglePause ( client_t * initiator , qboolean pausedornot ) ;
2004-08-23 00:15:46 +00:00
//
// sv_ents.c
//
void SV_WriteEntitiesToClient ( client_t * client , sizebuf_t * msg , qboolean ignorepvs ) ;
2021-08-04 21:16:57 +00:00
void SVFTE_EmitBaseline ( entity_state_t * to , qboolean numberisimportant , sizebuf_t * msg , unsigned int pext2 , unsigned int ezext ) ;
2009-11-04 21:16:50 +00:00
void SVQ3Q1_BuildEntityPacket ( client_t * client , packet_entities_t * pack ) ;
2016-07-12 00:40:13 +00:00
void SV_Snapshot_BuildStateQ1 ( entity_state_t * state , edict_t * ent , client_t * client , packet_entities_t * pack ) ;
2004-08-23 00:15:46 +00:00
int SV_HullNumForPlayer ( int h2hull , float * mins , float * maxs ) ;
void SV_GibFilterInit ( void ) ;
2012-07-05 19:42:36 +00:00
void SV_GibFilterPurge ( void ) ;
2004-08-23 00:15:46 +00:00
void SV_CleanupEnts ( void ) ;
2016-07-12 00:40:13 +00:00
void SV_ProcessSendFlags ( client_t * c ) ;
2004-08-23 00:15:46 +00:00
2016-07-12 00:40:13 +00:00
void SV_AckEntityFrame ( client_t * cl , int framenum ) ;
void SV_ReplaceEntityFrame ( client_t * cl , int framenum ) ;
2005-03-10 03:55:18 +00:00
2004-08-23 00:15:46 +00:00
//
// sv_nchan.c
//
void ClientReliableCheckBlock ( client_t * cl , int maxsize ) ;
2019-06-05 20:48:06 +00:00
sizebuf_t * ClientReliable_StartWrite ( client_t * cl , int maxsize ) ; //MUST be followed by a call to ClientReliable_FinishWrite before the next start
2004-08-23 00:15:46 +00:00
void ClientReliable_FinishWrite ( client_t * cl ) ;
void ClientReliableWrite_Begin ( client_t * cl , int c , int maxsize ) ;
2014-06-21 17:58:17 +00:00
client_t * ClientReliableWrite_BeginSplit ( client_t * cl , int svc , int svclen ) ;
2004-08-23 00:15:46 +00:00
void ClientReliableWrite_Angle ( client_t * cl , float f ) ;
void ClientReliableWrite_Angle16 ( client_t * cl , float f ) ;
void ClientReliableWrite_Byte ( client_t * cl , int c ) ;
void ClientReliableWrite_Char ( client_t * cl , int c ) ;
void ClientReliableWrite_Float ( client_t * cl , float f ) ;
2020-09-29 07:09:01 +00:00
void ClientReliableWrite_Double ( client_t * cl , double f ) ;
2004-08-23 00:15:46 +00:00
void ClientReliableWrite_Coord ( client_t * cl , float f ) ;
2020-09-29 07:09:01 +00:00
void ClientReliableWrite_Int64 ( client_t * cl , qint64_t c ) ;
2004-08-23 00:15:46 +00:00
void ClientReliableWrite_Long ( client_t * cl , int c ) ;
void ClientReliableWrite_Short ( client_t * cl , int c ) ;
------------------------------------------------------------------------
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 ClientReliableWrite_Entity ( client_t * cl , int c ) ;
2013-09-06 22:57:44 +00:00
void ClientReliableWrite_String ( client_t * cl , const char * s ) ;
void ClientReliableWrite_SZ ( client_t * cl , const void * data , int len ) ;
2004-08-23 00:15:46 +00:00
# ifdef SVRANKING
//flags
# define RANK_MUTED 2
# define RANK_CUFFED 4
# define RANK_CRIPPLED 8 //ha ha... get speed cheaters with this!... :o)
2009-11-05 03:07:52 +00:00
# define NUM_RANK_SPAWN_PARMS 32
2005-12-21 03:07:33 +00:00
typedef struct { //stats info
2004-08-23 00:15:46 +00:00
int kills ;
int deaths ;
2009-11-05 03:07:52 +00:00
float parm [ NUM_RANK_SPAWN_PARMS ] ;
2004-08-23 00:15:46 +00:00
float timeonserver ;
qbyte flags1 ;
qbyte trustlevel ;
char pad2 ;
char pad3 ;
playdemo accepts https urls now. will start playing before the file has finished downloading, to avoid unnecessary delays.
reworked network addresses to separate address family and connection type. this should make banning people more reliable, as well as simplifying a whole load of logic (no need to check for ipv4 AND ipv6).
tcpconnect will keep trying to connect even if the connection wasn't instant, instead of giving up instantly.
rewrote tcp connections quite a bit. sv_port_tcp now handles qtv+qizmo+http+ws+rtcbroker+tls equivalents.
qtv_streamport is now a legacy cvar and now acts equivalently to sv_port_tcp (but still separate).
rewrote screenshot and video capture code to use strides. this solves image-is-upside down issues with vulkan.
ignore alt key in browser port. oh no! no more red text! oh no! no more alt-being-wrongly-down-and-being-unable-to-type-anything-without-forcing-alt-released!
reworked audio decoder interface. now has clearly defined success/unavailable/end-of-file results. this should solve a whole load of issues with audio streaming.
fixed various openal audio streaming issues too. openal also got some workarounds for emscripten's poor emulation.
fixed ogg decoder to retain sync properly if seeked.
updated menu_media a bit. now reads vorbis comments/id3v1 tags to get proper track names. also saves the playlist so you don't have to manually repopulate the list so it might actually be usable now (after how many years?)
r_stains now defaults to 0, and is no longer enabled by presets. use decals if you want that sort of thing.
added fs_noreexec cvar, so configs will not be reexeced on gamedir change. this also means defaults won't be reapplied, etc.
added 'nvvk' renderer on windows, using nvidia's vulkan-inside-opengl gl extension. mostly just to see how much slower it is.
fixed up the ftp server quite a lot. more complete, more compliant, and should do ipv6 properly to-boot. file transfers also threaded.
fixed potential crash inside runclientphys.
experimental sv_antilag=3 setting. totally untested. the aim is to avoid missing due to lagged knockbacks. may be expensive for the server.
browser port's websockets support fixed. experimental support for webrtc ('works for me', requires a broker server).
updated avplug(renamed to ffmpeg so people know what it is) to use ffmpeg 3.2.4 properly, with its new encoder api. should be much more robust... also added experimental audio decoder for game music etc (currently doesn't resample, so playback rates are screwed, disabled by cvar).
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5097 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-05-10 02:08:58 +00:00
# if NUM_RANK_SPAWN_PARMS>32
quint64_t created ;
quint64_t lastseen ;
# endif
2004-08-23 00:15:46 +00:00
} rankstats_t ;
typedef struct { //name, identity and order.
int prev ; //score is held for convineance.
int next ;
char name [ 32 ] ;
int pwd ;
float score ;
} rankheader_t ;
typedef struct {
rankheader_t h ;
2005-12-21 03:07:33 +00:00
rankstats_t s ;
2004-08-23 00:15:46 +00:00
} rankinfo_t ;
2014-03-30 08:55:06 +00:00
int Rank_GetPlayerID ( char * guid , const char * name , int pwd , qboolean allowcreate , qboolean requirepasswordtobeset ) ;
2004-08-23 00:15:46 +00:00
void Rank_SetPlayerStats ( int id , rankstats_t * stats ) ;
rankstats_t * Rank_GetPlayerStats ( int id , rankstats_t * buffer ) ;
rankinfo_t * Rank_GetPlayerInfo ( int id , rankinfo_t * buffer ) ;
qboolean Rank_OpenRankings ( void ) ;
void Rank_Flush ( void ) ;
void Rank_ListTop10_f ( void ) ;
void Rank_RegisterCommands ( void ) ;
int Rank_GetPass ( char * name ) ;
extern cvar_t rank_needlogin ;
2015-09-01 04:45:15 +00:00
qboolean ReloadRanking ( client_t * cl , const char * newname ) ;
# endif
2004-08-23 00:15:46 +00:00
2014-03-30 08:55:06 +00:00
client_t * SV_GetClientForString ( const char * name , int * id ) ;
2010-08-14 03:17:33 +00:00
qboolean SV_MayCheat ( void ) ;
2004-08-23 00:15:46 +00:00
void NPP_Flush ( void ) ;
void NPP_NQWriteByte ( int dest , qbyte data ) ;
void NPP_NQWriteChar ( int dest , char data ) ;
void NPP_NQWriteShort ( int dest , short data ) ;
void NPP_NQWriteLong ( int dest , long data ) ;
void NPP_NQWriteAngle ( int dest , float data ) ;
void NPP_NQWriteCoord ( int dest , float data ) ;
2013-08-21 07:14:39 +00:00
void NPP_NQWriteFloat ( int dest , float data ) ;
2014-03-30 08:55:06 +00:00
void NPP_NQWriteString ( int dest , const char * data ) ;
2014-10-11 19:39:45 +00:00
void NPP_NQWriteEntity ( int dest , int data ) ;
2004-08-23 00:15:46 +00:00
void NPP_QWWriteByte ( int dest , qbyte data ) ;
void NPP_QWWriteChar ( int dest , char data ) ;
void NPP_QWWriteShort ( int dest , short data ) ;
void NPP_QWWriteLong ( int dest , long data ) ;
void NPP_QWWriteAngle ( int dest , float data ) ;
void NPP_QWWriteCoord ( int dest , float data ) ;
2013-08-21 07:14:39 +00:00
void NPP_QWWriteFloat ( int dest , float data ) ;
2014-03-30 08:55:06 +00:00
void NPP_QWWriteString ( int dest , const char * data ) ;
2014-10-11 19:39:45 +00:00
void NPP_QWWriteEntity ( int dest , int data ) ;
2004-08-23 00:15:46 +00:00
void NPP_MVDForceFlush ( void ) ;
//replacement rand function (useful cos it's fully portable, with seed grabbing)
void predictablesrand ( unsigned int x ) ;
int predictablerandgetseed ( void ) ;
int predictablerand ( void ) ;
# ifdef SVCHAT
void SV_WipeChat ( client_t * client ) ;
int SV_ChatMove ( int impulse ) ;
void SV_ChatThink ( client_t * client ) ;
# endif
2018-09-01 04:18:08 +00:00
# ifdef MVD_RECORDING
playdemo accepts https urls now. will start playing before the file has finished downloading, to avoid unnecessary delays.
reworked network addresses to separate address family and connection type. this should make banning people more reliable, as well as simplifying a whole load of logic (no need to check for ipv4 AND ipv6).
tcpconnect will keep trying to connect even if the connection wasn't instant, instead of giving up instantly.
rewrote tcp connections quite a bit. sv_port_tcp now handles qtv+qizmo+http+ws+rtcbroker+tls equivalents.
qtv_streamport is now a legacy cvar and now acts equivalently to sv_port_tcp (but still separate).
rewrote screenshot and video capture code to use strides. this solves image-is-upside down issues with vulkan.
ignore alt key in browser port. oh no! no more red text! oh no! no more alt-being-wrongly-down-and-being-unable-to-type-anything-without-forcing-alt-released!
reworked audio decoder interface. now has clearly defined success/unavailable/end-of-file results. this should solve a whole load of issues with audio streaming.
fixed various openal audio streaming issues too. openal also got some workarounds for emscripten's poor emulation.
fixed ogg decoder to retain sync properly if seeked.
updated menu_media a bit. now reads vorbis comments/id3v1 tags to get proper track names. also saves the playlist so you don't have to manually repopulate the list so it might actually be usable now (after how many years?)
r_stains now defaults to 0, and is no longer enabled by presets. use decals if you want that sort of thing.
added fs_noreexec cvar, so configs will not be reexeced on gamedir change. this also means defaults won't be reapplied, etc.
added 'nvvk' renderer on windows, using nvidia's vulkan-inside-opengl gl extension. mostly just to see how much slower it is.
fixed up the ftp server quite a lot. more complete, more compliant, and should do ipv6 properly to-boot. file transfers also threaded.
fixed potential crash inside runclientphys.
experimental sv_antilag=3 setting. totally untested. the aim is to avoid missing due to lagged knockbacks. may be expensive for the server.
browser port's websockets support fixed. experimental support for webrtc ('works for me', requires a broker server).
updated avplug(renamed to ffmpeg so people know what it is) to use ffmpeg 3.2.4 properly, with its new encoder api. should be much more robust... also added experimental audio decoder for game music etc (currently doesn't resample, so playback rates are screwed, disabled by cvar).
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5097 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-05-10 02:08:58 +00:00
/*
2004-08-23 00:15:46 +00:00
//
// sv_mvd.c
//
2007-08-07 00:11:21 +00:00
//qtv proxies are meant to send a small header now, bit like http
//this header gives supported version numbers and stuff
typedef struct mvdpendingdest_s {
qboolean error ; //disables writers, quit ASAP.
2014-02-07 08:38:40 +00:00
# ifdef _WIN32
qintptr_t socket ;
# else
2007-08-07 00:11:21 +00:00
int socket ;
2014-02-07 08:38:40 +00:00
# endif
2007-08-07 00:11:21 +00:00
char inbuffer [ 2048 ] ;
char outbuffer [ 2048 ] ;
char challenge [ 64 ] ;
qboolean hasauthed ;
qboolean isreverse ;
int insize ;
int outsize ;
struct mvdpendingdest_s * nextdest ;
playdemo accepts https urls now. will start playing before the file has finished downloading, to avoid unnecessary delays.
reworked network addresses to separate address family and connection type. this should make banning people more reliable, as well as simplifying a whole load of logic (no need to check for ipv4 AND ipv6).
tcpconnect will keep trying to connect even if the connection wasn't instant, instead of giving up instantly.
rewrote tcp connections quite a bit. sv_port_tcp now handles qtv+qizmo+http+ws+rtcbroker+tls equivalents.
qtv_streamport is now a legacy cvar and now acts equivalently to sv_port_tcp (but still separate).
rewrote screenshot and video capture code to use strides. this solves image-is-upside down issues with vulkan.
ignore alt key in browser port. oh no! no more red text! oh no! no more alt-being-wrongly-down-and-being-unable-to-type-anything-without-forcing-alt-released!
reworked audio decoder interface. now has clearly defined success/unavailable/end-of-file results. this should solve a whole load of issues with audio streaming.
fixed various openal audio streaming issues too. openal also got some workarounds for emscripten's poor emulation.
fixed ogg decoder to retain sync properly if seeked.
updated menu_media a bit. now reads vorbis comments/id3v1 tags to get proper track names. also saves the playlist so you don't have to manually repopulate the list so it might actually be usable now (after how many years?)
r_stains now defaults to 0, and is no longer enabled by presets. use decals if you want that sort of thing.
added fs_noreexec cvar, so configs will not be reexeced on gamedir change. this also means defaults won't be reapplied, etc.
added 'nvvk' renderer on windows, using nvidia's vulkan-inside-opengl gl extension. mostly just to see how much slower it is.
fixed up the ftp server quite a lot. more complete, more compliant, and should do ipv6 properly to-boot. file transfers also threaded.
fixed potential crash inside runclientphys.
experimental sv_antilag=3 setting. totally untested. the aim is to avoid missing due to lagged knockbacks. may be expensive for the server.
browser port's websockets support fixed. experimental support for webrtc ('works for me', requires a broker server).
updated avplug(renamed to ffmpeg so people know what it is) to use ffmpeg 3.2.4 properly, with its new encoder api. should be much more robust... also added experimental audio decoder for game music etc (currently doesn't resample, so playback rates are screwed, disabled by cvar).
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5097 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-05-10 02:08:58 +00:00
} mvdpendingdest_t ; */
2007-08-07 00:11:21 +00:00
typedef struct mvddest_s {
qboolean error ; //disables writers, quit ASAP.
qboolean droponmapchange ;
2016-07-12 00:40:13 +00:00
enum { DEST_NONE , DEST_FILE , DEST_BUFFEREDFILE , DEST_THREADEDFILE , DEST_STREAM } desttype ;
2007-08-07 00:11:21 +00:00
2009-04-01 22:03:56 +00:00
vfsfile_t * file ;
2007-08-07 00:11:21 +00:00
2019-05-10 09:31:21 +00:00
int id ;
char filename [ MAX_QPATH ] ; //demos/foo.mvd (or a username)
char simplename [ MAX_QPATH ] ; //foo.mvd (or a qtv resource)
2007-08-07 00:11:21 +00:00
2016-07-12 00:40:13 +00:00
int flushing ; //worker has a cache (used as a sync point)
2007-08-07 00:11:21 +00:00
char * cache ;
2016-07-12 00:40:13 +00:00
char * altcache ;
2007-08-07 00:11:21 +00:00
int cacheused ;
int maxcachesize ;
unsigned int totalsize ;
struct mvddest_s * nextdest ;
} mvddest_t ;
2004-08-23 00:15:46 +00:00
void SV_MVDPings ( void ) ;
2011-06-05 01:36:14 +00:00
void SV_MVD_FullClientUpdate ( sizebuf_t * msg , client_t * player ) ;
2012-08-04 01:35:52 +00:00
sizebuf_t * MVDWrite_Begin ( qbyte type , int to , int size ) ;
2004-08-23 00:15:46 +00:00
void MVDSetMsgBuf ( demobuf_t * prev , demobuf_t * cur ) ;
2016-07-12 00:40:13 +00:00
enum mvdclosereason_e
{
MVD_CLOSE_STOPPED ,
MVD_CLOSE_SIZELIMIT ,
MVD_CLOSE_CANCEL ,
MVD_CLOSE_DISCONNECTED , //qtv disconnected
MVD_CLOSE_FSERROR
} ;
void SV_MVDStop ( enum mvdclosereason_e reason , qboolean mvdonly ) ;
2004-08-23 00:15:46 +00:00
void SV_MVDStop_f ( void ) ;
2007-09-10 14:39:08 +00:00
qboolean SV_MVDWritePackets ( int num ) ;
2004-08-23 00:15:46 +00:00
void MVD_Init ( void ) ;
2007-08-07 00:11:21 +00:00
void SV_MVD_RunPendingConnections ( void ) ;
void SV_MVD_SendInitialGamestate ( mvddest_t * dest ) ;
2004-08-23 00:15:46 +00:00
extern demo_t demo ; // server demo struct
2019-03-23 07:06:37 +00:00
extern cvar_t sv_demoDir , sv_demoDirAlt ;
2018-09-01 04:18:08 +00:00
extern cvar_t sv_demoAutoRecord ;
2004-08-23 00:15:46 +00:00
extern cvar_t sv_demofps ;
extern cvar_t sv_demoPings ;
extern cvar_t sv_demoUseCache ;
extern cvar_t sv_demoMaxSize ;
extern cvar_t sv_demoMaxDirSize ;
2018-09-01 04:18:08 +00:00
qboolean MVD_CheckSpace ( qboolean broadcastwarnings ) ;
void SV_MVD_AutoRecord ( void ) ;
2011-09-03 03:49:43 +00:00
char * SV_Demo_CurrentOutput ( void ) ;
playdemo accepts https urls now. will start playing before the file has finished downloading, to avoid unnecessary delays.
reworked network addresses to separate address family and connection type. this should make banning people more reliable, as well as simplifying a whole load of logic (no need to check for ipv4 AND ipv6).
tcpconnect will keep trying to connect even if the connection wasn't instant, instead of giving up instantly.
rewrote tcp connections quite a bit. sv_port_tcp now handles qtv+qizmo+http+ws+rtcbroker+tls equivalents.
qtv_streamport is now a legacy cvar and now acts equivalently to sv_port_tcp (but still separate).
rewrote screenshot and video capture code to use strides. this solves image-is-upside down issues with vulkan.
ignore alt key in browser port. oh no! no more red text! oh no! no more alt-being-wrongly-down-and-being-unable-to-type-anything-without-forcing-alt-released!
reworked audio decoder interface. now has clearly defined success/unavailable/end-of-file results. this should solve a whole load of issues with audio streaming.
fixed various openal audio streaming issues too. openal also got some workarounds for emscripten's poor emulation.
fixed ogg decoder to retain sync properly if seeked.
updated menu_media a bit. now reads vorbis comments/id3v1 tags to get proper track names. also saves the playlist so you don't have to manually repopulate the list so it might actually be usable now (after how many years?)
r_stains now defaults to 0, and is no longer enabled by presets. use decals if you want that sort of thing.
added fs_noreexec cvar, so configs will not be reexeced on gamedir change. this also means defaults won't be reapplied, etc.
added 'nvvk' renderer on windows, using nvidia's vulkan-inside-opengl gl extension. mostly just to see how much slower it is.
fixed up the ftp server quite a lot. more complete, more compliant, and should do ipv6 properly to-boot. file transfers also threaded.
fixed potential crash inside runclientphys.
experimental sv_antilag=3 setting. totally untested. the aim is to avoid missing due to lagged knockbacks. may be expensive for the server.
browser port's websockets support fixed. experimental support for webrtc ('works for me', requires a broker server).
updated avplug(renamed to ffmpeg so people know what it is) to use ffmpeg 3.2.4 properly, with its new encoder api. should be much more robust... also added experimental audio decoder for game music etc (currently doesn't resample, so playback rates are screwed, disabled by cvar).
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5097 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-05-10 02:08:58 +00:00
void SV_Demo_PrintOutputs ( void ) ;
2004-08-23 00:15:46 +00:00
void SV_MVDInit ( void ) ;
2008-06-01 22:06:22 +00:00
char * SV_MVDNum ( char * buffer , int bufferlen , int num ) ;
dpp7: Treat 'dropped' c2s packets as choked when using dpp7 protocols. This is because the protocol provides no way to disambiguate, and I don't like false reports of packetloss (only reliables loss can be detected, and that's not frequent enough to be meaningful). Pings can still be determined with dpp7, for those few packets which are acked.
package manager: reworked to enable/disable plugins when downloaded, which can also be present-but-disabled.
package manager: display a confirmation prompt before applying changes. do not allow other changes to be made while applying. prompt may be skipped with 'pkg apply' in dedicated servers.
sv: downloads are no longer forced to lower case.
sv: added sv_demoAutoCompress cvar. set to 1 to directly record to *.mvd.gz
cl: properly support directly playing .mvd.gz files
menus: reworked to separate mouse and keyboard focus. mouse focus becomes keyboard focus only on mouse clicks. tooltips follow mouse cursors.
menus: cleaned up menu heirachy a little. now simpler.
server browser: changed 'hide *' filters to 'show *' instead. I felt it was more logical.
deluxmapping: changed to disabled, load, generate, like r_loadlit is.
render targets api now supports negative formats to mean nearest filtering, where filtering is part of texture state.
drawrotpic fixed, now batches and interacts with drawpic correctly.
drawline fixed, no interacts with draw* correctly, but still does not batch.
fixed saving games.
provide proper userinfo to nq clients, where supported.
qcc: catch string table overflows safely, giving errors instead of crashes. switch to 32bit statements if some over-sized function requires it.
qtv: some bigcoords support tweaks
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5073 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-03-21 05:27:07 +00:00
const char * SV_MVDLastNum ( unsigned int num ) ;
2004-08-23 00:15:46 +00:00
void SV_SendMVDMessage ( void ) ;
2016-09-08 19:04:35 +00:00
void SV_MVD_WriteReliables ( qboolean writebroadcasts ) ;
2004-08-23 00:15:46 +00:00
qboolean SV_ReadMVD ( void ) ;
void SV_FlushDemoSignon ( void ) ;
2007-08-07 00:11:21 +00:00
void DestFlush ( qboolean compleate ) ;
2004-08-23 00:15:46 +00:00
playdemo accepts https urls now. will start playing before the file has finished downloading, to avoid unnecessary delays.
reworked network addresses to separate address family and connection type. this should make banning people more reliable, as well as simplifying a whole load of logic (no need to check for ipv4 AND ipv6).
tcpconnect will keep trying to connect even if the connection wasn't instant, instead of giving up instantly.
rewrote tcp connections quite a bit. sv_port_tcp now handles qtv+qizmo+http+ws+rtcbroker+tls equivalents.
qtv_streamport is now a legacy cvar and now acts equivalently to sv_port_tcp (but still separate).
rewrote screenshot and video capture code to use strides. this solves image-is-upside down issues with vulkan.
ignore alt key in browser port. oh no! no more red text! oh no! no more alt-being-wrongly-down-and-being-unable-to-type-anything-without-forcing-alt-released!
reworked audio decoder interface. now has clearly defined success/unavailable/end-of-file results. this should solve a whole load of issues with audio streaming.
fixed various openal audio streaming issues too. openal also got some workarounds for emscripten's poor emulation.
fixed ogg decoder to retain sync properly if seeked.
updated menu_media a bit. now reads vorbis comments/id3v1 tags to get proper track names. also saves the playlist so you don't have to manually repopulate the list so it might actually be usable now (after how many years?)
r_stains now defaults to 0, and is no longer enabled by presets. use decals if you want that sort of thing.
added fs_noreexec cvar, so configs will not be reexeced on gamedir change. this also means defaults won't be reapplied, etc.
added 'nvvk' renderer on windows, using nvidia's vulkan-inside-opengl gl extension. mostly just to see how much slower it is.
fixed up the ftp server quite a lot. more complete, more compliant, and should do ipv6 properly to-boot. file transfers also threaded.
fixed potential crash inside runclientphys.
experimental sv_antilag=3 setting. totally untested. the aim is to avoid missing due to lagged knockbacks. may be expensive for the server.
browser port's websockets support fixed. experimental support for webrtc ('works for me', requires a broker server).
updated avplug(renamed to ffmpeg so people know what it is) to use ffmpeg 3.2.4 properly, with its new encoder api. should be much more robust... also added experimental audio decoder for game music etc (currently doesn't resample, so playback rates are screwed, disabled by cvar).
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5097 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-05-10 02:08:58 +00:00
typedef struct
{
qboolean hasauthed ;
qboolean isreverse ;
2023-02-20 08:35:56 +00:00
char challenge [ 64 ] ; //aka nonce
playdemo accepts https urls now. will start playing before the file has finished downloading, to avoid unnecessary delays.
reworked network addresses to separate address family and connection type. this should make banning people more reliable, as well as simplifying a whole load of logic (no need to check for ipv4 AND ipv6).
tcpconnect will keep trying to connect even if the connection wasn't instant, instead of giving up instantly.
rewrote tcp connections quite a bit. sv_port_tcp now handles qtv+qizmo+http+ws+rtcbroker+tls equivalents.
qtv_streamport is now a legacy cvar and now acts equivalently to sv_port_tcp (but still separate).
rewrote screenshot and video capture code to use strides. this solves image-is-upside down issues with vulkan.
ignore alt key in browser port. oh no! no more red text! oh no! no more alt-being-wrongly-down-and-being-unable-to-type-anything-without-forcing-alt-released!
reworked audio decoder interface. now has clearly defined success/unavailable/end-of-file results. this should solve a whole load of issues with audio streaming.
fixed various openal audio streaming issues too. openal also got some workarounds for emscripten's poor emulation.
fixed ogg decoder to retain sync properly if seeked.
updated menu_media a bit. now reads vorbis comments/id3v1 tags to get proper track names. also saves the playlist so you don't have to manually repopulate the list so it might actually be usable now (after how many years?)
r_stains now defaults to 0, and is no longer enabled by presets. use decals if you want that sort of thing.
added fs_noreexec cvar, so configs will not be reexeced on gamedir change. this also means defaults won't be reapplied, etc.
added 'nvvk' renderer on windows, using nvidia's vulkan-inside-opengl gl extension. mostly just to see how much slower it is.
fixed up the ftp server quite a lot. more complete, more compliant, and should do ipv6 properly to-boot. file transfers also threaded.
fixed potential crash inside runclientphys.
experimental sv_antilag=3 setting. totally untested. the aim is to avoid missing due to lagged knockbacks. may be expensive for the server.
browser port's websockets support fixed. experimental support for webrtc ('works for me', requires a broker server).
updated avplug(renamed to ffmpeg so people know what it is) to use ffmpeg 3.2.4 properly, with its new encoder api. should be much more robust... also added experimental audio decoder for game music etc (currently doesn't resample, so playback rates are screwed, disabled by cvar).
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5097 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-05-10 02:08:58 +00:00
} qtvpendingstate_t ;
int SV_MVD_GotQTVRequest ( vfsfile_t * clientstream , char * headerstart , char * headerend , qtvpendingstate_t * p ) ;
2018-09-01 04:18:08 +00:00
# endif
playdemo accepts https urls now. will start playing before the file has finished downloading, to avoid unnecessary delays.
reworked network addresses to separate address family and connection type. this should make banning people more reliable, as well as simplifying a whole load of logic (no need to check for ipv4 AND ipv6).
tcpconnect will keep trying to connect even if the connection wasn't instant, instead of giving up instantly.
rewrote tcp connections quite a bit. sv_port_tcp now handles qtv+qizmo+http+ws+rtcbroker+tls equivalents.
qtv_streamport is now a legacy cvar and now acts equivalently to sv_port_tcp (but still separate).
rewrote screenshot and video capture code to use strides. this solves image-is-upside down issues with vulkan.
ignore alt key in browser port. oh no! no more red text! oh no! no more alt-being-wrongly-down-and-being-unable-to-type-anything-without-forcing-alt-released!
reworked audio decoder interface. now has clearly defined success/unavailable/end-of-file results. this should solve a whole load of issues with audio streaming.
fixed various openal audio streaming issues too. openal also got some workarounds for emscripten's poor emulation.
fixed ogg decoder to retain sync properly if seeked.
updated menu_media a bit. now reads vorbis comments/id3v1 tags to get proper track names. also saves the playlist so you don't have to manually repopulate the list so it might actually be usable now (after how many years?)
r_stains now defaults to 0, and is no longer enabled by presets. use decals if you want that sort of thing.
added fs_noreexec cvar, so configs will not be reexeced on gamedir change. this also means defaults won't be reapplied, etc.
added 'nvvk' renderer on windows, using nvidia's vulkan-inside-opengl gl extension. mostly just to see how much slower it is.
fixed up the ftp server quite a lot. more complete, more compliant, and should do ipv6 properly to-boot. file transfers also threaded.
fixed potential crash inside runclientphys.
experimental sv_antilag=3 setting. totally untested. the aim is to avoid missing due to lagged knockbacks. may be expensive for the server.
browser port's websockets support fixed. experimental support for webrtc ('works for me', requires a broker server).
updated avplug(renamed to ffmpeg so people know what it is) to use ffmpeg 3.2.4 properly, with its new encoder api. should be much more robust... also added experimental audio decoder for game music etc (currently doesn't resample, so playback rates are screwed, disabled by cvar).
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5097 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-05-10 02:08:58 +00:00
2004-08-23 00:15:46 +00:00
// savegame.c
2016-01-18 05:22:07 +00:00
void SV_Savegame_f ( void ) ;
2020-04-19 01:23:32 +00:00
void SV_DeleteSavegame_f ( void ) ;
2017-08-14 16:38:44 +00:00
void SV_Savegame_c ( int argn , const char * partial , struct xcommandargcompletioncb_s * ctx ) ;
2016-01-18 05:22:07 +00:00
void SV_Loadgame_f ( void ) ;
2018-08-23 06:03:31 +00:00
qboolean SV_Loadgame ( const char * unsafe_savename ) ;
2016-01-18 05:22:07 +00:00
void SV_AutoSave ( void ) ;
2004-08-23 00:15:46 +00:00
void SV_FlushLevelCache ( void ) ;
2016-01-18 05:22:07 +00:00
extern cvar_t sv_autosave ;
2018-05-21 13:47:53 +00:00
extern cvar_t sv_savefmt ;
2016-01-18 05:22:07 +00:00
2004-08-23 00:15:46 +00:00
2004-10-19 16:10:14 +00:00
int SV_RateForClient ( client_t * cl ) ;
2004-08-23 00:15:46 +00:00
void SVVC_Frame ( qboolean enabled ) ;
void SV_CalcPHS ( void ) ;
void SV_GetConsoleCommands ( void ) ;
void SV_CheckTimer ( void ) ;
2007-08-07 00:11:21 +00:00
void SV_LogPlayer ( client_t * cl , char * msg ) ;
2009-11-04 21:16:50 +00:00
2014-06-22 16:30:35 +00:00
extern vec3_t pmove_mins , pmove_maxs ; //abs min/max extents
2017-08-29 02:29:06 +00:00
# ifdef USEAREAGRID
void AddAllLinksToPmove ( world_t * w , wedict_t * player ) ;
# else
void AddLinksToPmove ( world_t * w , wedict_t * player , areanode_t * node ) ;
void AddLinksToPmove_Force ( world_t * w , wedict_t * player , areanode_t * node ) ;
# define AddAllLinksToPmove(w,p) do{AddLinksToPmove(w,p,(w)->areanodes);AddLinksToPmove_Force(w,p,&(w)->portallist);}while(0)
# endif
2012-07-05 19:42:36 +00:00
# ifdef HLSERVER
void SVHL_SaveLevelCache ( char * filename ) ;
//network frame info
void SVHL_Snapshot_Build ( client_t * client , packet_entities_t * pack , qbyte * pvs , edict_t * clent , qboolean ignorepvs ) ;
qbyte * SVHL_Snapshot_SetupPVS ( client_t * client , qbyte * pvs , unsigned int pvsbufsize ) ;
void SVHL_BuildStats ( client_t * client , int * si , float * sf , char * * ss ) ;
//gamecode entry points
int SVHL_InitGame ( void ) ;
void SVHL_SetupGame ( void ) ;
void SVHL_SpawnEntities ( char * entstring ) ;
void SVHL_RunFrame ( void ) ;
qboolean SVHL_ClientConnect ( client_t * client , netadr_t adr , char rejectmessage [ 128 ] ) ;
void SVHL_PutClientInServer ( client_t * client ) ;
void SVHL_RunPlayerCommand ( client_t * cl , usercmd_t * oldest , usercmd_t * oldcmd , usercmd_t * newcmd ) ;
qboolean HLSV_ClientCommand ( client_t * client ) ;
void SVHL_DropClient ( client_t * drop ) ;
void SVHL_ShutdownGame ( void ) ;
# endif
2014-10-05 20:04:11 +00:00