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-09-26 03:40:09 +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 .
*/
// cl_parse.c -- parse a message received from the server
# include "quakedef.h"
2005-11-30 01:20:53 +00:00
# include "cl_ignore.h"
2017-08-29 02:29:06 +00:00
# include "shader.h"
2021-07-01 01:17:07 +00:00
# include "fs.h"
2004-08-23 00:15:46 +00:00
void CL_GetNumberedEntityInfo ( int num , float * org , float * ang ) ;
2012-02-12 05:18:31 +00:00
void CLDP_ParseDarkPlaces5Entities ( void ) ;
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
void CLH2_ParseEntities ( void ) ;
2015-08-20 03:17:47 +00:00
static void CL_SetStatNumeric ( int pnum , int stat , int ivalue , float fvalue ) ;
2016-02-15 06:01:17 +00:00
# define CL_SetStatInt(pnum,stat,ival) do{int thevalue=ival; CL_SetStatNumeric(pnum,stat,thevalue,thevalue);}while(0)
2017-02-21 20:22:07 +00:00
# define CL_SetStatFloat(pnum,stat,fval) do{float thevalue=fval; CL_SetStatNumeric(pnum,stat,thevalue,thevalue);}while(0)
2008-11-14 16:43:28 +00:00
static qboolean CL_CheckModelResources ( char * name ) ;
2016-07-15 12:26:24 +00:00
# ifdef NQPROT
2016-07-12 00:40:13 +00:00
static char * CLNQ_ParseProQuakeMessage ( char * s ) ;
2016-07-15 12:26:24 +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
static void DLC_Poll ( qdownload_t * dl ) ;
static void CL_ProcessUserInfo ( int slot , player_info_t * player ) ;
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
static void CL_ParseStuffCmd ( char * msg , int destsplit ) ;
2023-04-11 07:20:09 +00:00
static void Con_HexDump ( qbyte * packet , size_t len , size_t badoffset ) ;
2004-08-23 00:15:46 +00:00
2017-09-20 11:27:13 +00:00
# ifdef NQPROT
2021-05-27 11:36:01 +00:00
char * cl_dp_packagenames ;
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
static char cl_dp_csqc_progsname [ 128 ] ;
static int cl_dp_csqc_progssize ;
static int cl_dp_csqc_progscrc ;
static int cl_dp_serverextension_download ;
2017-09-20 11:27:13 +00:00
# endif
2007-06-20 00:02:54 +00:00
2019-01-29 07:18:07 +00:00
//tracks which svcs are using what data (per second)
static size_t packetusage_saved [ 256 ] ;
static size_t packetusage_pending [ 256 ] ;
static double packetusageflushtime ;
static const double packetusage_interval = 10 ;
2016-10-22 07:06:51 +00:00
# ifdef AVAIL_ZLIB
# ifndef ZEXPORT
# define ZEXPORT VARGS
# endif
# include <zlib.h>
# endif
2004-08-23 00:15:46 +00:00
2019-01-29 07:18:07 +00:00
static const char * svc_qwstrings [ ] =
2004-08-23 00:15:46 +00:00
{
" svc_bad " ,
" svc_nop " ,
" svc_disconnect " ,
2012-09-30 05:52:03 +00:00
" svcqw_updatestatbyte " ,
2004-08-23 00:15:46 +00:00
" svc_version " , // [long] server version
" svc_setview " , // [short] entity number
2016-07-12 00:40:13 +00:00
" svcqw_sound " , // <see code>
2004-08-23 00:15:46 +00:00
" svc_time " , // [float] server time
" svc_print " , // [string] null terminated string
" svc_stufftext " , // [string] stuffed into client's console buffer
// the string should be \n terminated
" svc_setangle " , // [vec3] set the view angle to this absolute value
2005-09-26 03:40:09 +00:00
2004-08-23 00:15:46 +00:00
" svc_serverdata " , // [long] version ...
" svc_lightstyle " , // [qbyte] [string]
" svc_updatename " , // [qbyte] [string]
" svc_updatefrags " , // [qbyte] [short]
" svc_clientdata " , // <shortbits + data>
" svc_stopsound " , // <see code>
" svc_updatecolors " , // [qbyte] [qbyte]
" svc_particle " , // [vec3] <variable>
" svc_damage " , // [qbyte] impact [qbyte] blood [vec3] from
2005-09-26 03:40:09 +00:00
2004-08-23 00:15:46 +00:00
" svc_spawnstatic " ,
2016-07-12 00:40:13 +00:00
" svcfte_spawnstatic2 " ,
2004-08-23 00:15:46 +00:00
" svc_spawnbaseline " ,
2005-09-26 03:40:09 +00:00
2004-08-23 00:15:46 +00:00
" svc_temp_entity " , // <variable>
" svc_setpause " ,
" svc_signonnum " ,
" svc_centerprint " ,
" svc_killedmonster " ,
" svc_foundsecret " ,
" svc_spawnstaticsound " ,
" svc_intermission " ,
" svc_finale " ,
" svc_cdtrack " ,
" svc_sellscreen " ,
" svc_smallkick " ,
" svc_bigkick " ,
" svc_updateping " ,
" svc_updateentertime " ,
" svc_updatestatlong " ,
" svc_muzzleflash " ,
" svc_updateuserinfo " ,
" svc_download " ,
" svc_playerinfo " ,
" svc_nails " ,
" svc_choke " ,
" svc_modellist " ,
" svc_soundlist " ,
" svc_packetentities " ,
" svc_deltapacketentities " ,
" svc_maxspeed " ,
" svc_entgravity " ,
" svc_setinfo " ,
" svc_serverinfo " ,
" svc_updatepl " ,
2006-03-14 01:21:18 +00:00
" MVD svc_nails2 " ,
2012-02-12 05:18:31 +00:00
" svcfte_soundextended " ,
" svcfte_soundlistshort " ,
2006-03-14 01:21:18 +00:00
" FTE svc_lightstylecol " ,
2011-03-24 14:35:24 +00:00
" FTE svc_bulletentext " , // obsolete
2006-03-14 01:21:18 +00:00
" FTE svc_lightnings " ,
" FTE svc_modellistshort " ,
" FTE svc_ftesetclientpersist " ,
" FTE svc_setportalstate " ,
" FTE svc_particle2 " ,
" FTE svc_particle3 " ,
" FTE svc_particle4 " ,
" FTE svc_spawnbaseline2 " ,
" FTE svc_customtempent " ,
" FTE svc_choosesplitclient " ,
2011-06-04 16:11:35 +00:00
" svcfte_showpic " ,
" svcfte_hidepic " ,
" svcfte_movepic " ,
" svcfte_updatepic " ,
2019-06-17 04:21:41 +00:00
" NEW PROTOCOL(73) " ,
2011-06-04 16:11:35 +00:00
" svcfte_effect " ,
" svcfte_effect2 " ,
" svcfte_csqcentities " ,
" svcfte_precache " ,
" svcfte_updatestatstring " ,
" svcfte_updatestatfloat " ,
" svcfte_trailparticles " ,
" svcfte_pointparticles " ,
" svcfte_pointparticles1 " ,
" svcfte_cgamepacket " ,
" svcfte_voicechat " ,
" svcfte_setangledelta " ,
2012-02-12 05:18:31 +00:00
" svcfte_updateentities " ,
2016-07-15 12:26:24 +00:00
" svcfte_brushedit " ,
" svcfte_updateseats " ,
2020-09-08 05:11:09 +00:00
" svcfte_setinfoblob " , //89
" svcfte_cgamepacket_sized " , //90
" svcfte_temp_entity_sized " , //91
" svcfte_csqcentities_sized " , //92
2019-06-17 04:21:41 +00:00
" NEW PROTOCOL(93) " ,
" NEW PROTOCOL(94) " ,
" NEW PROTOCOL(95) " ,
" NEW PROTOCOL(96) " ,
" NEW PROTOCOL(97) " ,
" NEW PROTOCOL(98) " ,
" NEW PROTOCOL(99) " ,
" NEW PROTOCOL(100) " ,
" NEW PROTOCOL(101) " ,
" NEW PROTOCOL(102) " ,
" NEW PROTOCOL(103) " ,
" NEW PROTOCOL(104) " ,
" NEW PROTOCOL(105) " ,
" NEW PROTOCOL(106) " ,
" NEW PROTOCOL(107) " ,
" NEW PROTOCOL(108) " ,
2004-08-23 00:15:46 +00:00
} ;
2017-09-20 11:27:13 +00:00
# ifdef NQPROT
2019-01-29 07:18:07 +00:00
static const char * svc_nqstrings [ ] =
2004-08-23 00:15:46 +00:00
{
" nqsvc_bad " ,
" nqsvc_nop " ,
" nqsvc_disconnect " ,
2012-09-30 05:52:03 +00:00
" nqsvc_updatestatlong " ,
2004-08-23 00:15:46 +00:00
" nqsvc_version " , // [long] server version
" nqsvc_setview " , // [short] entity number
" nqsvc_sound " , // <see code>
" nqsvc_time " , // [float] server time
" nqsvc_print " , // [string] null terminated string
" nqsvc_stufftext " , // [string] stuffed into client's console buffer
2022-01-16 18:41:44 +00:00
// the string should be \n terminated
2004-08-23 00:15:46 +00:00
" nqsvc_setangle " , // [vec3] set the view angle to this absolute value
" nqsvc_serverinfo " , // [long] version
2022-01-16 18:41:44 +00:00
// [string] signon string
// [string]..[0]model cache [string]...[0]sounds cache
// [string]..[0]item cache
2004-08-23 00:15:46 +00:00
" nqsvc_lightstyle " , // [qbyte] [string]
" nqsvc_updatename " , // [qbyte] [string]
" nqsvc_updatefrags " , // [qbyte] [short]
" nqsvc_clientdata " , // <shortbits + data>
" nqsvc_stopsound " , // <see code>
" nqsvc_updatecolors " , // [qbyte] [qbyte]
" nqsvc_particle " , // [vec3] <variable>
" nqsvc_damage " , // [qbyte] impact [qbyte] blood [vec3] from
" nqsvc_spawnstatic " ,
2022-01-16 18:41:44 +00:00
" ftenq_spawnstatic2(21) " ,
2004-08-23 00:15:46 +00:00
" nqsvc_spawnbaseline " ,
2022-01-16 18:41:44 +00:00
" nqsvc_temp_entity " , // <variable>
2004-08-23 00:15:46 +00:00
" nqsvc_setpause " ,
" nqsvc_signonnum " ,
" nqsvc_centerprint " ,
" nqsvc_killedmonster " ,
" nqsvc_foundsecret " ,
" nqsvc_spawnstaticsound " ,
" nqsvc_intermission " ,
" nqsvc_finale " , // [string] music [string] text
2022-01-16 18:41:44 +00:00
" nqsvc_cdtrack " , // [qbyte] track [qbyte] looptrack
2004-08-23 00:15:46 +00:00
" nqsvc_sellscreen " ,
2005-09-26 03:40:09 +00:00
" nqsvc_cutscene " , //34
2004-08-23 00:15:46 +00:00
2013-07-26 17:19:06 +00:00
" NEW PROTOCOL " , //35
" NEW PROTOCOL " , //36
2022-01-16 18:41:44 +00:00
" fitz_skybox " , //37
2013-07-26 17:19:06 +00:00
" NEW PROTOCOL " , //38
" NEW PROTOCOL " , //39
2022-01-16 18:41:44 +00:00
" fitz_bf " , //40
" fitz_fog " , //41
" fitz_spawnbaseline2 " , //42
" fitz_spawnstatic2 " , //43
" fitz_spawnstaticsound2 " , //44
2013-07-26 17:19:06 +00:00
" NEW PROTOCOL " , //45
2022-01-16 18:41:44 +00:00
" qex_updateping " , //46
" qex_updatesocial " , //47
" qex_updateplinfo " , //48
" qex_print " , //49
" dp_downloaddata / neh_skyboxsize / qex_servervars " , //50
" dp_updatestatubyte / neh_fog / qex_seq " , //51
" dp_effect / qex_achievement " , //52
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
" dp_effect2 / qex_chat " , //53
" dp6_precache / dp5_sound2 / qex_levelcompleted " , //54
" dp_spawnbaseline2 / qex_backtolobby " , //55
" dp_spawnstatic2 / qex_localsound " , //56 obsolete
" dp_entities / qex_prompt " , //57
" dp_csqcentities / qex_loccenterprint " , //58
2022-01-16 18:41:44 +00:00
" dp_spawnstaticsound2 " , //59
" dp_trailparticles " , //60
" dp_pointparticles " , //61
" dp_pointparticles1 " , //62
2013-07-26 17:19:06 +00:00
" NEW PROTOCOL(63) " , //63
" NEW PROTOCOL(64) " , //64
" NEW PROTOCOL(65) " , //65
2022-01-16 18:41:44 +00:00
" ftenq_spawnbaseline2 " , //66
2013-07-26 17:19:06 +00:00
" NEW PROTOCOL(67) " , //67
" NEW PROTOCOL(68) " , //68
" NEW PROTOCOL(69) " , //69
" NEW PROTOCOL(70) " , //70
" NEW PROTOCOL(71) " , //71
" NEW PROTOCOL(72) " , //72
" NEW PROTOCOL(73) " , //73
" NEW PROTOCOL(74) " , //74
" NEW PROTOCOL(75) " , //75
" NEW PROTOCOL(76) " , //76
" NEW PROTOCOL(77) " , //77
2022-01-16 18:41:44 +00:00
" ftenq_updatestatstring " , //78
" ftenq_updatestatfloat " , //79
2013-07-26 17:19:06 +00:00
" NEW PROTOCOL(80) " , //80
" NEW PROTOCOL(81) " , //81
" NEW PROTOCOL(82) " , //82
2022-01-16 18:41:44 +00:00
" ftenq_cgamepacket " , //83
" ftenq_voicechat " , //84
" ftenq_setangledelta " , //85
" ftenq_updateentities " , //86
2013-07-26 17:19:06 +00:00
" NEW PROTOCOL(87) " , //87
2019-06-17 04:21:41 +00:00
" NEW PROTOCOL(88) " , //88
2022-01-16 18:41:44 +00:00
" ftenq_setinfoblob " , //89
" ftenq_cgamepacket_sized " , //90
" ftenq_temp_entity_sized " , //91
" ftenq_csqcentities_sized " , //92
2004-08-23 00:15:46 +00:00
} ;
2017-09-20 11:27:13 +00:00
# endif
2004-08-23 00:15:46 +00:00
2020-06-12 23:29:58 +00:00
extern cvar_t requiredownloads , mod_precache , snd_precache , cl_standardchat , msg_filter , msg_filter_frags , msg_filter_pickups , cl_countpendingpl , cl_download_mapsrc ;
2004-08-23 00:15:46 +00:00
int oldparsecountmod ;
int parsecountmod ;
double parsecounttime ;
2005-01-18 20:15:20 +00:00
int cl_spikeindex , cl_playerindex , cl_h_playerindex , cl_flagindex , cl_rocketindex , cl_grenadeindex , cl_gib1index , cl_gib2index , cl_gib3index ;
2004-08-23 00:15:46 +00:00
2012-07-05 19:42:36 +00:00
//called after disconnect, purges all memory that was allocated etc
void CL_Parse_Disconnected ( void )
{
2014-06-12 23:08:42 +00:00
if ( cls . download )
2012-07-05 19:42:36 +00:00
{
2014-06-12 23:08:42 +00:00
//note: not all downloads abort when the server disconnects, as they're fully out of bounds (ie: http)
if ( cls . download - > method < = DL_QWPENDING )
DL_Abort ( cls . download , QDL_DISCONNECT ) ;
2012-07-05 19:42:36 +00:00
}
{
downloadlist_t * next ;
while ( cl . downloadlist )
{
next = cl . downloadlist - > next ;
Z_Free ( cl . downloadlist ) ;
cl . downloadlist = next ;
}
while ( cl . faileddownloads )
{
next = cl . faileddownloads - > next ;
Z_Free ( cl . faileddownloads ) ;
cl . faileddownloads = next ;
}
}
CL_ClearParseState ( ) ;
}
2004-08-23 00:15:46 +00:00
//=============================================================================
2019-01-13 16:51:50 +00:00
float packet_latency [ NET_TIMINGS ] ;
2004-08-23 00:15:46 +00:00
2014-03-30 08:55:06 +00:00
int CL_CalcNet ( float scale )
2004-08-23 00:15:46 +00:00
{
2013-03-12 22:53:23 +00:00
int i ;
2013-09-06 22:57:44 +00:00
outframe_t * frame ;
2013-03-12 22:53:23 +00:00
int lost = 0 ;
2006-04-02 23:25:03 +00:00
int percent ;
int sent ;
2004-08-23 00:15:46 +00:00
// char st[80];
2006-04-02 23:25:03 +00:00
sent = NET_TIMINGS ;
2013-07-26 17:19:06 +00:00
for ( i = cl . movesequence - UPDATE_BACKUP + 1
; i < = cl . movesequence
2004-08-23 00:15:46 +00:00
; i + + )
{
2013-09-06 22:57:44 +00:00
frame = & cl . outframes [ i & UPDATE_MASK ] ;
2015-05-14 03:06:58 +00:00
if ( i > cl . ackedmovesequence )
2013-03-12 22:55:17 +00:00
{
// no response yet
if ( cl_countpendingpl . ival )
{
packet_latency [ i & NET_TIMINGSMASK ] = 9999 ;
lost + + ;
}
else
packet_latency [ i & NET_TIMINGSMASK ] = 10000 ;
}
else if ( frame - > latency = = - 1 )
2013-03-12 22:53:23 +00:00
{
2004-08-23 00:15:46 +00:00
packet_latency [ i & NET_TIMINGSMASK ] = 9999 ; // dropped
2013-03-12 22:53:23 +00:00
lost + + ;
}
else if ( frame - > latency = = - 2 )
2004-08-23 00:15:46 +00:00
packet_latency [ i & NET_TIMINGSMASK ] = 10000 ; // choked
2013-03-12 22:53:23 +00:00
else if ( frame - > latency = = - 3 )
2006-04-02 23:25:03 +00:00
{
packet_latency [ i & NET_TIMINGSMASK ] = 9997 ; // c2spps
sent - - ;
}
2013-09-06 22:57:44 +00:00
// else if (frame->invalid)
// packet_latency[i&NET_TIMINGSMASK] = 9998; // invalid delta
2004-08-23 00:15:46 +00:00
else
2014-03-30 08:55:06 +00:00
packet_latency [ i & NET_TIMINGSMASK ] = frame - > latency * 60 * scale ;
2004-08-23 00:15:46 +00:00
}
2006-04-02 23:25:03 +00:00
2013-03-12 22:53:23 +00:00
if ( sent < 1 )
percent = 100 ; //shouldn't ever happen.
2006-04-02 23:25:03 +00:00
else
2013-03-12 22:53:23 +00:00
percent = lost * 100 / sent ;
2006-04-02 23:25:03 +00:00
return percent ;
2004-08-23 00:15:46 +00:00
}
2015-06-12 14:44:50 +00:00
void CL_CalcNet2 ( float * pings , float * pings_min , float * pings_max , float * pingms_stddev , float * pingfr , int * pingfr_min , int * pingfr_max , float * dropped , float * choked , float * invalid )
2015-04-21 04:12:00 +00:00
{
int i ;
outframe_t * frame ;
int lost = 0 ;
int pending = 0 ;
int sent ;
int valid = 0 ;
2015-06-12 14:44:50 +00:00
int fr ;
int nchoked = 0 ;
int ninvalid = 0 ;
2015-04-21 04:12:00 +00:00
// char st[80];
2015-06-12 14:44:50 +00:00
* pings = 0 ;
* pings_max = 0 ;
2016-07-17 18:41:01 +00:00
* pings_min = FLT_MAX ;
2015-06-12 14:44:50 +00:00
* pingfr = 0 ;
* pingfr_max = 0 ;
* pingfr_min = 0x7fffffff ;
* pingms_stddev = 0 ;
2015-04-21 04:12:00 +00:00
sent = NET_TIMINGS ;
for ( i = cl . movesequence - UPDATE_BACKUP + 1
; i < = cl . movesequence
; i + + )
{
frame = & cl . outframes [ i & UPDATE_MASK ] ;
if ( i > cl . lastackedmovesequence )
{ // no response yet
if ( cl_countpendingpl . ival )
lost + + ;
}
else if ( frame - > latency = = - 1 )
lost + + ; // lost
else if ( frame - > latency = = - 2 )
2015-06-12 14:44:50 +00:00
nchoked + + ; // choked
2015-04-21 04:12:00 +00:00
else if ( frame - > latency = = - 3 )
sent - - ; // c2spps
2015-06-12 14:44:50 +00:00
else if ( frame - > latency = = - 4 )
ninvalid + + ; //corrupt/wrong/dodgy/egads
2015-04-21 04:12:00 +00:00
else
{
2015-06-12 14:44:50 +00:00
* pings + = frame - > latency ;
if ( * pings_max < frame - > latency )
* pings_max = frame - > latency ;
if ( * pings_min > frame - > latency )
* pings_min = frame - > latency ;
fr = frame - > cmd_sequence - frame - > server_message_num ;
* pingfr + = fr ;
if ( * pingfr_max < fr )
* pingfr_max = fr ;
if ( * pingfr_min > fr )
* pingfr_min = fr ;
2015-04-21 04:12:00 +00:00
valid + + ;
}
}
2015-06-12 14:44:50 +00:00
if ( valid )
{
* pings / = valid ;
* pingfr / = valid ;
//determine stddev, in milliseconds instead of seconds.
for ( i = cl . movesequence - UPDATE_BACKUP + 1 ; i < = cl . movesequence ; i + + )
{
frame = & cl . outframes [ i & UPDATE_MASK ] ;
if ( i < = cl . lastackedmovesequence & & frame - > latency > = 0 )
{
float dev = ( frame - > latency - * pings ) * 1000 ;
* pingms_stddev + = dev * dev ;
}
}
* pingms_stddev = sqrt ( * pingms_stddev / valid ) ;
}
2015-04-21 04:12:00 +00:00
if ( pending = = sent | | sent < 1 )
2015-06-12 14:44:50 +00:00
* dropped = 1 ; //shouldn't ever happen.
2015-04-21 04:12:00 +00:00
else
2015-06-12 14:44:50 +00:00
* dropped = ( float ) lost / sent ;
* choked = ( float ) nchoked / sent ;
* invalid = ( float ) ninvalid / sent ;
2015-04-21 04:12:00 +00:00
}
2013-09-06 22:57:44 +00:00
void CL_AckedInputFrame ( int inseq , int outseq , qboolean worldstateokay )
2013-07-26 17:19:06 +00:00
{
unsigned int i ;
unsigned int newmod ;
2013-09-06 22:57:44 +00:00
outframe_t * frame ;
2013-07-26 17:19:06 +00:00
2013-09-06 22:57:44 +00:00
//calc the latency for this frame, but only if its not a dupe ack. we want the youngest, not the oldest, so we can calculate network latency rather than simply packet frequency
if ( outseq ! = cl . lastackedmovesequence )
2013-07-26 17:19:06 +00:00
{
2017-08-16 02:14:07 +00:00
newmod = outseq & UPDATE_MASK ;
2013-09-06 22:57:44 +00:00
frame = & cl . outframes [ newmod ] ;
// calculate latency
frame - > latency = realtime - frame - > senttime ;
if ( frame - > latency < 0 | | frame - > latency > 1.0 )
{
// Con_Printf ("Odd latency: %5.2f\n", latency);
}
2013-07-26 17:19:06 +00:00
else
2013-09-06 22:57:44 +00:00
{
// drift the average latency towards the observed latency
if ( frame - > latency < cls . latency )
cls . latency = frame - > latency ;
else
cls . latency + = 0.001 ; // drift up, so correction are needed
}
2013-07-26 17:19:06 +00:00
2021-07-17 15:10:01 +00:00
if ( cls . protocol ! = CP_NETQUAKE & & cl . inframes [ inseq & UPDATE_MASK ] . invalid )
2013-09-06 22:57:44 +00:00
frame - > latency = - 4 ;
//and mark any missing ones as dropped
2013-07-26 17:19:06 +00:00
for ( i = ( cl . lastackedmovesequence + 1 ) & UPDATE_MASK ; i ! = newmod ; i = ( i + 1 ) & UPDATE_MASK )
{
2013-09-06 22:57:44 +00:00
//nq has no concept of choking. outbound packets that are accepted during a single frame will be erroneoulsy considered dropped. nq never had a netgraph based upon outgoing timings.
// Con_Printf("Dropped moveframe %i\n", i);
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
if ( cls . protocol = = CP_NETQUAKE & & CPNQ_IS_DP )
{ //dp doesn't ack every single packet. trying to report packet loss correctly is futile, we'll just get bad-mouthed.
cl . outframes [ i ] . latency = - 2 ; //flag as choked
}
else
cl . outframes [ i ] . latency = - 1 ; //flag as dropped
2013-07-26 17:19:06 +00:00
}
}
2013-09-06 22:57:44 +00:00
cl . inframes [ inseq & UPDATE_MASK ] . ackframe = outseq ;
2013-07-26 17:19:06 +00:00
if ( worldstateokay )
2013-09-06 22:57:44 +00:00
cl . ackedmovesequence = outseq ;
cl . lastackedmovesequence = outseq ;
2013-07-26 17:19:06 +00:00
}
2004-08-23 00:15:46 +00:00
//=============================================================================
2014-03-30 08:55:06 +00:00
int CL_IsDownloading ( const char * localname )
2014-02-07 08:38:40 +00:00
{
downloadlist_t * dl ;
/*check for dupes*/
for ( dl = cl . downloadlist ; dl ; dl = dl - > next ) //It's already on our list. Ignore it.
{
if ( ! strcmp ( dl - > localname , localname ) )
return 2 ; //queued
}
2014-06-12 23:08:42 +00:00
if ( cls . download )
if ( ! strcmp ( cls . download - > localname , localname ) )
return 1 ; //downloading
2014-02-07 08:38:40 +00:00
return 0 ;
}
2005-01-13 16:29:20 +00:00
//note: this will overwrite existing files.
//returns true if the download is going to be downloaded after the call.
2014-03-30 08:55:06 +00:00
qboolean CL_EnqueDownload ( const char * filename , const char * localname , unsigned int flags )
2005-01-13 16:29:20 +00:00
{
2014-09-02 02:44:43 +00:00
extern cvar_t cl_downloads ;
2005-01-13 16:29:20 +00:00
downloadlist_t * dl ;
2010-03-25 22:56:11 +00:00
qboolean webdl = false ;
2014-10-05 20:04:11 +00:00
char ext [ 8 ] ;
2021-10-31 18:20:45 +00:00
if ( ( flags & DLLF_TRYWEB ) | | ! strncmp ( filename , " http:// " , 7 ) | | ! strncmp ( filename , " https:// " , 8 ) )
2010-03-25 22:56:11 +00:00
{
2021-10-31 18:20:45 +00:00
flags | = DLLF_TRYWEB ;
2012-11-27 03:23:19 +00:00
if ( ! localname )
return false ;
2010-03-25 22:56:11 +00:00
webdl = true ;
}
else
{
if ( ! localname )
localname = filename ;
2016-07-12 00:40:13 +00:00
if ( cls . state < ca_connected )
return false ;
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
if ( cls . demoplayback & & ! ( cls . demoplayback = = DPB_MVD & & ( cls . demoeztv_ext & EZTV_DOWNLOAD ) ) )
2010-03-25 22:56:11 +00:00
return false ;
}
2014-10-05 20:04:11 +00:00
COM_FileExtension ( localname , ext , sizeof ( ext ) ) ;
2013-05-11 05:03:07 +00:00
if ( ! stricmp ( ext , " dll " ) | | ! stricmp ( ext , " so " ) | | strchr ( localname , ' \\ ' ) | | strchr ( localname , ' : ' ) | | strstr ( localname , " .. " ) )
2005-01-13 16:29:20 +00:00
{
2019-07-29 05:28:20 +00:00
CL_DownloadFailed ( filename , NULL , DLFAIL_UNTRIED ) ;
2005-01-13 16:29:20 +00:00
Con_Printf ( " Denying download of \" %s \" \n " , filename ) ;
return false ;
}
2014-09-02 02:44:43 +00:00
if ( ! ( flags & DLLF_USEREXPLICIT ) & & ! cl_downloads . ival )
{
2019-07-29 05:28:20 +00:00
CL_DownloadFailed ( filename , NULL , DLFAIL_CLIENTCVAR ) ;
2014-09-02 02:44:43 +00:00
if ( flags & DLLF_VERBOSE )
Con_Printf ( " cl_downloads setting prevents download of \" %s \" \n " , filename ) ;
return false ;
}
2011-10-27 15:46:36 +00:00
/*reject if it already failed*/
2008-11-09 22:29:28 +00:00
if ( ! ( flags & DLLF_IGNOREFAILED ) )
2005-01-13 16:29:20 +00:00
{
2008-12-03 02:42:05 +00:00
# ifdef NQPROT
2010-03-25 22:56:11 +00:00
if ( ! webdl & & cls . protocol = = CP_NETQUAKE )
2008-12-03 02:42:05 +00:00
if ( ! cl_dp_serverextension_download )
2019-07-29 05:28:20 +00:00
{
CL_DownloadFailed ( filename , NULL , DLFAIL_UNSUPPORTED ) ;
2008-12-03 02:42:05 +00:00
return false ;
2019-07-29 05:28:20 +00:00
}
2008-12-03 02:42:05 +00:00
# endif
2005-01-13 16:29:20 +00:00
for ( dl = cl . faileddownloads ; dl ; dl = dl - > next ) //yeah, so it failed... Ignore it.
{
2009-05-24 10:11:17 +00:00
if ( ! strcmp ( dl - > rname , filename ) )
2005-01-13 16:29:20 +00:00
{
2008-11-09 22:29:28 +00:00
if ( flags & DLLF_VERBOSE )
2005-01-13 16:29:20 +00:00
Con_Printf ( " We've failed to download \" %s \" already \n " , filename ) ;
return false ;
}
}
}
2011-10-27 15:46:36 +00:00
/*check for dupes*/
2014-02-07 08:38:40 +00:00
switch ( CL_IsDownloading ( localname ) )
2005-01-13 16:29:20 +00:00
{
2014-02-07 08:38:40 +00:00
case 2 :
if ( flags & DLLF_VERBOSE )
Con_Printf ( " Already waiting for \" %s \" \n " , filename ) ;
return true ;
default :
case 1 :
2008-11-09 22:29:28 +00:00
if ( flags & DLLF_VERBOSE )
2005-01-13 16:29:20 +00:00
Con_Printf ( " Already downloading \" %s \" \n " , filename ) ;
return true ;
2014-02-07 08:38:40 +00:00
case 0 :
break ;
2005-01-13 16:29:20 +00:00
}
2008-11-09 22:29:28 +00:00
if ( ! * filename )
{
Con_Printf ( " Download \" \" ? Huh? \n " ) ;
return true ;
}
2005-01-13 16:29:20 +00:00
dl = Z_Malloc ( sizeof ( downloadlist_t ) ) ;
2009-05-24 10:11:17 +00:00
Q_strncpyz ( dl - > rname , filename , sizeof ( dl - > rname ) ) ;
2005-08-11 04:14:33 +00:00
Q_strncpyz ( dl - > localname , localname , sizeof ( dl - > localname ) ) ;
2005-01-13 16:29:20 +00:00
dl - > next = cl . downloadlist ;
2008-11-09 22:29:28 +00:00
dl - > size = 0 ;
dl - > flags = flags | DLLF_SIZEUNKNOWN ;
2005-01-13 16:29:20 +00:00
2016-01-18 05:22:07 +00:00
if ( ! cl . downloadlist )
flags & = ~ DLLF_VERBOSE ;
cl . downloadlist = dl ;
2010-03-25 22:56:11 +00:00
if ( ! webdl & & ( cls . fteprotocolextensions & ( PEXT_CHUNKEDDOWNLOADS
2008-11-09 22:29:28 +00:00
# ifdef PEXT_PK3DOWNLOADS
| PEXT_PK3DOWNLOADS
# endif
2012-11-29 13:37:48 +00:00
) ) & & ! ( dl - > flags & DLLF_TEMPORARY ) )
2011-10-27 15:46:36 +00:00
{
2009-05-24 10:11:17 +00:00
CL_SendClientCommand ( true , " dlsize \" %s \" " , dl - > rname ) ;
2011-10-27 15:46:36 +00:00
}
2008-11-09 22:29:28 +00:00
if ( flags & DLLF_VERBOSE )
2005-01-13 16:29:20 +00:00
Con_Printf ( " Enqued download of \" %s \" \n " , filename ) ;
return true ;
}
2014-06-12 23:08:42 +00:00
void CL_GetDownloadSizes ( unsigned int * filecount , qofs_t * totalsize , qboolean * somesizesunknown )
2008-11-09 22:29:28 +00:00
{
downloadlist_t * dl ;
2014-06-12 23:08:42 +00:00
qdownload_t * d ;
2008-11-09 22:29:28 +00:00
* filecount = 0 ;
* totalsize = 0 ;
* somesizesunknown = false ;
for ( dl = cl . downloadlist ; dl ; dl = dl - > next )
{
2009-04-06 00:34:32 +00:00
* filecount + = 1 ;
2008-11-09 22:29:28 +00:00
if ( dl - > flags & DLLF_SIZEUNKNOWN )
* somesizesunknown = true ;
else
* totalsize + = dl - > size ;
}
2014-06-12 23:08:42 +00:00
d = cls . download ;
if ( d )
2008-11-09 22:29:28 +00:00
{
2014-06-12 23:08:42 +00:00
if ( d - > sizeunknown )
* somesizesunknown = true ;
* totalsize + = d - > size ;
2008-11-09 22:29:28 +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
static void CL_DisenqueDownload ( char * filename )
2005-01-13 16:29:20 +00:00
{
downloadlist_t * dl , * nxt ;
if ( cl . downloadlist ) //remove from enqued download list
{
2009-05-24 10:11:17 +00:00
if ( ! strcmp ( cl . downloadlist - > rname , filename ) )
2005-01-13 16:29:20 +00:00
{
dl = cl . downloadlist ;
cl . downloadlist = cl . downloadlist - > next ;
Z_Free ( dl ) ;
}
else
{
2009-04-06 00:34:32 +00:00
for ( dl = cl . downloadlist ; dl - > next ; dl = dl - > next )
2005-01-13 16:29:20 +00:00
{
2009-05-24 10:11:17 +00:00
if ( ! strcmp ( dl - > next - > rname , filename ) )
2005-01-13 16:29:20 +00:00
{
nxt = dl - > next - > next ;
Z_Free ( dl - > next ) ;
dl - > next = nxt ;
break ;
}
}
}
}
2005-01-13 23:33:00 +00:00
}
2005-01-13 16:29:20 +00:00
2010-07-11 02:22:39 +00:00
# ifdef WEBCLIENT
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
static void CL_WebDownloadFinished ( struct dl_download * dl )
2010-03-25 22:56:11 +00:00
{
if ( dl - > status = = DL_FAILED )
2017-01-13 00:39:50 +00:00
{
2019-07-29 05:28:20 +00:00
if ( dl - > replycode = = 404 ) //regular file-not-found
CL_DownloadFailed ( dl - > url , & dl - > qdownload , DLFAIL_SERVERFILE ) ;
else //other stuff is PROBABLY 403forbidden, but lets blame the server's config if its a tls issue etc.
CL_DownloadFailed ( dl - > url , & dl - > qdownload , DLFAIL_SERVERCVAR ) ;
2017-01-13 00:39:50 +00:00
if ( dl - > qdownload . flags & DLLF_ALLOWWEB ) //re-enqueue it if allowed, but this time not from the web server.
2021-10-31 18:20:45 +00:00
CL_EnqueDownload ( dl - > qdownload . localname , dl - > qdownload . localname , dl - > qdownload . flags & ~ ( DLLF_ALLOWWEB | DLLF_TRYWEB ) ) ;
2017-01-13 00:39:50 +00:00
}
2010-03-25 22:56:11 +00:00
else if ( dl - > status = = DL_FINISHED )
{
if ( dl - > file )
VFS_CLOSE ( dl - > file ) ;
dl - > file = NULL ;
2014-06-12 23:08:42 +00:00
CL_DownloadFinished ( & dl - > qdownload ) ;
2010-03-25 22:56:11 +00:00
}
}
2010-07-11 02:22:39 +00:00
# endif
2010-03-25 22:56:11 +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
static void CL_SendDownloadStartRequest ( char * filename , char * localname , unsigned int flags )
2005-01-16 02:25:35 +00:00
{
2014-06-12 23:08:42 +00:00
static int dlsequence ;
qdownload_t * dl ;
2018-09-23 19:35:24 +00:00
//don't download multiple things at once... its leaky if nothing else.
if ( cls . download )
return ;
2014-06-12 23:08:42 +00:00
# ifdef WEBCLIENT
2021-10-31 18:20:45 +00:00
if ( flags & DLLF_TRYWEB )
2014-06-12 23:08:42 +00:00
{
2018-09-23 19:35:24 +00:00
struct dl_download * wdl = HTTP_CL_Get ( filename , localname , CL_WebDownloadFinished ) ;
if ( wdl )
2017-01-13 00:39:50 +00:00
{
2018-09-23 19:35:24 +00:00
if ( flags & DLLF_NONGAME )
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
{
2018-09-23 19:35:24 +00:00
wdl - > fsroot = FS_ROOT ;
if ( ! strncmp ( localname , " package/ " , 8 ) )
Q_strncpyz ( wdl - > localname , localname + 8 , sizeof ( wdl - > localname ) ) ;
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
}
2018-09-23 19:35:24 +00:00
if ( ! ( flags & DLLF_TEMPORARY ) )
Con_TPrintf ( " Downloading %s to %s... \n " , wdl - > url , wdl - > localname ) ;
wdl - > qdownload . flags = flags ;
CL_DisenqueDownload ( filename ) ;
cls . download = & wdl - > qdownload ;
2017-01-13 00:39:50 +00:00
}
2018-09-23 19:35:24 +00:00
else
2019-07-29 05:28:20 +00:00
CL_DownloadFailed ( filename , NULL , DLFAIL_CLIENTCVAR ) ;
2014-06-12 23:08:42 +00:00
return ;
}
# endif
dl = Z_Malloc ( sizeof ( * dl ) ) ;
dl - > filesequence = + + dlsequence ;
Q_strncpyz ( dl - > remotename , filename , sizeof ( dl - > remotename ) ) ;
Q_strncpyz ( dl - > localname , localname , sizeof ( dl - > localname ) ) ;
2012-11-29 13:37:48 +00:00
if ( ! ( flags & DLLF_TEMPORARY ) )
2014-06-12 23:08:42 +00:00
Con_TPrintf ( " Downloading %s... \n " , dl - > localname ) ;
2005-01-16 02:25:35 +00:00
// download to a temp name, and only rename
// to the real name when done, so if interrupted
// a runt file wont be left
2014-06-12 23:08:42 +00:00
COM_StripExtension ( localname , dl - > tempname , sizeof ( dl - > tempname ) - 5 ) ;
Q_strncatz ( dl - > tempname , " .tmp " , sizeof ( dl - > tempname ) ) ;
2005-01-16 02:25:35 +00:00
2016-10-22 07:06:51 +00:00
# ifdef AVAIL_ZLIB
if ( cls . protocol = = CP_QUAKE2 & & cls . protocol_q2 = = PROTOCOL_VERSION_R1Q2 )
CL_SendClientCommand ( true , " download %s 0 udp-zlib " , filename ) ;
else
# endif
CL_SendClientCommand ( true , " download %s " , filename ) ;
2014-06-12 23:08:42 +00:00
dl - > method = DL_QWPENDING ;
dl - > percent = 0 ;
dl - > sizeunknown = true ;
dl - > flags = flags & DLLF_OVERWRITE ;
2005-01-16 02:25:35 +00:00
CL_DisenqueDownload ( filename ) ;
2014-06-12 23:08:42 +00:00
cls . download = dl ;
2005-01-16 02:25:35 +00:00
}
2005-01-13 23:33:00 +00:00
//Do any reloading for the file that just reloaded.
2014-06-12 23:08:42 +00:00
void CL_DownloadFinished ( qdownload_t * dl )
2005-01-13 23:33:00 +00:00
{
int i ;
2014-10-05 20:04:11 +00:00
char ext [ 8 ] ;
2005-01-13 16:29:20 +00:00
2014-06-12 23:08:42 +00:00
char filename [ MAX_QPATH ] ;
char tempname [ MAX_QPATH ] ;
2009-05-24 10:11:17 +00:00
2014-06-12 23:08:42 +00:00
Q_strncpyz ( filename , dl - > localname , sizeof ( filename ) ) ;
Q_strncpyz ( tempname , dl - > tempname , sizeof ( tempname ) ) ;
2005-01-16 02:25:35 +00:00
2014-06-12 23:08:42 +00:00
DL_Abort ( dl , QDL_COMPLETED ) ;
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
FS_FlushFSHashWritten ( filename ) ;
2005-01-16 02:25:35 +00:00
2014-10-05 20:04:11 +00:00
COM_FileExtension ( filename , ext , sizeof ( ext ) ) ;
2008-11-09 22:29:28 +00:00
2010-12-23 08:53:23 +00:00
2014-06-12 23:08:42 +00:00
//should probably ask the filesytem code if its a package format instead.
2018-09-23 19:35:24 +00:00
if ( ! strncmp ( filename , " package/ " , 8 ) | | ! strncmp ( ext , " pk4 " , 3 ) | | ! strncmp ( ext , " pk3 " , 3 ) | | ! strncmp ( ext , " pak " , 3 ) | | ( dl - > fsroot = = FS_ROOT ) )
2011-10-27 15:46:36 +00:00
{
2008-11-09 22:29:28 +00:00
FS_ReloadPackFiles ( ) ;
2011-10-27 15:46:36 +00:00
CL_CheckServerInfo ( ) ;
}
2008-11-09 22:29:28 +00:00
else if ( ! strcmp ( filename , " gfx/palette.lmp " ) )
2005-01-13 23:33:00 +00:00
{
Cbuf_AddText ( " vid_restart \n " , RESTRICT_LOCAL ) ;
}
else
{
2008-11-28 20:34:51 +00:00
CL_CheckModelResources ( filename ) ;
2019-07-29 05:28:20 +00:00
Mod_FileWritten ( filename ) ;
2005-01-13 23:33:00 +00:00
{
2014-09-17 03:04:08 +00:00
for ( i = 0 ; i < MAX_PRECACHE_MODELS ; i + + ) //go and load this model now.
2006-01-04 00:44:34 +00:00
{
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
if ( cl . model_name [ i ] & & ! strcmp ( cl . model_name [ i ] , filename ) )
2008-11-09 22:29:28 +00:00
{
2018-09-23 19:35:24 +00:00
if ( cl . model_precache [ i ] & & cl . model_precache [ i ] - > loadstate = = MLS_FAILED )
cl . model_precache [ i ] - > loadstate = MLS_NOTLOADED ;
2023-09-11 09:31:09 +00:00
CL_CheckModelResources ( cl . model_name [ i ] ) ;
cl . model_precache [ i ] = Mod_ForName ( cl . model_name [ i ] , ( ( i = = 1 ) ? MLV_WARNSYNC : MLV_WARN ) ) ;
2008-11-09 22:29:28 +00:00
if ( i = = 1 )
2021-06-01 09:23:42 +00:00
{
2008-11-09 22:29:28 +00:00
cl . worldmodel = cl . model_precache [ i ] ;
2021-06-01 09:23:42 +00:00
//just in case.
if ( cl . model_precache [ 1 ] & & cl . model_precache [ 1 ] - > loadstate = = MLS_LOADED )
FS_LoadMapPackFile ( cl . model_precache [ 1 ] - > name , cl . model_precache [ 1 ] - > archive ) ;
}
2008-11-09 22:29:28 +00:00
break ;
}
2006-01-04 00:44:34 +00:00
}
2013-03-12 22:44:00 +00:00
for ( i = 0 ; i < MAX_CSMODELS ; i + + ) //go and load this model now.
2012-11-27 03:23:19 +00:00
{
if ( ! strcmp ( cl . model_csqcname [ i ] , filename ) )
{
2018-09-23 19:35:24 +00:00
if ( cl . model_csqcprecache [ i ] & & cl . model_csqcprecache [ i ] - > loadstate = = MLS_FAILED )
cl . model_csqcprecache [ i ] - > loadstate = MLS_NOTLOADED ;
2023-09-11 09:31:09 +00:00
CL_CheckModelResources ( cl . model_csqcname [ i ] ) ;
2018-09-23 19:35:24 +00:00
cl . model_csqcprecache [ i ] = Mod_ForName ( cl . model_csqcname [ i ] , MLV_WARN ) ;
2012-11-27 03:23:19 +00:00
break ;
}
}
2019-04-16 22:40:05 +00:00
# ifdef HAVE_LEGACY
2009-07-06 01:20:20 +00:00
for ( i = 0 ; i < MAX_VWEP_MODELS ; i + + )
{
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
if ( cl . model_name_vwep [ i ] & & ! strcmp ( cl . model_name_vwep [ i ] , filename ) )
2009-07-06 01:20:20 +00:00
{
2018-09-23 19:35:24 +00:00
if ( cl . model_precache_vwep [ i ] & & cl . model_precache_vwep [ i ] - > loadstate = = MLS_FAILED )
cl . model_precache_vwep [ i ] - > loadstate = MLS_NOTLOADED ;
2023-09-11 09:31:09 +00:00
CL_CheckModelResources ( cl . model_name_vwep [ i ] ) ;
2014-03-30 08:55:06 +00:00
cl . model_precache_vwep [ i ] = Mod_ForName ( cl . model_name_vwep [ i ] , MLV_WARN ) ;
2009-07-06 01:20:20 +00:00
break ;
}
}
2018-09-01 04:18:08 +00:00
# endif
2006-01-04 00:44:34 +00:00
}
2006-10-05 22:11:17 +00:00
S_ResetFailedLoad ( ) ; //okay, so this can still get a little spammy in bad places...
2006-01-04 00:44:34 +00:00
2018-03-04 14:41:16 +00:00
# ifdef QWSKINS
2006-01-04 00:44:34 +00:00
//this'll do the magic for us
2005-01-13 23:33:00 +00:00
Skin_FlushSkin ( filename ) ;
2018-03-04 14:41:16 +00:00
# endif
2005-01-13 23:33:00 +00:00
}
2005-01-13 16:29:20 +00:00
}
2007-06-20 00:02:54 +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
static qboolean CL_CheckFile ( const char * filename )
2007-06-20 00:02:54 +00:00
{
if ( strstr ( filename , " .. " ) )
{
2013-11-29 14:36:47 +00:00
Con_TPrintf ( " Refusing to download a path with .. \n " ) ;
2007-06-20 00:02:54 +00:00
return true ;
}
if ( COM_FCheckExists ( filename ) )
{ // it exists, no need to download
return true ;
}
return false ;
}
2011-10-27 15:46:36 +00:00
2014-03-30 08:55:06 +00:00
qboolean CL_CheckDLFile ( const char * filename )
2011-10-27 15:46:36 +00:00
{
if ( ! strncmp ( filename , " package/ " , 8 ) )
{
vfsfile_t * f ;
f = FS_OpenVFS ( filename + 8 , " rb " , FS_ROOT ) ;
if ( f )
{
VFS_CLOSE ( f ) ;
return true ;
}
return false ;
}
else
return COM_FCheckExists ( filename ) ;
}
2004-08-23 00:15:46 +00:00
/*
= = = = = = = = = = = = = = =
2006-01-04 00:44:34 +00:00
CL_CheckOrEnqueDownloadFile
2004-08-23 00:15:46 +00:00
2010-03-25 22:56:11 +00:00
Returns true if the file exists , returns false if it triggered a download .
2004-08-23 00:15:46 +00:00
= = = = = = = = = = = = = = =
*/
2007-06-20 00:02:54 +00:00
2014-03-30 08:55:06 +00:00
qboolean CL_CheckOrEnqueDownloadFile ( const char * filename , const char * localname , unsigned int flags )
2006-01-04 00:44:34 +00:00
{ //returns false if we don't have the file yet.
2014-10-05 20:04:11 +00:00
COM_AssertMainThread ( " CL_CheckOrEnqueDownloadFile " ) ;
2011-10-27 15:46:36 +00:00
if ( flags & DLLF_NONGAME )
{
/*pak/pk3 downloads have an explicit leading package/ as an internal/network marker*/
2013-06-23 02:17:02 +00:00
if ( ! strchr ( filename , ' : ' ) )
filename = va ( " package/%s " , filename ) ;
2011-10-27 15:46:36 +00:00
localname = va ( " package/%s " , localname ) ;
}
2013-06-23 02:17:02 +00:00
/*files with a leading * should not be downloaded (inline models, sexed sounds, etc). also block anyone trying to explicitly download a package/ because our code (wrongly) uses that name internally*/
2011-10-27 15:46:36 +00:00
else if ( * filename = = ' * ' | | ! strncmp ( filename , " package/ " , 8 ) )
return true ;
2005-08-11 04:14:33 +00:00
if ( ! localname )
localname = filename ;
2005-09-26 03:40:09 +00:00
2009-03-03 01:52:30 +00:00
# ifndef CLIENTONLY
2011-10-27 15:46:36 +00:00
/*no downloading if we're the one we'd be downloading from*/
2009-03-03 01:52:30 +00:00
if ( sv . state )
return true ;
# endif
2011-10-27 15:46:36 +00:00
if ( ! ( flags & DLLF_OVERWRITE ) )
{
if ( CL_CheckDLFile ( localname ) )
return true ;
}
2010-03-25 22:56:11 +00:00
2004-08-23 00:15:46 +00:00
//ZOID - can't download when recording
2005-01-13 16:29:20 +00:00
if ( cls . demorecording )
{
2013-11-29 14:36:47 +00:00
Con_TPrintf ( " Unable to download %s in record mode. \n " , filename ) ;
2019-06-18 15:09:31 +00:00
# if defined(MVD_RECORDING) && defined(HAVE_SERVER)
2019-06-18 13:03:37 +00:00
if ( sv_demoAutoRecord . ival )
Con_TPrintf ( " Note that ^[%s \\ cmd \\ %s 0 \\ ^] is enabled. \n " , sv_demoAutoRecord . name , sv_demoAutoRecord . name ) ;
2019-06-18 15:09:31 +00:00
# endif
2004-08-23 00:15:46 +00:00
return true ;
}
//ZOID - can't download when playback
2010-03-25 22:56:11 +00:00
// if (cls.demoplayback && cls.demoplayback != DPB_EZTV)
// return true;
2004-08-23 00:15:46 +00:00
2004-11-27 08:16:25 +00:00
SCR_EndLoadingPlaque ( ) ; //release console.
2017-01-13 00:39:50 +00:00
if ( flags & DLLF_ALLOWWEB )
2005-06-04 04:20:20 +00:00
{
2021-10-31 18:20:45 +00:00
const char * dlURL = InfoBuf_ValueForKey ( & cl . serverinfo , " sv_dlURL " ) ;
2023-08-16 04:09:58 +00:00
if ( ! * dlURL )
dlURL = cls . downloadurl ;
2021-10-31 18:20:45 +00:00
if ( ! * dlURL )
2023-03-27 17:22:00 +00:00
dlURL = fs_dlURL . string ;
2023-08-16 04:09:58 +00:00
if ( strncmp ( dlURL , " http:// " , 7 ) & & strncmp ( dlURL , " https:// " , 8 ) )
dlURL = " " ; //only allow http+https here. just paranoid.
2021-10-31 18:20:45 +00:00
flags & = ~ ( DLLF_TRYWEB | DLLF_ALLOWWEB ) ;
if ( * dlURL & & ( flags & DLLF_NONGAME ) & & ! strncmp ( filename , " package/ " , 8 ) )
{ //filename is something like: package/GAMEDIR/foo.pk3
2023-08-16 04:09:58 +00:00
filename = va ( " %s%s%s " , dlURL , ( ( dlURL [ strlen ( dlURL ) - 1 ] = = ' / ' ) ? " " : " / " ) , filename + 8 ) ;
2021-10-31 18:20:45 +00:00
flags | = DLLF_TRYWEB | DLLF_ALLOWWEB ;
}
else if ( * dlURL )
{ //we don't really know which gamedir its meant to be for...
2023-09-11 09:31:09 +00:00
# ifdef Q2CLIENT //ffs
if ( ! strncmp ( filename , " pics/../ " , 8 ) )
filename + = 8 ;
# endif
2023-08-16 04:09:58 +00:00
filename = va ( " %s%s%s/%s " , dlURL , ( ( dlURL [ strlen ( dlURL ) - 1 ] = = ' / ' ) ? " " : " / " ) , FS_GetGamedir ( true ) , filename ) ;
2021-10-31 18:20:45 +00:00
flags | = DLLF_TRYWEB | DLLF_ALLOWWEB ;
2020-04-19 01:23:32 +00:00
}
else if ( * cl_download_mapsrc . string & &
! strcmp ( filename , localname ) & &
! strncmp ( filename , " maps/ " , 5 ) & &
! strcmp ( filename + strlen ( filename ) - 4 , " .bsp " ) )
2017-01-13 00:39:50 +00:00
{
char base [ MAX_QPATH ] ;
COM_FileBase ( filename , base , sizeof ( base ) ) ;
2023-02-11 05:20:02 +00:00
# ifndef FTE_TARGET_WEB //don't care about prefixes in the web build, for site-relative uris.
if ( strncmp ( cl_download_mapsrc . string , " http:// " , 7 ) & & strncmp ( cl_download_mapsrc . string , " https:// " , 8 ) )
2021-10-31 18:20:45 +00:00
{
2023-02-11 05:20:02 +00:00
Con_Printf ( " %s: Scheme not specified, assuming https. \n " , cl_download_mapsrc . name ) ;
2021-10-31 18:20:45 +00:00
filename = va ( " https://%s/%s " , cl_download_mapsrc . string , filename + 5 ) ;
}
2017-01-13 00:39:50 +00:00
else
2021-10-31 18:20:45 +00:00
# endif
filename = va ( " %s%s " , cl_download_mapsrc . string , filename + 5 ) ;
flags | = DLLF_TRYWEB | DLLF_ALLOWWEB ;
2017-01-13 00:39:50 +00:00
}
2005-06-04 04:20:20 +00:00
}
2010-03-25 22:56:11 +00:00
if ( ! CL_EnqueDownload ( filename , localname , flags ) )
return true ; /*don't stall waiting for it if it failed*/
2008-11-09 22:29:28 +00:00
if ( ! ( flags & DLLF_IGNOREFAILED ) )
{
downloadlist_t * dl ;
for ( dl = cl . faileddownloads ; dl ; dl = dl - > next )
{
2009-05-24 10:11:17 +00:00
if ( ! strcmp ( dl - > rname , filename ) )
2008-11-09 22:29:28 +00:00
{
//if its on the failed list, don't block waiting for it to download
return true ;
}
}
}
2006-01-04 00:44:34 +00:00
return false ;
2004-08-23 00:15:46 +00:00
}
2008-11-09 22:29:28 +00:00
static qboolean CL_CheckMD2Skins ( qbyte * precache_model )
2004-08-23 00:15:46 +00:00
{
2008-11-09 22:29:28 +00:00
qboolean ret = false ;
2004-08-23 00:15:46 +00:00
md2_t * pheader ;
2008-11-09 22:29:28 +00:00
int skin = 1 ;
2005-03-18 06:14:07 +00:00
char * str ;
2004-08-23 00:15:46 +00:00
pheader = ( md2_t * ) precache_model ;
2008-11-09 22:29:28 +00:00
if ( LittleLong ( pheader - > version ) ! = MD2ALIAS_VERSION )
{
//bad version.
2004-08-23 00:15:46 +00:00
return false ;
}
pheader = ( md2_t * ) precache_model ;
2008-11-09 22:29:28 +00:00
for ( skin = 0 ; skin < LittleLong ( pheader - > num_skins ) ; skin + + )
2005-03-18 06:14:07 +00:00
{
str = ( char * ) precache_model +
2005-09-26 03:40:09 +00:00
LittleLong ( pheader - > ofs_skins ) +
2008-11-09 22:29:28 +00:00
skin * MD2MAX_SKINNAME ;
2005-03-18 06:14:07 +00:00
COM_CleanUpPath ( str ) ;
2008-11-09 22:29:28 +00:00
if ( ! CL_CheckOrEnqueDownloadFile ( str , str , 0 ) )
ret = true ;
2004-08-23 00:15:46 +00:00
}
2008-11-09 22:29:28 +00:00
return ret ;
}
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
static qboolean CL_CheckHLBspWads ( char * file )
2008-11-09 22:29:28 +00:00
{
lump_t lump ;
dheader_t * dh ;
char * s ;
char * w ;
char key [ 256 ] ;
char wads [ 4096 ] ;
dh = ( dheader_t * ) file ;
lump . fileofs = LittleLong ( dh - > lumps [ LUMP_ENTITIES ] . fileofs ) ;
lump . filelen = LittleLong ( dh - > lumps [ LUMP_ENTITIES ] . filelen ) ;
2010-12-23 08:53:23 +00:00
2008-11-09 22:29:28 +00:00
s = file + lump . fileofs ;
2005-09-26 03:40:09 +00:00
2008-11-09 22:29:28 +00:00
s = COM_Parse ( s ) ;
if ( strcmp ( com_token , " { " ) )
return false ;
while ( * s )
{
s = COM_ParseOut ( s , key , sizeof ( key ) ) ;
if ( ! strcmp ( key , " } " ) )
break ;
s = COM_ParseOut ( s , wads , sizeof ( wads ) ) ;
if ( ! strcmp ( key , " wad " ) )
{
s = wads ;
2011-05-30 13:36:44 +00:00
while ( ( s = COM_ParseToken ( s , " ; " ) ) )
2008-11-09 22:29:28 +00:00
{
if ( ! strcmp ( com_token , " ; " ) )
continue ;
2011-05-30 13:36:44 +00:00
while ( ( w = strchr ( com_token , ' \\ ' ) ) )
2008-11-09 22:29:28 +00:00
* w = ' / ' ;
w = COM_SkipPath ( com_token ) ;
if ( ! CL_CheckFile ( w ) )
2016-12-09 09:09:12 +00:00
{
Con_Printf ( " missing wad: %s \n " , w ) ;
2008-11-09 22:29:28 +00:00
CL_CheckOrEnqueDownloadFile ( va ( " textures/%s " , w ) , NULL , DLLF_REQUIRED ) ;
2016-12-09 09:09:12 +00:00
}
2008-11-09 22:29:28 +00:00
}
return false ;
}
}
2004-08-23 00:15:46 +00:00
return false ;
}
2006-06-04 16:02:03 +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
static qboolean CL_CheckQ2BspWals ( char * file )
2008-11-09 22:29:28 +00:00
{
qboolean gotone = false ;
2017-02-19 00:15:42 +00:00
# ifdef Q2BSPS
2008-11-09 22:29:28 +00:00
q2dheader_t * dh ;
lump_t lump ;
q2texinfo_t * tinf ;
unsigned int i , j , count ;
dh = ( q2dheader_t * ) file ;
2015-03-03 00:14:43 +00:00
if ( LittleLong ( dh - > version ) ! = BSPVERSION_Q2 )
2008-11-09 22:29:28 +00:00
{
//quake3? unknown?
return false ;
}
lump . fileofs = LittleLong ( dh - > lumps [ Q2LUMP_TEXINFO ] . fileofs ) ;
lump . filelen = LittleLong ( dh - > lumps [ Q2LUMP_TEXINFO ] . filelen ) ;
count = lump . filelen / sizeof ( * tinf ) ;
if ( lump . filelen ! = count * sizeof ( * tinf ) )
return false ;
2022-05-28 17:59:08 +00:00
//grab the appropriate palette, just in case... but only if this won't confuse anything.
if ( CL_CheckDLFile ( " gfx/palette.lmp " ) )
if ( ! CL_CheckOrEnqueDownloadFile ( " pics/colormap.pcx " , NULL , 0 ) )
gotone = true ;
2008-11-09 22:29:28 +00:00
tinf = ( q2texinfo_t * ) ( file + lump . fileofs ) ;
for ( i = 0 ; i < count ; i + + )
{
//ignore duplicate files (to save filesystem hits)
for ( j = 0 ; j < i ; j + + )
if ( ! strcmp ( tinf [ i ] . texture , tinf [ j ] . texture ) )
break ;
if ( i = = j )
2022-05-28 17:59:08 +00:00
{ //note: we do support formats other than .wal but we still need the .wal to figure out the correct scaling.
//we make a special exception for .tga-without-.wal because other q2 engines already expect that, with pre-scaled textures (and thus lightmaps too).
2012-02-15 13:53:30 +00:00
if ( ! CL_CheckDLFile ( va ( " textures/%s.wal " , tinf [ i ] . texture ) ) )
if ( ! CL_CheckDLFile ( va ( " textures/%s.tga " , tinf [ i ] . texture ) ) )
2023-08-16 04:09:58 +00:00
if ( ! CL_CheckOrEnqueDownloadFile ( va ( " textures/%s.wal " , tinf [ i ] . texture ) , NULL , DLLF_ALLOWWEB ) )
2012-02-15 13:53:30 +00:00
gotone = true ;
}
2008-11-09 22:29:28 +00:00
}
2022-05-28 17:59:08 +00:00
//FIXME: parse entity lump for sky name.
2017-02-19 00:15:42 +00:00
# endif
2008-11-09 22:29:28 +00:00
return gotone ;
}
2008-11-14 16:43:28 +00:00
static qboolean CL_CheckModelResources ( char * name )
2008-11-09 22:29:28 +00:00
{
//returns true if we triggered a download
qboolean ret ;
qbyte * file ;
if ( ! ( strstr ( name , " .md2 " ) | | strstr ( name , " .bsp " ) ) )
return false ;
// checking for skins in the model
2009-05-24 10:11:17 +00:00
2011-05-19 13:34:07 +00:00
FS_LoadFile ( name , ( void * * ) & file ) ;
2008-11-09 22:29:28 +00:00
if ( ! file )
{
return false ; // couldn't load it
}
2021-11-03 20:31:32 +00:00
if ( ! memcmp ( file , MD2IDALIASHEADER ) )
2008-11-09 22:29:28 +00:00
ret = CL_CheckMD2Skins ( file ) ;
2021-11-03 20:31:32 +00:00
else if ( ! memcmp ( file , BSPVERSIONHL ) )
2008-11-09 22:29:28 +00:00
ret = CL_CheckHLBspWads ( file ) ;
2021-11-03 20:31:32 +00:00
else if ( ! memcmp ( file , IDBSPHEADER ) )
2008-11-09 22:29:28 +00:00
ret = CL_CheckQ2BspWals ( file ) ;
else
ret = false ;
2009-05-24 10:11:17 +00:00
FS_FreeFile ( file ) ;
2008-11-09 22:29:28 +00:00
return ret ;
}
2004-08-23 00:15:46 +00:00
/*
= = = = = = = = = = = = = = = = =
Model_NextDownload
= = = = = = = = = = = = = = = = =
*/
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
static void Model_CheckDownloads ( void )
2004-08-23 00:15:46 +00:00
{
char * s ;
int i ;
2014-10-05 20:04:11 +00:00
char ext [ 8 ] ;
2004-08-23 00:15:46 +00:00
2009-03-03 01:52:30 +00:00
// Con_TPrintf (TLC_CHECKINGMODELS);
2006-01-04 00:44:34 +00:00
2004-08-23 00:15:46 +00:00
# ifdef Q2CLIENT
2005-05-26 12:55:34 +00:00
if ( cls . protocol = = CP_QUAKE2 )
2004-08-23 00:15:46 +00:00
{
for ( i = 0 ; i < Q2MAX_IMAGES ; i + + )
{
char picname [ 256 ] ;
2015-03-03 00:14:43 +00:00
if ( ! cl . image_name [ i ] | | ! * cl . image_name [ i ] )
2004-08-23 00:15:46 +00:00
continue ;
2023-09-11 09:31:09 +00:00
# if defined(HAVE_LEGACY)
Q_snprintfz ( picname , sizeof ( picname ) , " pics/%s.png " , cl . image_name [ i ] ) ;
if ( COM_FCheckExists ( picname ) )
return ;
# endif
2011-07-22 15:11:35 +00:00
Q_snprintfz ( picname , sizeof ( picname ) , " pics/%s.pcx " , cl . image_name [ i ] ) ;
2017-07-12 08:15:27 +00:00
if ( ! strncmp ( cl . image_name [ i ] , " ../ " , 3 ) ) //some servers are just awkward.
2021-10-31 18:20:45 +00:00
CL_CheckOrEnqueDownloadFile ( picname , picname + 8 , DLLF_ALLOWWEB ) ;
2017-07-12 08:15:27 +00:00
else
2021-10-31 18:20:45 +00:00
CL_CheckOrEnqueDownloadFile ( picname , picname , DLLF_ALLOWWEB ) ;
2004-08-23 00:15:46 +00:00
}
if ( ! CLQ2_RegisterTEntModels ( ) )
return ;
}
# endif
2004-11-17 17:58:22 +00:00
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
for ( i = 1 ; i < countof ( cl . model_name ) & & cl . model_name [ i ] ; i + + )
2004-08-23 00:15:46 +00:00
{
2006-01-04 00:44:34 +00:00
s = cl . model_name [ i ] ;
2004-08-23 00:15:46 +00:00
if ( s [ 0 ] = = ' * ' )
continue ; // inline brush model
2014-10-05 20:04:11 +00:00
if ( ! stricmp ( COM_FileExtension ( s , ext , sizeof ( ext ) ) , " dsp " ) ) //doom sprites are weird, and not really downloadable via this system
2004-08-23 00:15:46 +00:00
continue ;
2004-11-17 17:58:22 +00:00
2005-01-27 22:20:16 +00:00
# ifdef Q2CLIENT
2005-05-26 12:55:34 +00:00
if ( cls . protocol = = CP_QUAKE2 & & s [ 0 ] = = ' # ' ) //this is a vweap
2005-01-07 02:41:46 +00:00
continue ;
2005-01-27 22:20:16 +00:00
# endif
2005-01-07 02:41:46 +00:00
2021-10-31 18:20:45 +00:00
CL_CheckOrEnqueDownloadFile ( s , s , ( ( i = = 1 ) ? DLLF_REQUIRED : 0 ) | DLLF_ALLOWWEB ) ; //world is required to be loaded.
2008-11-09 22:29:28 +00:00
CL_CheckModelResources ( s ) ;
2004-08-23 00:15:46 +00:00
}
2009-07-06 01:20:20 +00:00
2019-04-16 22:40:05 +00:00
# ifdef HAVE_LEGACY
2009-07-06 01:20:20 +00:00
for ( i = 0 ; i < MAX_VWEP_MODELS ; i + + )
{
s = cl . model_name_vwep [ i ] ;
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
if ( ! s )
2009-07-06 01:20:20 +00:00
continue ;
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
if ( ! stricmp ( COM_FileExtension ( s , ext , sizeof ( ext ) ) , " dsp " ) ) //doom sprites are weird, and not really downloadable via this system
2010-03-25 22:56:11 +00:00
continue ;
2021-10-31 18:20:45 +00:00
CL_CheckOrEnqueDownloadFile ( s , s , DLLF_ALLOWWEB ) ;
2009-07-06 01:20:20 +00:00
CL_CheckModelResources ( s ) ;
}
2018-09-01 04:18:08 +00:00
# endif
2006-01-04 00:44:34 +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
static int CL_LoadModels ( int stage , qboolean dontactuallyload )
2006-01-04 00:44:34 +00:00
{
int i ;
2014-10-05 20:04:11 +00:00
float giveuptime = Sys_DoubleTime ( ) + 1 ; //small things get padded into a single frame
2006-01-11 22:24:08 +00:00
2017-06-26 09:31:02 +00:00
# define atstage() ((cl.contentstage == stage++ && !dontactuallyload)?true:false)
2018-10-11 10:31:23 +00:00
# define endstage() ++cl.contentstage;if (!cls.timedemo && giveuptime<Sys_DoubleTime()) return -1
# define skipstage() if (atstage())++cl.contentstage;else
2006-01-04 00:44:34 +00:00
2006-02-27 00:42:25 +00:00
pmove . numphysent = 0 ;
2015-05-03 19:57:46 +00:00
pmove . physents [ 0 ] . model = NULL ;
2006-02-27 00:42:25 +00:00
2018-09-23 19:35:24 +00:00
# if defined(CSQC_DAT) && defined(NQPROT)
if ( cls . protocol = = CP_NETQUAKE & & atstage ( ) )
{ //we only need this for nq. for qw we checked for downloads with the other stuff.
//there are also too many possible names to load... :(
2010-07-11 02:22:39 +00:00
extern cvar_t cl_nocsqc ;
2018-09-23 19:35:24 +00:00
if ( ! cl_nocsqc . ival & & ! cls . demoplayback )
2007-06-20 00:02:54 +00:00
{
2018-09-23 19:35:24 +00:00
const char * cscrc = InfoBuf_ValueForKey ( & cl . serverinfo , " *csprogs " ) ;
const char * cssize = InfoBuf_ValueForKey ( & cl . serverinfo , " *csprogssize " ) ;
const char * csname = InfoBuf_ValueForKey ( & cl . serverinfo , " *csprogsname " ) ;
unsigned int chksum = strtoul ( cscrc , NULL , 0 ) ;
size_t chksize = strtoul ( cssize , NULL , 0 ) ;
2012-05-09 15:30:53 +00:00
SCR_SetLoadingFile ( " csprogs " ) ;
2018-09-23 19:35:24 +00:00
if ( ! * csname )
csname = " csprogs.dat " ;
if ( * cscrc & & ! CSQC_CheckDownload ( csname , chksum , chksize ) ) //only allow csqc if the server says so, and the 'checksum' matches.
2007-06-20 00:02:54 +00:00
{
2011-10-27 15:46:36 +00:00
extern cvar_t cl_download_csprogs ;
2018-09-23 19:35:24 +00:00
unsigned int chksum = strtoul ( cscrc , NULL , 0 ) ;
2011-10-27 15:46:36 +00:00
if ( cl_download_csprogs . ival )
2007-06-20 00:02:54 +00:00
{
char * str = va ( " csprogsvers/%x.dat " , chksum ) ;
2018-09-23 19:35:24 +00:00
if ( CL_IsDownloading ( str ) )
return - 1 ; //don't progress to loading it while we're still downloading it.
if ( CL_CheckOrEnqueDownloadFile ( csname , str , DLLF_REQUIRED ) )
return - 1 ; //its kinda required
2007-06-20 00:02:54 +00:00
}
else
{
2018-09-23 19:35:24 +00:00
Con_Printf ( " Not downloading csprogs.dat due to %s \n " , cl_download_csprogs . name ) ;
2007-06-20 00:02:54 +00:00
}
}
}
endstage ( ) ;
}
2018-09-23 19:35:24 +00:00
# endif
2007-06-20 00:02:54 +00:00
2009-04-01 22:03:56 +00:00
# ifdef HLCLIENT
if ( atstage ( ) )
{
2012-05-09 15:30:53 +00:00
SCR_SetLoadingFile ( " hlclient " ) ;
2009-04-01 22:03:56 +00:00
CLHL_LoadClientGame ( ) ;
endstage ( ) ;
}
# endif
2018-03-24 04:02:09 +00:00
# ifdef CSQC_DAT
2006-01-04 00:44:34 +00:00
if ( atstage ( ) )
{
2008-11-09 22:29:28 +00:00
char * s ;
2009-11-04 21:16:50 +00:00
qboolean anycsqc ;
2012-10-13 00:56:31 +00:00
char * endptr ;
unsigned int chksum ;
2018-09-23 19:35:24 +00:00
size_t progsize ;
const char * progsname ;
2018-07-05 16:21:44 +00:00
anycsqc = atoi ( InfoBuf_ValueForKey ( & cl . serverinfo , " anycsqc " ) ) ;
2012-10-13 00:56:31 +00:00
if ( cls . demoplayback )
anycsqc = true ;
2018-09-23 19:35:24 +00:00
s = InfoBuf_ValueForKey ( & cl . serverinfo , " *csprogssize " ) ;
progsize = strtoul ( s , NULL , 0 ) ;
2018-07-05 16:21:44 +00:00
s = InfoBuf_ValueForKey ( & cl . serverinfo , " *csprogs " ) ;
2012-10-13 00:56:31 +00:00
chksum = strtoul ( s , & endptr , 0 ) ;
2018-09-23 19:35:24 +00:00
progsname = InfoBuf_ValueForKey ( & cl . serverinfo , " *csprogsname " ) ;
2012-10-13 00:56:31 +00:00
if ( * endptr )
2006-01-04 00:44:34 +00:00
{
2012-10-13 00:56:31 +00:00
Con_Printf ( " corrupt *csprogs key in serverinfo \n " ) ;
anycsqc = true ;
chksum = 0 ;
}
2018-09-23 19:35:24 +00:00
progsname = * s ? InfoBuf_ValueForKey ( & cl . serverinfo , " *csprogsname " ) : NULL ;
2012-10-13 00:56:31 +00:00
SCR_SetLoadingFile ( " csprogs " ) ;
2018-09-23 19:35:24 +00:00
if ( ! CSQC_Init ( anycsqc , progsname , chksum , progsize ) )
2012-10-13 00:56:31 +00:00
{
Sbar_Start ( ) ; //try and start this before we're actually on the server,
//this'll stop the mod from sending so much stuffed data at us, whilst we're frozen while trying to load.
//hopefully this'll make it more robust.
//csqc is expected to use it's own huds, or to run on decent servers. :p
2006-01-04 00:44:34 +00:00
}
2006-01-11 22:24:08 +00:00
endstage ( ) ;
2006-01-04 00:44:34 +00:00
}
2006-01-13 06:27:18 +00:00
# endif
2006-01-04 00:44:34 +00:00
2008-01-19 05:59:00 +00:00
if ( atstage ( ) )
{
2012-05-09 15:30:53 +00:00
SCR_SetLoadingFile ( " prenewmap " ) ;
2014-10-05 20:04:11 +00:00
Surf_PreNewMap ( ) ;
2008-01-19 05:59:00 +00:00
endstage ( ) ;
}
2013-06-23 02:17:02 +00:00
if ( cl . playerview [ 0 ] . playernum = = - 1 )
2004-08-23 00:15:46 +00:00
{ //q2 cinematic - don't load the models.
2014-03-30 08:55:06 +00:00
cl . worldmodel = cl . model_precache [ 1 ] = Mod_ForName ( " " , MLV_WARN ) ;
2004-08-23 00:15:46 +00:00
}
2006-01-04 00:44:34 +00:00
else
2004-08-23 00:15:46 +00:00
{
2014-09-17 03:04:08 +00:00
for ( i = 1 ; i < MAX_PRECACHE_MODELS ; i + + )
2004-08-23 00:15:46 +00:00
{
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
if ( ! cl . model_name [ i ] )
2018-10-11 10:31:23 +00:00
skipstage ( ) ;
else if ( atstage ( ) )
2006-01-04 00:44:34 +00:00
{
2014-10-05 20:04:11 +00:00
#if 0
2012-05-09 15:30:53 +00:00
SCR_SetLoadingFile ( cl . model_name [ i ] ) ;
2008-11-09 22:29:28 +00:00
# ifdef CSQC_DAT
if ( i = = 1 )
CSQC_LoadResource ( cl . model_name [ i ] , " map " ) ;
else
CSQC_LoadResource ( cl . model_name [ i ] , " model " ) ;
# endif
2014-10-05 20:04:11 +00:00
# endif
2009-04-01 22:03:56 +00:00
# ifdef Q2CLIENT
if ( cls . protocol = = CP_QUAKE2 & & * cl . model_name [ i ] = = ' # ' )
cl . model_precache [ i ] = NULL ;
else
# endif
2020-05-14 15:50:26 +00:00
if ( ! cls . timedemo & & i ! = 1 & & mod_precache . ival ! = 1 )
cl . model_precache [ i ] = Mod_FindName ( Mod_FixName ( cl . model_name [ i ] , cl . model_name [ 1 ] ) ) ;
else
2014-10-05 20:04:11 +00:00
cl . model_precache [ i ] = Mod_ForName ( Mod_FixName ( cl . model_name [ i ] , cl . model_name [ 1 ] ) , MLV_WARN ) ;
2004-08-23 00:15:46 +00:00
2006-01-04 00:44:34 +00:00
S_ExtraUpdate ( ) ;
2004-08-23 00:15:46 +00:00
2006-01-11 22:24:08 +00:00
endstage ( ) ;
2006-01-04 00:44:34 +00:00
}
2004-08-23 00:15:46 +00:00
}
2019-04-16 22:40:05 +00:00
# ifdef HAVE_LEGACY
2009-07-06 01:20:20 +00:00
for ( i = 0 ; i < MAX_VWEP_MODELS ; i + + )
{
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
if ( ! cl . model_name_vwep [ i ] )
skipstage ( ) ;
else if ( atstage ( ) )
2009-07-06 01:20:20 +00:00
{
2014-10-05 20:04:11 +00:00
#if 0
2012-05-09 15:30:53 +00:00
SCR_SetLoadingFile ( cl . model_name_vwep [ i ] ) ;
2009-07-09 22:12:29 +00:00
# ifdef CSQC_DAT
CSQC_LoadResource ( cl . model_name_vwep [ i ] , " vwep " ) ;
2014-10-05 20:04:11 +00:00
# endif
2009-07-09 22:12:29 +00:00
# endif
2014-03-30 08:55:06 +00:00
cl . model_precache_vwep [ i ] = Mod_ForName ( cl . model_name_vwep [ i ] , MLV_WARN ) ;
2009-07-06 01:20:20 +00:00
endstage ( ) ;
}
}
2018-09-01 04:18:08 +00:00
# endif
2006-01-04 00:44:34 +00:00
}
2004-08-23 00:15:46 +00:00
2008-05-25 22:23:43 +00:00
if ( atstage ( ) )
{
cl . worldmodel = cl . model_precache [ 1 ] ;
if ( ! cl . worldmodel | | cl . worldmodel - > type = = mod_dummy )
2008-11-09 22:29:28 +00:00
{
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
if ( ! cl . model_name [ 1 ] )
2008-11-09 22:29:28 +00:00
Host_EndGame ( " Worldmodel name wasn't sent \n " ) ;
2009-03-03 01:52:30 +00:00
// else
// return stage;
// Host_EndGame("Worldmodel wasn't loaded\n");
2008-11-09 22:29:28 +00:00
}
2017-06-21 01:24:25 +00:00
//the worldmodel can take a while to load, so be sure to wait.
if ( cl . worldmodel & & cl . worldmodel - > loadstate = = MLS_LOADING )
return - 1 ;
2008-05-25 22:23:43 +00:00
2021-06-01 09:23:42 +00:00
FS_LoadMapPackFile ( cl . worldmodel - > name , cl . worldmodel - > archive ) ;
2012-05-09 15:30:53 +00:00
SCR_SetLoadingFile ( " csprogs world " ) ;
2008-05-25 22:23:43 +00:00
endstage ( ) ;
}
2013-03-12 22:44:00 +00:00
for ( i = 1 ; i < MAX_CSMODELS ; i + + )
2006-01-11 22:24:08 +00:00
{
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
if ( ! cl . model_csqcname [ i ] )
2018-10-11 10:31:23 +00:00
skipstage ( ) ;
else if ( atstage ( ) )
2006-01-11 22:24:08 +00:00
{
2014-10-05 20:04:11 +00:00
#if 0
2012-05-09 15:30:53 +00:00
SCR_SetLoadingFile ( cl . model_csqcname [ i ] ) ;
2008-11-09 22:29:28 +00:00
# ifdef CSQC_DAT
if ( i = = 1 )
CSQC_LoadResource ( cl . model_csqcname [ i ] , " map " ) ;
else
CSQC_LoadResource ( cl . model_csqcname [ i ] , " model " ) ;
2014-10-05 20:04:11 +00:00
# endif
2008-11-09 22:29:28 +00:00
# endif
2014-03-30 08:55:06 +00:00
cl . model_csqcprecache [ i ] = Mod_ForName ( cl . model_csqcname [ i ] , MLV_WARN ) ;
2006-01-11 22:24:08 +00:00
S_ExtraUpdate ( ) ;
endstage ( ) ;
}
}
2006-01-04 00:44:34 +00:00
if ( atstage ( ) )
{
2012-05-09 15:30:53 +00:00
SCR_SetLoadingFile ( " wads " ) ;
2015-01-07 13:34:05 +00:00
if ( cl . worldmodel & & cl . worldmodel - > loadstate = = MLS_LOADING )
2015-01-08 13:09:20 +00:00
return - 1 ;
if ( cl . worldmodel & & cl . worldmodel - > loadstate = = MLS_LOADING )
COM_WorkerPartialSync ( cl . worldmodel , & cl . worldmodel - > loadstate , MLS_LOADING ) ;
2015-01-07 13:34:05 +00:00
Mod_ParseInfoFromEntityLump ( cl . worldmodel ) ;
2006-01-04 00:44:34 +00:00
Wad_NextDownload ( ) ;
2006-01-11 22:24:08 +00:00
endstage ( ) ;
2006-01-04 00:44:34 +00:00
}
2004-08-23 00:15:46 +00:00
2006-01-04 00:44:34 +00:00
if ( atstage ( ) )
{
2012-05-09 15:30:53 +00:00
SCR_SetLoadingFile ( " external textures " ) ;
2014-10-05 20:04:11 +00:00
if ( cl . worldmodel & & cl . worldmodel - > loadstate = = MLS_LOADING )
COM_WorkerPartialSync ( cl . worldmodel , & cl . worldmodel - > loadstate , MLS_LOADING ) ;
2023-03-15 01:31:51 +00:00
CL_CheckServerInfo ( ) ; //some serverinfo rules can change with map type, so make sure they're updated now we're sure we know it properly.
2014-10-05 20:04:11 +00:00
if ( cl . worldmodel & & cl . worldmodel - > loadstate = = MLS_LOADED )
Mod_NowLoadExternal ( cl . worldmodel ) ;
2006-01-04 00:44:34 +00:00
2023-09-11 09:31:09 +00:00
/*#ifdef Q2CLIENT
if ( cls . protocol = = CP_QUAKE2 & & cl . worldmodel & & ! cls . demoplayback & &
cl . worldmodel - > checksum ! = cl . q2mapchecksum & &
cl . worldmodel - > checksum2 ! = cl . q2mapchecksum )
Host_EndGame ( " Local map version differs from server: %i != '%i' \n " , cl . worldmodel - > checksum2 , cl . q2mapchecksum ) ;
# endif* /
2023-08-16 04:09:58 +00:00
2006-01-11 22:24:08 +00:00
endstage ( ) ;
2004-08-23 00:15:46 +00:00
}
2005-09-26 03:40:09 +00:00
2004-08-23 00:15:46 +00:00
// all done
2006-01-04 00:44:34 +00:00
if ( atstage ( ) )
2004-08-23 00:15:46 +00:00
{
2012-05-09 15:30:53 +00:00
SCR_SetLoadingFile ( " newmap " ) ;
2023-03-15 17:57:31 +00:00
2014-10-05 20:04:11 +00:00
// if (!cl.worldmodel || cl.worldmodel->type == mod_dummy)
2009-03-03 01:52:30 +00:00
// Host_EndGame("No worldmodel was loaded\n");
2022-03-08 05:31:34 +00:00
Surf_NewMap ( cl . worldmodel ) ;
2006-01-04 00:44:34 +00:00
2006-01-28 19:04:13 +00:00
pmove . physents [ 0 ] . model = cl . worldmodel ;
2006-01-11 22:24:08 +00:00
endstage ( ) ;
2004-08-23 00:15:46 +00:00
}
2006-01-04 00:44:34 +00:00
2011-09-05 01:48:23 +00:00
# ifdef CSQC_DAT
2011-09-03 03:49:43 +00:00
if ( atstage ( ) )
2021-06-29 09:22:56 +00:00
{
2012-05-09 15:30:53 +00:00
SCR_SetLoadingFile ( " csqc init " ) ;
2021-06-29 09:22:56 +00:00
CSQC_WorldLoaded ( ) ;
2011-09-03 03:49:43 +00:00
if ( CSQC_Inited ( ) )
{
------------------------------------------------------------------------
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
if ( cls . fteprotocolextensions & PEXT_CSQC )
CL_SendClientCommand ( true , " enablecsqc " ) ;
2011-09-03 03:49:43 +00:00
}
else
{
2011-12-05 15:23:40 +00:00
if ( cls . fteprotocolextensions & PEXT_CSQC )
CL_SendClientCommand ( true , " disablecsqc " ) ;
2011-09-03 03:49:43 +00:00
}
endstage ( ) ;
}
2011-09-05 01:48:23 +00:00
# endif
2011-09-03 03:49:43 +00:00
2006-01-04 00:44:34 +00:00
return stage ;
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
static int CL_LoadSounds ( int stage , qboolean dontactuallyload )
2008-11-09 22:29:28 +00:00
{
int i ;
float giveuptime = Sys_DoubleTime ( ) + 0.1 ; //small things get padded into a single frame
2009-04-06 00:34:32 +00:00
//#define atstage() ((cl.contentstage == stage++)?++cl.contentstage:false)
//#define endstage() if (giveuptime<Sys_DoubleTime()) return -1;
2008-11-09 22:29:28 +00:00
2014-09-17 03:04:08 +00:00
for ( i = 1 ; i < MAX_PRECACHE_SOUNDS ; i + + )
2008-11-09 22:29:28 +00:00
{
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
if ( ! cl . sound_name [ i ] )
2008-11-09 22:29:28 +00:00
break ;
if ( atstage ( ) )
{
2014-10-05 20:04:11 +00:00
#if 0
2012-05-09 15:30:53 +00:00
SCR_SetLoadingFile ( cl . sound_name [ i ] ) ;
2008-11-09 22:29:28 +00:00
# ifdef CSQC_DAT
CSQC_LoadResource ( cl . sound_name [ i ] , " sound " ) ;
2014-10-05 20:04:11 +00:00
# endif
2008-11-09 22:29:28 +00:00
# endif
cl . sound_precache [ i ] = S_PrecacheSound ( cl . sound_name [ i ] ) ;
S_ExtraUpdate ( ) ;
endstage ( ) ;
}
}
return stage ;
}
2014-03-30 08:55:06 +00:00
void Sound_CheckDownload ( const char * s )
2011-04-20 21:32:43 +00:00
{
2020-04-19 01:23:32 +00:00
# if defined(HAVE_LEGACY) && defined(AVAIL_OGGVORBIS)
2011-04-20 21:32:43 +00:00
char mangled [ 512 ] ;
2018-05-06 16:09:07 +00:00
# endif
2011-04-20 21:32:43 +00:00
if ( * s = = ' * ' ) //q2 sexed sound
return ;
if ( ! S_HaveOutput ( ) )
return ;
//check without the sound/ prefix
if ( CL_CheckFile ( s ) )
return ; //we have it already
2020-04-19 01:23:32 +00:00
# if defined(HAVE_LEGACY) && defined(AVAIL_OGGVORBIS)
2011-04-20 21:32:43 +00:00
//the things I do for nexuiz... *sigh*
COM_StripExtension ( s , mangled , sizeof ( mangled ) ) ;
COM_DefaultExtension ( mangled , " .ogg " , sizeof ( mangled ) ) ;
if ( CL_CheckFile ( mangled ) )
return ;
2018-05-06 16:09:07 +00:00
# endif
2011-04-20 21:32:43 +00:00
//check with the sound/ prefix
s = va ( " sound/%s " , s ) ;
if ( CL_CheckFile ( s ) )
return ; //we have it already
2020-04-19 01:23:32 +00:00
# if defined(HAVE_LEGACY) && defined(AVAIL_OGGVORBIS)
2011-04-20 21:32:43 +00:00
//the things I do for nexuiz... *sigh*
COM_StripExtension ( s , mangled , sizeof ( mangled ) ) ;
COM_DefaultExtension ( mangled , " .ogg " , sizeof ( mangled ) ) ;
if ( CL_CheckFile ( mangled ) )
return ;
2018-05-06 16:09:07 +00:00
# endif
2011-04-20 21:32:43 +00:00
//download the one the server said.
2021-10-31 18:20:45 +00:00
CL_CheckOrEnqueDownloadFile ( s , NULL , DLLF_ALLOWWEB ) ;
2011-04-20 21:32:43 +00:00
}
2004-08-23 00:15:46 +00:00
/*
= = = = = = = = = = = = = = = = =
Sound_NextDownload
= = = = = = = = = = = = = = = = =
*/
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
static void Sound_CheckDownloads ( void )
2004-08-23 00:15:46 +00:00
{
int i ;
2005-08-11 04:14:33 +00:00
2009-03-03 01:52:30 +00:00
// Con_TPrintf (TLC_CHECKINGSOUNDS);
2004-08-23 00:15:46 +00:00
2005-08-11 04:14:33 +00:00
# ifdef CSQC_DAT
2009-05-24 10:11:17 +00:00
// if (cls.fteprotocolextensions & PEXT_CSQC)
2005-08-11 04:14:33 +00:00
{
2012-10-13 00:56:31 +00:00
char * s ;
2018-07-05 16:21:44 +00:00
s = InfoBuf_ValueForKey ( & cl . serverinfo , " *csprogs " ) ;
2009-05-24 10:11:17 +00:00
if ( * s ) //only allow csqc if the server says so, and the 'checksum' matches.
2005-08-11 04:14:33 +00:00
{
2011-10-27 15:46:36 +00:00
extern cvar_t cl_download_csprogs , cl_nocsqc ;
Android: fat presses, vibrator, onscreen keyboard, keep-screen-on, console scaling, touch-based console scrolling, additional bindables.
Some memory leaks fixed.
latency with the nq protocol over loopback is much reduced.
Terrain: now mostly a property of a (q1 for now) bsp map, file format changed, glsl now built in, terrain editor builtin improved/changed, holes supported.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4067 fc73d0e0-1445-4013-8a0c-d673dee63da5
2012-07-14 16:25:18 +00:00
char * endptr ;
unsigned int chksum = strtoul ( s , & endptr , 0 ) ;
if ( cl_nocsqc . ival | | cls . demoplayback | | * endptr )
2010-07-11 02:22:39 +00:00
{
}
2011-10-27 15:46:36 +00:00
else if ( cl_download_csprogs . ival )
2006-01-04 00:44:34 +00:00
{
char * str = va ( " csprogsvers/%x.dat " , chksum ) ;
2008-11-09 22:29:28 +00:00
CL_CheckOrEnqueDownloadFile ( " csprogs.dat " , str , DLLF_REQUIRED ) ;
2006-01-04 00:44:34 +00:00
}
2005-10-01 03:09:17 +00:00
else
2006-01-04 00:44:34 +00:00
{
Con_Printf ( " Not downloading csprogs.dat \n " ) ;
}
2005-08-11 04:14:33 +00:00
}
}
# endif
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
for ( i = 1 ; i < countof ( cl . model_name ) & & cl . sound_name [ i ] ; i + + )
2004-08-23 00:15:46 +00:00
{
2011-04-20 21:32:43 +00:00
Sound_CheckDownload ( cl . sound_name [ i ] ) ;
2004-08-23 00:15:46 +00:00
}
}
/*
= = = = = = = = = = = = = = = = = = = = = =
CL_RequestNextDownload
= = = = = = = = = = = = = = = = = = = = = =
*/
void CL_RequestNextDownload ( void )
{
2010-12-23 08:53:23 +00:00
2008-11-09 22:29:28 +00:00
int stage ;
2011-10-27 15:46:36 +00:00
/*already downloading*/
2014-06-12 23:08:42 +00:00
if ( cls . download & & ! cls . demoplayback )
2006-01-04 00:44:34 +00:00
return ;
2011-10-27 15:46:36 +00:00
/*request downloads only if we're at the point where we've received a complete list of them*/
2006-01-04 00:44:34 +00:00
if ( cl . sendprespawn | | cls . state = = ca_active )
2021-10-31 18:20:45 +00:00
{
2006-01-04 00:44:34 +00:00
if ( cl . downloadlist )
{
2008-11-09 22:29:28 +00:00
downloadlist_t * dl ;
2010-08-28 17:14:38 +00:00
unsigned int fl ;
2009-04-06 00:34:32 +00:00
//download required downloads first
2008-11-09 22:29:28 +00:00
for ( dl = cl . downloadlist ; dl ; dl = dl - > next )
{
2011-10-27 15:46:36 +00:00
if ( dl - > flags & DLLF_NONGAME )
2008-11-09 22:29:28 +00:00
break ;
}
if ( ! dl )
2011-10-27 15:46:36 +00:00
{
for ( dl = cl . downloadlist ; dl ; dl = dl - > next )
{
if ( dl - > flags & DLLF_REQUIRED )
break ;
}
if ( ! dl )
dl = cl . downloadlist ;
}
2010-08-28 17:14:38 +00:00
fl = dl - > flags ;
2010-12-23 08:53:23 +00:00
2011-10-27 15:46:36 +00:00
/*if we don't require downloads don't queue requests until we're actually on the server, slightly more deterministic*/
2021-10-31 18:20:45 +00:00
if ( cls . state = = ca_active | | ( requiredownloads . value & & ! ( cls . demoplayback & & ! ( fl & DLLF_TRYWEB ) ) ) | | ( fl & DLLF_REQUIRED ) )
2006-01-04 00:44:34 +00:00
{
2011-10-27 15:46:36 +00:00
if ( ( fl & DLLF_OVERWRITE ) | | ! CL_CheckFile ( dl - > localname ) )
2010-11-02 23:17:25 +00:00
{
2012-11-29 13:37:48 +00:00
CL_SendDownloadStartRequest ( dl - > rname , dl - > localname , fl ) ;
2010-11-02 23:17:25 +00:00
return ;
}
2010-08-28 17:14:38 +00:00
else
{
2016-07-12 00:40:13 +00:00
//we already got this file somehow? must have come from a pak or something. don't spam.
Con_DPrintf ( " Already have %s \n " , dl - > localname ) ;
2010-08-28 17:14:38 +00:00
CL_DisenqueDownload ( dl - > rname ) ;
2008-11-09 22:29:28 +00:00
2010-08-28 17:14:38 +00:00
//recurse a bit.
CL_RequestNextDownload ( ) ;
return ;
}
2006-01-04 00:44:34 +00:00
}
}
2021-10-31 18:20:45 +00:00
else if ( cls . download & & requiredownloads . value )
return ;
}
2006-01-04 00:44:34 +00:00
if ( cl . sendprespawn )
{ // get next signon phase
2009-04-06 00:34:32 +00:00
extern int total_loading_size , current_loading_size ;
if ( ! cl . contentstage )
{
2018-09-01 04:18:08 +00:00
int pure ;
2009-04-06 00:34:32 +00:00
stage = 0 ;
stage = CL_LoadModels ( stage , true ) ;
stage = CL_LoadSounds ( stage , true ) ;
total_loading_size = stage ;
cl . contentstage = 0 ;
2018-04-15 02:48:23 +00:00
//might be safer to do it later, but kinder to do it before wasting time.
2018-09-01 04:18:08 +00:00
pure = FS_PureOkay ( ) ;
if ( pure < 0 | | ( pure = = 0 & & ( cls . download | | cl . downloadlist ) ) )
return ; //we're downloading something and may still be able to satisfy it.
if ( pure = = 0 & & ! cls . demoplayback )
{ //failure!
Con_Printf ( CON_ERROR " You are missing pure packages, and they could not be autodownloaded. \n You may need to purchase an update. \n " ) ;
2018-04-15 02:48:23 +00:00
# ifdef HAVE_MEDIA_ENCODER
if ( cls . demoplayback & & Media_Capturing ( ) )
{
Con_Printf ( CON_ERROR " Aborting capture \n " ) ;
CL_StopPlayback ( ) ;
}
# endif
SCR_SetLoadingStage ( LS_NONE ) ;
2018-12-06 04:55:35 +00:00
CL_Disconnect ( " Game Content differs from server " ) ;
2018-04-15 02:48:23 +00:00
return ;
}
2009-04-06 00:34:32 +00:00
}
2008-11-09 22:29:28 +00:00
stage = 0 ;
2009-04-06 00:34:32 +00:00
stage = CL_LoadModels ( stage , false ) ;
current_loading_size = cl . contentstage ;
2008-11-09 22:29:28 +00:00
if ( stage < 0 )
2006-01-04 00:44:34 +00:00
return ; //not yet
2009-04-06 00:34:32 +00:00
stage = CL_LoadSounds ( stage , false ) ;
current_loading_size = cl . contentstage ;
2008-11-09 22:29:28 +00:00
if ( stage < 0 )
return ;
2018-07-05 16:21:44 +00:00
//if (cls.userinfosync.numkeys)
// return; //don't prespawn until we've actually sent all our initial userinfo.
2014-10-05 20:04:11 +00:00
if ( requiredownloads . ival & & COM_HasWork ( ) )
{
SCR_SetLoadingFile ( " loading content " ) ;
return ;
}
2014-08-27 08:41:31 +00:00
SCR_SetLoadingFile ( " receiving game state " ) ;
2014-10-05 20:04:11 +00:00
2006-01-04 00:44:34 +00:00
cl . sendprespawn = false ;
2014-10-05 20:04:11 +00:00
2023-09-11 09:31:09 +00:00
if ( cl_splitscreen . ival )
{
if ( cls . fteprotocolextensions & PEXT_SPLITSCREEN )
;
else if ( cls . protocol = = CP_QUAKE2 & & cls . protocol_q2 = = PROTOCOL_VERSION_Q2EX )
;
else
Con_TPrintf ( CON_WARNING " Splitscreen requested but not available on this server. \n " ) ;
}
2021-06-25 18:50:42 +00:00
2014-10-05 20:04:11 +00:00
if ( cl . worldmodel & & cl . worldmodel - > loadstate = = MLS_LOADING )
COM_WorkerPartialSync ( cl . worldmodel , & cl . worldmodel - > loadstate , MLS_LOADING ) ;
if ( ! cl . worldmodel | | cl . worldmodel - > loadstate ! = MLS_LOADED )
2009-04-06 00:34:32 +00:00
{
2019-07-29 05:28:20 +00:00
downloadlist_t * dl = NULL ;
const char * worldname = cl . worldmodel ? cl . worldmodel - > name : " unknown " ;
if ( cl . worldmodel )
for ( dl = cl . faileddownloads ; dl ; dl = dl - > next ) //yeah, so it failed... Ignore it.
if ( ! strcmp ( dl - > rname , cl . worldmodel - > name ) )
break ;
Con_Printf ( " \n \n ------------- \n " ) ;
switch ( dl ? dl - > failreason : DLFAIL_UNTRIED )
{
case DLFAIL_UNSUPPORTED :
Con_Printf ( CON_ERROR " Download of \" %s \" not supported on this server - cannot fully connect \n " , worldname ) ;
break ;
case DLFAIL_CORRUPTED :
Con_Printf ( CON_ERROR " Download of \" %s \" corrupt/failed - cannot fully connect \n " , worldname ) ;
break ;
case DLFAIL_CLIENTCVAR :
Con_Printf ( CON_ERROR " Downloading of \" %s \" blocked by clientside cvars - tweak cl_download* before retrying \n " , worldname ) ;
break ;
case DLFAIL_CLIENTFILE :
Con_Printf ( CON_ERROR " Disk error downloading \" %s \" - cannot fully connect \n " , worldname ) ;
break ;
case DLFAIL_SERVERCVAR :
Con_Printf ( CON_ERROR " Download of \" %s \" denied by server - cannot fully connect \n " , worldname ) ;
break ;
case DLFAIL_SERVERFILE :
Con_Printf ( CON_ERROR " Download of \" %s \" unavailable - cannot fully connect \n " , worldname ) ;
break ;
case DLFAIL_REDIRECTED :
Con_Printf ( CON_ERROR " Redirection failure downloading \" %s \" - cannot fully connect \n " , worldname ) ;
break ;
case DLFAIL_UNTRIED :
if ( COM_FCheckExists ( worldname ) )
2019-09-10 15:40:04 +00:00
{
if ( ! cl . worldmodel )
Con_Printf ( CON_ERROR " Couldn't load \" %s \" - worldmodel not set - cannot fully connect \n " , worldname ) ;
else if ( cl . worldmodel - > loadstate = = MLS_FAILED )
Con_Printf ( CON_ERROR " Couldn't load \" %s \" - corrupt? - cannot fully connect \n " , worldname ) ;
else if ( cl . worldmodel - > loadstate = = MLS_LOADING )
Con_Printf ( CON_ERROR " Couldn't load \" %s \" - still loading - cannot fully connect \n " , worldname ) ;
else if ( cl . worldmodel - > loadstate = = MLS_NOTLOADED )
Con_Printf ( CON_ERROR " Couldn't load \" %s \" - worldmodel not loaded - cannot fully connect \n " , worldname ) ;
else
Con_Printf ( CON_ERROR " Couldn't load \" %s \" - corrupt? - cannot fully connect \n " , worldname ) ;
}
2019-07-29 05:28:20 +00:00
else
Con_Printf ( CON_ERROR " Couldn't find \" %s \" - cannot fully connect \n " , worldname ) ;
break ;
}
2017-02-21 20:22:07 +00:00
# ifdef HAVE_MEDIA_ENCODER
2016-01-18 05:22:07 +00:00
if ( cls . demoplayback & & Media_Capturing ( ) )
{
Con_Printf ( CON_ERROR " Aborting capture \n " ) ;
CL_StopPlayback ( ) ;
}
# endif
//else should probably force the demo speed really fast or something
2009-04-06 00:34:32 +00:00
SCR_SetLoadingStage ( LS_NONE ) ;
return ;
}
2006-01-04 00:44:34 +00:00
2016-10-22 07:06:51 +00:00
Cvar_ForceCallback ( Cvar_FindVar ( " r_particlesdesc " ) ) ;
2006-01-04 00:44:34 +00:00
# ifdef Q2CLIENT
if ( cls . protocol = = CP_QUAKE2 )
{
2016-10-22 07:06:51 +00:00
if ( cls . protocol_q2 = = PROTOCOL_VERSION_R1Q2 )
{ //fixme: make dynamic...
// MSG_WriteByte (&cls.netchan.message, clcr1q2_setting);
// MSG_WriteShort (&cls.netchan.message, R1Q2_CLSET_NOGUN);
// MSG_WriteShort (&cls.netchan.message, r_drawviewmodel.value <= 0);
// MSG_WriteByte (&cls.netchan.message, clcr1q2_setting);
// MSG_WriteShort (&cls.netchan.message, R1Q2_CLSET_PLAYERUPDATES);
// MSG_WriteShort (&cls.netchan.message, 1);
// MSG_WriteByte (&cls.netchan.message, clcr1q2_setting);
// MSG_WriteShort (&cls.netchan.message, R1Q2_CLSET_FPS);
// MSG_WriteShort (&cls.netchan.message, 30);
}
2006-01-04 00:44:34 +00:00
Skin_NextDownload ( ) ;
2009-04-06 00:34:32 +00:00
SCR_SetLoadingStage ( LS_NONE ) ;
2006-01-06 23:58:32 +00:00
CL_SendClientCommand ( true , " begin %i \n " , cl . servercount ) ;
2006-01-04 00:44:34 +00:00
}
2005-01-16 02:25:35 +00:00
else
2006-01-04 00:44:34 +00:00
# endif
2005-01-16 02:25:35 +00:00
{
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
if ( cls . demoplayback = = DPB_MVD & & cls . demoeztv_ext )
2008-01-09 00:52:31 +00:00
{
if ( CL_RemoveClientCommands ( " qtvspawn " ) )
------------------------------------------------------------------------
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
Con_DPrintf ( " Multiple prespawns \n " ) ;
2017-06-21 01:24:25 +00:00
CL_SendClientCommand ( true , " qtvspawn %i 0 %i " , cl . servercount , COM_RemapMapChecksum ( cl . worldmodel , LittleLong ( cl . worldmodel - > checksum2 ) ) ) ;
2009-04-06 00:34:32 +00:00
SCR_SetLoadingStage ( LS_NONE ) ;
2008-01-09 00:52:31 +00:00
}
else
{
2006-01-04 00:44:34 +00:00
// done with modellist, request first of static signon messages
2008-01-09 00:52:31 +00:00
if ( CL_RemoveClientCommands ( " prespawn " ) )
------------------------------------------------------------------------
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
Con_DPrintf ( " Multiple prespawns \n " ) ;
if ( cls . protocol = = CP_NETQUAKE )
CL_SendClientCommand ( true , " prespawn " ) ;
else
{
// CL_SendClientCommand("prespawn %i 0 %i", cl.servercount, cl.worldmodel->checksum2);
2017-06-21 01:24:25 +00:00
CL_SendClientCommand ( true , prespawn_name , cl . servercount , COM_RemapMapChecksum ( cl . worldmodel , LittleLong ( cl . worldmodel - > checksum2 ) ) ) ;
------------------------------------------------------------------------
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
}
2008-01-09 00:52:31 +00:00
}
2005-01-16 02:25:35 +00:00
}
2006-01-04 00:44:34 +00:00
2020-05-14 15:50:26 +00:00
if ( mod_precache . ival > = 2 )
{
int i ;
for ( i = 1 ; i < MAX_PRECACHE_MODELS ; i + + )
{
if ( cl . model_precache [ i ] & & cl . model_precache [ i ] - > loadstate = = MLS_NOTLOADED )
Mod_LoadModel ( cl . model_precache [ i ] , MLV_WARN ) ;
}
}
2020-06-12 23:29:58 +00:00
if ( snd_precache . ival > = 2 )
{
int i ;
for ( i = 1 ; i < MAX_PRECACHE_SOUNDS ; i + + )
{
if ( cl . sound_precache [ i ] & & cl . sound_precache [ i ] - > loadstate = = SLS_NOTLOADED )
S_LoadSound ( cl . sound_precache [ i ] , false ) ;
}
}
2004-08-23 00:15:46 +00:00
}
}
2005-01-16 02:25:35 +00:00
int CL_RequestADownloadChunk ( void ) ;
void CL_SendDownloadReq ( sizebuf_t * msg )
2005-01-13 23:33:00 +00:00
{
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
if ( cls . demoplayback = = DPB_MVD )
2008-01-30 02:32:00 +00:00
return ; //tcp connection, so no need to constantly ask
2014-06-12 23:08:42 +00:00
if ( ! cls . download )
2005-01-13 23:33:00 +00:00
{
2014-06-12 23:08:42 +00:00
if ( cl . downloadlist )
CL_RequestNextDownload ( ) ;
2005-01-13 23:33:00 +00:00
return ;
}
# ifdef PEXT_CHUNKEDDOWNLOADS
2014-06-12 23:08:42 +00:00
if ( cls . download - > method = = DL_QWCHUNKS )
DLC_Poll ( cls . download ) ;
2005-01-13 23:33:00 +00:00
# endif
}
2004-08-23 00:15:46 +00:00
# ifdef PEXT_ZLIBDL
# include <zlib.h>
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
static char * ZLibDownloadDecode ( int * messagesize , char * input , int finalsize )
2004-08-23 00:15:46 +00:00
{
char * outbuf = Hunk_TempAlloc ( finalsize ) ;
z_stream zs ;
* messagesize = ( * ( short * ) input ) ;
input + = 2 ;
if ( ! * messagesize )
{
* messagesize = finalsize + 2 ;
return input ;
}
memset ( & zs , 0 , sizeof ( zs ) ) ;
zs . next_in = input ;
zs . avail_in = * messagesize ; //tell it that it has a lot. Possibly a bad idea.
zs . total_in = 0 ;
zs . next_out = outbuf ;
zs . avail_out = finalsize ; //this is the limiter.
zs . total_out = 0 ;
zs . data_type = Z_BINARY ;
inflateInit ( & zs ) ;
inflate ( & zs , Z_FINISH ) ; //decompress it in one go.
inflateEnd ( & zs ) ;
* messagesize = zs . total_in + 2 ;
return outbuf ;
}
# endif
2019-07-29 05:28:20 +00:00
downloadlist_t * CL_DownloadFailed ( const char * name , qdownload_t * qdl , enum dlfailreason_e failreason )
2005-01-16 02:25:35 +00:00
{
//add this to our failed list. (so we don't try downloading it again...)
2008-11-09 22:29:28 +00:00
downloadlist_t * failed , * * link , * dl ;
2005-01-16 02:25:35 +00:00
failed = Z_Malloc ( sizeof ( downloadlist_t ) ) ;
failed - > next = cl . faileddownloads ;
cl . faileddownloads = failed ;
2009-05-24 10:11:17 +00:00
Q_strncpyz ( failed - > rname , name , sizeof ( failed - > rname ) ) ;
2019-07-29 05:28:20 +00:00
failed - > failreason = failreason ;
2005-01-16 02:25:35 +00:00
2008-11-09 22:29:28 +00:00
//if this is what we're currently downloading, close it up now.
2012-11-29 13:37:48 +00:00
//don't do this if we're just marking the file as unavailable for download.
2014-06-12 23:08:42 +00:00
if ( qdl & & ( ! stricmp ( qdl - > remotename , name ) | | ! * name ) )
2008-11-09 22:29:28 +00:00
{
2014-06-12 23:08:42 +00:00
DL_Abort ( qdl , QDL_FAILED ) ;
2008-11-09 22:29:28 +00:00
}
link = & cl . downloadlist ;
while ( * link )
{
dl = * link ;
2009-05-24 10:11:17 +00:00
if ( ! strcmp ( dl - > rname , name ) )
2008-11-09 22:29:28 +00:00
{
* link = dl - > next ;
failed - > flags | = dl - > flags ;
Z_Free ( dl ) ;
}
else
link = & ( * link ) - > next ;
}
return failed ;
2005-01-16 02:25:35 +00:00
}
2005-01-13 16:29:20 +00:00
# ifdef PEXT_CHUNKEDDOWNLOADS
2008-11-09 22:29:28 +00:00
int CL_DownloadRate ( void )
{
2014-06-12 23:08:42 +00:00
qdownload_t * dl = cls . download ;
if ( dl )
{
double curtime = Sys_DoubleTime ( ) ;
if ( ! dl - > ratetime )
{
dl - > ratetime = curtime ;
return dl - > completedbytes / ( Sys_DoubleTime ( ) - dl - > starttime ) ;
}
if ( curtime - dl - > ratetime > 1 )
{
dl - > rate = dl - > ratebytes / ( curtime - dl - > ratetime ) ;
dl - > ratetime = curtime ;
dl - > ratebytes = 0 ;
}
return dl - > rate ;
}
return 0 ;
}
//called when the server acks the download. opens the local file and stuff. returns false on failure
qboolean DL_Begun ( qdownload_t * dl )
{
//figure out where the file is meant to be going.
dl - > prefixbytes = 0 ;
if ( ! strncmp ( dl - > tempname , " package/ " , 8 ) )
{
dl - > prefixbytes = 8 ; //ignore the package/ part
dl - > fsroot = FS_ROOT ; //and put it in the root dir (-basedir), and hope the name includes a gamedir part
}
else if ( ! strncmp ( dl - > tempname , " skins/ " , 6 ) )
dl - > fsroot = FS_PUBBASEGAMEONLY ; //shared between gamedirs, so only use the basegame.
else
2015-06-12 14:44:50 +00:00
dl - > fsroot = FS_PUBGAMEONLY ; //FS_GAMEONLY; //other files are relative to the active gamedir.
2014-06-12 23:08:42 +00:00
Q_snprintfz ( dl - > dclname , sizeof ( dl - > dclname ) , " %s.dcl " , dl - > tempname ) ;
if ( dl - > method = = DL_QWCHUNKS )
{
qboolean error = false ;
char partline [ 256 ] ;
char partterm [ 128 ] ;
char * p , t ;
qofs_t lastend = 0 ;
qofs_t start , end ;
struct dlblock_s * * link = & dl - > dlblocks ;
vfsfile_t * parts = FS_OpenVFS ( dl - > dclname + dl - > prefixbytes , " rb " , dl - > fsroot ) ;
if ( ! parts )
error = true ;
while ( ! error & & VFS_GETS ( parts , partline , sizeof ( partline ) ) )
{
p = COM_ParseOut ( partline , partterm , sizeof ( partterm ) ) ;
t = * partterm ;
p = COM_ParseOut ( p , partterm , sizeof ( partterm ) ) ;
start = strtoull ( partterm , NULL , 0 ) ;
p = COM_ParseOut ( p , partterm , sizeof ( partterm ) ) ;
end = strtoull ( partterm , NULL , 0 ) ;
( * link ) = Z_Malloc ( sizeof ( * * link ) ) ;
( * link ) - > start = start ;
( * link ) - > end = end ;
( * link ) - > state = ( t = = ' c ' ) ? DLB_RECEIVED : DLB_MISSING ;
link = & ( * link ) - > next ;
if ( t = = ' c ' )
dl - > completedbytes + = end - start ;
if ( start ! = lastend )
error = true ;
lastend = end ;
}
if ( lastend ! = dl - > size )
error = true ;
if ( parts )
VFS_CLOSE ( parts ) ;
if ( ! error )
dl - > file = FS_OpenVFS ( dl - > tempname + dl - > prefixbytes , " w+b " , dl - > fsroot ) ;
}
if ( ! dl - > file )
{
struct dlblock_s * b ;
//make sure we don't get confused if someone end-tasks us before the download is complete.
FS_Remove ( dl - > dclname + dl - > prefixbytes , dl - > fsroot ) ;
dl - > completedbytes = 0 ;
while ( dl - > dlblocks )
{
b = dl - > dlblocks ;
dl - > dlblocks = b - > next ;
Z_Free ( b ) ;
}
FS_CreatePath ( dl - > tempname + dl - > prefixbytes , dl - > fsroot ) ;
dl - > file = FS_OpenVFS ( dl - > tempname + dl - > prefixbytes , " wb " , dl - > fsroot ) ;
}
if ( ! dl - > file )
{
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
char displaypath [ MAX_OSPATH ] ;
FS_DisplayPath ( dl - > tempname + dl - > prefixbytes , dl - > fsroot , displaypath , sizeof ( displaypath ) ) ;
Con_TPrintf ( " Unable to open \" %s \" \n " , displaypath ) ;
2014-06-12 23:08:42 +00:00
return false ;
}
if ( dl - > method = = DL_QWPENDING )
Con_TPrintf ( " method is still 'pending' \n " ) ;
if ( dl - > method = = DL_QWCHUNKS & & ! dl - > dlblocks )
{
dl - > dlblocks = Z_Malloc ( sizeof ( * dl - > dlblocks ) ) ;
dl - > dlblocks - > start = 0 ;
dl - > dlblocks - > end = dl - > size ;
dl - > dlblocks - > state = DLB_MISSING ;
}
dl - > flags | = DLLF_BEGUN ;
dl - > starttime = Sys_DoubleTime ( ) ;
return true ;
}
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
static void DL_Completed ( qdownload_t * dl , qofs_t start , qofs_t end )
2014-06-12 23:08:42 +00:00
{
struct dlblock_s * prev = NULL , * b , * n , * e ;
if ( end < = start )
return ; //ignore invalid ranges.
for ( b = dl - > dlblocks ; b ; )
{
if ( b - > state = = DLB_RECEIVED )
{
//nothing to be done. dupe. somehow. or simply a different range.
}
else if ( b - > start > = start & & b - > end < = end )
{
//whole block
// Con_Printf("Whole block\n");
b - > state = DLB_RECEIVED ;
dl - > completedbytes + = b - > end - b - > start ;
dl - > ratebytes + = b - > end - b - > start ;
}
else if ( start > b - > start & & end < b - > end )
{
// Con_Printf("chop out middle\n");
//in the middle, no need to merge
n = Z_Malloc ( sizeof ( * n ) ) ;
e = Z_Malloc ( sizeof ( * e ) ) ;
e - > next = b - > next ;
n - > next = e ;
b - > next = n ;
e - > state = b - > state ;
e - > sequence = b - > sequence ;
n - > state = DLB_RECEIVED ;
e - > end = b - > end ;
b - > end = start ;
n - > start = start ;
n - > end = end ;
e - > start = end ;
dl - > completedbytes + = n - > end - n - > start ;
dl - > ratebytes + = n - > end - n - > start ;
}
//data overlaps the start (data end must be smaller than block end)
else if ( start < = b - > start & & end > b - > start )
{
// Con_Printf("complete start\n");
//split it. new(non-complete) block is second.
n = Z_Malloc ( sizeof ( * n ) ) ;
n - > next = b - > next ;
b - > next = n ;
//second block keeps original block's state. first block gets completed
n - > state = b - > state ;
n - > sequence = b - > sequence ;
b - > state = DLB_RECEIVED ;
n - > start = end ;
n - > end = b - > end ;
b - > end = end ;
dl - > completedbytes + = b - > end - b - > start ;
dl - > ratebytes + = b - > end - b - > start ;
}
//new data overlaps the end
else if ( start > b - > start & & start < b - > end )
{
// Con_Printf("complete end\n");
//split it. new(completed) block is second.
n = Z_Malloc ( sizeof ( * n ) ) ;
n - > next = b - > next ;
b - > next = n ;
//second block keeps original block's state. first block gets completed
n - > state = DLB_RECEIVED ;
n - > sequence = 0 ;
n - > start = end ;
n - > end = b - > end ;
b - > end = end ;
dl - > completedbytes + = n - > end - n - > start ;
dl - > ratebytes + = n - > end - n - > start ;
prev = b ;
b = n ;
}
else
{ //don't bother merging, as nothing changed
prev = b ;
b = b - > next ;
continue ;
}
//merge with next block
if ( b - > next & & b - > next - > state = = DLB_RECEIVED )
{
n = b - > next ;
b - > next = n - > next ;
b - > end = n - > end ;
Z_Free ( n ) ;
}
//merge with previous block if possible
if ( prev & & prev - > state = = DLB_RECEIVED )
{
n = b ;
prev - > end = b - > end ;
prev - > next = b - > next ;
Z_Free ( b ) ;
b = prev - > next ;
continue ; //careful here
}
prev = b ;
b = b - > next ;
}
2008-11-09 22:29:28 +00:00
}
2014-06-12 23:08:42 +00:00
static float chunkrate ;
2023-04-14 01:50:19 +00:00
static int CL_CountQueuedDownloads ( 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
static void CL_ParseChunkedDownload ( qdownload_t * dl )
2005-01-13 16:29:20 +00:00
{
2005-01-17 17:40:21 +00:00
qbyte * svname ;
2014-06-12 23:08:42 +00:00
int flag ;
qofs_t filesize ;
qofs_t chunknum ;
2005-01-16 02:25:35 +00:00
char data [ DLBLOCKSIZE ] ;
2005-01-13 16:29:20 +00:00
chunknum = MSG_ReadLong ( ) ;
2013-03-31 04:21:08 +00:00
if ( chunknum = = - 1 )
2005-01-13 16:29:20 +00:00
{
2014-06-12 23:08:42 +00:00
flag = MSG_ReadLong ( ) ;
if ( flag = = 0x80000000 )
{ //really big files need special handling here.
flag = MSG_ReadLong ( ) ;
filesize = qofs_Make ( flag , MSG_ReadLong ( ) ) ;
flag = 0 ;
}
else
filesize = flag ;
2005-01-17 17:40:21 +00:00
svname = MSG_ReadString ( ) ;
2005-01-13 16:29:20 +00:00
if ( cls . demoplayback )
2023-04-14 01:50:19 +00:00
{ //downloading in demos is allowed ONLY for csprogs.dat
extern cvar_t cl_downloads , cl_download_csprogs ;
if ( ! cls . download & & ! dl & &
! strcmp ( svname , " csprogs.dat " ) & & filesize & & filesize = = strtoul ( InfoBuf_ValueForKey ( & cl . serverinfo , " *csprogssize " ) , NULL , 0 ) & &
cl_downloads . ival & & cl_download_csprogs . ival )
{
//FIXME: should probably save this to memory instead of bloating it on disk.
dl = Z_Malloc ( sizeof ( * dl ) ) ;
Q_strncpyz ( dl - > remotename , svname , sizeof ( dl - > remotename ) ) ;
Q_strncpyz ( dl - > localname , va ( " csprogsvers/%x.dat " , ( unsigned int ) strtoul ( InfoBuf_ValueForKey ( & cl . serverinfo , " *csprogs " ) , NULL , 0 ) ) , sizeof ( dl - > localname ) ) ;
// download to a temp name, and only rename
// to the real name when done, so if interrupted
// a runt file wont be left
COM_StripExtension ( dl - > localname , dl - > tempname , sizeof ( dl - > tempname ) - 5 ) ;
Q_strncatz ( dl - > tempname , " .tmp " , sizeof ( dl - > tempname ) ) ;
dl - > method = DL_QWPENDING ;
dl - > percent = 0 ;
dl - > sizeunknown = true ;
dl - > flags = DLLF_OVERWRITE ;
if ( COM_FCheckExists ( dl - > localname ) )
{
Con_DPrintf ( " Demo embeds redundant %s \n " , dl - > localname ) ;
Z_Free ( dl ) ;
return ;
}
cls . download = dl ;
Con_Printf ( " Saving recorded file %s (%lu bytes) \n " , dl - > localname , ( unsigned long ) filesize ) ;
}
else
return ;
}
2005-01-13 16:29:20 +00:00
2008-11-09 22:29:28 +00:00
if ( ! * svname )
{
//stupid mvdsv.
/*if (totalsize < 0)
svname = cls . downloadname ;
else */
{
Con_Printf ( " ignoring nameless download \n " ) ;
return ;
}
}
2014-06-12 23:08:42 +00:00
if ( flag < 0 )
2005-01-13 16:29:20 +00:00
{
2019-07-29 05:28:20 +00:00
enum dlfailreason_e failreason ;
2016-02-10 23:23:43 +00:00
if ( flag = = DLERR_REDIRECTFILE )
2013-03-31 04:21:08 +00:00
{
2019-07-29 06:04:43 +00:00
failreason = DLFAIL_REDIRECTED ;
2017-04-18 11:12:17 +00:00
if ( CL_AllowArbitaryDownload ( dl - > remotename , svname ) )
2013-03-31 04:21:08 +00:00
{
2014-06-12 23:08:42 +00:00
Con_Printf ( " Download of \" %s \" redirected to \" %s \" \n " , dl - > remotename , svname ) ;
2016-07-12 00:40:13 +00:00
if ( ! strncmp ( svname , " package/ " , 8 ) )
{
int i , c ;
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
char * pn ;
2021-05-27 11:36:01 +00:00
Cmd_TokenizeString ( cl . serverpacknames , false , false ) ;
2016-07-12 00:40:13 +00:00
c = Cmd_Argc ( ) ;
for ( i = 0 ; i < c ; i + + )
{
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
pn = Cmd_Argv ( i ) ;
if ( * pn = = ' * ' )
pn + + ; //'required'... so shouldn't really be missing.
if ( ! strcmp ( pn , svname + 8 ) )
2016-07-12 00:40:13 +00:00
break ;
}
if ( i = = c )
Con_Printf ( " However, package \" %s \" is unknown. \n " , svname + 8 ) ;
else
{
char localname [ MAX_OSPATH ] ;
2021-05-27 11:36:01 +00:00
char * hash ;
Cmd_TokenizeString ( cl . serverpackhashes , false , false ) ;
hash = Cmd_Argv ( i ) ;
if ( FS_GenCachedPakName ( svname + 8 , hash , localname , sizeof ( localname ) ) )
2016-07-12 00:40:13 +00:00
{
if ( CL_CheckOrEnqueDownloadFile ( svname + 8 , localname , DLLF_NONGAME ) )
if ( ! CL_CheckDLFile ( dl - > localname ) )
Con_Printf ( " However, \" %s \" already exists. You may need to delete it. \n " , svname ) ;
}
else
Con_Printf ( " However, package \" %s \" is invalid. \n " , svname + 8 ) ;
}
}
else if ( CL_CheckOrEnqueDownloadFile ( svname , NULL , 0 ) )
2019-07-29 05:28:20 +00:00
{
2013-03-31 04:21:08 +00:00
Con_Printf ( " However, \" %s \" already exists. You may need to delete it. \n " , svname ) ;
2019-07-29 05:28:20 +00:00
failreason = DLFAIL_CLIENTFILE ;
}
2013-03-31 04:21:08 +00:00
}
2014-06-12 23:08:42 +00:00
svname = dl - > remotename ;
2013-03-31 04:21:08 +00:00
}
2016-02-10 23:23:43 +00:00
else if ( flag = = DLERR_UNKNOWN )
2019-07-29 05:28:20 +00:00
{
2008-11-09 22:29:28 +00:00
Con_Printf ( " Server reported an error when downloading file \" %s \" \n " , svname ) ;
2019-07-29 05:28:20 +00:00
failreason = DLFAIL_CORRUPTED ;
}
2016-02-10 23:23:43 +00:00
else if ( flag = = DLERR_PERMISSIONS )
2019-07-29 05:28:20 +00:00
{
2008-11-09 22:29:28 +00:00
Con_Printf ( " Server permissions deny downloading file \" %s \" \n " , svname ) ;
2019-07-29 05:28:20 +00:00
failreason = DLFAIL_SERVERCVAR ;
}
2016-02-10 23:23:43 +00:00
else //if (flag == DLERR_FILENOTFOUND)
2019-07-29 05:28:20 +00:00
{
2008-11-09 22:29:28 +00:00
Con_Printf ( " Couldn't find file \" %s \" on the server \n " , svname ) ;
2019-07-29 05:28:20 +00:00
failreason = DLFAIL_SERVERFILE ;
}
2005-01-13 16:29:20 +00:00
2014-06-12 23:08:42 +00:00
if ( dl )
{
2019-07-29 05:28:20 +00:00
CL_DownloadFailed ( svname , dl , failreason ) ;
2005-01-13 16:29:20 +00:00
2014-06-12 23:08:42 +00:00
CL_RequestNextDownload ( ) ;
}
2005-01-13 16:29:20 +00:00
return ;
}
2014-06-12 23:08:42 +00:00
if ( ! dl )
{
Con_Printf ( " ignoring download start. we're not meant to be downloading \n " ) ;
return ;
}
if ( dl - > method = = DL_QWCHUNKS )
2005-01-17 17:40:21 +00:00
Host_EndGame ( " Received second download - \" %s \" \n " , svname ) ;
2005-01-13 16:29:20 +00:00
2014-06-12 23:08:42 +00:00
if ( stricmp ( dl - > remotename , svname ) )
2013-03-31 04:21:08 +00:00
{
//fixme: we should allow extension changes, in the case of ogg/mp3/wav, or tga/png/jpg/pcx, or the addition of .gz or whatever
2014-06-12 23:08:42 +00:00
Host_EndGame ( " Server sent the wrong download - \" %s \" instead of \" %s \" \n " , svname , dl - > remotename ) ;
2013-03-31 04:21:08 +00:00
}
2006-01-04 00:44:34 +00:00
2005-12-13 02:31:57 +00:00
2005-01-13 16:29:20 +00:00
//start the new download
2014-06-12 23:08:42 +00:00
dl - > method = DL_QWCHUNKS ;
dl - > percent = 0 ;
dl - > size = filesize ;
2023-04-14 01:50:19 +00:00
dl - > sizeunknown = false ;
2005-01-16 02:25:35 +00:00
2014-06-12 23:08:42 +00:00
dl - > starttime = Sys_DoubleTime ( ) ;
2005-01-13 16:29:20 +00:00
2006-01-10 18:48:03 +00:00
/*
2005-01-17 17:40:21 +00:00
strcpy ( cls . downloadname , svname ) ;
COM_StripExtension ( svname , cls . downloadtempname ) ;
2005-01-13 16:29:20 +00:00
COM_DefaultExtension ( cls . downloadtempname , " .tmp " ) ;
2006-01-10 18:48:03 +00:00
*/
2005-01-13 16:29:20 +00:00
2014-06-12 23:08:42 +00:00
if ( ! DL_Begun ( dl ) )
2005-12-13 02:31:57 +00:00
{
2019-07-29 05:28:20 +00:00
CL_DownloadFailed ( svname , dl , DLFAIL_CLIENTFILE ) ;
2005-12-13 02:31:57 +00:00
return ;
}
2005-01-13 16:29:20 +00:00
return ;
}
2005-01-17 17:40:21 +00:00
// Con_Printf("Received dl block %i: ", chunknum);
2005-01-16 02:25:35 +00:00
MSG_ReadData ( data , DLBLOCKSIZE ) ;
2014-06-12 23:08:42 +00:00
if ( ! dl )
{
2023-04-14 01:50:19 +00:00
if ( ! cls . demoplayback ) //mute it in demos.
Con_Printf ( " ignoring download data packet \n " ) ;
2013-03-31 04:21:08 +00:00
return ;
2014-06-12 23:08:42 +00:00
}
2013-03-31 04:21:08 +00:00
2014-06-12 23:08:42 +00:00
if ( chunknum * DLBLOCKSIZE > dl - > size + DLBLOCKSIZE )
return ;
if ( ! dl - > file )
2006-01-13 20:30:01 +00:00
return ;
2014-06-12 23:08:42 +00:00
VFS_SEEK ( dl - > file , chunknum * DLBLOCKSIZE ) ;
if ( dl - > size - chunknum * DLBLOCKSIZE < DLBLOCKSIZE ) //final block is actually meant to be smaller than we recieve.
VFS_WRITE ( dl - > file , data , dl - > size - chunknum * DLBLOCKSIZE ) ;
else
VFS_WRITE ( dl - > file , data , DLBLOCKSIZE ) ;
2005-09-26 03:40:09 +00:00
2014-06-12 23:08:42 +00:00
DL_Completed ( dl , chunknum * DLBLOCKSIZE , ( chunknum + 1 ) * DLBLOCKSIZE ) ;
2005-01-16 02:25:35 +00:00
2014-06-12 23:08:42 +00:00
dl - > percent = dl - > completedbytes / ( float ) dl - > size * 100 ;
2005-01-16 02:25:35 +00:00
2014-06-12 23:08:42 +00:00
chunkrate + = 1 ;
2023-04-14 01:50:19 +00:00
if ( dl - > completedbytes = = dl - > size )
CL_DownloadFinished ( dl ) ;
2005-01-13 23:33:00 +00:00
}
2017-04-18 11:12:17 +00:00
static int CL_CountQueuedDownloads ( void )
2006-01-04 00:44:34 +00:00
{
int count = 0 ;
downloadlist_t * dl ;
for ( dl = cl . downloadlist ; dl ; dl = dl - > next )
count + + ;
return count ;
}
2014-06-12 23:08:42 +00:00
static void DLC_RequestDownloadChunks ( qdownload_t * dl , float frametime )
2005-01-13 23:33:00 +00:00
{
2014-06-12 23:08:42 +00:00
char * cmd ;
qofs_t chunk ;
struct dlblock_s * b , * n ;
qboolean stillpending = false ;
qboolean haveloss = false ;
int chunks , chunksremaining ;
static float slop ; //try to keep things as integers
// int cmds = 20;
if ( frametime < 0 )
frametime = 0 ;
if ( frametime > 0.1 )
frametime = 0.1 ; //erg?
if ( chunkrate < 0 )
chunkrate = 0 ;
slop + = chunkrate * frametime ;
chunksremaining = slop ;
slop - = chunksremaining ;
if ( chunksremaining < 1 )
{
if ( chunkrate < 30 )
chunksremaining = 1 ;
else
return ;
/* if (!chunkrate)
chunkrate = 72 ;
else
chunkrate + = frametime ;
return ;
*/ }
if ( chunksremaining > 100 )
{ //we're going to need some sanity limit, for cpu resources.
chunkrate - = ( chunksremaining - 100 ) ;
chunksremaining = 100 ;
2005-01-16 02:25:35 +00:00
}
2014-06-12 23:08:42 +00:00
//Con_DPrintf("%i\n", chunksremaining);
for ( b = dl - > dlblocks ; b ; b = b - > next )
2005-01-16 02:25:35 +00:00
{
2014-06-12 23:08:42 +00:00
//packetloss reverts blocks to missing.
if ( b - > state = = DLB_PENDING )
2005-01-16 02:25:35 +00:00
{
2014-06-12 23:08:42 +00:00
if ( b - > sequence < cls . netchan . incoming_sequence - 10 )
{
haveloss = true ;
b - > state = DLB_MISSING ;
for ( ; ; ) //merge it with the next if they're all invalid
{
n = b - > next ;
if ( ! n )
break ;
if ( n - > state = = DLB_MISSING | | ( n - > state = = DLB_PENDING & & n - > sequence < cls . netchan . incoming_sequence - 10 ) )
{
b - > next = n - > next ;
b - > end = n - > end ;
Z_Free ( n ) ;
continue ;
}
break ;
}
}
else
stillpending = true ;
2005-01-16 02:25:35 +00:00
}
2014-06-12 23:08:42 +00:00
if ( b - > state = = DLB_MISSING & & chunksremaining )
{
chunk = b - > start / DLBLOCKSIZE ;
chunks = 1 ; //((b->end+DLBLOCKSIZE-1)/DLBLOCKSIZE) - (b->start / DLBLOCKSIZE);
if ( chunks > chunksremaining )
chunks = chunksremaining ;
//if this block is bigger than a chunk, split the two blocks.
if ( b - > end - b - > start > DLBLOCKSIZE * chunks )
{
n = Z_Malloc ( sizeof ( * n ) ) ;
n - > next = b - > next ;
n - > start = ( chunk + chunks ) * DLBLOCKSIZE ;
n - > end = b - > end ;
b - > end = n - > start ;
n - > state = DLB_MISSING ;
b - > next = n ;
}
b - > state = DLB_PENDING ;
b - > sequence = cls . netchan . outgoing_sequence ;
stillpending = true ;
if ( chunks > 1 )
cmd = va ( " nextdl %u %3g %i %i \n " , ( unsigned int ) chunk , dl - > percent , dl - > filesequence , chunks ) ;
else
cmd = va ( " nextdl %u %3g %i \n " , ( unsigned int ) chunk , dl - > percent , dl - > filesequence ) ;
CL_RemoveClientCommands ( cmd ) ;
CL_SendClientCommand ( false , " %s " , cmd ) ;
chunksremaining - = chunks ;
if ( chunksremaining < = 0 )
break ;
/*if (--cmds <= 0)
{
chunkrate - = chunksremaining ;
// haveloss = true;
break ;
} */
}
}
if ( haveloss )
{
chunkrate * = 0.98 ;
2005-01-16 02:25:35 +00:00
}
2014-06-12 23:08:42 +00:00
if ( ! stillpending )
{ //when there's nothing still pending, the download is complete.
Con_DPrintf ( " Download took %i seconds (%i more) \n " , ( int ) ( Sys_DoubleTime ( ) - dl - > starttime ) , CL_CountQueuedDownloads ( ) ) ;
CL_DownloadFinished ( dl ) ;
}
}
2005-01-16 02:25:35 +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
static void DLC_Poll ( qdownload_t * dl )
2014-06-12 23:08:42 +00:00
{
static float lasttime ;
DLC_RequestDownloadChunks ( dl , realtime - lasttime ) ;
lasttime = realtime ;
}
2005-01-16 02:25:35 +00:00
2014-06-12 23:08:42 +00:00
# endif
2008-11-09 22:29:28 +00:00
2014-06-12 23:08:42 +00:00
void DL_Abort ( qdownload_t * dl , enum qdlabort aborttype )
{
struct dlblock_s * b , * n ;
2005-01-16 02:25:35 +00:00
2014-06-12 23:08:42 +00:00
if ( dl - > file )
{
VFS_CLOSE ( dl - > file ) ;
dl - > file = NULL ;
}
2005-01-17 17:40:21 +00:00
2014-06-12 23:08:42 +00:00
if ( dl - > flags & DLLF_BEGUN )
{
2017-01-13 00:39:50 +00:00
dl - > flags & = ~ DLLF_BEGUN ;
2014-06-12 23:08:42 +00:00
if ( aborttype = = QDL_COMPLETED )
{
//this file isn't needed now the download has finished.
FS_Remove ( dl - > dclname + dl - > prefixbytes , dl - > fsroot ) ;
2005-01-16 02:25:35 +00:00
2014-06-12 23:08:42 +00:00
if ( dl - > flags & DLLF_TEMPORARY )
{
2014-06-16 21:13:50 +00:00
# ifdef TERRAIN
2014-06-12 23:08:42 +00:00
if ( ! Terr_DownloadedSection ( dl - > tempname + dl - > prefixbytes ) )
2014-06-16 21:13:50 +00:00
# endif
2014-06-12 23:08:42 +00:00
Con_Printf ( " Downloaded unusable temporary file \n " ) ;
FS_Remove ( dl - > tempname + dl - > prefixbytes , dl - > fsroot ) ;
}
else if ( Q_strcasecmp ( dl - > tempname , dl - > localname ) )
{
if ( dl - > flags & DLLF_OVERWRITE )
FS_Remove ( dl - > localname + dl - > prefixbytes , dl - > fsroot ) ;
if ( ! FS_Rename ( dl - > tempname + dl - > prefixbytes , dl - > localname + dl - > prefixbytes , dl - > fsroot ) )
{
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
char displaytmp [ MAX_OSPATH ] , displayfinal [ MAX_OSPATH ] ;
FS_DisplayPath ( dl - > tempname + dl - > prefixbytes , dl - > fsroot , displaytmp , sizeof ( displaytmp ) ) ;
FS_DisplayPath ( dl - > localname + dl - > prefixbytes , dl - > fsroot , displayfinal , sizeof ( displayfinal ) ) ;
Con_Printf ( " Couldn't rename %s to %s \n " , displaytmp , displayfinal ) ;
2014-06-12 23:08:42 +00:00
}
}
2021-07-01 11:03:28 +00:00
# ifdef PACKAGEMANAGER
2021-10-09 07:58:27 +00:00
if ( ! strncmp ( dl - > localname , " package/ " , 8 ) & & dl - > fsroot = = FS_ROOT )
PM_FileInstalled ( dl - > localname + 8 , dl - > fsroot , NULL , false ) ;
2021-07-01 11:03:28 +00:00
# endif
2014-06-12 23:08:42 +00:00
}
else
{
//file was aborted half way through...
if ( dl - > dlblocks )
{
//save the list of valid chunks so we don't have to redownload those.
vfsfile_t * parts ;
parts = FS_OpenVFS ( dl - > dclname + dl - > prefixbytes , " wb " , dl - > fsroot ) ;
if ( parts )
{
for ( b = dl - > dlblocks ; b ; b = n )
{
if ( b - > state = = DLB_RECEIVED )
2016-02-15 06:01:17 +00:00
VFS_PRINTF ( parts , " c % " PRIx64 " % " PRIx64 " \n " , ( quint64_t ) b - > start , ( quint64_t ) b - > end ) ;
2014-06-12 23:08:42 +00:00
else
{
for ( ; ; )
{
n = b - > next ;
if ( n & & n - > state ! = DLB_RECEIVED )
{
b - > end = n - > end ;
b - > next = n - > next ;
Z_Free ( n ) ;
continue ;
}
break ;
}
2016-02-15 06:01:17 +00:00
VFS_PRINTF ( parts , " m % " PRIx64 " % " PRIx64 " \n " , ( quint64_t ) b - > start , ( quint64_t ) b - > end ) ;
2014-06-12 23:08:42 +00:00
}
2005-01-16 02:25:35 +00:00
2014-06-12 23:08:42 +00:00
n = b - > next ;
Z_Free ( b ) ;
}
dl - > dlblocks = NULL ;
VFS_CLOSE ( parts ) ;
}
else
FS_Remove ( dl - > tempname + dl - > prefixbytes , dl - > fsroot ) ;
}
else
{
//download looks like it was non-resumable. just delete it.
FS_Remove ( dl - > tempname + dl - > prefixbytes , dl - > fsroot ) ;
}
}
if ( aborttype ! = QDL_DISCONNECT )
{
switch ( dl - > method )
{
default :
break ;
# ifdef Q3CLIENT
case DL_Q3 :
2022-03-08 05:31:34 +00:00
q3 - > cl . SendClientCommand ( " stopdl " ) ;
2014-06-12 23:08:42 +00:00
break ;
2005-01-13 16:29:20 +00:00
# endif
2014-06-12 23:08:42 +00:00
case DL_QW :
2017-07-12 08:15:27 +00:00
break ;
case DL_DARKPLACES :
2019-03-04 00:46:41 +00:00
CL_SendClientCommand ( true , " stopdownload " ) ;
break ;
2014-06-12 23:08:42 +00:00
case DL_QWCHUNKS :
{
2019-03-04 00:46:41 +00:00
//char *serverversion = InfoBuf_ValueForKey(&cl.serverinfo, "*version");
//if (!strncmp(serverversion , "MVDSV ", 6)) //mvdsv will spam if we use stopdownload. and it'll misreport packetloss if we send nothing. grr.
CL_SendClientCommand ( true , " nextdl -1 100 %i " , dl - > filesequence ) ;
//else
// CL_SendClientCommand(true, "stopdownload");
2014-06-12 23:08:42 +00:00
}
break ;
}
}
}
for ( b = dl - > dlblocks ; b ; b = n )
{
n = b - > next ;
Z_Free ( b ) ;
}
dl - > dlblocks = NULL ;
2017-01-13 00:39:50 +00:00
if ( dl - > method ! = DL_HTTP )
Z_Free ( dl ) ;
2014-06-12 23:08:42 +00:00
if ( cls . download = = dl )
cls . download = NULL ;
}
2005-01-13 16:29:20 +00:00
2004-08-23 00:15:46 +00:00
/*
= = = = = = = = = = = = = = = = = = = = =
CL_ParseDownload
A download message has been received from the server
= = = = = = = = = = = = = = = = = = = = =
*/
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
static void CL_ParseDownload ( qboolean zlib )
2004-08-23 00:15:46 +00:00
{
2006-08-02 05:34:17 +00:00
extern cvar_t cl_dlemptyterminate ;
2004-08-23 00:15:46 +00:00
int size , percent ;
qbyte name [ 1024 ] ;
2014-06-12 23:08:42 +00:00
qdownload_t * dl = cls . download ;
2004-08-23 00:15:46 +00:00
2005-01-13 16:29:20 +00:00
# ifdef PEXT_CHUNKEDDOWNLOADS
if ( cls . fteprotocolextensions & PEXT_CHUNKEDDOWNLOADS )
{
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
if ( cls . demoplayback = = DPB_MVD & & cls . demoeztv_ext )
2008-01-30 02:32:00 +00:00
Host_EndGame ( " CL_ParseDownload: chunked download on qtv proxy. " ) ;
2014-06-12 23:08:42 +00:00
CL_ParseChunkedDownload ( dl ) ;
2005-01-13 16:29:20 +00:00
return ;
}
# endif
2004-08-23 00:15:46 +00:00
// read the data
size = MSG_ReadShort ( ) ;
percent = MSG_ReadByte ( ) ;
2012-02-12 05:18:31 +00:00
if ( size = = - 2 )
{
/*quakeforge*/
MSG_ReadString ( ) ;
return ;
}
if ( size = = - 3 )
{
2014-02-14 09:59:32 +00:00
char * requestedname ;
2012-02-12 05:18:31 +00:00
Q_strncpyz ( name , MSG_ReadString ( ) , sizeof ( name ) ) ;
2014-02-14 09:59:32 +00:00
requestedname = MSG_ReadString ( ) ;
Con_DPrintf ( " Download for %s redirected to %s \n " , requestedname , name ) ;
2012-02-12 05:18:31 +00:00
/*quakeforge http download redirection*/
2014-06-12 23:08:42 +00:00
if ( dl )
2019-07-29 05:28:20 +00:00
CL_DownloadFailed ( dl - > remotename , dl , DLFAIL_REDIRECTED ) ;
2013-03-12 22:35:33 +00:00
//FIXME: find some safe way to do this and actually test it. we should already know the local name, but we might have gained a .gz or something (this is quakeforge after all).
// CL_CheckOrEnqueDownloadFile(name, localname, DLLF_IGNOREFAILED);
2012-02-12 05:18:31 +00:00
return ;
}
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
if ( cls . demoplayback & & ! cls . demoeztv_ext )
2004-08-23 00:15:46 +00:00
{
if ( size > 0 )
2022-03-08 05:34:26 +00:00
MSG_ReadSkip ( size ) ;
2014-06-12 23:08:42 +00:00
return ; // not in demo playback, we don't know the name of the file.
2004-08-23 00:15:46 +00:00
}
2014-06-12 23:08:42 +00:00
if ( ! dl )
2004-12-05 11:37:39 +00:00
{
2014-06-12 23:08:42 +00:00
//download packet without file requested.
if ( size > 0 )
2022-03-08 05:34:26 +00:00
MSG_ReadSkip ( size ) ;
2014-06-12 23:08:42 +00:00
return ; // not in demo playback
2004-12-05 11:37:39 +00:00
}
2005-01-13 16:29:20 +00:00
if ( size < 0 )
2004-08-23 00:15:46 +00:00
{
2013-11-29 14:36:47 +00:00
Con_TPrintf ( " File not found. \n " ) ;
2005-01-16 02:25:35 +00:00
2014-06-12 23:08:42 +00:00
if ( dl )
2019-07-29 05:28:20 +00:00
CL_DownloadFailed ( dl - > remotename , dl , DLFAIL_SERVERFILE ) ;
2004-08-23 00:15:46 +00:00
return ;
}
// open the file if not opened yet
2014-06-12 23:08:42 +00:00
if ( dl - > method = = DL_QWPENDING )
2004-08-23 00:15:46 +00:00
{
2014-06-12 23:08:42 +00:00
dl - > method = DL_QW ;
if ( ! DL_Begun ( dl ) )
2004-08-23 00:15:46 +00:00
{
2022-03-08 05:34:26 +00:00
MSG_ReadSkip ( size ) ;
2014-06-12 23:08:42 +00:00
Con_TPrintf ( " Failed to open %s \n " , dl - > tempname ) ;
2019-07-29 05:28:20 +00:00
CL_DownloadFailed ( dl - > remotename , dl , DLFAIL_CLIENTFILE ) ;
2004-08-23 00:15:46 +00:00
CL_RequestNextDownload ( ) ;
return ;
}
SCR_EndLoadingPlaque ( ) ;
}
2014-06-12 23:08:42 +00:00
2016-10-22 07:06:51 +00:00
if ( zlib )
{
2017-02-19 00:15:42 +00:00
# if defined(AVAIL_ZLIB) && defined(Q2CLIENT)
2016-10-22 07:06:51 +00:00
z_stream s ;
unsigned short clen = size ;
unsigned short ulen = MSG_ReadShort ( ) ;
char cdata [ 8192 ] ;
unsigned int done = 0 ;
memset ( & s , 0 , sizeof ( s ) ) ;
2022-03-08 05:34:26 +00:00
s . next_in = net_message . data + MSG_GetReadCount ( ) ;
2016-10-22 07:06:51 +00:00
s . avail_in = clen ;
if ( inflateInit2 ( & s , - 15 ) ! = Z_OK )
Host_EndGame ( " CL_ParseZDownload: unable to initialise zlib " ) ;
for ( ; ; )
{
int zerr ;
s . next_out = cdata ;
s . avail_out = sizeof ( cdata ) ;
zerr = inflate ( & s , Z_FULL_FLUSH ) ;
VFS_WRITE ( dl - > file , cdata , s . total_out - done ) ;
done = s . total_out ;
if ( zerr = = Z_STREAM_END )
break ;
else if ( zerr = = Z_OK )
continue ;
else
Host_EndGame ( " CL_ParseZDownload: stream truncated " ) ;
}
if ( inflateEnd ( & s ) ! = Z_OK )
Host_EndGame ( " CL_ParseZDownload: stream truncated " ) ;
VFS_WRITE ( dl - > file , cdata , s . total_out - done ) ;
done = s . total_out ;
if ( s . total_out ! = ulen | | s . total_in ! = clen )
Host_EndGame ( " CL_ParseZDownload: stream truncated " ) ;
# else
Host_EndGame ( " Unable to handle zlib downloads, zlib is not supported in this build " ) ;
# endif
2022-03-08 05:34:26 +00:00
MSG_ReadSkip ( size ) ;
2016-10-22 07:06:51 +00:00
}
else
2004-08-23 00:15:46 +00:00
# ifdef PEXT_ZLIBDL
if ( percent > = 101 & & percent < = 201 ) // && cls.fteprotocolextensions & PEXT_ZLIBDL)
{
int compsize ;
percent = percent - 101 ;
2022-03-08 05:34:26 +00:00
VFS_WRITE ( cls . download , ZLibDownloadDecode ( & compsize , net_message . data + MSG_GetReadCount ( ) , size ) , size ) ;
2004-08-23 00:15:46 +00:00
2022-03-08 05:34:26 +00:00
MSG_ReadSkip ( compsize ) ;
2004-08-23 00:15:46 +00:00
}
else
# endif
{
2022-03-08 05:34:26 +00:00
VFS_WRITE ( dl - > file , net_message . data + MSG_GetReadCount ( ) , size ) ;
MSG_ReadSkip ( size ) ;
2004-08-23 00:15:46 +00:00
}
2014-06-12 23:08:42 +00:00
dl - > completedbytes + = size ;
dl - > ratebytes + = size ;
if ( dl - > percent ! = percent ) //try and guess the size (its most acurate when the percent value changes)
dl - > size = ( ( float ) dl - > completedbytes * 100 ) / percent ;
2004-08-23 00:15:46 +00:00
2009-11-04 21:16:50 +00:00
if ( percent ! = 100 & & size = = 0 & & cl_dlemptyterminate . ival )
2006-08-02 05:34:17 +00:00
{
2014-06-12 23:08:42 +00:00
Con_Printf ( CON_WARNING " WARNING: Client received empty svc_download, assuming EOF. \n " ) ;
2006-08-02 05:34:17 +00:00
percent = 100 ;
}
2004-08-23 00:15:46 +00:00
if ( percent ! = 100 )
{
// request next block
2014-06-12 23:08:42 +00:00
dl - > percent = percent ;
2004-08-23 00:15:46 +00:00
2005-03-23 22:14:08 +00:00
CL_SendClientCommand ( true , " nextdl " ) ;
2004-08-23 00:15:46 +00:00
}
else
{
2014-06-12 23:08:42 +00:00
Con_DPrintf ( " Download took %i seconds \n " , ( int ) ( Sys_DoubleTime ( ) - dl - > starttime ) ) ;
2004-08-23 00:15:46 +00:00
2014-06-12 23:08:42 +00:00
CL_DownloadFinished ( dl ) ;
2005-01-16 02:25:35 +00:00
2004-08-23 00:15:46 +00:00
// get another file if needed
CL_RequestNextDownload ( ) ;
}
}
2008-11-09 22:29:28 +00:00
qboolean CL_ParseOOBDownload ( void )
{
2014-06-12 23:08:42 +00:00
qdownload_t * dl = cls . download ;
if ( ! dl )
return false ;
if ( MSG_ReadLong ( ) ! = dl - > filesequence )
2008-11-09 22:29:28 +00:00
return false ;
if ( MSG_ReadChar ( ) ! = svc_download )
return false ;
2016-10-22 07:06:51 +00:00
CL_ParseDownload ( false ) ;
2008-11-09 22:29:28 +00:00
return true ;
}
2017-09-20 11:27:13 +00:00
# ifdef NQPROT
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
static void CLDP_ParseDownloadData ( void )
2007-06-20 00:02:54 +00:00
{
2014-06-12 23:08:42 +00:00
qdownload_t * dl = cls . download ;
2007-06-20 00:02:54 +00:00
unsigned char buffer [ 1 < < 16 ] ;
2014-02-07 08:38:40 +00:00
qofs_t start ;
2007-06-20 00:02:54 +00:00
int size ;
start = MSG_ReadLong ( ) ;
size = ( unsigned short ) MSG_ReadShort ( ) ;
2010-12-23 08:53:23 +00:00
2007-06-20 00:02:54 +00:00
MSG_ReadData ( buffer , size ) ;
2014-06-12 23:08:42 +00:00
if ( ! dl )
return ;
if ( dl - > file )
2009-04-12 16:57:30 +00:00
{
2018-09-23 19:35:24 +00:00
if ( start > dl - > completedbytes )
2022-03-01 02:51:55 +00:00
{ //this protocol cannot deal with gaps. we might as well wait until its repeated later.
//don't ack values ahead of what we completed, we won't get good results if we do that. servers are dumb.
start = dl - > completedbytes ;
size = 0 ;
}
2018-09-23 19:35:24 +00:00
else if ( start + size < dl - > completedbytes )
; //already completed this data
else
{
int offset = dl - > completedbytes - start ; //we may already have completed some chunk already
VFS_WRITE ( dl - > file , buffer + offset , size - offset ) ;
dl - > completedbytes + = size - offset ;
dl - > ratebytes + = size - offset ; //for download rate calcs
}
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-01 02:51:55 +00:00
dl - > percent = ( dl - > completedbytes ) / ( float ) dl - > size * 100 ;
2009-04-12 16:57:30 +00:00
}
2007-06-20 00:02:54 +00:00
2018-09-23 19:35:24 +00:00
//we need to ack in order.
//the server doesn't actually track packets, only position, however there's no way to tell it that we already have a chunk
//we could send the acks unreliably, but any cl->sv loss would involve a sv->cl resend (because we can't dupe).
2007-06-20 00:02:54 +00:00
MSG_WriteByte ( & cls . netchan . message , clcdp_ackdownloaddata ) ;
MSG_WriteLong ( & cls . netchan . message , start ) ;
MSG_WriteShort ( & cls . netchan . message , size ) ;
}
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
static void CLDP_ParseDownloadBegin ( char * s )
2007-06-20 00:02:54 +00:00
{
2014-06-12 23:08:42 +00:00
qdownload_t * dl = cls . download ;
2007-06-20 00:02:54 +00:00
char buffer [ 8192 ] ;
2014-08-03 14:47:47 +00:00
qofs_t size , pos , chunk ;
2007-06-20 00:02:54 +00:00
char * fname ;
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
Cmd_TokenizeString ( s , false , false ) ;
2014-08-03 14:47:47 +00:00
size = ( qofs_t ) strtoull ( Cmd_Argv ( 1 ) , NULL , 0 ) ;
2007-06-20 00:02:54 +00:00
fname = Cmd_Argv ( 2 ) ;
2014-06-12 23:08:42 +00:00
if ( ! dl | | strcmp ( fname , dl - > remotename ) )
2012-11-27 03:23:19 +00:00
{
2019-09-04 07:59:40 +00:00
# ifdef CSQC_DAT
2017-09-21 12:22:16 +00:00
if ( cls . demoplayback & & ! dl & & cl_dp_csqc_progssize & & size = = cl_dp_csqc_progssize & & ! strcmp ( fname , cl_dp_csqc_progsname ) )
{ //its somewhat common for demos to contain a copy of the csprogs, so that the same version is available when trying to play the demo back.
extern cvar_t cl_download_csprogs , cl_nocsqc ;
if ( ! cl_nocsqc . ival & & cl_download_csprogs . ival )
{
fname = va ( " csprogsvers/%x.dat " , cl_dp_csqc_progscrc ) ;
if ( CL_CheckDLFile ( fname ) )
return ; //we already have this version
//Begin downloading it...
}
else
return ; //silently ignore it
}
else
2019-09-04 07:59:40 +00:00
# endif
2017-09-21 12:22:16 +00:00
{
Con_Printf ( " Warning: server started sending a file we did not request. Ignoring. \n " ) ;
return ;
}
}
if ( ! dl )
{
dl = Z_Malloc ( sizeof ( * dl ) ) ;
dl - > filesequence = 0 ;
Q_strncpyz ( dl - > remotename , fname , sizeof ( dl - > remotename ) ) ;
Q_strncpyz ( dl - > localname , fname , sizeof ( dl - > localname ) ) ;
Con_TPrintf ( " Downloading %s... \n " , dl - > localname ) ;
// download to a temp name, and only rename
// to the real name when done, so if interrupted
// a runt file wont be left
COM_StripExtension ( dl - > localname , dl - > tempname , sizeof ( dl - > tempname ) - 5 ) ;
Q_strncatz ( dl - > tempname , " .tmp " , sizeof ( dl - > tempname ) ) ;
dl - > method = DL_DARKPLACES ;
dl - > percent = 0 ;
dl - > sizeunknown = true ;
dl - > flags = DLLF_REQUIRED ;
cls . download = dl ;
2012-11-27 03:23:19 +00:00
}
2017-01-13 00:39:50 +00:00
if ( dl - > method = = DL_QWPENDING )
dl - > method = DL_DARKPLACES ;
2014-06-12 23:08:42 +00:00
if ( dl - > method ! = DL_DARKPLACES )
2007-06-20 00:02:54 +00:00
{
2014-06-12 23:08:42 +00:00
Con_Printf ( " Warning: download method isn't right. \n " ) ;
return ;
2007-06-20 00:02:54 +00:00
}
2014-06-12 23:08:42 +00:00
dl - > sizeunknown = false ;
dl - > size = size ;
if ( ! DL_Begun ( dl ) )
{
2019-07-29 05:28:20 +00:00
CL_DownloadFailed ( dl - > remotename , dl , DLFAIL_CLIENTFILE ) ;
2014-06-12 23:08:42 +00:00
return ;
}
2010-12-23 08:53:23 +00:00
2014-06-12 23:08:42 +00:00
CL_SendClientCommand ( true , " sv_startdownload " ) ;
2012-11-27 03:23:19 +00:00
2014-06-12 23:08:42 +00:00
//fill the file with 0 bytes, for some reason
memset ( buffer , 0 , sizeof ( buffer ) ) ;
for ( pos = 0 , chunk = 1 ; chunk ; pos + = chunk )
2007-06-20 00:02:54 +00:00
{
2014-06-12 23:08:42 +00:00
chunk = size - pos ;
if ( chunk > sizeof ( buffer ) )
chunk = sizeof ( buffer ) ;
VFS_WRITE ( dl - > file , buffer , chunk ) ;
2007-06-20 00:02:54 +00:00
}
2022-03-01 02:51:55 +00:00
VFS_SEEK ( dl - > file , 0 ) ;
2007-06-20 00:02:54 +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
static void CLDP_ParseDownloadFinished ( char * s )
2007-06-20 00:02:54 +00:00
{
2014-06-12 23:08:42 +00:00
qdownload_t * dl = cls . download ;
2022-03-01 02:51:55 +00:00
unsigned int runningcrc = 0 ;
2021-04-14 05:21:04 +00:00
const hashfunc_t * hfunc = & hash_crc16 ;
2007-06-20 00:02:54 +00:00
char buffer [ 8192 ] ;
2022-03-01 02:51:55 +00:00
qofs_t size , pos , chunk ;
2014-06-12 23:08:42 +00:00
if ( ! dl | | ! dl - > file )
2007-06-20 00:02:54 +00:00
return ;
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
Cmd_TokenizeString ( s , false , false ) ;
2007-06-20 00:02:54 +00:00
2014-06-12 23:08:42 +00:00
VFS_CLOSE ( dl - > file ) ;
2007-06-20 00:02:54 +00:00
2014-06-12 23:08:42 +00:00
dl - > file = FS_OpenVFS ( dl - > tempname + dl - > prefixbytes , " rb " , dl - > fsroot ) ;
if ( dl - > file )
2007-06-20 00:02:54 +00:00
{
2022-03-01 02:51:55 +00:00
void * hashctx = alloca ( hfunc - > contextsize ) ;
2014-06-12 23:08:42 +00:00
size = dl - > size ;
2022-03-01 02:51:55 +00:00
hfunc - > init ( hashctx ) ;
for ( pos = 0 ; pos < size ; pos + = chunk )
2007-06-20 00:02:54 +00:00
{
2022-03-01 02:51:55 +00:00
chunk = min ( sizeof ( buffer ) , size - pos ) ;
if ( chunk ! = VFS_READ ( dl - > file , buffer , chunk ) )
break ;
hfunc - > process ( hashctx , buffer , chunk ) ;
2007-06-20 00:02:54 +00:00
}
2014-06-12 23:08:42 +00:00
VFS_CLOSE ( dl - > file ) ;
dl - > file = NULL ;
2021-04-14 05:21:04 +00:00
runningcrc = hashfunc_terminate_uint ( hfunc , hashctx ) ;
2007-08-08 03:02:36 +00:00
}
else
{
Con_Printf ( " Download failed: unable to check CRC of download \n " ) ;
2019-07-29 05:28:20 +00:00
CL_DownloadFailed ( dl - > remotename , dl , DLFAIL_CLIENTFILE ) ;
2010-12-23 08:53:23 +00:00
return ;
2007-08-08 03:02:36 +00:00
}
2007-06-20 00:02:54 +00:00
2007-08-08 03:02:36 +00:00
if ( size ! = atoi ( Cmd_Argv ( 1 ) ) )
{
Con_Printf ( " Download failed: wrong file size \n " ) ;
2019-07-29 05:28:20 +00:00
CL_DownloadFailed ( dl - > remotename , dl , DLFAIL_CORRUPTED ) ;
2007-08-08 03:02:36 +00:00
return ;
}
if ( runningcrc ! = atoi ( Cmd_Argv ( 2 ) ) )
{
Con_Printf ( " Download failed: wrong crc \n " ) ;
2019-07-29 05:28:20 +00:00
CL_DownloadFailed ( dl - > remotename , dl , DLFAIL_CORRUPTED ) ;
2007-08-08 03:02:36 +00:00
return ;
2007-06-20 00:02:54 +00:00
}
2014-06-12 23:08:42 +00:00
Con_DPrintf ( " Download took %i seconds \n " , ( int ) ( Sys_DoubleTime ( ) - dl - > starttime ) ) ;
2007-06-20 00:02:54 +00:00
2014-06-12 23:08:42 +00:00
CL_DownloadFinished ( dl ) ;
2007-06-20 00:02:54 +00:00
// get another file if needed
CL_RequestNextDownload ( ) ;
}
2017-09-20 11:27:13 +00:00
# endif
2007-06-20 00:02:54 +00:00
2006-01-12 22:56:54 +00:00
static vfsfile_t * upload_file ;
2004-08-23 00:15:46 +00:00
static qbyte * upload_data ;
static int upload_pos ;
static int upload_size ;
void CL_NextUpload ( void )
{
qbyte buffer [ 1024 ] ;
int r ;
int percent ;
int size ;
r = upload_size - upload_pos ;
if ( r > 768 )
r = 768 ;
2006-01-12 22:56:54 +00:00
if ( upload_data )
{
memcpy ( buffer , upload_data + upload_pos , r ) ;
}
else if ( upload_file )
{
r = VFS_READ ( upload_file , buffer , r ) ;
if ( r = = 0 )
{
CL_StopUpload ( ) ;
return ;
}
}
else
return ;
2004-08-23 00:15:46 +00:00
MSG_WriteByte ( & cls . netchan . message , clc_upload ) ;
MSG_WriteShort ( & cls . netchan . message , r ) ;
upload_pos + = r ;
size = upload_size ;
if ( ! size )
size = 1 ;
percent = upload_pos * 100 / size ;
MSG_WriteByte ( & cls . netchan . message , percent ) ;
SZ_Write ( & cls . netchan . message , buffer , r ) ;
Con_DPrintf ( " UPLOAD: %6d: %d written \n " , upload_pos - r , r ) ;
if ( upload_pos ! = upload_size )
return ;
2013-11-29 14:36:47 +00:00
Con_TPrintf ( " Upload completed \n " ) ;
2004-08-23 00:15:46 +00:00
2006-01-12 22:56:54 +00:00
CL_StopUpload ( ) ;
2004-08-23 00:15:46 +00:00
}
void CL_StartUpload ( qbyte * data , int size )
{
if ( cls . state < ca_onserver )
return ; // gotta be connected
// override
2006-01-12 22:56:54 +00:00
CL_StopUpload ( ) ;
2004-08-23 00:15:46 +00:00
Con_DPrintf ( " Upload starting of %d... \n " , size ) ;
upload_data = BZ_Malloc ( size ) ;
memcpy ( upload_data , data , size ) ;
upload_size = size ;
upload_pos = 0 ;
CL_NextUpload ( ) ;
2005-09-26 03:40:09 +00:00
}
2004-08-23 00:15:46 +00:00
qboolean CL_IsUploading ( void )
{
2006-01-12 22:56:54 +00:00
if ( upload_data | | upload_file )
2004-08-23 00:15:46 +00:00
return true ;
return false ;
}
void CL_StopUpload ( void )
{
if ( upload_data )
BZ_Free ( upload_data ) ;
2006-01-12 22:56:54 +00:00
if ( upload_file )
VFS_CLOSE ( upload_file ) ;
upload_file = NULL ;
2004-08-23 00:15:46 +00:00
upload_data = NULL ;
2006-01-12 22:56:54 +00:00
upload_pos = upload_size = 0 ;
}
2017-09-20 11:27:13 +00:00
#if 0 //in case we ever want to add any uploads other than snaps
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
static qboolean CL_StartUploadFile ( char * filename )
2006-01-12 22:56:54 +00:00
{
if ( ! COM_CheckParm ( " -fileul " ) )
{
Con_Printf ( " You must currently use the -fileul commandline parameter in order to use this functionality \n " ) ;
return false ;
}
if ( cls . state < ca_onserver )
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
{
Con_Printf ( " not connected \n " ) ;
2006-01-12 22:56:54 +00:00
return false ; // gotta be connected
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
}
2006-01-12 22:56:54 +00:00
CL_StopUpload ( ) ;
2008-12-23 02:55:20 +00:00
upload_file = FS_OpenVFS ( filename , " rb " , FS_ROOT ) ;
2006-01-12 22:56:54 +00:00
upload_size = VFS_GETLEN ( upload_file ) ;
upload_pos = 0 ;
if ( upload_file )
{
CL_NextUpload ( ) ;
return true ;
}
return false ;
2004-08-23 00:15:46 +00:00
}
2017-09-20 11:27:13 +00:00
# endif
2004-08-23 00:15:46 +00:00
/*
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
SERVER CONNECTING MESSAGES
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
*/
2009-04-06 00:34:32 +00:00
void CL_ClearParseState ( void )
{
// done with sounds, request models now
memset ( cl . model_precache , 0 , sizeof ( cl . model_precache ) ) ;
cl_playerindex = - 1 ;
cl_h_playerindex = - 1 ;
cl_spikeindex = - 1 ;
cl_flagindex = - 1 ;
cl_rocketindex = - 1 ;
cl_grenadeindex = - 1 ;
cl_gib1index = - 1 ;
cl_gib2index = - 1 ;
cl_gib3index = - 1 ;
2012-07-05 19:42:36 +00:00
if ( cl_baselines )
{
BZ_Free ( cl_baselines ) ;
cl_baselines = NULL ;
}
cl_baselines_count = 0 ;
cl_max_static_entities = 0 ;
if ( cl_static_entities )
{
BZ_Free ( cl_static_entities ) ;
cl_static_entities = NULL ;
}
2009-04-06 00:34:32 +00:00
}
2004-08-23 00:15:46 +00:00
/*
= = = = = = = = = = = = = = = = = =
CL_ParseServerData
= = = = = = = = = = = = = = = = = =
*/
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
static void CLQW_ParseServerData ( void )
2004-08-23 00:15:46 +00:00
{
int pnum ;
int clnum ;
char * str ;
int protover , svcnt ;
float maxspeed , entgrav ;
2005-09-26 03:40:09 +00:00
2014-06-12 23:08:42 +00:00
if ( cls . download & & cls . download - > method = = DL_QWPENDING )
2013-03-12 22:35:33 +00:00
{
//if we didn't actually start downloading it yet, cancel the current download.
//this is to avoid qizmo not responding to the download command, resulting in hanging downloads that cause the client to then be unable to connect anywhere simply because someone's skin was set.
2019-07-29 05:28:20 +00:00
CL_DownloadFailed ( cls . download - > remotename , cls . download , DLFAIL_CORRUPTED ) ;
2013-03-12 22:35:33 +00:00
}
2016-09-08 19:04:35 +00:00
Con_DPrintf ( " Serverdata packet %s. \n " , cls . demoplayback ? " read " : " received " ) ;
2004-08-23 00:15:46 +00:00
//
// wipe the client_state_t struct
2005-09-26 03:40:09 +00:00
//
2004-08-23 00:15:46 +00:00
2009-04-06 00:34:32 +00:00
SCR_SetLoadingStage ( LS_CLIENT ) ;
2004-08-23 00:15:46 +00:00
SCR_BeginLoadingPlaque ( ) ;
// parse protocol version number
// allow 2.2 and 2.29 demos to play
2017-12-28 16:24:50 +00:00
cls . fteprotocolextensions = 0 ;
cls . fteprotocolextensions2 = 0 ;
cls . ezprotocolextensions1 = 0 ;
2004-08-23 00:15:46 +00:00
for ( ; ; )
{
protover = MSG_ReadLong ( ) ;
2019-05-10 09:31:21 +00:00
if ( protover = = PROTOCOL_VERSION_FTE1 )
2004-08-23 00:15:46 +00:00
{
2010-07-18 08:42:59 +00:00
cls . fteprotocolextensions = MSG_ReadLong ( ) ;
2009-11-04 21:16:50 +00:00
continue ;
}
if ( protover = = PROTOCOL_VERSION_FTE2 )
{
2010-07-18 08:42:59 +00:00
cls . fteprotocolextensions2 = MSG_ReadLong ( ) ;
2004-08-23 00:15:46 +00:00
continue ;
}
2017-12-28 16:24:50 +00:00
if ( protover = = PROTOCOL_VERSION_EZQUAKE1 )
{
cls . ezprotocolextensions1 = MSG_ReadLong ( ) ;
continue ;
}
2010-07-18 08:42:59 +00:00
if ( protover = = PROTOCOL_VERSION_VARLENGTH )
{
int ident ;
int len ;
char data [ 1024 ] ;
ident = MSG_ReadLong ( ) ;
len = MSG_ReadLong ( ) ;
if ( len < = sizeof ( data ) )
{
MSG_ReadData ( data , len ) ;
switch ( ident )
{
default :
break ;
}
continue ;
}
}
2008-04-12 23:24:19 +00:00
if ( protover = = PROTOCOL_VERSION_QW ) //this ends the version info
2004-08-23 00:15:46 +00:00
break ;
2018-07-24 20:42:44 +00:00
if ( cls . demoplayback & & ( protover > = 24 & & protover < = 28 ) ) //older versions, maintain demo compatability.
2004-08-23 00:15:46 +00:00
break ;
2008-04-12 23:24:19 +00:00
Host_EndGame ( " Server returned version %i, not %i \n " , protover , PROTOCOL_VERSION_QW ) ;
2004-08-23 00:15:46 +00:00
}
2017-12-28 16:24:50 +00:00
if ( developer . ival | | cl_shownet . ival )
{
2019-03-23 07:06:37 +00:00
if ( cls . fteprotocolextensions2 | | cls . fteprotocolextensions | | cls . ezprotocolextensions1 )
Con_TPrintf ( " Using FTE extensions 0x%x%08x %#x \n " , cls . fteprotocolextensions2 , cls . fteprotocolextensions , cls . ezprotocolextensions1 ) ;
2017-12-28 16:24:50 +00:00
}
2019-03-23 07:06:37 +00:00
if ( cls . fteprotocolextensions & ~ PEXT_CLIENTSUPPORT )
Con_TPrintf ( CON_WARNING " Using unknown fte-pext1 extensions (%#x) \n " , cls . fteprotocolextensions & ~ PEXT_CLIENTSUPPORT ) ;
if ( cls . fteprotocolextensions2 & ~ PEXT2_CLIENTSUPPORT )
Con_TPrintf ( CON_WARNING " Using unknown fte-pext2 extensions (%#x) \n " , cls . fteprotocolextensions2 & ~ PEXT2_CLIENTSUPPORT ) ;
if ( cls . ezprotocolextensions1 & ~ EZPEXT1_CLIENTSUPPORT )
Con_TPrintf ( CON_WARNING " Using unknown ezquake extensions (%#x) \n " , cls . ezprotocolextensions1 & ~ EZPEXT1_CLIENTSUPPORT ) ;
2009-11-04 21:16:50 +00:00
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
if ( ( cls . ezprotocolextensions1 & EZPEXT1_HIDDEN_MESSAGES ) & & ! cls . demoplayback )
Con_TPrintf ( CON_WARNING " Server's EZPEXT1_HIDDEN_MESSAGES extension does not make sense outside of demos \n " ) ; //we do not request this at all. its safe to blame the server.
2004-11-27 08:16:25 +00:00
if ( cls . fteprotocolextensions & PEXT_FLOATCOORDS )
{
2019-10-14 02:36:57 +00:00
cls . netchan . netprim . coordtype = COORDTYPE_FLOAT_32 ;
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
cls . netchan . netprim . anglesize = 2 ;
2004-11-27 08:16:25 +00:00
}
else
{
2019-10-14 02:36:57 +00:00
cls . netchan . netprim . coordtype = COORDTYPE_FIXED_13_3 ;
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
cls . netchan . netprim . anglesize = 1 ;
2004-11-27 08:16:25 +00:00
}
Fixes, workarounds, and breakages. Hexen2 should work much better (-hexen2 says no mission pack, -portals says h2mp). Started working on splitting bigcoords per client, far too much work still to go on that. Removed gl_ztrick entirely. Enabled csprogs download by default. Added client support for fitzquake's 666 protocol, needs testing, some cleanup for dp protocols too, no server support, couldn't selectively enable it anyway. Now attempting to cache shadow meshes for explosions and stuff. Played with lightmaps a little, should potentially run a little faster on certain (intel?) cards. Tweeked npfte a little to try to avoid deadlocks and crashes. Fixed sky worldspawn parsing. Added h2mp's model format. Fixed baseline issue in q2 client, made servers generate q2 baselines. MOVETYPE_PUSH will not rotate extra if rotation is forced. Made status command show allowed client types. Changed lighting on weapons - should now be shaded.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/branches/wip@3572 fc73d0e0-1445-4013-8a0c-d673dee63da5
2010-08-11 03:36:31 +00:00
cls . netchan . message . prim = cls . netchan . netprim ;
MSG_ChangePrimitives ( cls . netchan . netprim ) ;
2004-11-27 08:16:25 +00:00
2005-09-08 01:58:25 +00:00
svcnt = MSG_ReadLong ( ) ;
2004-08-23 00:15:46 +00:00
// game directory
str = MSG_ReadString ( ) ;
2012-02-12 05:18:31 +00:00
Con_DPrintf ( " Server is using gamedir \" %s \" \n " , str ) ;
2006-02-22 23:35:04 +00:00
if ( ! * str )
2019-08-01 02:13:44 +00:00
str = " qw " ; //FIXME: query active manifest's basegamedir
2004-08-23 00:15:46 +00:00
# ifndef CLIENTONLY
if ( ! sv . state )
# endif
2015-05-14 03:06:58 +00:00
COM_Gamedir ( str , NULL ) ;
2004-08-23 00:15:46 +00:00
2018-09-23 19:35:24 +00:00
CL_ClearState ( true ) ;
2017-07-10 15:40:42 +00:00
# ifdef QUAKEHUD
2004-08-23 00:15:46 +00:00
Stats_NewMap ( ) ;
2017-07-10 15:40:42 +00:00
# endif
2004-08-23 00:15:46 +00:00
cl . servercount = svcnt ;
2017-10-12 12:02:25 +00:00
cl . protocol_qw = protover ;
2004-08-23 00:15:46 +00:00
2015-08-20 03:17:47 +00:00
Cvar_ForceCallback ( Cvar_FindVar ( " r_particlesdesc " ) ) ;
2021-05-09 13:00:37 +00:00
cl . teamfortress = ! ! Q_strcasestr ( str , " fortress " ) ;
2004-12-29 03:24:21 +00:00
2004-08-23 00:15:46 +00:00
if ( cl . gamedirchanged )
{
cl . gamedirchanged = false ;
# ifndef CLIENTONLY
if ( ! sv . state )
# endif
Wads_Flush ( ) ;
}
2012-02-12 05:18:31 +00:00
/*mvds have different parsing*/
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
if ( cls . demoplayback = = DPB_MVD )
2004-08-23 00:15:46 +00:00
{
2015-08-07 17:49:49 +00:00
extern float olddemotime ;
2012-01-24 04:24:14 +00:00
int i , j ;
2012-02-12 05:18:31 +00:00
if ( cls . fteprotocolextensions2 & PEXT2_MAXPLAYERS )
{
cl . allocated_client_slots = MSG_ReadByte ( ) ;
if ( cl . allocated_client_slots > MAX_CLIENTS )
cl . allocated_client_slots = MAX_CLIENTS ;
}
cl . gametime = MSG_ReadFloat ( ) ;
cl . gametimemark = realtime ;
cl . oldgametime = cl . gametime ;
cl . oldgametimemark = realtime ;
2015-08-07 17:49:49 +00:00
cl . demogametimebias = cl . gametime - olddemotime ;
2012-01-24 04:24:14 +00:00
for ( j = 0 ; j < MAX_SPLITS ; j + + )
{
2013-06-23 02:17:02 +00:00
cl . playerview [ j ] . playernum = cl . allocated_client_slots + j ;
cl . playerview [ j ] . viewentity = 0 ; //free floating.
2017-05-28 15:42:32 +00:00
cl . playerview [ j ] . spectator = true ;
2012-01-24 04:24:14 +00:00
for ( i = 0 ; i < UPDATE_BACKUP ; i + + )
{
2013-06-23 02:17:02 +00:00
cl . inframes [ i ] . playerstate [ cl . playerview [ j ] . playernum ] . pm_type = PM_SPECTATOR ;
cl . inframes [ i ] . playerstate [ cl . playerview [ j ] . playernum ] . messagenum = 1 ;
2012-01-24 04:24:14 +00:00
}
}
2004-08-23 00:15:46 +00:00
cl . splitclients = 1 ;
}
2012-02-12 05:18:31 +00:00
else if ( cls . fteprotocolextensions2 & PEXT2_MAXPLAYERS )
{
2017-06-22 16:49:29 +00:00
// qboolean spec = false;
2012-02-12 05:18:31 +00:00
cl . allocated_client_slots = MSG_ReadByte ( ) ;
if ( cl . allocated_client_slots > MAX_CLIENTS )
{
2020-09-08 05:11:09 +00:00
Con_Printf ( CON_ERROR " Server has too many client slots (%u > %u) \n " , cl . allocated_client_slots , MAX_CLIENTS ) ;
2012-02-12 05:18:31 +00:00
cl . allocated_client_slots = MAX_CLIENTS ;
}
/*parsing here is slightly different to allow us 255 max players instead of 127*/
2018-03-25 09:36:14 +00:00
cl . splitclients = ( qbyte ) MSG_ReadByte ( ) ;
2021-08-04 21:18:20 +00:00
if ( cls . fteprotocolextensions2 & PEXT2_VRINPUTS )
;
else if ( cl . splitclients & 128 )
2012-02-12 05:18:31 +00:00
{
2017-06-22 16:49:29 +00:00
// spec = true;
2012-02-12 05:18:31 +00:00
cl . splitclients & = ~ 128 ;
}
if ( cl . splitclients > MAX_SPLITS )
2020-09-08 05:11:09 +00:00
Host_EndGame ( " Server sent us too many seats (%u > %u) \n " , cl . splitclients , MAX_SPLITS ) ;
2012-02-12 05:18:31 +00:00
for ( pnum = 0 ; pnum < cl . splitclients ; pnum + + )
{
2017-05-28 15:42:32 +00:00
cl . playerview [ pnum ] . spectator = true ;
2021-04-17 14:00:51 +00:00
# ifdef QUAKESTATS
2014-09-14 01:45:11 +00:00
if ( cls . z_ext & Z_EXT_VIEWHEIGHT )
2021-04-14 05:21:04 +00:00
cl . playerview [ pnum ] . viewheight = cl . playerview [ pnum ] . statsf [ STAT_VIEWHEIGHT ] ;
2021-04-17 14:00:51 +00:00
# endif
2018-03-25 09:36:14 +00:00
cl . playerview [ pnum ] . playernum = ( qbyte ) MSG_ReadByte ( ) ;
2013-06-23 02:17:02 +00:00
if ( cl . playerview [ pnum ] . playernum > = cl . allocated_client_slots )
2012-02-12 05:18:31 +00:00
Host_EndGame ( " unsupported local player slot \n " ) ;
2013-06-23 02:17:02 +00:00
cl . playerview [ pnum ] . viewentity = cl . playerview [ pnum ] . playernum + 1 ;
2012-02-12 05:18:31 +00:00
}
}
else
2004-08-23 00:15:46 +00:00
{
// parse player slot, high bit means spectator
pnum = MSG_ReadByte ( ) ;
for ( clnum = 0 ; ; clnum + + )
{
2013-03-12 22:47:42 +00:00
if ( clnum = = MAX_SPLITS )
2020-09-08 05:11:09 +00:00
Host_EndGame ( " Server sent us over %u seats \n " , MAX_SPLITS ) ;
2021-04-17 14:00:51 +00:00
# ifdef QUAKESTATS
2014-09-14 01:45:11 +00:00
if ( cls . z_ext & Z_EXT_VIEWHEIGHT )
2021-04-14 05:21:04 +00:00
cl . playerview [ pnum ] . viewheight = cl . playerview [ pnum ] . statsf [ STAT_VIEWHEIGHT ] ;
2021-04-17 14:00:51 +00:00
# endif
2013-06-23 02:17:02 +00:00
cl . playerview [ clnum ] . playernum = pnum ;
if ( cl . playerview [ clnum ] . playernum & 128 )
2004-08-23 00:15:46 +00:00
{
2017-05-28 15:42:32 +00:00
cl . playerview [ clnum ] . spectator = true ;
2013-06-23 02:17:02 +00:00
cl . playerview [ clnum ] . playernum & = ~ 128 ;
2004-08-23 00:15:46 +00:00
}
2017-05-28 15:42:32 +00:00
else
cl . playerview [ clnum ] . spectator = false ;
2004-08-23 00:15:46 +00:00
2013-06-23 02:17:02 +00:00
if ( cl . playerview [ clnum ] . playernum > = cl . allocated_client_slots )
2012-02-12 05:18:31 +00:00
Host_EndGame ( " unsupported local player slot \n " ) ;
2013-06-23 02:17:02 +00:00
cl . playerview [ clnum ] . viewentity = cl . playerview [ clnum ] . playernum + 1 ;
2004-08-23 00:15:46 +00:00
if ( ! ( cls . fteprotocolextensions & PEXT_SPLITSCREEN ) )
break ;
pnum = MSG_ReadByte ( ) ;
if ( pnum = = 128 )
break ;
}
cl . splitclients = clnum + 1 ;
}
// get the full level name
str = MSG_ReadString ( ) ;
Q_strncpyz ( cl . levelname , str , sizeof ( cl . levelname ) ) ;
2017-10-12 12:02:25 +00:00
if ( cl . protocol_qw > = 25 )
{
// get the movevars
movevars . gravity = MSG_ReadFloat ( ) ;
movevars . stopspeed = MSG_ReadFloat ( ) ;
maxspeed = MSG_ReadFloat ( ) ;
movevars . spectatormaxspeed = MSG_ReadFloat ( ) ;
movevars . accelerate = MSG_ReadFloat ( ) ;
movevars . airaccelerate = MSG_ReadFloat ( ) ;
movevars . wateraccelerate = MSG_ReadFloat ( ) ;
movevars . friction = MSG_ReadFloat ( ) ;
movevars . waterfriction = MSG_ReadFloat ( ) ;
entgrav = MSG_ReadFloat ( ) ;
}
else
{
movevars . gravity = 800 ;
movevars . stopspeed = 100 ;
maxspeed = 320 ;
movevars . spectatormaxspeed = 500 ;
movevars . accelerate = 10 ;
movevars . airaccelerate = 0.7f ;
movevars . wateraccelerate = 10 ;
movevars . friction = 6.0f ;
movevars . waterfriction = 1 ;
entgrav = 1 ;
}
2019-03-23 07:06:37 +00:00
movevars . flags = MOVEFLAG_QWCOMPAT ;
2004-08-23 00:15:46 +00:00
for ( clnum = 0 ; clnum < cl . splitclients ; clnum + + )
{
2013-06-23 02:17:02 +00:00
cl . playerview [ clnum ] . maxspeed = maxspeed ;
cl . playerview [ clnum ] . entgravity = entgrav ;
2004-08-23 00:15:46 +00:00
}
// seperate the printfs so the server message can have a color
2009-07-05 18:45:53 +00:00
# if 1
2012-04-24 07:59:11 +00:00
Con_Printf ( " \n \n " ) ;
Con_Printf ( " ^Ue01d^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01f " ) ;
Con_Printf ( " \n \n " ) ;
2009-07-05 18:45:53 +00:00
Con_Printf ( " \1 %s \n " , str ) ;
# else
2013-11-29 14:36:47 +00:00
Con_TPrintf ( " \n \n ^Ue01d^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01f \n \n " ) ;
Con_Printf ( " %c%s \n " , 2 , str ) ;
2009-07-05 18:45:53 +00:00
# endif
2004-08-23 00:15:46 +00:00
2005-06-04 04:20:20 +00:00
if ( CL_RemoveClientCommands ( " new " ) ) //mvdsv is really appaling some times.
2005-10-01 13:47:47 +00:00
{
// Con_Printf("Multiple 'new' commands?!?!? This server needs reinstalling!\n");
}
2005-06-04 04:20:20 +00:00
2004-08-23 00:15:46 +00:00
memset ( cl . sound_name , 0 , sizeof ( cl . sound_name ) ) ;
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
if ( cls . demoplayback = = DPB_MVD & & ( cls . demoeztv_ext & EZTV_DOWNLOAD ) )
2004-11-17 17:58:22 +00:00
{
2016-07-12 00:40:13 +00:00
if ( CL_RemoveClientCommands ( " qtvsoundlist " ) )
Con_DPrintf ( " Multiple soundlists \n " ) ;
CL_SendClientCommand ( true , " qtvsoundlist %i 0 " , cl . servercount ) ;
2004-11-17 17:58:22 +00:00
}
else
{
2018-08-23 06:03:31 +00:00
if ( CL_RemoveClientCommands ( " soundlist " ) & & ! ( cls . fteprotocolextensions2 & PEXT2_REPLACEMENTDELTAS ) )
2016-07-12 00:40:13 +00:00
Con_DPrintf ( " Multiple soundlists \n " ) ;
// ask for the sound list next
// CL_SendClientCommand ("soundlist %i 0", cl.servercount);
CL_SendClientCommand ( true , soundlist_name , cl . servercount , 0 ) ;
2004-11-17 17:58:22 +00:00
}
2004-08-23 00:15:46 +00:00
// now waiting for downloads, etc
cls . state = ca_onserver ;
2015-06-12 14:44:50 +00:00
Cam_AutoTrack_Update ( NULL ) ;
2004-08-23 00:15:46 +00:00
2006-01-10 18:50:23 +00:00
cl . sendprespawn = false ;
2010-11-16 02:03:47 +00:00
# ifdef VOICECHAT
S_Voip_MapChange ( ) ;
# endif
2005-02-09 19:32:09 +00:00
# ifdef CSQC_DAT
2005-03-10 03:55:18 +00:00
CSQC_Shutdown ( ) ; //revive it when we get the serverinfo saying the checksum.
2005-02-09 19:32:09 +00:00
# endif
2004-08-23 00:15:46 +00:00
}
2010-08-11 09:31:24 +00:00
# ifdef Q2CLIENT
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
static void CLQ2_ParseServerData ( void )
2004-08-23 00:15:46 +00:00
{
char * str ;
int i ;
int svcnt ;
2023-09-11 09:31:09 +00:00
int rate ;
2004-08-23 00:15:46 +00:00
// int cflag;
2004-11-27 08:16:25 +00:00
2015-12-28 17:41:39 +00:00
memset ( & cls . netchan . netprim , 0 , sizeof ( cls . netchan . netprim ) ) ;
2019-10-14 02:36:57 +00:00
cls . netchan . netprim . coordtype = COORDTYPE_FIXED_13_3 ;
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
cls . netchan . netprim . anglesize = 1 ;
2016-01-18 05:22:07 +00:00
cls . fteprotocolextensions = 0 ;
cls . fteprotocolextensions2 = 0 ;
2017-12-28 16:24:50 +00:00
cls . ezprotocolextensions1 = 0 ;
2016-01-18 05:22:07 +00:00
cls . demohadkeyframe = true ; //assume that it did, so this stuff all gets recorded.
2005-09-26 03:40:09 +00:00
2016-09-08 19:04:35 +00:00
Con_DPrintf ( " Serverdata packet %s. \n " , cls . demoplayback ? " read " : " received " ) ;
2004-08-23 00:15:46 +00:00
//
// wipe the client_state_t struct
//
2009-04-06 00:34:32 +00:00
SCR_SetLoadingStage ( LS_CLIENT ) ;
2004-08-23 00:15:46 +00:00
SCR_BeginLoadingPlaque ( ) ;
// CL_ClearState ();
cls . state = ca_onserver ;
// parse protocol version number
i = MSG_ReadLong ( ) ;
2016-01-18 05:22:07 +00:00
2019-05-10 09:31:21 +00:00
if ( i = = PROTOCOL_VERSION_FTE1 )
2016-01-18 05:22:07 +00:00
{
cls . fteprotocolextensions = i = MSG_ReadLong ( ) ;
2023-09-11 09:31:09 +00:00
if ( i & PEXT_FLOATCOORDS )
i - = PEXT_FLOATCOORDS ;
2016-01-18 05:22:07 +00:00
if ( i & PEXT_SOUNDDBL )
i - = PEXT_SOUNDDBL ;
if ( i & PEXT_MODELDBL )
i - = PEXT_MODELDBL ;
if ( i & PEXT_SPLITSCREEN )
i - = PEXT_SPLITSCREEN ;
if ( i )
Host_EndGame ( " Unsupported q2 protocol extensions: %x " , i ) ;
i = MSG_ReadLong ( ) ;
if ( cls . fteprotocolextensions & PEXT_FLOATCOORDS )
2023-09-11 09:31:09 +00:00
{
2019-10-14 02:36:57 +00:00
cls . netchan . netprim . coordtype = COORDTYPE_FLOAT_32 ;
2023-09-11 09:31:09 +00:00
cls . netchan . netprim . anglesize = 2 ;
}
2016-01-18 05:22:07 +00:00
}
2004-08-23 00:15:46 +00:00
2015-12-28 17:41:39 +00:00
if ( i = = PROTOCOL_VERSION_R1Q2 )
Con_DPrintf ( " Using R1Q2 protocol \n " ) ;
else if ( i = = PROTOCOL_VERSION_Q2PRO )
Con_DPrintf ( " Using Q2PRO protocol \n " ) ;
2023-09-11 09:31:09 +00:00
else if ( i = = PROTOCOL_VERSION_Q2EXDEMO )
{
i = PROTOCOL_VERSION_Q2EX ; //close enough, don't distinguish. only real difference is 16bit coords for WritePos etc.
Con_DPrintf ( " Using Q2EXDemo protocol \n " ) ;
}
else if ( i = = PROTOCOL_VERSION_Q2EX )
{
cls . netchan . netprim . coordtype = COORDTYPE_FLOAT_32 ;
cls . netchan . netprim . anglesize = 2 ;
Con_DPrintf ( " Using Q2EX protocol \n " ) ;
}
2015-12-28 17:41:39 +00:00
else if ( i > PROTOCOL_VERSION_Q2 | | i < ( cls . demoplayback ? PROTOCOL_VERSION_Q2_DEMO_MIN : PROTOCOL_VERSION_Q2_MIN ) )
Host_EndGame ( " Q2 Server returned version %i, not %i " , i , PROTOCOL_VERSION_Q2 ) ;
2023-09-11 09:31:09 +00:00
cls . protocol_q2 = i ;
2004-08-23 00:15:46 +00:00
svcnt = MSG_ReadLong ( ) ;
/*cl.attractloop =*/ MSG_ReadByte ( ) ;
2023-09-11 09:31:09 +00:00
if ( cls . protocol_q2 = = PROTOCOL_VERSION_Q2EX )
rate = MSG_ReadByte ( ) ;
else
rate = 10 ; //fixed to a poopy 10hz.
2004-08-23 00:15:46 +00:00
// game directory
str = MSG_ReadString ( ) ;
// set gamedir
if ( ! * str )
2015-05-14 03:06:58 +00:00
COM_Gamedir ( " baseq2 " , NULL ) ;
2004-08-23 00:15:46 +00:00
else
2015-05-14 03:06:58 +00:00
COM_Gamedir ( str , NULL ) ;
2004-08-23 00:15:46 +00:00
2006-04-11 20:09:39 +00:00
Cvar_Get ( " timescale " , " 1 " , 0 , " Q2Admin hacks " ) ; //Q2Admin will kick players who have a timescale set to something other than 1
2015-12-12 19:25:15 +00:00
//FTE doesn't actually have a timescale cvar, so create one to 'fool' q2admin.
2006-04-11 20:09:39 +00:00
//I can't really blame q2admin for rejecting engines that don't have this cvar, as it could have been renamed via a hex-edit.
2018-09-23 19:35:24 +00:00
CL_ClearState ( true ) ;
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
CLQ2_ClearState ( ) ;
2004-08-23 00:15:46 +00:00
cl . minpitch = - 89 ;
cl . maxpitch = 89 ;
cl . servercount = svcnt ;
2015-06-12 14:44:50 +00:00
Cam_AutoTrack_Update ( NULL ) ;
2017-07-10 15:40:42 +00:00
# ifdef QUAKEHUD
2004-08-23 00:15:46 +00:00
Stats_NewMap ( ) ;
2017-07-10 15:40:42 +00:00
# endif
2004-08-23 00:15:46 +00:00
// parse player entity number
2013-06-23 02:17:02 +00:00
cl . playerview [ 0 ] . playernum = MSG_ReadShort ( ) ;
cl . playerview [ 0 ] . viewentity = cl . playerview [ 0 ] . playernum + 1 ;
2017-05-28 15:42:32 +00:00
cl . playerview [ 0 ] . spectator = false ;
2004-08-23 00:15:46 +00:00
cl . splitclients = 1 ;
2023-09-11 09:31:09 +00:00
if ( cls . protocol_q2 = = PROTOCOL_VERSION_Q2EX & & cl . playerview [ 0 ] . playernum = = - 2 )
{
i = MSG_ReadShort ( ) ;
if ( i > MAX_SPLITS )
Host_EndGame ( " server's splitscreen count too high (%u > %u) \n " , i , MAX_SPLITS ) ;
cl . splitclients = i ;
for ( i = 0 ; i < cl . splitclients ; i + + )
{
cl . playerview [ i ] . playernum = MSG_ReadShort ( ) ;
cl . playerview [ i ] . viewentity = cl . playerview [ i ] . playernum + 1 ;
cl . playerview [ i ] . spectator = false ;
}
}
2006-04-11 20:09:39 +00:00
cl . numq2visibleweapons = 1 ; //give it a default.
cl . q2visibleweapons [ 0 ] = " weapon.md2 " ;
2023-09-11 09:31:09 +00:00
cl . q2svnetrate = rate ;
if ( cl . q2svnetrate < 1 ) //wut?...
cl . q2svnetrate = 10 ;
2006-04-11 20:09:39 +00:00
2004-08-23 00:15:46 +00:00
// get the full level name
str = MSG_ReadString ( ) ;
Q_strncpyz ( cl . levelname , str , sizeof ( cl . levelname ) ) ;
2015-12-28 17:41:39 +00:00
if ( cls . protocol_q2 = = PROTOCOL_VERSION_R1Q2 )
{
unsigned short r1q2ver ;
qboolean isenhanced = MSG_ReadByte ( ) ;
if ( isenhanced )
Host_EndGame ( " R1Q2 server is running an unsupported mod " ) ;
r1q2ver = MSG_ReadShort ( ) ; //protocol version... limit... yeah, buggy.
2016-10-22 07:06:51 +00:00
if ( r1q2ver > 1905 )
2015-12-28 17:41:39 +00:00
Host_EndGame ( " R1Q2 server version %i not supported " , r1q2ver ) ;
2016-10-22 07:06:51 +00:00
if ( r1q2ver > = 1903 )
{
MSG_ReadByte ( ) ; //'used to be advanced deltas'
MSG_ReadByte ( ) ; //strafejump hack
}
if ( r1q2ver > = 1904 )
cls . netchan . netprim . flags | = NPQ2_R1Q2_UCMD ;
2015-12-28 17:41:39 +00:00
if ( r1q2ver > = 1905 )
2016-07-12 00:40:13 +00:00
cls . netchan . netprim . flags | = NPQ2_SOLID32 ;
2015-12-28 17:41:39 +00:00
}
else if ( cls . protocol_q2 = = PROTOCOL_VERSION_Q2PRO )
{
unsigned short q2prover = MSG_ReadShort ( ) ; //q2pro protocol version
if ( q2prover < 1011 | | q2prover > 1021 )
Host_EndGame ( " Q2PRO server version %i not supported " , q2prover ) ;
MSG_ReadByte ( ) ; //server state (ie: demo playback vs actual game)
MSG_ReadByte ( ) ; //strafejump hack
MSG_ReadByte ( ) ; //q2pro qw-mode. kinda silly for us tbh.
if ( q2prover > = 1014 )
2016-07-12 00:40:13 +00:00
cls . netchan . netprim . flags | = NPQ2_SOLID32 ;
2015-12-28 17:41:39 +00:00
if ( q2prover > = 1018 )
2016-07-12 00:40:13 +00:00
cls . netchan . netprim . flags | = NPQ2_ANG16 ;
2015-12-28 17:41:39 +00:00
if ( q2prover > = 1015 )
MSG_ReadByte ( ) ; //some kind of waterjump hack enable
}
2016-10-22 07:06:51 +00:00
cls . netchan . message . prim = cls . netchan . netprim ;
2015-12-28 17:41:39 +00:00
MSG_ChangePrimitives ( cls . netchan . netprim ) ;
2013-06-23 02:17:02 +00:00
if ( cl . playerview [ 0 ] . playernum = = - 1 )
2004-08-23 00:15:46 +00:00
{ // playing a cinematic or showing a pic, not a level
SCR_EndLoadingPlaque ( ) ;
2016-07-12 00:40:13 +00:00
CL_MakeActive ( " Quake2 " ) ;
2023-08-11 13:47:53 +00:00
if ( ! COM_FCheckExists ( str ) & & ! COM_FCheckExists ( va ( " video/%s " , str ) ) )
{
int i ;
char basename [ 64 ] , * t ;
char * exts [ ] = { " .ogv " , " .roq " , " .cin " } ;
COM_StripExtension ( COM_SkipPath ( str ) , basename , sizeof ( basename ) ) ;
for ( i = 0 ; i < countof ( exts ) ; i + + )
{
t = va ( " video/%s%s " , basename , exts [ i ] ) ;
if ( COM_FCheckExists ( t ) )
{
str = t ;
break ;
}
}
}
2013-05-03 04:28:08 +00:00
if ( ! Media_PlayFilm ( str , false ) )
2010-11-13 17:22:46 +00:00
{
CL_SendClientCommand ( true , " nextserver %i " , cl . servercount ) ;
}
2004-08-23 00:15:46 +00:00
}
else
{
// seperate the printfs so the server message can have a color
2013-11-29 14:36:47 +00:00
Con_TPrintf ( " \n \n ^Ue01d^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01f \n \n " ) ;
Con_Printf ( " %c%s \n " , 2 , str ) ;
2004-08-23 00:15:46 +00:00
2013-05-03 04:28:08 +00:00
Media_StopFilm ( true ) ;
2004-08-27 00:48:03 +00:00
2004-08-23 00:15:46 +00:00
// need to prep refresh at next oportunity
//cl.refresh_prepped = false;
}
2008-11-09 22:29:28 +00:00
Cvar_ForceCallback ( Cvar_FindVar ( " r_particlesdesc " ) ) ;
2004-08-23 00:15:46 +00:00
2014-10-05 20:04:11 +00:00
Surf_PreNewMap ( ) ;
2023-03-15 01:31:51 +00:00
CL_CheckServerInfo ( ) ;
2004-08-23 00:15:46 +00:00
}
2010-08-11 09:31:24 +00:00
# endif
2004-08-23 00:15:46 +00:00
2008-12-03 02:42:05 +00:00
void CL_ParseEstablished ( void )
{
# ifdef NQPROT
2022-01-16 18:41:44 +00:00
cls . qex = false ;
2021-05-27 11:36:01 +00:00
Z_Free ( cl_dp_packagenames ) ;
cl_dp_packagenames = NULL ;
2008-12-03 02:42:05 +00:00
cl_dp_serverextension_download = false ;
2018-09-23 19:35:24 +00:00
* cl_dp_csqc_progsname = 0 ;
2008-12-03 02:42:05 +00:00
cl_dp_csqc_progscrc = 0 ;
cl_dp_csqc_progssize = 0 ;
# endif
2022-01-28 10:48:01 +00:00
if ( cls . netchan . remote_address . type ! = NA_LOOPBACK )
{
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
char fp [ DIGEST_MAXSIZE * 3 + 1 + 4 ] ;
char dig [ DIGEST_MAXSIZE + 1 ] ;
char cert [ 8192 ] ;
2022-01-28 10:48:01 +00:00
const char * security ;
switch ( cls . protocol )
{
case CP_QUAKEWORLD : Con_DPrintf ( S_COLOR_GRAY " QW " ) ; break ;
case CP_NETQUAKE : Con_Printf ( S_COLOR_GRAY " NQ " ) ; break ;
case CP_QUAKE2 : Con_Printf ( S_COLOR_GRAY " Q2 " ) ; break ;
case CP_QUAKE3 : Con_Printf ( S_COLOR_GRAY " Q3 " ) ; break ;
default : break ;
}
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
* fp = 0 ;
2022-07-28 02:16:31 +00:00
if ( NET_IsEncrypted ( & cls . netchan . remote_address ) )
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
{
if ( cls . netchan . remote_address . prot = = NP_DTLS )
{
int sz = NET_GetConnectionCertificate ( cls . sockets , & cls . netchan . remote_address , QCERT_PEERCERTIFICATE , cert , sizeof ( cert ) ) ;
if ( sz > = 0 )
{
Q_strncpyz ( fp , " ?fp= " , sizeof ( fp ) ) ;
sz = 4 + Base64_EncodeBlockURI ( dig , CalcHash ( & hash_certfp , dig , sizeof ( dig ) , cert , sz ) , fp + 4 , sizeof ( fp ) - 4 ) ;
fp [ sz ] = 0 ;
}
}
security = localtext ( " ^[ " S_COLOR_GREEN " encrypted \\ tip \\ Any passwords will be sent securely, but will still be readable by the server admin \n ^] " ) ;
}
2022-01-28 10:48:01 +00:00
else
2023-05-27 17:00:32 +00:00
security = localtext ( " ^[ " S_COLOR_RED " plain-text \\ tip \\ " CON_WARNING " Do not type passwords as they can potentially be seen by network sniffers^] " ) ;
2022-01-28 10:48:01 +00:00
2023-05-27 17:00:32 +00:00
Con_Printf ( " \r " ) ;
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
Con_TPrintf ( " Connected to ^[ " S_COLOR_BLUE " %s " S_COLOR_GRAY " %s \\ type \\ connect %s%s^] (%s). \n " , cls . servername , fp , cls . servername , fp , security ) ;
2022-01-28 10:48:01 +00:00
}
2008-12-03 02:42:05 +00:00
}
2004-08-23 00:15:46 +00:00
# ifdef NQPROT
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
static void CLNQ_ParseProtoVersion ( void )
2004-08-23 00:15:46 +00:00
{
int protover ;
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 ;
2007-06-20 00:02:54 +00:00
2013-03-12 22:35:33 +00:00
cls . fteprotocolextensions = 0 ;
cls . fteprotocolextensions2 = 0 ;
2017-12-28 16:24:50 +00:00
cls . ezprotocolextensions1 = 0 ;
2013-03-12 22:35:33 +00:00
for ( ; ; )
{
protover = MSG_ReadLong ( ) ;
switch ( protover )
{
2019-05-10 09:31:21 +00:00
case PROTOCOL_VERSION_FTE1 :
2013-03-12 22:35:33 +00:00
cls . fteprotocolextensions = MSG_ReadLong ( ) ;
continue ;
case PROTOCOL_VERSION_FTE2 :
cls . fteprotocolextensions2 = MSG_ReadLong ( ) ;
continue ;
default :
break ;
}
break ;
}
2004-08-23 00:15:46 +00:00
2019-10-14 02:36:57 +00:00
netprim . coordtype = COORDTYPE_FIXED_13_3 ;
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
netprim . anglesize = 1 ;
2004-11-27 08:16:25 +00:00
2016-07-12 00:40:13 +00:00
cls . protocol_nq = CPNQ_ID ;
2004-12-05 08:19:54 +00:00
cls . z_ext = 0 ;
2004-11-27 08:16:25 +00:00
2019-04-16 22:40:05 +00:00
# ifdef HAVE_LEGACY
2017-07-12 08:15:27 +00:00
if ( protover = = PROTOCOL_VERSION_NQ & & cls . demoplayback )
{
if ( ! Q_strcasecmp ( FS_GetGamedir ( true ) , " nehahra " ) )
protover = PROTOCOL_VERSION_NEHD ; //if we're using the nehahra gamedir, pretend that it was the nehahra protocol version. clients should otherwise be using a different protocol.
}
# endif
2016-02-15 06:01:17 +00:00
if ( protover = = PROTOCOL_VERSION_NEHD )
2017-07-12 08:15:27 +00:00
{
cls . protocol_nq = CPNQ_NEHAHRA ;
Con_DPrintf ( " Nehahra demo net protocol \n " ) ;
}
2016-02-15 06:01:17 +00:00
else if ( protover = = PROTOCOL_VERSION_FITZ )
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
{
//fitzquake 0.85
cls . protocol_nq = CPNQ_FITZ666 ;
Con_DPrintf ( " FitzQuake 666 protocol \n " ) ;
}
2016-02-15 06:01:17 +00:00
else if ( protover = = PROTOCOL_VERSION_RMQ )
2011-10-27 15:46:36 +00:00
{
int fl ;
cls . protocol_nq = CPNQ_FITZ666 ;
Con_DPrintf ( " RMQ extensions to FitzQuake's protocol \n " ) ;
fl = MSG_ReadLong ( ) ;
2024-04-25 05:57:34 +00:00
if ( ( ( fl & RMQFL_SHORTANGLE ) & & ( fl & RMQFL_FLOATANGLE ) ) | |
( ( fl & RMQFL_24BITCOORD ) & & ( fl & RMQFL_INT32COORD ) ) | |
( ( fl & RMQFL_24BITCOORD ) & & ( fl & RMQFL_FLOATCOORD ) ) | |
( ( fl & RMQFL_INT32COORD ) & & ( fl & RMQFL_FLOATCOORD ) ) )
Host_EndGame ( " Server is using conflicting RMQ protocol bits - %#x \n " , fl ) ;
2011-10-27 15:46:36 +00:00
if ( fl & RMQFL_SHORTANGLE )
netprim . anglesize = 2 ;
if ( fl & RMQFL_FLOATANGLE )
netprim . anglesize = 4 ;
if ( fl & RMQFL_24BITCOORD )
2019-10-14 02:36:57 +00:00
netprim . coordtype = COORDTYPE_FIXED_16_8 ;
if ( fl & RMQFL_INT32COORD )
netprim . coordtype = COORDTYPE_FIXED_28_4 ;
2011-10-27 15:46:36 +00:00
if ( fl & RMQFL_FLOATCOORD )
2019-10-14 02:36:57 +00:00
netprim . coordtype = COORDTYPE_FLOAT_32 ;
2024-04-25 05:57:34 +00:00
fl & = ~ ( RMQFL_SHORTANGLE | RMQFL_FLOATANGLE | RMQFL_24BITCOORD | RMQFL_INT32COORD | RMQFL_FLOATCOORD | RMQFL_EDICTSCALE ) ;
if ( fl )
Host_EndGame ( " Server is using unsupported RMQ extensions - %#x \n " , fl ) ;
2011-10-27 15:46:36 +00:00
}
2016-02-15 06:01:17 +00:00
else if ( protover = = PROTOCOL_VERSION_DP5 )
2004-11-27 08:16:25 +00:00
{
//darkplaces5
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
cls . protocol_nq = CPNQ_DP5 ;
2019-10-14 02:36:57 +00:00
netprim . coordtype = COORDTYPE_FLOAT_32 ;
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
netprim . anglesize = 2 ;
2005-09-26 03:40:09 +00:00
Con_DPrintf ( " DP5 protocols \n " ) ;
2004-11-27 08:16:25 +00:00
}
2016-02-15 06:01:17 +00:00
else if ( protover = = PROTOCOL_VERSION_DP6 )
2004-12-05 08:19:54 +00:00
{
//darkplaces6 (it's a small difference from dp5)
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
cls . protocol_nq = CPNQ_DP6 ;
2019-10-14 02:36:57 +00:00
netprim . coordtype = COORDTYPE_FLOAT_32 ;
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
netprim . anglesize = 2 ;
2004-12-05 08:19:54 +00:00
cls . z_ext = Z_EXT_VIEWHEIGHT ;
2005-09-26 03:40:09 +00:00
Con_DPrintf ( " DP6 protocols \n " ) ;
2004-12-05 08:19:54 +00:00
}
2016-02-15 06:01:17 +00:00
else if ( protover = = PROTOCOL_VERSION_DP7 )
2005-05-26 12:55:34 +00:00
{
//darkplaces7 (it's a small difference from dp5)
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
cls . protocol_nq = CPNQ_DP7 ;
2019-10-14 02:36:57 +00:00
netprim . coordtype = COORDTYPE_FLOAT_32 ;
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
netprim . anglesize = 2 ;
2005-05-26 12:55:34 +00:00
cls . z_ext = Z_EXT_VIEWHEIGHT ;
2005-09-26 03:40:09 +00:00
Con_DPrintf ( " DP7 protocols \n " ) ;
2005-05-26 12:55:34 +00:00
}
2016-02-15 06:01:17 +00:00
else if ( protover = = PROTOCOL_VERSION_H2 )
2010-08-16 02:03:02 +00:00
{
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
if ( cls . demoplayback )
cls . protocol_nq = CPNQ_H2MP ;
else
Host_EndGame ( " \n Unable to connect to standard Hexen2 servers. Host the game with " DISTRIBUTION " \n " ) ;
2010-08-16 02:03:02 +00:00
}
2016-02-15 06:01:17 +00:00
else if ( protover = = PROTOCOL_VERSION_BJP1 )
2004-08-23 00:15:46 +00:00
{
2016-02-15 06:01:17 +00:00
cls . protocol_nq = CPNQ_BJP1 ;
Con_DPrintf ( " bjp1 %i protocol \n " , PROTOCOL_VERSION_BJP1 ) ;
2004-08-23 00:15:46 +00:00
}
2016-02-15 06:01:17 +00:00
else if ( protover = = PROTOCOL_VERSION_BJP2 )
2005-09-26 03:40:09 +00:00
{
2016-02-15 06:01:17 +00:00
cls . protocol_nq = CPNQ_BJP2 ;
Con_DPrintf ( " bjp2 %i protocol \n " , PROTOCOL_VERSION_BJP2 ) ;
}
else if ( protover = = PROTOCOL_VERSION_BJP3 )
{
cls . protocol_nq = CPNQ_BJP3 ;
2017-01-15 13:13:09 +00:00
Con_DPrintf ( " bjp3 %i protocol \n " , PROTOCOL_VERSION_BJP3 ) ;
2005-09-26 03:40:09 +00:00
}
2016-02-15 06:01:17 +00:00
else if ( protover = = PROTOCOL_VERSION_NQ )
Con_DPrintf ( " Standard NQ protocols \n " ) ;
else
Host_EndGame ( " Server is using protocol version %i, which is not supported by this version of " FULLENGINENAME " . " , protover ) ;
2013-03-12 22:35:33 +00:00
if ( cls . fteprotocolextensions & PEXT_FLOATCOORDS )
{
if ( netprim . anglesize < 2 )
netprim . anglesize = 2 ;
2019-10-14 02:36:57 +00:00
if ( netprim . coordtype < COORDTYPE_FLOAT_32 )
netprim . coordtype = COORDTYPE_FLOAT_32 ;
2013-03-12 22:35:33 +00:00
}
Fixes, workarounds, and breakages. Hexen2 should work much better (-hexen2 says no mission pack, -portals says h2mp). Started working on splitting bigcoords per client, far too much work still to go on that. Removed gl_ztrick entirely. Enabled csprogs download by default. Added client support for fitzquake's 666 protocol, needs testing, some cleanup for dp protocols too, no server support, couldn't selectively enable it anyway. Now attempting to cache shadow meshes for explosions and stuff. Played with lightmaps a little, should potentially run a little faster on certain (intel?) cards. Tweeked npfte a little to try to avoid deadlocks and crashes. Fixed sky worldspawn parsing. Added h2mp's model format. Fixed baseline issue in q2 client, made servers generate q2 baselines. MOVETYPE_PUSH will not rotate extra if rotation is forced. Made status command show allowed client types. Changed lighting on weapons - should now be shaded.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/branches/wip@3572 fc73d0e0-1445-4013-8a0c-d673dee63da5
2010-08-11 03:36:31 +00:00
cls . netchan . message . prim = cls . netchan . netprim = netprim ;
MSG_ChangePrimitives ( netprim ) ;
2013-07-26 17:19:06 +00:00
}
2016-07-12 00:40:13 +00:00
static int CL_Darkplaces_Particle_Precache ( const char * pname )
{
int i ;
for ( i = 1 ; i < MAX_SSPARTICLESPRE ; i + + )
{
if ( ! cl . particle_ssname [ i ] )
{
cl . particle_ssname [ i ] = strdup ( pname ) ;
cl . particle_ssprecache [ i ] = P_FindParticleType ( pname ) ;
cl . particle_ssprecaches = true ;
return i ;
}
if ( ! strcmp ( cl . particle_ssname [ i ] , pname ) )
return i ;
}
return 0 ; //failed
}
2013-07-26 17:19:06 +00:00
//FIXME: move to header
void CL_KeepaliveMessage ( 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
static void CLNQ_ParseServerData ( void ) //Doesn't change gamedir - use with caution.
2013-07-26 17:19:06 +00:00
{
int nummodels , numsounds ;
2022-01-16 18:41:44 +00:00
char * str = NULL ;
2013-07-26 17:19:06 +00:00
int gametype ;
2016-09-08 19:04:35 +00:00
Con_DPrintf ( " Serverdata packet %s. \n " , cls . demoplayback ? " read " : " received " ) ;
2013-07-26 17:19:06 +00:00
SCR_SetLoadingStage ( LS_CLIENT ) ;
2018-09-23 19:35:24 +00:00
CL_ClearState ( true ) ;
2017-07-10 15:40:42 +00:00
# ifdef QUAKEHUD
2013-07-26 17:19:06 +00:00
Stats_NewMap ( ) ;
2017-07-10 15:40:42 +00:00
# endif
2013-07-26 17:19:06 +00:00
Cvar_ForceCallback ( Cvar_FindVar ( " r_particlesdesc " ) ) ;
CLNQ_ParseProtoVersion ( ) ;
2005-09-26 03:40:09 +00:00
2022-01-16 18:41:44 +00:00
if ( cls . qex )
2016-10-22 07:06:51 +00:00
{
2022-01-16 18:41:44 +00:00
cl . allocated_client_slots = MSG_ReadByte ( ) ;
2016-10-22 07:06:51 +00:00
str = MSG_ReadString ( ) ;
2022-01-16 18:41:44 +00:00
}
else
{
if ( cls . fteprotocolextensions2 & PEXT2_PREDINFO )
str = MSG_ReadString ( ) ;
cl . allocated_client_slots = MSG_ReadByte ( ) ;
}
if ( str )
{
2016-10-22 07:06:51 +00:00
# ifndef CLIENTONLY
if ( ! sv . state )
# endif
COM_Gamedir ( str , NULL ) ;
}
2016-09-08 19:04:35 +00:00
if ( cl . allocated_client_slots > MAX_CLIENTS )
2004-08-23 00:15:46 +00:00
{
2016-09-08 19:04:35 +00:00
cl . allocated_client_slots = MAX_CLIENTS ;
2006-01-28 19:04:13 +00:00
Con_Printf ( " \n Warning, this server supports more than %i clients, additional clients will do bad things \n " , MAX_CLIENTS ) ;
2004-08-23 00:15:46 +00:00
}
cl . splitclients = 1 ;
2022-01-16 18:41:44 +00:00
2008-11-09 22:29:28 +00:00
gametype = MSG_ReadByte ( ) ;
2004-08-23 00:15:46 +00:00
str = MSG_ReadString ( ) ;
Q_strncpyz ( cl . levelname , str , sizeof ( cl . levelname ) ) ;
// seperate the printfs so the server message can have a color
2012-11-27 03:23:19 +00:00
# if 1
Con_Printf ( " \n \n " ) ;
Con_Printf ( " ^Ue01d^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01f " ) ;
Con_Printf ( " \n \n " ) ;
Con_Printf ( " \1 %s \n " , str ) ;
# else
2013-11-29 14:36:47 +00:00
Con_TPrintf ( " \n \n ^Ue01d^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01e^Ue01f \n \n " ) ;
Con_Printf ( " %c%s \n " , 2 , str ) ;
2012-11-27 03:23:19 +00:00
# endif
2004-08-23 00:15:46 +00:00
SCR_BeginLoadingPlaque ( ) ;
2014-10-05 20:04:11 +00:00
Surf_PreNewMap ( ) ;
2004-08-23 00:15:46 +00:00
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
for ( nummodels = 0 ; nummodels < countof ( cl . model_name ) ; nummodels + + )
{
if ( cl . model_name [ nummodels ] )
{
Z_Free ( cl . model_name [ nummodels ] ) ;
cl . model_name [ nummodels ] = NULL ;
}
}
2004-08-23 00:15:46 +00:00
for ( nummodels = 1 ; ; nummodels + + )
{
str = MSG_ReadString ( ) ;
if ( ! str [ 0 ] )
break ;
2014-09-17 03:04:08 +00:00
if ( nummodels = = MAX_PRECACHE_MODELS )
2004-08-23 00:15:46 +00:00
{
2013-11-29 14:36:47 +00:00
Con_TPrintf ( " Server sent too many model precaches \n " ) ;
2004-08-23 00:15:46 +00:00
return ;
}
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
Z_StrDupPtr ( & cl . model_name [ nummodels ] , str ) ;
2013-03-12 23:24:15 +00:00
if ( * str ! = ' * ' & & strcmp ( str , " null " ) ) //not inline models!
2017-01-13 00:39:50 +00:00
CL_CheckOrEnqueDownloadFile ( str , NULL , ( ( nummodels = = 1 ) ? DLLF_REQUIRED | DLLF_ALLOWWEB : 0 ) ) ;
2020-09-29 07:09:01 +00:00
//qw has a special network protocol for spikes.
if ( ! strcmp ( cl . model_name [ nummodels ] , " progs/spike.mdl " ) )
cl_spikeindex = nummodels ;
if ( ! strcmp ( cl . model_name [ nummodels ] , " progs/player.mdl " ) )
cl_playerindex = nummodels ;
# ifdef HAVE_LEGACY
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
if ( cl . model_name_vwep [ 0 ] & & ! strcmp ( cl . model_name [ nummodels ] , cl . model_name_vwep [ 0 ] ) & & cl_playerindex = = - 1 )
2020-09-29 07:09:01 +00:00
cl_playerindex = nummodels ;
# endif
if ( ! strcmp ( cl . model_name [ nummodels ] , " progs/h_player.mdl " ) )
cl_h_playerindex = nummodels ;
if ( ! strcmp ( cl . model_name [ nummodels ] , " progs/flag.mdl " ) )
cl_flagindex = nummodels ;
//rocket to grenade
if ( ! strcmp ( cl . model_name [ nummodels ] , " progs/missile.mdl " ) )
cl_rocketindex = nummodels ;
if ( ! strcmp ( cl . model_name [ nummodels ] , " progs/grenade.mdl " ) )
cl_grenadeindex = nummodels ;
//cl_gibfilter
if ( ! strcmp ( cl . model_name [ nummodels ] , " progs/gib1.mdl " ) )
cl_gib1index = nummodels ;
if ( ! strcmp ( cl . model_name [ nummodels ] , " progs/gib2.mdl " ) )
cl_gib2index = nummodels ;
if ( ! strcmp ( cl . model_name [ nummodels ] , " progs/gib3.mdl " ) )
cl_gib3index = nummodels ;
2004-08-23 00:15:46 +00:00
Mod_TouchModel ( str ) ;
}
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
for ( numsounds = 0 ; numsounds < countof ( cl . sound_name ) ; numsounds + + )
{
if ( cl . sound_name [ numsounds ] )
{
Z_Free ( cl . sound_name [ numsounds ] ) ;
cl . sound_name [ numsounds ] = NULL ;
}
}
2004-08-23 00:15:46 +00:00
for ( numsounds = 1 ; ; numsounds + + )
{
2005-09-26 03:40:09 +00:00
str = MSG_ReadString ( ) ;
2004-08-23 00:15:46 +00:00
if ( ! str [ 0 ] )
break ;
2014-09-17 03:04:08 +00:00
if ( numsounds = = MAX_PRECACHE_SOUNDS )
2004-08-23 00:15:46 +00:00
{
2013-11-29 14:36:47 +00:00
Con_TPrintf ( " Server sent too many sound precaches \n " ) ;
2004-08-23 00:15:46 +00:00
return ;
}
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
Z_StrDupPtr ( & cl . sound_name [ numsounds ] , str ) ;
2021-05-19 04:49:58 +00:00
cl . sound_precache [ numsounds ] = S_FindName ( cl . sound_name [ numsounds ] , true , false ) ;
2008-12-03 02:42:05 +00:00
2013-03-12 23:24:15 +00:00
Sound_CheckDownload ( str ) ;
2004-08-23 00:15:46 +00:00
}
2008-11-09 22:29:28 +00:00
cls . signon = 0 ;
cls . state = ca_onserver ;
2015-06-12 14:44:50 +00:00
Cam_AutoTrack_Update ( NULL ) ;
2004-08-23 00:15:46 +00:00
2008-11-09 22:29:28 +00:00
//fill in the csqc stuff
2009-03-03 01:52:30 +00:00
if ( ! cl_dp_csqc_progscrc )
{
2018-07-05 16:21:44 +00:00
InfoBuf_RemoveKey ( & cl . serverinfo , " *csprogs " ) ;
InfoBuf_RemoveKey ( & cl . serverinfo , " *csprogssize " ) ;
InfoBuf_RemoveKey ( & cl . serverinfo , " *csprogsname " ) ;
2009-03-03 01:52:30 +00:00
}
else
{
2018-07-05 16:21:44 +00:00
InfoBuf_SetStarKey ( & cl . serverinfo , " *csprogs " , va ( " %i " , cl_dp_csqc_progscrc ) ) ;
InfoBuf_SetStarKey ( & cl . serverinfo , " *csprogssize " , va ( " %i " , cl_dp_csqc_progssize ) ) ;
InfoBuf_SetStarKey ( & cl . serverinfo , " *csprogsname " , va ( " %s " , cl_dp_csqc_progsname ) ) ;
2009-03-03 01:52:30 +00:00
}
2004-08-23 00:15:46 +00:00
2021-05-27 11:36:01 +00:00
if ( cl_dp_packagenames )
2018-09-23 19:35:24 +00:00
{
char * in = cl_dp_packagenames ;
2021-05-27 11:36:01 +00:00
if ( cl . serverpacknames )
Z_StrCat ( & cl . serverpacknames , " " ) ;
Z_StrCat ( & cl . serverpacknames , in ) ;
while ( ( in = COM_Parse ( in ) ) )
2018-09-23 19:35:24 +00:00
{
2021-05-27 11:36:01 +00:00
Z_StrCat ( & cl . serverpackhashes , cl . serverpackhashes ? " - " : " - " ) ; //no hash info.
2018-09-23 19:35:24 +00:00
cl . serverpakschanged = true ;
}
}
2008-11-09 22:29:28 +00:00
//update gamemode
2013-03-12 22:53:23 +00:00
if ( gametype ! = GAME_COOP )
2018-07-05 16:21:44 +00:00
InfoBuf_SetKey ( & cl . serverinfo , " deathmatch " , " 1 " ) ;
2008-11-09 22:29:28 +00:00
else
2018-07-05 16:21:44 +00:00
InfoBuf_SetKey ( & cl . serverinfo , " deathmatch " , " 0 " ) ;
InfoBuf_SetKey ( & cl . serverinfo , " teamplay " , " 0 " ) ;
2004-08-23 00:15:46 +00:00
Fixes, workarounds, and breakages. Hexen2 should work much better (-hexen2 says no mission pack, -portals says h2mp). Started working on splitting bigcoords per client, far too much work still to go on that. Removed gl_ztrick entirely. Enabled csprogs download by default. Added client support for fitzquake's 666 protocol, needs testing, some cleanup for dp protocols too, no server support, couldn't selectively enable it anyway. Now attempting to cache shadow meshes for explosions and stuff. Played with lightmaps a little, should potentially run a little faster on certain (intel?) cards. Tweeked npfte a little to try to avoid deadlocks and crashes. Fixed sky worldspawn parsing. Added h2mp's model format. Fixed baseline issue in q2 client, made servers generate q2 baselines. MOVETYPE_PUSH will not rotate extra if rotation is forced. Made status command show allowed client types. Changed lighting on weapons - should now be shaded.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/branches/wip@3572 fc73d0e0-1445-4013-8a0c-d673dee63da5
2010-08-11 03:36:31 +00:00
//allow some things by default that quakeworld bans by default
2018-07-05 16:21:44 +00:00
InfoBuf_SetKey ( & cl . serverinfo , " watervis " , " 1 " ) ;
2011-09-03 03:49:43 +00:00
2016-07-12 00:40:13 +00:00
//prohibit some things that QW/FTE has enabled by default, which would be frowned upon in NQ
2018-07-05 16:21:44 +00:00
InfoBuf_SetKey ( & cl . serverinfo , " fbskins " , " 0 " ) ;
2005-05-19 02:53:03 +00:00
2008-11-09 22:29:28 +00:00
//pretend it came from the server, and update cheat/permissions/etc
CL_CheckServerInfo ( ) ;
2004-08-23 00:15:46 +00:00
2010-12-23 08:53:23 +00:00
# if _MSC_VER > 1200
2010-12-05 02:46:07 +00:00
Sys_RecentServer ( " +nqconnect " , cls . servername , cls . servername , " Join NQ Server " ) ;
2010-12-23 08:53:23 +00:00
# endif
2010-12-05 02:46:07 +00:00
2016-07-12 00:40:13 +00:00
if ( CPNQ_IS_DP ) //DP's protocol requires client+server to have exactly the same data files. this is shit, but in the interests of compatibility...
COM_Effectinfo_Enumerate ( CL_Darkplaces_Particle_Precache ) ;
2017-01-17 19:04:09 +00:00
# ifdef VOICECHAT
S_Voip_MapChange ( ) ;
# endif
2018-03-24 04:02:09 +00:00
# ifdef CSQC_DAT
2008-11-09 22:29:28 +00:00
CSQC_Shutdown ( ) ;
2009-07-18 20:46:42 +00:00
# endif
2004-08-23 00:15:46 +00:00
}
2022-01-16 18:41:44 +00:00
static void CLQEX_ParseServerVars ( void )
{
unsigned int bits = MSG_ReadULEB128 ( ) ;
if ( bits & QEX_GV_DEATHMATCH )
2022-08-19 13:30:16 +00:00
InfoBuf_SetStarKey ( & cl . serverinfo , " deathmatch " , va ( " %i " , MSG_ReadByte ( ) ) ) ;
2022-01-16 18:41:44 +00:00
if ( bits & QEX_GV_IDEALPITCHSCALE )
MSG_ReadFloat ( ) ;
if ( bits & QEX_GV_FRICTION )
movevars . friction = MSG_ReadFloat ( ) ;
if ( bits & QEX_GV_EDGEFRICTION )
2022-08-19 13:30:16 +00:00
InfoBuf_SetStarKey ( & cl . serverinfo , " pm_edgefriction " , va ( " %g " , MSG_ReadFloat ( ) ) ) ;
2022-01-16 18:41:44 +00:00
if ( bits & QEX_GV_STOPSPEED )
movevars . stopspeed = MSG_ReadFloat ( ) ;
if ( bits & QEX_GV_MAXVELOCITY )
/*movevars.maxvelocity =*/ MSG_ReadFloat ( ) ;
if ( bits & QEX_GV_GRAVITY )
movevars . gravity = MSG_ReadFloat ( ) ;
if ( bits & QEX_GV_NOSTEP )
/*movevars.nostep =*/ MSG_ReadByte ( ) ;
if ( bits & QEX_GV_MAXSPEED )
movevars . maxspeed = MSG_ReadFloat ( ) ;
if ( bits & QEX_GV_ACCELERATE )
movevars . accelerate = MSG_ReadFloat ( ) ;
if ( bits & QEX_GV_CONTROLLERONLY )
2022-08-19 13:30:16 +00:00
InfoBuf_SetStarKey ( & cl . serverinfo , " nomouse " , va ( " %i " , MSG_ReadByte ( ) ) ) ;
2022-01-16 18:41:44 +00:00
if ( bits & QEX_GV_TIMELIMIT )
InfoBuf_SetStarKey ( & cl . serverinfo , " timelimit " , va ( " %g " , MSG_ReadFloat ( ) ) ) ;
if ( bits & QEX_GV_FRAGLIMIT )
InfoBuf_SetStarKey ( & cl . serverinfo , " fraglimit " , va ( " %g " , MSG_ReadFloat ( ) ) ) ;
2022-08-19 13:30:16 +00:00
if ( bits & QEX_GV_TEAMPLAY )
InfoBuf_SetStarKey ( & cl . serverinfo , " teamplay " , va ( " %i " , MSG_ReadByte ( ) ) ) ;
if ( bits & ~ QEX_GV_ALL )
Con_Printf ( " CLQEX_ParseServerVars: Unknown bits %#x \n " , bits & ~ QEX_GV_ALL ) ;
CL_CheckServerInfo ( ) ;
}
static void CLQEX_ParsePrompt ( void )
{
int a , count = MSG_ReadByte ( ) , imp ;
const char * s ;
char message [ 65536 ] ;
size_t ofs = 0 ;
if ( count = = 0 )
{
SCR_CenterPrint ( 0 , NULL , true ) ;
return ;
}
2023-01-09 05:11:34 +00:00
* message = 0 ;
2022-08-19 13:30:16 +00:00
s = MSG_ReadString ( ) ;
Q_strncatz ( message + ofs , " /S/C/. " , sizeof ( message ) - ofs ) ;
ofs + = strlen ( message + ofs ) ;
2023-01-09 05:11:34 +00:00
TL_Reformat ( com_language , message + ofs , sizeof ( message ) - ofs , 1 , & s ) ;
2022-08-19 13:30:16 +00:00
ofs + = strlen ( message + ofs ) ;
Q_strncatz ( message + ofs , " \n " , sizeof ( message ) - ofs ) ;
ofs + = strlen ( message + ofs ) ;
for ( a = 0 ; a < count ; a + + )
{
s = MSG_ReadString ( ) ;
imp = MSG_ReadByte ( ) ;
Q_strncatz ( message + ofs , " ^[[ " , sizeof ( message ) - ofs ) ;
ofs + = strlen ( message + ofs ) ;
2023-01-09 05:11:34 +00:00
TL_Reformat ( com_language , message + ofs , sizeof ( message ) - ofs , 1 , & s ) ;
2022-08-19 13:30:16 +00:00
ofs + = strlen ( message + ofs ) ;
Q_strncatz ( message + ofs , va ( " ] \\ impulse \\ %i^] \n " , imp ) , sizeof ( message ) - ofs ) ;
ofs + = strlen ( message + ofs ) ;
}
SCR_CenterPrint ( 0 , message , true ) ;
2022-01-16 18:41:44 +00:00
}
static char * CLQEX_ReadStrings ( void )
{
unsigned short count = MSG_ReadShort ( ) , a ;
2022-01-28 10:47:52 +00:00
const char * arg [ 256 ] ;
2022-01-16 18:41:44 +00:00
static char formatted [ 8192 ] ;
2022-01-28 10:47:52 +00:00
char inputs [ 65536 ] ;
size_t ofs = 0 ;
for ( a = 0 ; a < count & & a < countof ( arg ) ; )
2022-01-16 18:41:44 +00:00
{
2022-08-19 13:30:16 +00:00
arg [ a + + ] = MSG_ReadStringBuffer ( inputs + ofs , sizeof ( inputs ) - ofs - 1 ) ;
2022-01-28 10:47:52 +00:00
ofs + = strlen ( inputs + ofs ) + 1 ;
if ( ofs > = sizeof ( inputs ) )
break ;
2022-01-16 18:41:44 +00:00
}
2022-01-28 10:47:52 +00:00
for ( ; a < count ; a + + )
MSG_ReadString ( ) ; //don't lose space, though we can't buffer it.
2022-01-16 18:41:44 +00:00
2023-01-09 05:11:34 +00:00
TL_Reformat ( com_language , formatted , sizeof ( formatted ) , a , arg ) ;
2022-01-16 18:41:44 +00:00
return formatted ;
}
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
static void CLNQ_SendInitialUserInfo ( void * ctx , const char * key , const char * value )
{
2019-04-07 16:41:09 +00:00
InfoSync_Add ( & cls . userinfosync , ctx , key ) ;
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
}
2004-08-23 00:15:46 +00:00
void CLNQ_SignonReply ( void )
2005-02-28 07:16:19 +00:00
{
2004-08-23 00:15:46 +00:00
extern cvar_t topcolor ;
extern cvar_t bottomcolor ;
2005-10-01 03:09:17 +00:00
extern cvar_t rate ;
extern cvar_t model ;
extern cvar_t skin ;
2004-08-23 00:15:46 +00:00
Con_DPrintf ( " CL_SignonReply: %i \n " , cls . signon ) ;
switch ( cls . signon )
{
case 1 :
2007-06-20 00:02:54 +00:00
cl . sendprespawn = true ;
2014-10-05 20:04:11 +00:00
SCR_SetLoadingFile ( " loading data " ) ;
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
CL_RequestNextDownload ( ) ; //this sucks, but sometimes mods send csqc-specific messages to us before things are properly inited. if we start doing stuff now then we can minimize the chances of dodgy mods screwing with us. FIXME: warn about receiving csqc messages before begin.
2004-08-23 00:15:46 +00:00
break ;
2005-09-26 03:40:09 +00:00
case 2 :
2005-03-23 22:14:08 +00:00
CL_SendClientCommand ( true , " name \" %s \" \n " , name . string ) ;
2009-11-04 21:16:50 +00:00
CL_SendClientCommand ( true , " color %i %i \n " , topcolor . ival , bottomcolor . ival ) ;
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
if ( cl . haveserverinfo )
2019-04-07 16:41:09 +00:00
InfoBuf_Enumerate ( & cls . userinfo [ 0 ] , & cls . userinfo [ 0 ] , CLNQ_SendInitialUserInfo ) ;
2017-08-29 02:29:06 +00:00
else if ( CPNQ_IS_DP )
{ //dp needs a couple of extras to work properly in certain cases. don't send them on other servers because that generally results in error messages.
2005-10-01 03:09:17 +00:00
CL_SendClientCommand ( true , " rate %s " , rate . string ) ;
CL_SendClientCommand ( true , " playermodel %s " , model . string ) ;
CL_SendClientCommand ( true , " playerskin %s " , skin . string ) ;
}
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
CL_SendClientCommand ( true , " spawn %s " , " " ) ;
2004-08-23 00:15:46 +00:00
break ;
2005-09-26 03:40:09 +00:00
case 3 :
2005-03-23 22:14:08 +00:00
CL_SendClientCommand ( true , " begin " ) ;
2004-08-23 00:15:46 +00:00
break ;
2005-09-26 03:40:09 +00:00
2004-08-23 00:15:46 +00:00
case 4 :
2005-09-26 03:40:09 +00:00
SCR_EndLoadingPlaque ( ) ; // allow normal screen updates
2009-04-19 00:50:42 +00:00
SCR_SetLoadingStage ( LS_NONE ) ;
2004-08-23 00:15:46 +00:00
break ;
}
}
# define DEFAULT_VIEWHEIGHT 22
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
static void CLNQ_ParseClientdata ( void )
2004-08-23 00:15:46 +00:00
{
2004-12-05 08:19:54 +00:00
int i ;
2017-02-21 20:22:07 +00:00
const int seat = 0 ;
player_state_t * pl = & cl . inframes [ cl . validsequence & UPDATE_MASK ] . playerstate [ cl . playerview [ seat ] . playernum ] ;
2004-11-27 08:16:25 +00:00
2005-09-26 03:40:09 +00:00
unsigned int bits ;
2006-02-12 20:20:01 +00:00
bits = ( unsigned short ) MSG_ReadShort ( ) ;
2004-11-27 08:16:25 +00:00
2013-03-12 22:36:18 +00:00
if ( bits & SU_EXTEND1 )
2004-11-27 08:16:25 +00:00
bits | = ( MSG_ReadByte ( ) < < 16 ) ;
2013-03-12 22:36:18 +00:00
if ( bits & SU_EXTEND2 )
2004-11-27 08:16:25 +00:00
bits | = ( MSG_ReadByte ( ) < < 24 ) ;
2005-09-26 03:40:09 +00:00
2004-08-23 00:15:46 +00:00
if ( bits & SU_VIEWHEIGHT )
2008-05-25 22:23:43 +00:00
CL_SetStatInt ( 0 , STAT_VIEWHEIGHT , MSG_ReadChar ( ) ) ;
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
else if ( ( ! CPNQ_IS_DP | | cls . protocol_nq < = CPNQ_DP5 ) & & cls . protocol_nq ! = CPNQ_H2MP )
2008-05-25 22:23:43 +00:00
CL_SetStatInt ( 0 , STAT_VIEWHEIGHT , DEFAULT_VIEWHEIGHT ) ;
2004-08-23 00:15:46 +00:00
if ( bits & SU_IDEALPITCH )
2016-10-22 07:06:51 +00:00
CL_SetStatInt ( 0 , STAT_IDEALPITCH , MSG_ReadChar ( ) ) ;
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
else if ( cls . protocol_nq ! = CPNQ_H2MP )
2016-10-22 07:06:51 +00:00
CL_SetStatInt ( 0 , STAT_IDEALPITCH , 0 ) ;
2005-09-26 03:40:09 +00:00
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
if ( cls . protocol_nq = = CPNQ_H2MP & & ( bits & ( 1 < < 8 ) /*SU_IDEALROLL*/ ) )
MSG_ReadChar ( ) ;
2004-08-23 00:15:46 +00:00
for ( i = 0 ; i < 3 ; i + + )
{
if ( bits & ( SU_PUNCH1 < < i ) )
2017-02-21 20:22:07 +00:00
CL_SetStatFloat ( seat , STAT_PUNCHANGLE_X + i , CPNQ_IS_DP ? MSG_ReadAngle16 ( ) : MSG_ReadChar ( ) ) ;
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
else if ( cls . protocol_nq ! = CPNQ_H2MP )
2017-02-21 20:22:07 +00:00
CL_SetStatFloat ( seat , STAT_PUNCHANGLE_X + i , 0 ) ;
2004-11-27 08:16:25 +00:00
2013-03-12 22:36:18 +00:00
if ( CPNQ_IS_DP & & bits & ( DPSU_PUNCHVEC1 < < i ) )
2017-02-21 20:22:07 +00:00
CL_SetStatFloat ( seat , STAT_PUNCHVECTOR_X + i , MSG_ReadCoord ( ) ) ;
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
else if ( cls . protocol_nq ! = CPNQ_H2MP )
2017-02-21 20:22:07 +00:00
CL_SetStatFloat ( seat , STAT_PUNCHVECTOR_X + i , 0 ) ;
2004-11-27 08:16:25 +00:00
2014-08-19 06:08:23 +00:00
if ( bits & ( SU_VELOCITY1 < < i ) )
2004-11-27 08:16:25 +00:00
{
2022-01-16 18:41:44 +00:00
if ( CPNQ_IS_DP | | ( cls . qex & & ( bits & QEX_SU_FLOATCOORDS ) ) )
2014-08-19 06:08:23 +00:00
pl - > velocity [ i ] = MSG_ReadFloat ( ) ;
2004-11-27 08:16:25 +00:00
else
2014-08-19 06:08:23 +00:00
pl - > velocity [ i ] = MSG_ReadChar ( ) * 16 ;
2004-11-27 08:16:25 +00:00
}
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
else if ( cls . protocol_nq ! = CPNQ_H2MP )
2014-08-19 06:08:23 +00:00
pl - > velocity [ i ] = 0 ;
2004-08-23 00:15:46 +00:00
}
2014-08-16 19:03:04 +00:00
if ( ( bits & SU_ITEMS ) | | cls . protocol_nq = = CPNQ_ID ) //hipnotic bug - hipnotic demos don't always have SU_ITEMS set, yet they update STAT_ITEMS anyway.
2008-05-25 22:23:43 +00:00
CL_SetStatInt ( 0 , STAT_ITEMS , MSG_ReadLong ( ) ) ;
2004-08-23 00:15:46 +00:00
2014-08-19 06:08:23 +00:00
pl - > onground = ( bits & SU_ONGROUND ) ! = 0 ;
2020-09-29 07:09:01 +00:00
if ( bits & SU_INWATER )
pl - > flags | = PF_INWATER ; //mostly just means smartjump should be used.
else
pl - > flags & = ~ PF_INWATER ;
2004-08-23 00:15:46 +00:00
Fixes, workarounds, and breakages. Hexen2 should work much better (-hexen2 says no mission pack, -portals says h2mp). Started working on splitting bigcoords per client, far too much work still to go on that. Removed gl_ztrick entirely. Enabled csprogs download by default. Added client support for fitzquake's 666 protocol, needs testing, some cleanup for dp protocols too, no server support, couldn't selectively enable it anyway. Now attempting to cache shadow meshes for explosions and stuff. Played with lightmaps a little, should potentially run a little faster on certain (intel?) cards. Tweeked npfte a little to try to avoid deadlocks and crashes. Fixed sky worldspawn parsing. Added h2mp's model format. Fixed baseline issue in q2 client, made servers generate q2 baselines. MOVETYPE_PUSH will not rotate extra if rotation is forced. Made status command show allowed client types. Changed lighting on weapons - should now be shaded.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/branches/wip@3572 fc73d0e0-1445-4013-8a0c-d673dee63da5
2010-08-11 03:36:31 +00:00
if ( cls . protocol_nq = = CPNQ_DP5 )
2004-12-05 08:19:54 +00:00
{
2008-05-25 22:23:43 +00:00
CL_SetStatInt ( 0 , STAT_WEAPONFRAME , ( bits & SU_WEAPONFRAME ) ? ( unsigned short ) MSG_ReadShort ( ) : 0 ) ;
CL_SetStatInt ( 0 , STAT_ARMOR , ( bits & SU_ARMOR ) ? MSG_ReadShort ( ) : 0 ) ;
2015-03-03 00:14:43 +00:00
CL_SetStatInt ( 0 , STAT_WEAPONMODELI , ( bits & SU_WEAPONMODEL ) ? MSG_ReadShort ( ) : 0 ) ;
2004-11-27 08:16:25 +00:00
2008-05-25 22:23:43 +00:00
CL_SetStatInt ( 0 , STAT_HEALTH , MSG_ReadShort ( ) ) ;
2004-11-27 08:16:25 +00:00
2008-05-25 22:23:43 +00:00
CL_SetStatInt ( 0 , STAT_AMMO , MSG_ReadShort ( ) ) ;
2004-11-27 08:16:25 +00:00
2008-05-25 22:23:43 +00:00
CL_SetStatInt ( 0 , STAT_SHELLS , MSG_ReadShort ( ) ) ;
CL_SetStatInt ( 0 , STAT_NAILS , MSG_ReadShort ( ) ) ;
CL_SetStatInt ( 0 , STAT_ROCKETS , MSG_ReadShort ( ) ) ;
CL_SetStatInt ( 0 , STAT_CELLS , MSG_ReadShort ( ) ) ;
2004-08-23 00:15:46 +00:00
2008-05-25 22:23:43 +00:00
CL_SetStatInt ( 0 , STAT_ACTIVEWEAPON , ( unsigned short ) MSG_ReadShort ( ) ) ;
2004-08-23 00:15:46 +00:00
}
2015-06-16 23:53:58 +00:00
else if ( CPNQ_IS_DP & & cls . protocol_nq > CPNQ_DP5 )
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
{
2012-02-12 05:18:31 +00:00
/*nothing in dp6+*/
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
}
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
else if ( cls . protocol_nq = = CPNQ_H2MP )
{ //only changed stuff
if ( bits & SU_WEAPONFRAME ) CL_SetStatInt ( 0 , STAT_WEAPONFRAME , MSG_ReadByte ( ) ) ;
if ( bits & SU_ARMOR ) CL_SetStatInt ( 0 , STAT_ARMOR , MSG_ReadByte ( ) ) ;
if ( bits & SU_WEAPONMODEL ) CL_SetStatInt ( 0 , STAT_WEAPONMODELI , MSG_ReadUInt16 ( ) ) ;
} //nothing else.
2004-11-27 08:16:25 +00:00
else
2004-08-23 00:15:46 +00:00
{
2015-08-20 03:17:47 +00:00
int weaponmodel = 0 , armour = 0 , weaponframe = 0 , health = 0 , currentammo = 0 , shells = 0 , nails = 0 , rockets = 0 , cells = 0 , activeweapon = 0 ;
2004-11-27 08:16:25 +00:00
2013-03-12 22:36:18 +00:00
if ( bits & SU_WEAPONFRAME ) weaponframe | = ( unsigned char ) MSG_ReadByte ( ) ;
2015-08-20 03:17:47 +00:00
if ( bits & SU_ARMOR ) armour | = ( unsigned char ) MSG_ReadByte ( ) ;
2016-02-15 06:01:17 +00:00
if ( bits & SU_WEAPONMODEL )
{
if ( CPNQ_IS_BJP )
weaponmodel | = ( unsigned short ) MSG_ReadShort ( ) ;
else
weaponmodel | = ( unsigned char ) MSG_ReadByte ( ) ;
}
2013-03-12 22:36:18 +00:00
health | = MSG_ReadShort ( ) ;
currentammo | = MSG_ReadByte ( ) ;
shells | = MSG_ReadByte ( ) ;
nails | = MSG_ReadByte ( ) ;
rockets | = MSG_ReadByte ( ) ;
cells | = MSG_ReadByte ( ) ;
activeweapon | = MSG_ReadByte ( ) ;
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
if ( cls . protocol_nq = = CPNQ_FITZ666 )
{
2013-03-12 22:36:18 +00:00
if ( bits & FITZSU_WEAPONMODEL2 )
weaponmodel | = MSG_ReadByte ( ) < < 8 ;
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
if ( bits & FITZSU_ARMOR2 )
2015-08-20 03:17:47 +00:00
armour | = MSG_ReadByte ( ) < < 8 ;
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
if ( bits & FITZSU_AMMO2 )
2013-03-12 22:36:18 +00:00
currentammo | = MSG_ReadByte ( ) < < 8 ;
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
if ( bits & FITZSU_SHELLS2 )
2013-03-12 22:36:18 +00:00
shells | = MSG_ReadByte ( ) < < 8 ;
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
if ( bits & FITZSU_NAILS2 )
2013-03-12 22:36:18 +00:00
nails | = MSG_ReadByte ( ) < < 8 ;
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
if ( bits & FITZSU_ROCKETS2 )
2013-03-12 22:36:18 +00:00
rockets | = MSG_ReadByte ( ) < < 8 ;
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
if ( bits & FITZSU_CELLS2 )
2013-03-12 22:36:18 +00:00
cells | = MSG_ReadByte ( ) < < 8 ;
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
if ( bits & FITZSU_WEAPONFRAME2 )
2013-03-12 22:36:18 +00:00
weaponframe | = MSG_ReadByte ( ) < < 8 ;
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
if ( bits & FITZSU_WEAPONALPHA )
MSG_ReadByte ( ) ;
2022-01-16 18:41:44 +00:00
if ( cls . qex )
{
if ( bits & QEX_SU_ENTFLAGS ) /*entflags =*/ MSG_ReadULEB128 ( ) ;
}
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
}
2013-03-12 22:36:18 +00:00
CL_SetStatInt ( 0 , STAT_WEAPONFRAME , weaponframe ) ;
2015-08-20 03:17:47 +00:00
CL_SetStatInt ( 0 , STAT_ARMOR , armour ) ;
2015-03-03 00:14:43 +00:00
CL_SetStatInt ( 0 , STAT_WEAPONMODELI , weaponmodel ) ;
2013-03-12 22:36:18 +00:00
CL_SetStatInt ( 0 , STAT_HEALTH , health ) ;
CL_SetStatInt ( 0 , STAT_AMMO , currentammo ) ;
CL_SetStatInt ( 0 , STAT_SHELLS , shells ) ;
CL_SetStatInt ( 0 , STAT_NAILS , nails ) ;
CL_SetStatInt ( 0 , STAT_ROCKETS , rockets ) ;
CL_SetStatInt ( 0 , STAT_CELLS , cells ) ;
CL_SetStatInt ( 0 , STAT_ACTIVEWEAPON , activeweapon ) ;
2004-08-23 00:15:46 +00:00
}
2004-11-27 08:16:25 +00:00
2012-02-12 05:18:31 +00:00
if ( CPNQ_IS_DP )
2004-11-27 08:16:25 +00:00
{
Fixes, workarounds, and breakages. Hexen2 should work much better (-hexen2 says no mission pack, -portals says h2mp). Started working on splitting bigcoords per client, far too much work still to go on that. Removed gl_ztrick entirely. Enabled csprogs download by default. Added client support for fitzquake's 666 protocol, needs testing, some cleanup for dp protocols too, no server support, couldn't selectively enable it anyway. Now attempting to cache shadow meshes for explosions and stuff. Played with lightmaps a little, should potentially run a little faster on certain (intel?) cards. Tweeked npfte a little to try to avoid deadlocks and crashes. Fixed sky worldspawn parsing. Added h2mp's model format. Fixed baseline issue in q2 client, made servers generate q2 baselines. MOVETYPE_PUSH will not rotate extra if rotation is forced. Made status command show allowed client types. Changed lighting on weapons - should now be shaded.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/branches/wip@3572 fc73d0e0-1445-4013-8a0c-d673dee63da5
2010-08-11 03:36:31 +00:00
if ( bits & DPSU_VIEWZOOM )
{
2015-06-16 23:53:58 +00:00
if ( cls . protocol_nq > = CPNQ_DP5 )
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
i = ( unsigned short ) MSG_ReadShort ( ) ;
else
i = MSG_ReadByte ( ) ;
if ( i < 2 )
i = 2 ;
2017-07-12 08:15:27 +00:00
CL_SetStatFloat ( 0 , STAT_VIEWZOOM , i * ( STAT_VIEWZOOM_SCALE / 255.0 ) ) ;
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
}
2004-11-27 08:16:25 +00:00
else
2017-07-12 08:15:27 +00:00
CL_SetStatFloat ( 0 , STAT_VIEWZOOM , STAT_VIEWZOOM_SCALE ) ;
2004-11-27 08:16:25 +00:00
}
2004-08-23 00:15:46 +00:00
}
# endif
/*
= = = = = = = = = = = = = = = = = =
CL_ParseSoundlist
= = = = = = = = = = = = = = = = = =
*/
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
static void CL_ParseSoundlist ( qboolean lots )
2004-08-23 00:15:46 +00:00
{
int numsounds ;
char * str ;
int n ;
// precache sounds
// memset (cl.sound_precache, 0, sizeof(cl.sound_precache));
2008-11-28 20:34:51 +00:00
if ( lots )
numsounds = MSG_ReadShort ( ) ;
else
2017-10-12 12:02:25 +00:00
numsounds = ( cl . protocol_qw > = 26 ) ? MSG_ReadByte ( ) : 0 ;
2004-08-23 00:15:46 +00:00
2005-02-28 07:16:19 +00:00
for ( ; ; )
{
2004-08-23 00:15:46 +00:00
str = MSG_ReadString ( ) ;
if ( ! str [ 0 ] )
break ;
numsounds + + ;
2014-09-17 03:04:08 +00:00
if ( numsounds > = MAX_PRECACHE_SOUNDS )
2004-08-23 00:15:46 +00:00
Host_EndGame ( " Server sent too many sound_precache " ) ;
2005-09-26 03:40:09 +00:00
2004-08-23 00:15:46 +00:00
// if (strlen(str)>4)
// if (!strcmp(str+strlen(str)-4, ".mp3")) //don't let the server send us a specific mp3. convert it to wav and this way we know not to look outside the quake path for it.
// strcpy(str+strlen(str)-4, ".wav");
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
Z_StrDupPtr ( & cl . sound_name [ numsounds ] , str ) ;
2004-08-23 00:15:46 +00:00
}
2017-10-12 12:02:25 +00:00
n = ( cl . protocol_qw > = 26 ) ? MSG_ReadByte ( ) : 0 ;
2004-08-23 00:15:46 +00:00
2005-02-28 07:16:19 +00:00
if ( n )
{
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
if ( cls . demoplayback = = DPB_MVD & & ( cls . demoeztv_ext & EZTV_DOWNLOAD ) )
;
else
2008-01-09 00:52:31 +00:00
{
2022-01-28 10:48:01 +00:00
if ( CL_RemoveClientCommands ( " soundlist " ) & & ! ( cls . fteprotocolextensions2 & PEXT2_REPLACEMENTDELTAS ) )
------------------------------------------------------------------------
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
Con_DPrintf ( " Multiple soundlists \n " ) ;
2008-01-09 00:52:31 +00:00
// CL_SendClientCommand("soundlist %i %i", cl.servercount, n);
2008-11-28 20:34:51 +00:00
CL_SendClientCommand ( true , soundlist_name , cl . servercount , ( numsounds & 0xff00 ) + n ) ;
2008-01-09 00:52:31 +00:00
}
2004-08-23 00:15:46 +00:00
return ;
}
2009-04-06 00:34:32 +00:00
# ifdef Q2CLIENT
if ( cls . protocol = = CP_QUAKE2 )
{
CL_AllowIndependantSendCmd ( false ) ; //stop it now, the indep stuff *could* require model tracing.
cl . sendprespawn = true ;
2014-10-05 20:04:11 +00:00
SCR_SetLoadingFile ( " loading data " ) ;
2009-04-06 00:34:32 +00:00
}
else
# endif
{
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
if ( cls . demoplayback = = DPB_MVD & & cls . demoeztv_ext )
2009-04-06 00:34:32 +00:00
{
if ( CL_RemoveClientCommands ( " qtvmodellist " ) )
------------------------------------------------------------------------
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
Con_DPrintf ( " Multiple modellists \n " ) ;
2009-04-06 00:34:32 +00:00
CL_SendClientCommand ( true , " qtvmodellist %i 0 " , cl . servercount ) ;
}
else
{
2018-08-23 06:03:31 +00:00
if ( CL_RemoveClientCommands ( " modellist " ) & & ! ( cls . fteprotocolextensions2 & PEXT2_REPLACEMENTDELTAS ) )
------------------------------------------------------------------------
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
Con_DPrintf ( " Multiple modellists \n " ) ;
2009-04-06 00:34:32 +00:00
// CL_SendClientCommand ("modellist %i 0", cl.servercount);
CL_SendClientCommand ( true , modellist_name , cl . servercount , 0 ) ;
}
}
2004-08-23 00:15:46 +00:00
}
/*
= = = = = = = = = = = = = = = = = =
CL_ParseModellist
= = = = = = = = = = = = = = = = = =
*/
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
static void CL_ParseModellist ( qboolean lots )
2004-08-23 00:15:46 +00:00
{
int nummodels ;
char * str ;
int n ;
// precache models and note certain default indexes
if ( lots )
nummodels = MSG_ReadShort ( ) ;
else
2017-10-12 12:02:25 +00:00
nummodels = ( cl . protocol_qw > = 26 ) ? MSG_ReadByte ( ) : 0 ;
2004-08-23 00:15:46 +00:00
for ( ; ; )
{
str = MSG_ReadString ( ) ;
if ( ! str [ 0 ] )
break ;
nummodels + + ;
2014-09-17 03:04:08 +00:00
if ( nummodels > = MAX_PRECACHE_MODELS )
2004-08-23 00:15:46 +00:00
Host_EndGame ( " Server sent too many model_precache " ) ;
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
Z_StrDupPtr ( & cl . model_name [ nummodels ] , str ) ;
if ( nummodels = = 1 )
SCR_ImageName ( cl . model_name [ nummodels ] ) ;
2004-08-23 00:15:46 +00:00
2013-11-21 23:02:28 +00:00
//qw has a special network protocol for spikes.
2004-08-23 00:15:46 +00:00
if ( ! strcmp ( cl . model_name [ nummodels ] , " progs/spike.mdl " ) )
cl_spikeindex = nummodels ;
if ( ! strcmp ( cl . model_name [ nummodels ] , " progs/player.mdl " ) )
cl_playerindex = nummodels ;
2019-04-16 22:40:05 +00:00
# ifdef HAVE_LEGACY
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
if ( cl . model_name_vwep [ 0 ] & & ! strcmp ( cl . model_name [ nummodels ] , cl . model_name_vwep [ 0 ] ) & & cl_playerindex = = - 1 )
2013-10-08 14:28:11 +00:00
cl_playerindex = nummodels ;
2018-09-01 04:18:08 +00:00
# endif
2005-01-18 20:15:20 +00:00
if ( ! strcmp ( cl . model_name [ nummodels ] , " progs/h_player.mdl " ) )
cl_h_playerindex = nummodels ;
2004-08-23 00:15:46 +00:00
if ( ! strcmp ( cl . model_name [ nummodels ] , " progs/flag.mdl " ) )
cl_flagindex = nummodels ;
2005-01-17 17:40:21 +00:00
2013-11-21 23:02:28 +00:00
//rocket to grenade
2005-01-17 17:40:21 +00:00
if ( ! strcmp ( cl . model_name [ nummodels ] , " progs/missile.mdl " ) )
cl_rocketindex = nummodels ;
if ( ! strcmp ( cl . model_name [ nummodels ] , " progs/grenade.mdl " ) )
cl_grenadeindex = nummodels ;
2005-01-18 20:15:20 +00:00
2013-11-21 23:02:28 +00:00
//cl_gibfilter
2005-01-18 20:15:20 +00:00
if ( ! strcmp ( cl . model_name [ nummodels ] , " progs/gib1.mdl " ) )
cl_gib1index = nummodels ;
if ( ! strcmp ( cl . model_name [ nummodels ] , " progs/gib2.mdl " ) )
cl_gib2index = nummodels ;
if ( ! strcmp ( cl . model_name [ nummodels ] , " progs/gib3.mdl " ) )
cl_gib3index = nummodels ;
2004-08-23 00:15:46 +00:00
2023-09-11 09:31:09 +00:00
//we have the names, we might as well START loading them now.
if ( COM_HasWorkers ( WG_LOADER ) )
Mod_ForName ( cl . model_name [ nummodels ] , MLV_SILENT ) ;
}
2004-08-23 00:15:46 +00:00
2017-10-12 12:02:25 +00:00
n = ( cl . protocol_qw > = 26 ) ? MSG_ReadByte ( ) : 0 ;
2004-08-23 00:15:46 +00:00
2005-02-28 07:16:19 +00:00
if ( n )
{
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
if ( cls . demoplayback = = DPB_MVD & & cls . demoeztv_ext )
;
else
2008-01-09 00:52:31 +00:00
{
2022-01-28 10:48:01 +00:00
if ( CL_RemoveClientCommands ( " modellist " ) & & ! ( cls . fteprotocolextensions2 & PEXT2_REPLACEMENTDELTAS ) )
------------------------------------------------------------------------
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
Con_DPrintf ( " Multiple modellists \n " ) ;
2008-01-09 00:52:31 +00:00
// CL_SendClientCommand("modellist %i %i", cl.servercount, n);
CL_SendClientCommand ( true , modellist_name , cl . servercount , ( nummodels & 0xff00 ) + n ) ;
}
2004-08-23 00:15:46 +00:00
return ;
}
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
# ifdef QUAKESTATS
if ( cls . demoplayback = = DPB_MVD & & ! cl . model_name_vwep [ 0 ] & & ! ( cls . fteprotocolextensions2 & PEXT2_REPLACEMENTDELTAS ) )
CL_ParseStuffCmd ( " //vwep vwplayer w_axe w_shot w_shot2 w_nail w_nail2 w_rock w_rock2 w_light " , 0 ) ;
# endif
2021-06-01 09:23:42 +00:00
SCR_SetLoadingFile ( " loading data " ) ;
//we need to try to load it now if we can, so any embedded archive will be loaded *before* we start looking for other content...
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
cl . model_precache [ 1 ] = cl . model_name [ 1 ] ? Mod_ForName ( cl . model_name [ 1 ] , MLV_SILENTSYNC ) : NULL ;
2021-06-01 09:23:42 +00:00
if ( cl . model_precache [ 1 ] & & cl . model_precache [ 1 ] - > loadstate = = MLS_LOADED )
FS_LoadMapPackFile ( cl . model_precache [ 1 ] - > name , cl . model_precache [ 1 ] - > archive ) ;
2009-05-24 10:11:17 +00:00
Sound_CheckDownloads ( ) ;
2009-04-06 00:34:32 +00:00
Model_CheckDownloads ( ) ;
CL_AllowIndependantSendCmd ( false ) ; //stop it now, the indep stuff *could* require model tracing.
//set the flag to load models and send prespawn
cl . sendprespawn = true ;
2004-08-23 00:15:46 +00:00
}
2006-05-28 21:56:04 +00:00
# ifdef Q2CLIENT
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
static void CLQ2_ParseClientinfo ( int i , char * s )
2004-08-23 00:15:46 +00:00
{
2005-03-20 02:57:11 +00:00
char * model , * name ;
2004-08-23 00:15:46 +00:00
player_info_t * player ;
//s contains "name\model/skin"
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
//q2 doesn't really do much with userinfos.
2004-08-23 00:15:46 +00:00
2015-12-28 17:41:39 +00:00
if ( i > = MAX_CLIENTS )
return ;
2004-08-23 00:15:46 +00:00
player = & cl . players [ i ] ;
2018-07-05 16:21:44 +00:00
InfoBuf_Clear ( & player - > userinfo , true ) ;
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
cl . players [ i ] . userinfovalid = true ;
2004-08-23 00:15:46 +00:00
model = strchr ( s , ' \\ ' ) ;
if ( model )
{
* model = ' \0 ' ;
model + + ;
name = s ;
}
else
{
name = " Unnammed " ;
model = " male " ;
}
2005-03-20 02:57:11 +00:00
#if 0
2004-08-23 00:15:46 +00:00
skin = strchr ( model , ' / ' ) ;
if ( skin )
{
* skin = ' \0 ' ;
skin + + ;
}
else
skin = " " ;
2018-07-05 16:21:44 +00:00
InfoBuf_SetValueForKey ( & player - > userinfo , " model " , model ) ;
InfoBuf_SetValueForKey ( & player - > userinfo , " skin " , skin ) ;
2005-03-20 02:57:11 +00:00
# else
2018-07-05 16:21:44 +00:00
InfoBuf_SetValueForKey ( & player - > userinfo , " skin " , model ) ;
2005-03-20 02:57:11 +00:00
# endif
2018-07-05 16:21:44 +00:00
InfoBuf_SetValueForKey ( & player - > userinfo , " name " , name ) ;
2005-03-20 02:57:11 +00:00
cl . players [ i ] . userid = i ;
2007-07-23 18:52:11 +00:00
cl . players [ i ] . rbottomcolor = 1 ;
cl . players [ i ] . rtopcolor = 1 ;
2004-08-23 00:15:46 +00:00
CL_ProcessUserInfo ( i , player ) ;
}
2023-09-11 09:31:09 +00:00
void CLQ2EX_ParseLightConfigString ( int i , const char * s ) ;
static void CLQ2_UpdateConfigString ( unsigned int i , char * s )
2004-08-23 00:15:46 +00:00
{
2016-01-18 05:22:07 +00:00
if ( i > = 0x8000 & & i < 0x8000 + MAX_PRECACHE_MODELS )
{
2023-09-11 09:31:09 +00:00
i - = 0x8000 ;
goto parsemodelindex ;
2016-01-18 05:22:07 +00:00
}
else if ( i > = 0xc000 & & i < 0xc000 + MAX_PRECACHE_SOUNDS )
{
2023-09-11 09:31:09 +00:00
i - = 0xc000 ;
goto parsesoundindex ;
}
if ( cls . protocol_q2 ! = PROTOCOL_VERSION_Q2EX )
{ //remap from vanilla to q2e
# define PASTE(a,b) (a##b)
# define REMAPR(n,l) if (i >= Q2CS_##n && i < Q2CS_##n+Q2MAX_##l) i = i-Q2CS_##n+Q2EXCS_##n; else
# define REMAPS(n) if (i == PASTE(Q2CS_,n)) i = i-PASTE(Q2CS_,n)+PASTE(Q2EXCS_,n); else
# define Q2MAX_STATUSBAR (Q2CS_AIRACCEL-Q2CS_STATUSBAR)
REMAPS ( NAME )
REMAPS ( CDTRACK )
REMAPS ( SKY )
REMAPS ( SKYAXIS )
REMAPS ( SKYROTATE )
REMAPR ( STATUSBAR , STATUSBAR )
REMAPS ( AIRACCEL )
REMAPS ( MAXCLIENTS )
REMAPS ( MAPCHECKSUM )
REMAPR ( MODELS , MODELS )
REMAPR ( SOUNDS , SOUNDS )
REMAPR ( IMAGES , IMAGES )
REMAPR ( LIGHTS , LIGHTSTYLES )
REMAPR ( ITEMS , ITEMS )
REMAPR ( PLAYERSKINS , CLIENTS )
REMAPR ( GENERAL , GENERAL )
Host_EndGame ( " configstring %i > Q2MAX_CONFIGSTRINGS " , i ) ;
}
if ( ( unsigned int ) i > = Q2EXMAX_CONFIGSTRINGS )
Host_EndGame ( " configstring %i > Q2EXMAX_CONFIGSTRINGS " , i ) ;
2004-08-23 00:15:46 +00:00
// strncpy (olds, cl.configstrings[i], sizeof(olds));
// olds[sizeof(olds) - 1] = 0;
// strcpy (cl.configstrings[i], s);
2005-09-26 03:40:09 +00:00
// do something apropriate
2004-08-23 00:15:46 +00:00
2023-09-11 09:31:09 +00:00
if ( i = = Q2EXCS_NAME )
2015-12-28 17:41:39 +00:00
{
Q_strncpyz ( cl . levelname , s , sizeof ( cl . levelname ) ) ;
}
2023-09-11 09:31:09 +00:00
else if ( i = = Q2EXCS_SKY )
2017-08-29 02:29:06 +00:00
R_SetSky ( s ) ;
2023-09-11 09:31:09 +00:00
else if ( i = = Q2EXCS_SKYAXIS | | i = = Q2EXCS_SKYROTATE )
2005-10-16 03:53:31 +00:00
{
2023-09-11 09:31:09 +00:00
if ( i = = Q2EXCS_SKYROTATE )
2023-09-02 05:57:07 +00:00
{
s = COM_Parse ( s ) ;
cl . skyrotate = atof ( com_token ) ;
s = COM_Parse ( s ) ;
if ( * com_token )
cl . skyautorotate = atoi ( com_token ) ;
}
2019-07-19 02:13:19 +00:00
else
2006-01-09 01:49:06 +00:00
{
s = COM_Parse ( s ) ;
if ( s )
{
2019-07-19 02:13:19 +00:00
cl . skyaxis [ 0 ] = atof ( com_token ) ;
2006-01-09 01:49:06 +00:00
s = COM_Parse ( s ) ;
if ( s )
2019-07-19 02:13:19 +00:00
{
cl . skyaxis [ 1 ] = atof ( com_token ) ;
s = COM_Parse ( s ) ;
if ( s )
cl . skyaxis [ 2 ] = atof ( com_token ) ;
}
2006-01-09 01:49:06 +00:00
}
}
2019-07-19 02:13:19 +00:00
if ( cl . skyrotate )
{
if ( cl . skyaxis [ 0 ] | | cl . skyaxis [ 1 ] | | cl . skyaxis [ 2 ] )
2023-09-02 05:57:07 +00:00
Cvar_LockFromServer ( & r_skybox_orientation , va ( " %g %g %g %g " , cl . skyaxis [ 0 ] , cl . skyaxis [ 1 ] , cl . skyaxis [ 2 ] , cl . skyrotate ) ) ;
2019-07-19 02:13:19 +00:00
else
2023-09-02 05:57:07 +00:00
Cvar_LockFromServer ( & r_skybox_orientation , va ( " 0 0 1 %g " , cl . skyrotate ) ) ;
2019-07-19 02:13:19 +00:00
}
else
2023-09-02 05:57:07 +00:00
Cvar_LockFromServer ( & r_skybox_orientation , " " ) ;
Cvar_LockFromServer ( & r_skybox_autorotate , va ( " %i " , cl . skyautorotate ) ) ;
2005-10-16 03:53:31 +00:00
}
2023-09-11 09:31:09 +00:00
else if ( i = = Q2EXCS_STATUSBAR )
2004-08-23 00:15:46 +00:00
{
Q_strncpyz ( cl . q2statusbar , s , sizeof ( cl . q2statusbar ) ) ;
}
2023-09-11 09:31:09 +00:00
else if ( i > Q2EXCS_STATUSBAR & & i < Q2EXCS_AIRACCEL )
; //trailing statusbar
else if ( i = = Q2EXCS_MAXCLIENTS )
{
i = atoi ( s ) ;
if ( i > 1 )
cl . allocated_client_slots = i ;
}
else if ( i > = Q2EXCS_LIGHTS & & i < Q2EXCS_LIGHTS + Q2EXMAX_LIGHTSTYLES )
2004-08-23 00:15:46 +00:00
{
2023-09-11 09:31:09 +00:00
R_UpdateLightStyle ( i - Q2EXCS_LIGHTS , s , 1 , 1 , 1 ) ;
2004-08-23 00:15:46 +00:00
}
2023-09-11 09:31:09 +00:00
else if ( i > = Q2EXCS_RTLIGHTS & & i < Q2EXCS_RTLIGHTS + Q2EXMAX_RTLIGHTS )
{
i - = Q2EXCS_RTLIGHTS ;
CLQ2EX_ParseLightConfigString ( i , s ) ;
}
else if ( i = = Q2EXCS_CDTRACK )
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
Media_NamedTrack ( s , NULL ) ;
2004-08-23 00:15:46 +00:00
}
2023-09-11 09:31:09 +00:00
else if ( i = = Q2EXCS_AIRACCEL )
2018-07-05 16:21:44 +00:00
Q_strncpyz ( cl . q2airaccel , s , sizeof ( cl . q2airaccel ) ) ;
2023-09-11 09:31:09 +00:00
else if ( i > = Q2EXCS_MODELS & & i < Q2EXCS_MODELS + Q2EXMAX_MODELS )
2004-08-23 00:15:46 +00:00
{
2023-09-11 09:31:09 +00:00
i - = Q2EXCS_MODELS ;
parsemodelindex :
if ( ( unsigned int ) i > = countof ( cl . model_name ) )
return ;
2017-07-12 08:15:27 +00:00
if ( * s = = ' / ' )
s + + ; //*sigh*
2023-09-11 09:31:09 +00:00
if ( i = = 255 )
s = " *playermodel " ; //something special.
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
Z_StrDupPtr ( & cl . model_name [ i ] , s ) ;
2023-09-11 09:31:09 +00:00
if ( cl . model_name [ i ] [ 0 ] = = ' # ' )
2004-08-23 00:15:46 +00:00
{
2015-03-03 00:14:43 +00:00
if ( cl . numq2visibleweapons < Q2MAX_VISIBLE_WEAPONS )
2006-04-11 20:09:39 +00:00
{
2023-09-11 09:31:09 +00:00
cl . q2visibleweapons [ cl . numq2visibleweapons ] = cl . model_name [ i ] + 1 ;
2015-03-03 00:14:43 +00:00
cl . numq2visibleweapons + + ;
2006-04-11 20:09:39 +00:00
}
2023-09-11 09:31:09 +00:00
cl . model_precache [ i ] = NULL ;
2004-08-23 00:15:46 +00:00
}
2017-07-12 08:15:27 +00:00
else if ( cl . contentstage )
2023-09-11 09:31:09 +00:00
cl . model_precache [ i ] = Mod_ForName ( cl . model_name [ i ] , MLV_WARN ) ;
2004-08-23 00:15:46 +00:00
}
2023-09-11 09:31:09 +00:00
else if ( i > = Q2EXCS_SOUNDS & & i < Q2EXCS_SOUNDS + Q2MAX_SOUNDS )
2004-08-23 00:15:46 +00:00
{
2023-09-11 09:31:09 +00:00
i - = Q2EXCS_SOUNDS ;
parsesoundindex :
if ( ( unsigned int ) i > = countof ( cl . sound_name ) )
return ;
2017-07-12 08:15:27 +00:00
if ( * s = = ' / ' )
s + + ; //*sigh*
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
Z_StrDupPtr ( & cl . sound_name [ i ] , s ) ;
2017-07-12 08:15:27 +00:00
if ( cl . contentstage )
2023-09-11 09:31:09 +00:00
cl . sound_precache [ i ] = S_PrecacheSound ( s ) ;
2004-08-23 00:15:46 +00:00
}
2023-09-11 09:31:09 +00:00
else if ( i > = Q2EXCS_IMAGES & & i < Q2EXCS_IMAGES + Q2MAX_IMAGES )
2015-03-03 00:14:43 +00:00
{
2023-09-11 09:31:09 +00:00
i - = Q2EXCS_IMAGES ;
if ( ( unsigned int ) i > = countof ( cl . image_name ) )
return ;
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
Z_StrDupPtr ( & cl . image_name [ i ] , s ) ;
2015-03-03 00:14:43 +00:00
}
2023-09-11 09:31:09 +00:00
else if ( i > = Q2EXCS_ITEMS & & i < Q2EXCS_ITEMS + Q2MAX_ITEMS )
2015-03-03 00:14:43 +00:00
{
2023-09-11 09:31:09 +00:00
i - = Q2EXCS_ITEMS ;
if ( ( unsigned int ) i > = countof ( cl . item_name ) )
return ;
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
Z_StrDupPtr ( & cl . item_name [ i ] , s ) ;
2004-08-23 00:15:46 +00:00
}
2023-09-11 09:31:09 +00:00
else if ( i > = Q2EXCS_GENERAL & & i < Q2EXCS_GENERAL + Q2EXMAX_GENERAL )
2015-12-28 17:41:39 +00:00
{
2023-09-11 09:31:09 +00:00
i - = Q2EXCS_GENERAL ;
if ( ( unsigned int ) i > = Q2MAX_CLIENTS ) //countof(cl.configstring_general))
return ;
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
Z_StrDupPtr ( & cl . configstring_general [ i ] , s ) ;
2015-12-28 17:41:39 +00:00
}
2023-09-11 09:31:09 +00:00
else if ( i > = Q2EXCS_PLAYERSKINS & & i < Q2EXCS_PLAYERSKINS + Q2EXMAX_CLIENTS )
2004-08-23 00:15:46 +00:00
{
2023-09-11 09:31:09 +00:00
i - = Q2EXCS_GENERAL ;
i + = Q2EXMAX_CLIENTS ;
if ( ( unsigned int ) i > = countof ( cl . configstring_general ) )
return ;
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
Z_StrDupPtr ( & cl . configstring_general [ i ] , s ) ;
2023-09-11 09:31:09 +00:00
CLQ2_ParseClientinfo ( i , s ) ;
2004-08-23 00:15:46 +00:00
}
2023-09-11 09:31:09 +00:00
else if ( i = = Q2EXCS_MAPCHECKSUM )
2006-04-08 05:43:53 +00:00
{
2020-03-28 01:46:25 +00:00
int serverchecksum = ( int ) strtol ( s , NULL , 10 ) ;
2020-03-25 21:29:30 +00:00
if ( cl . worldmodel )
2006-04-08 05:43:53 +00:00
{
2020-03-25 21:29:30 +00:00
if ( cl . worldmodel - > loadstate = = MLS_LOADING )
COM_WorkerPartialSync ( cl . worldmodel , & cl . worldmodel - > loadstate , MLS_LOADING ) ;
2020-03-28 01:46:25 +00:00
// the Q2 client normally exits here, however for our purposes we might as well ignore it
2023-09-11 09:31:09 +00:00
if ( cl . worldmodel - > checksum ! = serverchecksum & &
cl . worldmodel - > checksum2 ! = serverchecksum )
Con_Printf ( CON_WARNING " WARNING: Client checksum does not match server checksum (%i != %i) " , cl . worldmodel - > checksum2 , serverchecksum ) ;
2006-04-08 05:43:53 +00:00
}
2020-03-28 01:46:25 +00:00
cl . q2mapchecksum = serverchecksum ;
2006-04-08 05:43:53 +00:00
}
2023-09-11 09:31:09 +00:00
else if ( i > = Q2ECS_WHEEL_WEAPONS & & i < Q2ECS_WHEEL_WEAPONS + Q2EXMAX_WWHEEL )
;
else if ( i > = Q2ECS_WHEEL_AMMO & & i < Q2ECS_WHEEL_AMMO + Q2EXMAX_WWHEEL )
;
else if ( i > = Q2ECS_WHEEL_POWERUPS & & i < Q2ECS_WHEEL_POWERUPS + Q2EXMAX_WWHEEL )
;
else if ( i = = Q2ECS_CD_LOOP_COUNT )
;
else if ( i = = Q2ECS_GAME_STYLE )
;
# define Q2EXCS_SOUNDS (Q2EXCS_MODELS +Q2EXMAX_MODELS)
# define Q2EXCS_IMAGES (Q2EXCS_SOUNDS +Q2EXMAX_SOUNDS)
# define Q2EXCS_LIGHTS (Q2EXCS_IMAGES +Q2EXMAX_IMAGES)
# define Q2EXCS_RTLIGHTS (Q2EXCS_LIGHTS +Q2EXMAX_LIGHTSTYLES)
else
Con_Printf ( CON_WARNING " Config string %i unsupported \n " , i ) ;
}
static void CLQ2_ParseConfigString ( void )
{
unsigned int i = MSG_ReadUInt16 ( ) ;
char * s = MSG_ReadString ( ) ;
CLQ2_UpdateConfigString ( i , s ) ;
2004-08-23 00:15:46 +00:00
}
2006-05-28 21:56:04 +00:00
# endif
2004-08-23 00:15:46 +00:00
2006-07-24 04:24:41 +00:00
qboolean CL_CheckBaselines ( int size )
{
int i ;
if ( size < 0 )
return false ;
if ( size > MAX_EDICTS )
return false ;
size = ( size + 64 ) & ~ 63 ; // round up to next 64
2009-03-03 01:52:30 +00:00
if ( size < = cl_baselines_count )
2006-07-24 04:24:41 +00:00
return true ;
2010-12-23 08:53:23 +00:00
cl_baselines = BZ_Realloc ( cl_baselines , sizeof ( * cl_baselines ) * size ) ;
2006-07-24 04:24:41 +00:00
for ( i = cl_baselines_count ; i < size ; i + + )
{
memcpy ( cl_baselines + i , & nullentitystate , sizeof ( * cl_baselines ) ) ;
2024-04-25 05:57:34 +00:00
if ( cls . protocol = = CP_NETQUAKE & & cls . protocol_nq = = CPNQ_H2MP )
cl_baselines [ i ] . hexen2flags = 0 ;
2006-07-24 04:24:41 +00:00
}
cl_baselines_count = size ;
return true ;
}
2004-08-23 00:15:46 +00:00
/*
= = = = = = = = = = = = = = = = = =
CL_ParseBaseline
= = = = = = = = = = = = = = = = = =
*/
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
static void CL_ParseBaseline ( entity_state_t * es , int baselinetype2 )
2004-08-23 00:15:46 +00:00
{
int i ;
2016-07-12 00:40:13 +00:00
unsigned int bits ;
2004-08-23 00:15:46 +00:00
2006-02-27 00:42:25 +00:00
memcpy ( es , & nullentitystate , sizeof ( entity_state_t ) ) ;
2005-09-26 03:40:09 +00:00
2016-07-12 00:40:13 +00:00
if ( baselinetype2 = = CPNQ_FITZ666 )
bits = MSG_ReadByte ( ) ; //fitzquake has actual flags. yay extensibility. just a shame they're not the same as other entity updates.
else if ( baselinetype2 > = CPNQ_DP5 & & baselinetype2 < = CPNQ_DP7 )
bits = FITZ_B_LARGEMODEL | FITZ_B_LARGEFRAME ; //dp's baseline2 always has these (regular baseline is unmodified)
else if ( cls . protocol = = CP_NETQUAKE & & CPNQ_IS_BJP )
bits = FITZ_B_LARGEMODEL ; //bjp always uses shorts for models.
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
else if ( cls . protocol = = CP_NETQUAKE & & cls . protocol_nq = = CPNQ_H2MP )
bits = FITZ_B_LARGEMODEL ; //urgh
2016-02-15 06:01:17 +00:00
else
2016-07-12 00:40:13 +00:00
bits = 0 ; //vanilla nq or qw
es - > modelindex = ( bits & FITZ_B_LARGEMODEL ) ? ( unsigned short ) MSG_ReadShort ( ) : MSG_ReadByte ( ) ;
es - > frame = ( bits & FITZ_B_LARGEFRAME ) ? ( unsigned short ) MSG_ReadShort ( ) : MSG_ReadByte ( ) ;
2004-08-23 00:15:46 +00:00
es - > colormap = MSG_ReadByte ( ) ;
es - > skinnum = MSG_ReadByte ( ) ;
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
if ( cls . protocol = = CP_NETQUAKE & & cls . protocol_nq = = CPNQ_H2MP )
{
2024-04-25 05:57:34 +00:00
es - > scale = ( MSG_ReadByte ( ) / 100.0 ) * 16 ;
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
es - > hexen2flags = MSG_ReadByte ( ) ;
es - > abslight = MSG_ReadByte ( ) ;
}
2004-08-23 00:15:46 +00:00
for ( i = 0 ; i < 3 ; i + + )
{
es - > origin [ i ] = MSG_ReadCoord ( ) ;
es - > angles [ i ] = MSG_ReadAngle ( ) ;
}
2016-07-12 00:40:13 +00:00
es - > trans = ( bits & FITZ_B_ALPHA ) ? MSG_ReadByte ( ) : 255 ;
2022-01-17 09:12:56 +00:00
# ifdef NQPROT
2022-01-16 18:41:44 +00:00
if ( cls . qex )
{
if ( bits & QEX_B_SOLID )
/*es->solidtype =*/ MSG_ReadByte ( ) ;
if ( bits & QEX_B_UNKNOWN4 )
Con_Printf ( CON_WARNING " QEX_B_UNKNOWN4: %x \n " , MSG_ReadByte ( ) ) ;
if ( bits & QEX_B_UNKNOWN5 )
Con_Printf ( CON_WARNING " QEX_B_UNKNOWN5: %x \n " , MSG_ReadByte ( ) ) ;
if ( bits & QEX_B_UNKNOWN6 )
Con_DPrintf ( CON_WARNING " QEX_B_UNKNOWN6: %x \n " , MSG_ReadByte ( ) ) ;
if ( bits & QEX_B_UNKNOWN7 )
Con_Printf ( CON_WARNING " QEX_B_UNKNOWN7: %x \n " , MSG_ReadByte ( ) ) ;
}
else
2022-01-17 09:12:56 +00:00
# endif
2022-01-16 18:41:44 +00:00
es - > scale = ( bits & RMQFITZ_B_SCALE ) ? MSG_ReadByte ( ) : 16 ;
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
static void CL_ParseBaselineDelta ( void )
2004-08-23 00:15:46 +00:00
{
2006-02-27 00:42:25 +00:00
entity_state_t es ;
2004-08-23 00:15:46 +00:00
2012-07-05 19:42:36 +00:00
if ( cls . fteprotocolextensions2 & PEXT2_REPLACEMENTDELTAS )
CLFTE_ParseBaseline ( & es , true ) ;
else
2016-07-12 00:40:13 +00:00
CLQW_ParseDelta ( & nullentitystate , & es , ( unsigned short ) MSG_ReadShort ( ) ) ;
2006-07-24 04:24:41 +00:00
if ( ! CL_CheckBaselines ( es . number ) )
2017-01-16 08:13:51 +00:00
Host_EndGame ( " CL_ParseBaselineDelta: check baselines failed with size %i " , es . number ) ;
2006-07-24 04:24:41 +00:00
memcpy ( cl_baselines + es . number , & es , sizeof ( es ) ) ;
2004-08-23 00:15:46 +00:00
}
2017-09-20 11:27:13 +00:00
# ifdef Q2CLIENT
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
static void CLQ2_Precache_f ( void )
2004-08-23 00:15:46 +00:00
{
2009-04-06 00:34:32 +00:00
Model_CheckDownloads ( ) ;
Sound_CheckDownloads ( ) ;
cl . contentstage = 0 ;
2006-01-06 23:58:32 +00:00
cl . sendprespawn = true ;
2014-10-05 20:04:11 +00:00
SCR_SetLoadingFile ( " loading data " ) ;
2004-08-23 00:15:46 +00:00
}
2017-09-20 11:27:13 +00:00
# endif
2004-08-23 00:15:46 +00:00
/*
= = = = = = = = = = = = = = = = = = = = =
CL_ParseStatic
Static entities are non - interactive world objects
like torches
= = = = = = = = = = = = = = = = = = = = =
*/
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
void R_StaticEntityToRTLight ( int i ) ;
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
static void CL_ParseStaticProt ( int baselinetype )
2004-08-23 00:15:46 +00:00
{
entity_t * ent ;
int i ;
2006-02-27 00:42:25 +00:00
entity_state_t es ;
2010-07-11 02:22:39 +00:00
vec3_t mins , maxs ;
2004-08-23 00:15:46 +00:00
2017-01-18 11:34:44 +00:00
if ( baselinetype > = 0 )
2013-07-26 17:19:06 +00:00
{
2017-01-16 08:13:51 +00:00
CL_ParseBaseline ( & es , baselinetype ) ;
2013-07-26 17:19:06 +00:00
i = cl . num_statics ;
cl . num_statics + + ;
}
2017-01-16 08:13:51 +00:00
else
2004-08-23 00:15:46 +00:00
{
2013-07-26 17:19:06 +00:00
//new deltaed style ('full' extension support)
2012-07-05 19:42:36 +00:00
if ( cls . fteprotocolextensions2 & PEXT2_REPLACEMENTDELTAS )
CLFTE_ParseBaseline ( & es , false ) ;
else
2016-07-12 00:40:13 +00:00
CLQW_ParseDelta ( & nullentitystate , & es , ( unsigned short ) MSG_ReadShort ( ) ) ;
2004-08-23 00:15:46 +00:00
2012-09-30 05:52:03 +00:00
if ( ! es . number )
i = cl . num_statics + + ;
else
{
es . number + = MAX_EDICTS ;
2004-08-23 00:15:46 +00:00
2012-09-30 05:52:03 +00:00
for ( i = 0 ; i < cl . num_statics ; i + + )
if ( cl_static_entities [ i ] . ent . keynum = = es . number )
{
pe - > DelinkTrailstate ( & cl_static_entities [ i ] . emit ) ;
break ;
}
if ( i = = cl . num_statics )
cl . num_statics + + ;
}
2004-08-23 00:15:46 +00:00
}
2005-09-26 03:40:09 +00:00
Fixes, workarounds, and breakages. Hexen2 should work much better (-hexen2 says no mission pack, -portals says h2mp). Started working on splitting bigcoords per client, far too much work still to go on that. Removed gl_ztrick entirely. Enabled csprogs download by default. Added client support for fitzquake's 666 protocol, needs testing, some cleanup for dp protocols too, no server support, couldn't selectively enable it anyway. Now attempting to cache shadow meshes for explosions and stuff. Played with lightmaps a little, should potentially run a little faster on certain (intel?) cards. Tweeked npfte a little to try to avoid deadlocks and crashes. Fixed sky worldspawn parsing. Added h2mp's model format. Fixed baseline issue in q2 client, made servers generate q2 baselines. MOVETYPE_PUSH will not rotate extra if rotation is forced. Made status command show allowed client types. Changed lighting on weapons - should now be shaded.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/branches/wip@3572 fc73d0e0-1445-4013-8a0c-d673dee63da5
2010-08-11 03:36:31 +00:00
if ( i = = cl_max_static_entities )
2004-08-23 00:15:46 +00:00
{
Fixes, workarounds, and breakages. Hexen2 should work much better (-hexen2 says no mission pack, -portals says h2mp). Started working on splitting bigcoords per client, far too much work still to go on that. Removed gl_ztrick entirely. Enabled csprogs download by default. Added client support for fitzquake's 666 protocol, needs testing, some cleanup for dp protocols too, no server support, couldn't selectively enable it anyway. Now attempting to cache shadow meshes for explosions and stuff. Played with lightmaps a little, should potentially run a little faster on certain (intel?) cards. Tweeked npfte a little to try to avoid deadlocks and crashes. Fixed sky worldspawn parsing. Added h2mp's model format. Fixed baseline issue in q2 client, made servers generate q2 baselines. MOVETYPE_PUSH will not rotate extra if rotation is forced. Made status command show allowed client types. Changed lighting on weapons - should now be shaded.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/branches/wip@3572 fc73d0e0-1445-4013-8a0c-d673dee63da5
2010-08-11 03:36:31 +00:00
cl_max_static_entities + = 16 ;
cl_static_entities = BZ_Realloc ( cl_static_entities , sizeof ( * cl_static_entities ) * cl_max_static_entities ) ;
2004-08-23 00:15:46 +00:00
}
Fixes, workarounds, and breakages. Hexen2 should work much better (-hexen2 says no mission pack, -portals says h2mp). Started working on splitting bigcoords per client, far too much work still to go on that. Removed gl_ztrick entirely. Enabled csprogs download by default. Added client support for fitzquake's 666 protocol, needs testing, some cleanup for dp protocols too, no server support, couldn't selectively enable it anyway. Now attempting to cache shadow meshes for explosions and stuff. Played with lightmaps a little, should potentially run a little faster on certain (intel?) cards. Tweeked npfte a little to try to avoid deadlocks and crashes. Fixed sky worldspawn parsing. Added h2mp's model format. Fixed baseline issue in q2 client, made servers generate q2 baselines. MOVETYPE_PUSH will not rotate extra if rotation is forced. Made status command show allowed client types. Changed lighting on weapons - should now be shaded.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/branches/wip@3572 fc73d0e0-1445-4013-8a0c-d673dee63da5
2010-08-11 03:36:31 +00:00
cl_static_entities [ i ] . mdlidx = es . modelindex ;
2021-08-27 04:29:25 +00:00
cl_static_entities [ i ] . emit = trailkey_null ;
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
2014-10-05 20:04:11 +00:00
cl_static_entities [ i ] . state = es ;
2010-07-11 02:22:39 +00:00
ent = & cl_static_entities [ i ] . ent ;
------------------------------------------------------------------------
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
V_ClearEntity ( ent ) ;
2019-04-07 16:41:09 +00:00
memset ( & cl_static_entities [ i ] . ent . pvscache , 0 , sizeof ( cl_static_entities [ i ] . ent . pvscache ) ) ;
2004-08-23 00:15:46 +00:00
ent - > keynum = es . number ;
// copy it to the current state
ent - > model = cl . model_precache [ es . modelindex ] ;
2015-02-07 22:34:22 +00:00
memset ( & ent - > framestate , 0 , sizeof ( ent - > framestate ) ) ;
2008-12-23 02:55:20 +00:00
ent - > framestate . g [ FS_REG ] . frame [ 0 ] = ent - > framestate . g [ FS_REG ] . frame [ 1 ] = es . frame ;
2015-02-07 22:34:22 +00:00
ent - > framestate . g [ FS_REG ] . lerpweight [ 0 ] = 1 ;
2004-08-23 00:15:46 +00:00
ent - > skinnum = es . skinnum ;
2017-02-19 00:15:42 +00:00
# ifdef HEXEN2
2005-05-15 18:49:04 +00:00
ent - > drawflags = es . hexen2flags ;
2017-02-19 00:15:42 +00:00
ent - > abslight = es . abslight ;
# endif
2004-08-23 00:15:46 +00:00
# ifdef PEXT_SCALE
2005-07-01 19:23:00 +00:00
ent - > scale = es . scale / 16.0 ;
2004-08-23 00:15:46 +00:00
# endif
2020-01-20 17:58:45 +00:00
ent - > glowmod [ 0 ] = ( 8.0f / 256.0f ) * es . glowmod [ 0 ] ;
ent - > glowmod [ 1 ] = ( 8.0f / 256.0f ) * es . glowmod [ 1 ] ;
ent - > glowmod [ 2 ] = ( 8.0f / 256.0f ) * es . glowmod [ 2 ] ;
2012-02-12 05:18:31 +00:00
ent - > shaderRGBAf [ 0 ] = ( 8.0f / 256.0f ) * es . colormod [ 0 ] ;
ent - > shaderRGBAf [ 1 ] = ( 8.0f / 256.0f ) * es . colormod [ 1 ] ;
ent - > shaderRGBAf [ 2 ] = ( 8.0f / 256.0f ) * es . colormod [ 2 ] ;
2006-02-27 00:42:25 +00:00
2009-07-05 18:45:53 +00:00
ent - > fatness = es . fatness / 16.0 ;
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
ent - > flags = 0 ;
if ( es . dpflags & RENDER_VIEWMODEL )
2014-03-31 17:06:41 +00:00
ent - > flags | = RF_WEAPONMODEL | Q2RF_MINLIGHT | RF_DEPTHHACK ;
------------------------------------------------------------------------
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
if ( es . dpflags & RENDER_EXTERIORMODEL )
2014-03-31 17:06:41 +00:00
ent - > flags | = RF_EXTERNALMODEL ;
2012-02-12 05:18:31 +00:00
if ( es . effects & NQEF_ADDITIVE )
2014-03-31 17:06:41 +00:00
ent - > flags | = RF_ADDITIVE ;
2012-02-12 05:18:31 +00:00
if ( es . effects & EF_NODEPTHTEST )
ent - > flags | = RF_NODEPTHTEST ;
2016-01-18 05:22:07 +00:00
if ( es . effects & EF_NOSHADOW )
2012-02-12 05:18:31 +00:00
ent - > flags | = RF_NOSHADOW ;
2016-12-09 09:09:12 +00:00
if ( es . trans < 0xfe )
{
ent - > shaderRGBAf [ 3 ] = es . trans / ( float ) 0xfe ;
2014-03-31 17:06:41 +00:00
ent - > flags | = RF_TRANSLUCENT ;
2016-12-09 09:09:12 +00:00
}
else
ent - > shaderRGBAf [ 3 ] = 1.0 ;
2012-02-12 05:18:31 +00:00
2004-08-23 00:15:46 +00:00
VectorCopy ( es . origin , ent - > origin ) ;
VectorCopy ( es . angles , ent - > angles ) ;
2016-10-22 07:06:51 +00:00
if ( ent - > model & & ent - > model - > type = = mod_alias )
2020-10-06 03:17:28 +00:00
AngleVectorsMesh ( es . angles , ent - > axis [ 0 ] , ent - > axis [ 1 ] , ent - > axis [ 2 ] ) ;
2016-10-22 07:06:51 +00:00
else
AngleVectors ( es . angles , ent - > axis [ 0 ] , ent - > axis [ 1 ] , ent - > axis [ 2 ] ) ;
2004-11-22 00:00:54 +00:00
VectorInverse ( ent - > axis [ 1 ] ) ;
2004-08-23 00:15:46 +00:00
2014-10-05 20:04:11 +00:00
if ( ! cl . worldmodel | | cl . worldmodel - > loadstate ! = MLS_LOADED )
2004-08-23 00:15:46 +00:00
return ;
2010-07-11 02:22:39 +00:00
if ( ent - > model )
{
2015-01-08 13:09:20 +00:00
//FIXME: wait for model to load so we know the correct size?
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
/*FIXME: compensate for angle*/
2010-07-11 02:22:39 +00:00
VectorAdd ( es . origin , ent - > model - > mins , mins ) ;
VectorAdd ( es . origin , ent - > model - > maxs , maxs ) ;
}
2012-11-27 03:23:19 +00:00
else
{
VectorCopy ( es . origin , mins ) ;
VectorCopy ( es . origin , maxs ) ;
}
2019-04-07 16:41:09 +00:00
cl . worldmodel - > funcs . FindTouchedLeafs ( cl . worldmodel , & cl_static_entities [ i ] . ent . pvscache , mins , maxs ) ;
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
# ifdef RTLIGHTS
//and now handle any rtlight fields on it
R_StaticEntityToRTLight ( i ) ;
# endif
2004-08-23 00:15:46 +00:00
}
/*
= = = = = = = = = = = = = = = = = = =
CL_ParseStaticSound
= = = = = = = = = = = = = = = = = = =
*/
2022-06-29 07:20:24 +00:00
static void CL_ParseStaticSound ( unsigned int flags )
2004-08-23 00:15:46 +00:00
{
2005-01-13 16:29:20 +00:00
extern cvar_t cl_staticsounds ;
2004-08-23 00:15:46 +00:00
vec3_t org ;
2022-06-29 07:20:24 +00:00
size_t sound_num ;
2015-08-10 18:28:23 +00:00
float vol , atten ;
2004-08-23 00:15:46 +00:00
int i ;
2005-09-26 03:40:09 +00:00
2022-06-29 07:20:24 +00:00
if ( flags & ~ ( 1 ) )
Host_EndGame ( " CL_ParseStaticSound: unsupported flags & %x \n " , flags & ~ ( 1 ) ) ;
2004-08-23 00:15:46 +00:00
for ( i = 0 ; i < 3 ; i + + )
org [ i ] = MSG_ReadCoord ( ) ;
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
if ( flags | | ( cls . protocol = = CP_NETQUAKE & & ( cls . protocol_nq = = CPNQ_BJP2 | | cls . protocol_nq = = CPNQ_H2MP ) ) )
2022-06-29 07:20:24 +00:00
{
if ( cls . fteprotocolextensions2 & PEXT2_LERPTIME )
sound_num = ( unsigned short ) MSG_ReadULEB128 ( ) ;
else
sound_num = ( unsigned short ) MSG_ReadShort ( ) ;
}
2012-11-27 03:23:19 +00:00
else
sound_num = MSG_ReadByte ( ) ;
2015-08-10 18:28:23 +00:00
vol = MSG_ReadByte ( ) / 255.0 ;
atten = MSG_ReadByte ( ) / 64.0 ;
2005-01-13 16:29:20 +00:00
2022-06-29 07:20:24 +00:00
if ( sound_num > = countof ( cl . sound_precache ) )
return ; //no crashing, please.
2009-11-04 21:16:50 +00:00
vol * = cl_staticsounds . value ;
if ( vol < 0 )
2005-01-13 16:29:20 +00:00
return ;
2005-09-26 03:40:09 +00:00
2004-08-23 00:15:46 +00:00
S_StaticSound ( cl . sound_precache [ sound_num ] , org , vol , atten ) ;
}
/*
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
ACTION MESSAGES
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
*/
/*
= = = = = = = = = = = = = = = = = =
CL_ParseStartSoundPacket
= = = = = = = = = = = = = = = = = =
*/
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
static void CLQW_ParseStartSoundPacket ( void )
2004-08-23 00:15:46 +00:00
{
2017-01-29 13:10:53 +00:00
vec3_t pos ;
int channel , ent ;
int sound_num ;
int volume ;
float attenuation ;
int i ;
2005-09-26 03:40:09 +00:00
2017-01-29 13:10:53 +00:00
channel = MSG_ReadShort ( ) ;
2004-08-23 00:15:46 +00:00
2017-01-29 13:10:53 +00:00
if ( channel & QWSND_VOLUME )
2004-08-23 00:15:46 +00:00
volume = MSG_ReadByte ( ) ;
else
volume = DEFAULT_SOUND_PACKET_VOLUME ;
2005-09-26 03:40:09 +00:00
2017-01-29 13:10:53 +00:00
if ( channel & QWSND_ATTENUATION )
2004-08-23 00:15:46 +00:00
attenuation = MSG_ReadByte ( ) / 64.0 ;
else
attenuation = DEFAULT_SOUND_PACKET_ATTENUATION ;
2005-09-26 03:40:09 +00:00
2004-08-23 00:15:46 +00:00
sound_num = MSG_ReadByte ( ) ;
for ( i = 0 ; i < 3 ; i + + )
pos [ i ] = MSG_ReadCoord ( ) ;
2005-09-26 03:40:09 +00:00
2004-08-23 00:15:46 +00:00
ent = ( channel > > 3 ) & 1023 ;
channel & = 7 ;
if ( ent > MAX_EDICTS )
Host_EndGame ( " CL_ParseStartSoundPacket: ent = %i " , ent ) ;
2005-09-26 03:40:09 +00:00
2018-03-24 04:02:09 +00:00
# ifdef CSQC_DAT
2017-01-29 13:10:53 +00:00
if ( ! CSQC_StartSound ( ent , channel , cl . sound_name [ sound_num ] , pos , volume / 255.0 , attenuation , 1 , 0 , 0 ) )
2005-08-03 23:14:59 +00:00
# endif
2010-08-21 13:31:39 +00:00
{
if ( ! sound_num )
S_StopSound ( ent , channel ) ;
else
2016-07-12 00:40:13 +00:00
S_StartSound ( ent , channel , cl . sound_precache [ sound_num ] , pos , NULL , volume / 255.0 , attenuation , 0 , 0 , 0 ) ;
2010-08-21 13:31:39 +00:00
}
2004-08-23 00:15:46 +00:00
2020-04-19 01:23:32 +00:00
# ifdef QUAKESTATS
2015-08-07 17:49:49 +00:00
for ( i = 0 ; i < cl . splitclients ; i + + )
{
if ( ent = = cl . playerview [ i ] . playernum + 1 )
{
TP_CheckPickupSound ( cl . sound_name [ sound_num ] , pos , i ) ;
return ;
}
}
TP_CheckPickupSound ( cl . sound_name [ sound_num ] , pos , - 1 ) ;
2020-04-19 01:23:32 +00:00
# endif
2004-08-23 00:15:46 +00:00
}
# ifdef Q2CLIENT
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
static void CLQ2_ParseStartSoundPacket ( void )
2004-08-23 00:15:46 +00:00
{
2023-09-11 09:31:09 +00:00
vec3_t pos ;
2016-07-12 00:40:13 +00:00
int channel , ent ;
int sound_num ;
float volume ;
float attenuation ;
2004-08-23 00:15:46 +00:00
int flags ;
float ofs ;
2014-10-05 20:04:11 +00:00
sfx_t * sfx ;
2004-08-23 00:15:46 +00:00
flags = MSG_ReadByte ( ) ;
2023-09-11 09:31:09 +00:00
if ( flags & Q2SND_EXTRABITS )
flags | = MSG_ReadByte ( ) < < 8 ;
2016-01-18 05:22:07 +00:00
2023-09-11 09:31:09 +00:00
if ( cls . protocol_q2 = = PROTOCOL_VERSION_Q2EX | | ( ( flags & Q2SNDFTE_LARGEIDX ) & & ( cls . fteprotocolextensions & PEXT_SOUNDDBL ) ) )
sound_num = MSG_ReadUInt16 ( ) ;
2016-01-18 05:22:07 +00:00
else
sound_num = MSG_ReadByte ( ) ;
2004-08-23 00:15:46 +00:00
2016-07-12 00:40:13 +00:00
if ( flags & Q2SND_VOLUME )
2004-08-23 00:15:46 +00:00
volume = MSG_ReadByte ( ) / 255.0 ;
else
volume = Q2DEFAULT_SOUND_PACKET_VOLUME ;
2005-09-26 03:40:09 +00:00
2016-07-12 00:40:13 +00:00
if ( flags & Q2SND_ATTENUATION )
2004-08-23 00:15:46 +00:00
attenuation = MSG_ReadByte ( ) / 64.0 ;
else
2005-09-26 03:40:09 +00:00
attenuation = Q2DEFAULT_SOUND_PACKET_ATTENUATION ;
2004-08-23 00:15:46 +00:00
2016-07-12 00:40:13 +00:00
if ( flags & Q2SND_OFFSET )
2004-08-23 00:15:46 +00:00
ofs = MSG_ReadByte ( ) / 1000.0 ;
else
ofs = 0 ;
if ( flags & Q2SND_ENT )
{ // entity reletive
2023-09-11 09:31:09 +00:00
if ( cls . protocol_q2 = = PROTOCOL_VERSION_Q2EX & & ( flags & Q2SNDEX_LARGEENT ) )
channel = MSG_ReadLong ( ) ;
else
channel = MSG_ReadShort ( ) ;
2004-08-23 00:15:46 +00:00
ent = channel > > 3 ;
if ( ent > MAX_EDICTS )
Host_EndGame ( " CL_ParseStartSoundPacket: ent = %i " , ent ) ;
channel & = 7 ;
}
else
{
ent = 0 ;
channel = 0 ;
}
if ( flags & Q2SND_POS )
{ // positioned in space
2023-09-11 09:31:09 +00:00
MSG_ReadPos ( pos ) ;
2005-09-26 03:40:09 +00:00
2023-09-11 09:31:09 +00:00
//FIXME
// if (!(flags & Q2SNDEX_EXPLICITPOS))
// CL_GetNumberedEntityInfo(ent, pos, NULL);
2004-08-23 00:15:46 +00:00
}
else // use entity number
{
2023-09-11 09:31:09 +00:00
CL_GetNumberedEntityInfo ( ent , pos , NULL ) ;
2004-08-23 00:15:46 +00:00
}
if ( ! cl . sound_precache [ sound_num ] )
return ;
2014-10-05 20:04:11 +00:00
sfx = cl . sound_precache [ sound_num ] ;
if ( sfx - > name [ 0 ] = = ' * ' )
2006-04-11 20:09:39 +00:00
{ //a 'sexed' sound
2014-10-05 20:04:11 +00:00
if ( ent > 0 & & ent < = MAX_CLIENTS )
2006-04-11 20:09:39 +00:00
{
2018-07-05 16:21:44 +00:00
char * model = InfoBuf_ValueForKey ( & cl . players [ ent - 1 ] . userinfo , " skin " ) ;
2014-10-05 20:04:11 +00:00
char * skin ;
skin = strchr ( model , ' / ' ) ;
if ( skin )
* skin = ' \0 ' ;
if ( * model )
sfx = S_PrecacheSound ( va ( " players/%s/%s " , model , cl . sound_precache [ sound_num ] - > name + 1 ) ) ;
}
//fall back to male if it failed to load.
//note: threaded loading can still make it silent the first time we hear it.
if ( sfx - > loadstate = = SLS_FAILED )
sfx = S_PrecacheSound ( va ( " players/male/%s " , cl . sound_precache [ sound_num ] - > name + 1 ) ) ;
}
2016-07-12 00:40:13 +00:00
S_StartSound ( ent , channel , sfx , pos , NULL , volume , attenuation , ofs , 0 , 0 ) ;
2004-08-23 00:15:46 +00:00
}
# endif
2008-12-01 02:56:32 +00:00
# if defined(NQPROT) || defined(PEXT_SOUNDDBL)
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
static void CLNQ_ParseStartSoundPacket ( void )
2004-08-23 00:15:46 +00:00
{
2016-07-12 00:40:13 +00:00
vec3_t pos , vel ;
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
int channel , ent ;
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
unsigned int sound_num ;
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
int volume ;
int field_mask ;
float attenuation ;
2004-08-23 00:15:46 +00:00
int i ;
2017-01-29 13:10:53 +00:00
float pitchadj ;
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
float timeofs ;
2015-07-27 08:21:34 +00:00
unsigned int flags ;
2005-09-26 03:40:09 +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
field_mask = MSG_ReadByte ( ) ;
2004-08-23 00:15:46 +00:00
2016-01-18 05:22:07 +00:00
if ( field_mask & FTESND_MOREFLAGS )
2021-07-01 01:16:54 +00:00
field_mask | = MSG_ReadUInt64 ( ) < < 8 ;
2016-01-18 05:22:07 +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
if ( field_mask & NQSND_VOLUME )
2004-08-23 00:15:46 +00:00
volume = MSG_ReadByte ( ) ;
else
volume = DEFAULT_SOUND_PACKET_VOLUME ;
2005-09-26 03:40:09 +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
if ( field_mask & NQSND_ATTENUATION )
2004-08-23 00:15:46 +00:00
attenuation = MSG_ReadByte ( ) / 64.0 ;
else
attenuation = DEFAULT_SOUND_PACKET_ATTENUATION ;
2005-09-26 03:40:09 +00:00
2010-11-06 23:05:29 +00:00
if ( field_mask & FTESND_PITCHADJ )
2017-01-29 13:10:53 +00:00
pitchadj = MSG_ReadByte ( ) / 100.0 ;
2010-11-06 23:05:29 +00:00
else
2017-01-29 13:10:53 +00:00
pitchadj = 1 ;
2010-11-06 23:05:29 +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
if ( field_mask & FTESND_TIMEOFS )
timeofs = MSG_ReadShort ( ) / 1000.0 ;
else
timeofs = 0 ;
2016-07-12 00:40:13 +00:00
if ( field_mask & FTESND_VELOCITY )
{
vel [ 0 ] = MSG_ReadShort ( ) / 8.0 ;
vel [ 1 ] = MSG_ReadShort ( ) / 8.0 ;
vel [ 2 ] = MSG_ReadShort ( ) / 8.0 ;
}
else
VectorClear ( vel ) ;
2017-01-29 13:10:53 +00:00
if ( field_mask & DPSND_SPEEDUSHORT4000 )
pitchadj = ( unsigned short ) MSG_ReadShort ( ) / 4000.0 ;
2016-01-18 05:22:07 +00:00
flags = field_mask > > 8 ;
2018-10-17 00:43:04 +00:00
flags & = CF_NETWORKED ;
2015-07-27 08:21:34 +00:00
2016-07-12 00:40:13 +00:00
if ( field_mask & NQSND_LARGEENTITY )
2008-11-09 22:29:28 +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
ent = MSGCL_ReadEntity ( ) ;
2008-11-09 22:29:28 +00:00
channel = MSG_ReadByte ( ) ;
}
else
{ //regular
channel = MSG_ReadShort ( ) ;
ent = channel > > 3 ;
channel & = 7 ;
}
2004-08-23 00:15:46 +00:00
2023-08-15 00:11:00 +00:00
//channel = (channel & 7) | ((channel & 0x0f1) << 1); //this line undoes the reliable=(channel&8) gap from qwssqc... but frankly just pass the flags arg properly. csqc's builtin doesn't use it, so don't give an inconsistent gap at all here.
2011-07-30 14:14:56 +00:00
2016-07-12 00:40:13 +00:00
if ( ( field_mask & NQSND_LARGESOUND ) | | ( cls . protocol = = CP_NETQUAKE & & ( cls . protocol_nq = = CPNQ_BJP2 | | cls . protocol_nq = = CPNQ_BJP3 ) ) ) //bjp kinda sucks
2008-11-09 22:29:28 +00:00
sound_num = ( unsigned short ) MSG_ReadShort ( ) ;
else
2016-01-18 05:22:07 +00:00
sound_num = ( unsigned char ) MSG_ReadByte ( ) ;
2004-08-23 00:15:46 +00:00
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
for ( i = 0 ; i < 3 ; i + + )
pos [ i ] = MSG_ReadCoord ( ) ;
2004-08-23 00:15:46 +00:00
if ( ent > MAX_EDICTS )
Host_EndGame ( " CL_ParseStartSoundPacket: ent = %i " , ent ) ;
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
if ( sound_num > = MAX_PRECACHE_SOUNDS )
Host_EndGame ( " CL_ParseStartSoundPacket: sndidx = %i " , sound_num ) ;
2005-09-26 03:40:09 +00:00
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
if ( ! cl . sound_name [ sound_num ] )
return ; //nope, not precached yet... silly raqces.
2005-09-26 03:40:09 +00:00
2018-03-24 04:02:09 +00:00
# ifdef CSQC_DAT
2015-07-27 08:21:34 +00:00
if ( ! CSQC_StartSound ( ent , channel , cl . sound_name [ sound_num ] , pos , volume / 255.0 , attenuation , pitchadj , timeofs , flags ) )
2010-08-21 13:31:39 +00:00
# endif
{
if ( ! sound_num )
S_StopSound ( ent , channel ) ;
else
2016-07-12 00:40:13 +00:00
S_StartSound ( ent , channel , cl . sound_precache [ sound_num ] , pos , vel , volume / 255.0 , attenuation , timeofs , pitchadj , flags ) ;
2010-08-21 13:31:39 +00:00
}
2005-06-04 04:20:20 +00:00
2020-04-19 01:23:32 +00:00
# ifdef QUAKESTATS
2015-08-07 17:49:49 +00:00
for ( i = 0 ; i < cl . splitclients ; i + + )
{
if ( ent = = cl . playerview [ i ] . playernum + 1 )
{
TP_CheckPickupSound ( cl . sound_name [ sound_num ] , pos , i ) ;
return ;
}
}
TP_CheckPickupSound ( cl . sound_name [ sound_num ] , pos , - 1 ) ;
2020-04-19 01:23:32 +00:00
# endif
2005-09-26 03:40:09 +00:00
}
2004-08-23 00:15:46 +00:00
# endif
/*
= = = = = = = = = = = = = = = = = =
CL_ParseClientdata
Server information pertaining to this client only , sent every frame
= = = = = = = = = = = = = = = = = =
*/
void CL_ParseClientdata ( void )
{
int i ;
// calculate simulated time of message
oldparsecountmod = parsecountmod ;
i = cls . netchan . incoming_acknowledged ;
2013-07-26 17:40:06 +00:00
# ifdef NQPROT
2013-07-26 17:19:06 +00:00
if ( cls . demoplayback = = DPB_NETQUAKE )
2013-07-26 17:40:06 +00:00
{
2013-07-26 17:19:06 +00:00
i = cls . netchan . incoming_sequence - 1 ;
2013-07-26 17:40:06 +00:00
cl . oldparsecount = i - 1 ;
oldparsecountmod = cl . oldparsecount & UPDATE_MASK ;
}
else
# endif
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
if ( cls . demoplayback = = DPB_MVD )
2012-01-24 04:24:14 +00:00
{
2004-08-27 00:48:03 +00:00
cl . oldparsecount = i - 1 ;
2012-01-24 04:24:14 +00:00
oldparsecountmod = cl . oldparsecount & UPDATE_MASK ;
}
2004-08-23 00:15:46 +00:00
cl . parsecount = i ;
2017-08-29 02:29:06 +00:00
parsecountmod = i & UPDATE_MASK ;
2015-06-05 09:04:05 +00:00
parsecounttime = realtime ; //cl.outframes[i].senttime;
2004-08-23 00:15:46 +00:00
2013-07-26 17:19:06 +00:00
if ( cls . protocol = = CP_QUAKEWORLD )
2013-09-06 22:57:44 +00:00
CL_AckedInputFrame ( cls . netchan . incoming_sequence , cl . parsecount , false ) ;
2004-08-23 00:15:46 +00:00
}
2018-03-04 14:41:16 +00:00
# ifdef QWSKINS
2016-07-12 00:40:13 +00:00
static qboolean CLQ2_PlayerSkinIsOkay ( skinid_t id )
{
skinfile_t * sk = Mod_LookupSkin ( id ) ;
if ( ! sk ) //err...
return false ;
if ( sk - > nummappings ! = 1 | | * sk - > mappings [ 0 ] . surface )
return true ; //looks like its a custom skin, ignore it.
return R_GetShaderSizes ( sk - > mappings [ 0 ] . shader , NULL , NULL , true ) > 0 ;
}
static int QDECL CLQ2_EnumeratedSkin ( const char * name , qofs_t size , time_t mtime , void * ptr , searchpathfuncs_t * spath )
{
//follows the form of players/$MODELNAME/$SKINNAME_i.$EXT
player_info_t * player = ptr ;
if ( ! player - > skinid )
{
char * e ;
e = strstr ( name , " _i. " ) ;
if ( e )
{
* e = 0 ;
player - > skinid = Mod_ReadSkinFile ( va ( " %s.skin " , name ) , va ( " replace \" \" \" %s.pcx \" " , name ) ) ;
}
}
return true ;
}
2018-03-25 09:36:14 +00:00
//returns the player if they're not spectating.
static int CL_TryTrackNum ( playerview_t * pv )
{
if ( pv - > spectator & & pv - > cam_state ! = CAM_FREECAM & & pv - > cam_spec_track > = 0 )
return pv - > cam_spec_track ;
return pv - > playernum ;
}
2004-08-23 00:15:46 +00:00
/*
= = = = = = = = = = = = = = = = = = = = =
CL_NewTranslation
= = = = = = = = = = = = = = = = = = = = =
*/
void CL_NewTranslation ( int slot )
{
int top , bottom ;
2014-09-08 23:47:19 +00:00
int local ;
2018-03-25 09:36:14 +00:00
qboolean mayforce ;
2004-08-23 00:15:46 +00:00
2004-12-29 03:24:21 +00:00
char * s ;
player_info_t * player ;
2005-01-23 17:47:04 +00:00
if ( slot > = MAX_CLIENTS )
2006-03-12 22:01:49 +00:00
Host_Error ( " CL_NewTranslation: slot > MAX_CLIENTS " ) ;
2004-12-29 03:24:21 +00:00
player = & cl . players [ slot ] ;
2014-09-08 23:47:19 +00:00
if ( cls . protocol = = CP_QUAKE2 )
{
2023-09-11 09:31:09 +00:00
char * mod , * skin , * dogtag ;
2014-09-08 23:47:19 +00:00
player - > qwskin = NULL ;
player - > skinid = 0 ;
player - > model = NULL ;
player - > ttopcolor = TOP_DEFAULT ;
player - > tbottomcolor = BOTTOM_DEFAULT ;
2018-07-05 16:21:44 +00:00
mod = InfoBuf_ValueForKey ( & player - > userinfo , " skin " ) ;
2014-09-08 23:47:19 +00:00
skin = strchr ( mod , ' / ' ) ;
if ( skin )
2023-09-11 09:31:09 +00:00
{
2014-09-08 23:47:19 +00:00
* skin + + = 0 ;
2023-09-11 09:31:09 +00:00
dogtag = strchr ( skin , ' \\ ' ) ;
if ( dogtag )
* dogtag + + = 0 ;
}
2015-03-03 00:14:43 +00:00
if ( ! mod | | ! * mod )
mod = " male " ;
2023-09-11 09:31:09 +00:00
if ( ! skin | | ! * skin | | ! COM_FCheckExists ( va ( " players/%s/%s.pcx " , mod , skin ) ) )
skin = " grunt " ;
2014-09-08 23:47:19 +00:00
2023-09-11 09:31:09 +00:00
player - > model = Mod_ForName ( va ( " players/%s/tris.md2 " , mod ) , MLV_WARNSYNC ) ;
2015-03-03 00:14:43 +00:00
if ( player - > model - > loadstate = = MLS_FAILED & & strcmp ( mod , " male " ) )
2016-07-12 00:40:13 +00:00
{ //fall back on male if the model doesn't exist. yes, sexist, but also statistically most likely to represent the actual player.
2015-03-03 00:14:43 +00:00
mod = " male " ;
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
player - > model = Mod_ForName ( va ( " players/%s/tris.md2 " , mod ) , 0 ) ;
2015-03-03 00:14:43 +00:00
}
2014-09-08 23:47:19 +00:00
player - > skinid = Mod_RegisterSkinFile ( va ( " players/%s/%s.skin " , mod , skin ) ) ;
if ( ! player - > skinid )
player - > skinid = Mod_ReadSkinFile ( va ( " players/%s/%s.skin " , mod , skin ) , va ( " replace \" \" \" players/%s/%s.pcx \" " , mod , skin ) ) ;
2016-07-12 00:40:13 +00:00
if ( ! CLQ2_PlayerSkinIsOkay ( player - > skinid ) )
{
player - > skinid = 0 ;
COM_EnumerateFiles ( va ( " players/%s/*_i.* " , mod ) , CLQ2_EnumeratedSkin , player ) ;
}
2014-09-08 23:47:19 +00:00
return ;
}
2018-03-25 09:36:14 +00:00
mayforce = ! ( cl . fpd & FPD_NO_FORCE_COLOR ) ;
# if MAX_SPLITS > 1
if ( mayforce & & cl . splitclients > 1 & & cl . teamplay )
{ //if we're using splitscreen, only allow team/enemy forcing if all split clients are on the same team
char * needteam ;
int i ;
needteam = cl . players [ CL_TryTrackNum ( & cl . playerview [ 0 ] ) ] . team ;
for ( i = 1 ; i < cl . splitclients ; i + + )
{
if ( strcmp ( needteam , cl . players [ CL_TryTrackNum ( & cl . playerview [ i ] ) ] . team ) )
{
mayforce = false ;
break ;
}
}
}
# endif
2004-12-29 03:24:21 +00:00
s = Skin_FindName ( player ) ;
2006-03-11 03:12:10 +00:00
COM_StripExtension ( s , s , MAX_QPATH ) ;
2020-09-29 07:09:01 +00:00
if ( player - > qwskin & & stricmp ( s , player - > qwskin - > name ) )
2014-09-08 23:47:19 +00:00
player - > qwskin = NULL ;
player - > skinid = 0 ;
player - > model = NULL ;
2004-12-29 03:24:21 +00:00
2007-07-23 18:52:11 +00:00
top = player - > rtopcolor ;
bottom = player - > rbottomcolor ;
2018-03-25 09:36:14 +00:00
if ( mayforce )
2004-08-23 00:15:46 +00:00
{
2018-03-25 09:36:14 +00:00
local = CL_TryTrackNum ( & cl . playerview [ 0 ] ) ;
2009-04-01 22:03:56 +00:00
if ( ( cl . teamplay | | cls . protocol = = CP_NETQUAKE ) & & ! strcmp ( player - > team , cl . players [ local ] . team ) )
2007-07-23 18:52:11 +00:00
{
2008-06-01 22:06:22 +00:00
if ( cl_teamtopcolor ! = ~ 0 )
2007-07-23 18:52:11 +00:00
top = cl_teamtopcolor ;
2008-06-01 22:06:22 +00:00
if ( cl_teambottomcolor ! = ~ 0 )
2007-07-23 18:52:11 +00:00
bottom = cl_teambottomcolor ;
2008-06-05 07:45:34 +00:00
if ( player - > colourised )
{
if ( player - > colourised - > topcolour ! = ~ 0 )
top = player - > colourised - > topcolour ;
if ( player - > colourised - > bottomcolour ! = ~ 0 )
bottom = player - > colourised - > bottomcolour ;
}
2007-07-23 18:52:11 +00:00
}
else
{
2008-06-01 22:06:22 +00:00
if ( cl_enemytopcolor ! = ~ 0 )
2007-07-23 18:52:11 +00:00
top = cl_enemytopcolor ;
2008-06-01 22:06:22 +00:00
if ( cl_enemybottomcolor ! = ~ 0 )
2007-07-23 18:52:11 +00:00
bottom = cl_enemybottomcolor ;
}
}
2008-06-01 22:06:22 +00:00
/*
2007-07-23 18:52:11 +00:00
if ( top > 13 | | top < 0 )
top = 13 ;
if ( bottom > 13 | | bottom < 0 )
bottom = 13 ;
2008-06-01 22:06:22 +00:00
*/
2007-07-23 18:52:11 +00:00
//other renderers still need the team stuff set, but that's all
player - > ttopcolor = top ;
player - > tbottomcolor = bottom ;
2004-08-23 00:15:46 +00:00
}
2018-03-04 14:41:16 +00:00
# endif
2004-08-23 00:15:46 +00:00
/*
= = = = = = = = = = = = = =
CL_UpdateUserinfo
= = = = = = = = = = = = = =
*/
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
static void CL_ProcessUserInfo ( int slot , player_info_t * player )
2004-08-23 00:15:46 +00:00
{
2015-11-18 07:37:39 +00:00
int i ;
2008-06-01 22:06:22 +00:00
char * col ;
2017-08-14 16:38:44 +00:00
int ospec = player - > spectator ;
2021-11-14 00:35:23 +00:00
if ( cls . protocol = = CP_NETQUAKE )
player - > userid = slot ;
2018-07-05 16:21:44 +00:00
Q_strncpyz ( player - > name , InfoBuf_ValueForKey ( & player - > userinfo , " name " ) , sizeof ( player - > name ) ) ;
Q_strncpyz ( player - > team , InfoBuf_ValueForKey ( & player - > userinfo , " team " ) , sizeof ( player - > team ) ) ;
2008-06-01 22:06:22 +00:00
2021-04-14 05:21:04 +00:00
Ruleset_Check ( InfoBuf_ValueForKey ( & player - > userinfo , RULESET_USERINFO ) , player - > ruleset , sizeof ( player - > ruleset ) ) ;
2018-07-05 16:21:44 +00:00
col = InfoBuf_ValueForKey ( & player - > userinfo , " topcolor " ) ;
2008-06-01 22:06:22 +00:00
if ( ! strncmp ( col , " 0x " , 2 ) )
player - > rtopcolor = 0xff000000 | strtoul ( col + 2 , NULL , 16 ) ;
else
player - > rtopcolor = atoi ( col ) ;
2018-07-05 16:21:44 +00:00
col = InfoBuf_ValueForKey ( & player - > userinfo , " bottomcolor " ) ;
2008-06-01 22:06:22 +00:00
if ( ! strncmp ( col , " 0x " , 2 ) )
player - > rbottomcolor = 0xff000000 | strtoul ( col + 2 , NULL , 16 ) ;
else
player - > rbottomcolor = atoi ( col ) ;
2018-07-05 16:21:44 +00:00
i = atoi ( InfoBuf_ValueForKey ( & player - > userinfo , " *spectator " ) ) ;
2015-11-18 07:37:39 +00:00
if ( i = = 2 )
player - > spectator = 2 ;
else if ( i )
2004-08-23 00:15:46 +00:00
player - > spectator = true ;
else
player - > spectator = false ;
2008-06-01 22:06:22 +00:00
/*
if ( player - > rtopcolor > 13 )
player - > rtopcolor = 13 ;
if ( player - > rbottomcolor > 13 )
player - > rbottomcolor = 13 ;
*/
2008-01-28 23:03:42 +00:00
2023-02-11 05:12:55 +00:00
player - > chatstate = atoi ( InfoBuf_ValueForKey ( & player - > userinfo , " chat " ) ) ;
2014-09-17 03:04:08 +00:00
# ifdef HEXEN2
2010-08-28 17:14:38 +00:00
/*if we're running hexen2, they have to be some class...*/
2018-07-05 16:21:44 +00:00
player - > h2playerclass = atoi ( InfoBuf_ValueForKey ( & player - > userinfo , " cl_playerclass " ) ) ;
2010-08-28 17:14:38 +00:00
if ( player - > h2playerclass > 5 )
player - > h2playerclass = 5 ;
if ( player - > h2playerclass < 1 )
player - > h2playerclass = 1 ;
2014-09-17 03:04:08 +00:00
# endif
2010-08-28 17:14:38 +00:00
2018-03-04 14:41:16 +00:00
# ifdef QWSKINS
player - > model = NULL ;
2008-06-05 07:45:34 +00:00
player - > colourised = TP_FindColours ( player - > name ) ;
2018-03-04 14:41:16 +00:00
# endif
2008-06-05 07:45:34 +00:00
2007-11-23 18:27:30 +00:00
// If it's us
2017-05-28 15:42:32 +00:00
for ( i = 0 ; i < cl . splitclients ; i + + )
if ( slot = = cl . playerview [ i ] . playernum )
break ;
if ( i < cl . splitclients & & player - > name [ 0 ] )
2007-11-23 18:27:30 +00:00
{
2017-05-28 15:42:32 +00:00
if ( cl . playerview [ i ] . spectator ! = player - > spectator )
2015-12-12 19:25:15 +00:00
{
2017-05-28 15:42:32 +00:00
cl . playerview [ i ] . spectator = player - > spectator ;
2015-12-12 19:25:15 +00:00
for ( i = 0 ; i < cl . splitclients ; i + + )
{
Cam_Unlock ( & cl . playerview [ i ] ) ;
}
2017-08-29 02:29:06 +00:00
CL_CheckServerInfo ( ) ;
2015-12-12 19:25:15 +00:00
}
2007-11-23 18:27:30 +00:00
// Update the rules since spectators can bypass everything but players can't
2017-08-29 02:29:06 +00:00
else if ( ospec ! = player - > spectator )
2017-08-14 16:38:44 +00:00
CL_CheckServerInfo ( ) ;
2007-11-23 18:27:30 +00:00
2008-01-28 23:03:42 +00:00
Skin_FlushPlayers ( ) ;
}
2018-03-04 14:41:16 +00:00
# ifdef QWSKINS
2017-05-28 15:42:32 +00:00
else if ( cl . teamplay & & cl . playerview [ 0 ] . spectator & & slot = = Cam_TrackNum ( & cl . playerview [ 0 ] ) ) //skin forcing cares about the team of the guy we're tracking.
2016-02-10 23:23:43 +00:00
Skin_FlushPlayers ( ) ;
2021-11-14 00:35:23 +00:00
else if ( cls . state > = ca_onserver )
2004-08-23 00:15:46 +00:00
Skin_Find ( player ) ;
CL_NewTranslation ( slot ) ;
2018-03-04 14:41:16 +00:00
# endif
Sbar_Changed ( ) ;
2019-06-17 04:21:41 +00:00
CSQC_PlayerInfoChanged ( slot ) ;
2004-08-23 00:15:46 +00:00
}
/*
= = = = = = = = = = = = = =
CL_UpdateUserinfo
= = = = = = = = = = = = = =
*/
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
static void CL_UpdateUserinfo ( void )
2004-08-23 00:15:46 +00:00
{
int slot ;
player_info_t * player ;
slot = MSG_ReadByte ( ) ;
if ( slot > = MAX_CLIENTS )
Host_EndGame ( " CL_ParseServerMessage: svc_updateuserinfo > MAX_SCOREBOARD " ) ;
player = & cl . players [ slot ] ;
player - > userid = MSG_ReadLong ( ) ;
2018-07-05 16:21:44 +00:00
InfoBuf_FromString ( & player - > userinfo , MSG_ReadString ( ) , false ) ;
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
player - > userinfovalid = true ;
2004-08-23 00:15:46 +00:00
CL_ProcessUserInfo ( slot , player ) ;
2006-02-22 23:35:04 +00:00
2013-06-23 02:17:02 +00:00
if ( slot = = cl . playerview [ 0 ] . playernum & & player - > name [ 0 ] )
2006-02-22 23:35:04 +00:00
{
char * qz ;
2018-07-05 16:21:44 +00:00
qz = InfoBuf_ValueForKey ( & player - > userinfo , " Qizmo " ) ;
2006-02-22 23:35:04 +00:00
if ( * qz )
2015-06-16 23:53:58 +00:00
TP_ExecTrigger ( " f_qizmoconnect " , false ) ;
2006-02-22 23:35:04 +00:00
}
2004-08-23 00:15:46 +00:00
}
2019-03-12 05:04:27 +00:00
static void CL_ParseSetInfoBlob ( void )
{
qbyte slot = MSG_ReadByte ( ) ;
char * key = MSG_ReadString ( ) ;
size_t keysize ;
unsigned int offset = MSG_ReadLong ( ) ;
qboolean final = ! ! ( offset & 0x80000000 ) ;
unsigned short valsize = MSG_ReadShort ( ) ;
char * val = BZ_Malloc ( valsize ) ;
MSG_ReadData ( val , valsize ) ;
offset & = ~ 0x80000000 ;
key = InfoBuf_DecodeString ( key , key + strlen ( key ) , & keysize ) ;
if ( slot - - = = 0 )
2019-06-17 04:21:41 +00:00
{
2019-03-12 05:04:27 +00:00
InfoBuf_SyncReceive ( & cl . serverinfo , key , keysize , val , valsize , offset , final ) ;
2019-06-17 04:21:41 +00:00
if ( final )
CL_CheckServerInfo ( ) ;
}
2019-03-12 05:04:27 +00:00
else if ( slot > = MAX_CLIENTS )
Con_Printf ( " INVALID SETINFO %i: %s=%s \n " , slot , key , val ) ;
else
{
player_info_t * player = & cl . players [ slot ] ;
if ( offset )
Con_DLPrintf ( 2 , " SETINFO %s: %s+=%s \n " , player - > name , key , val ) ;
else
Con_DLPrintf ( strcmp ( key , " chat " ) ? 1 : 2 , " SETINFO %s: %s=%s \n " , player - > name , key , val ) ;
InfoBuf_SyncReceive ( & player - > userinfo , key , keysize , val , valsize , offset , final ) ;
player - > userinfovalid = true ;
if ( final )
CL_ProcessUserInfo ( slot , player ) ;
}
Z_Free ( key ) ;
Z_Free ( val ) ;
}
2004-08-23 00:15:46 +00:00
/*
= = = = = = = = = = = = = =
CL_SetInfo
= = = = = = = = = = = = = =
*/
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
static void CL_ParseSetInfo ( void )
2004-08-23 00:15:46 +00:00
{
int slot ;
player_info_t * player ;
2018-07-05 16:21:44 +00:00
char * val ;
2019-03-12 05:04:27 +00:00
char key [ 512 ] ;
2004-08-23 00:15:46 +00:00
slot = MSG_ReadByte ( ) ;
2019-03-12 05:04:27 +00:00
MSG_ReadStringBuffer ( key , sizeof ( key ) ) ;
val = MSG_ReadString ( ) ;
2018-07-05 16:21:44 +00:00
2019-03-12 05:04:27 +00:00
if ( slot > = MAX_CLIENTS )
2018-07-05 16:21:44 +00:00
Con_Printf ( " INVALID SETINFO %i: %s=%s \n " , slot , key , val ) ;
2015-06-29 23:46:31 +00:00
else
{
player = & cl . players [ slot ] ;
2004-08-23 00:15:46 +00:00
2023-04-14 01:51:39 +00:00
if ( cl_shownet . value = = 3 )
Con_Printf ( " \t %i(%s): %s= \" %s \" \n " , slot , player - > name , key , val ) ;
else
Con_DLPrintf ( strcmp ( key , " chat " ) ? 1 : 2 , " SETINFO %s: %s=%s \n " , player - > name , key , val ) ;
2004-08-23 00:15:46 +00:00
2019-03-12 05:04:27 +00:00
InfoBuf_SetStarKey ( & player - > userinfo , key , val ) ;
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
player - > userinfovalid = true ;
2015-06-29 23:46:31 +00:00
CL_ProcessUserInfo ( slot , player ) ;
}
2004-08-23 00:15:46 +00:00
}
/*
= = = = = = = = = = = = = =
CL_ServerInfo
= = = = = = = = = = = = = =
*/
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
static void CL_ServerInfo ( void )
2004-08-23 00:15:46 +00:00
{
// int slot;
// player_info_t *player;
char key [ MAX_QWMSGLEN ] ;
char value [ MAX_QWMSGLEN ] ;
Q_strncpyz ( key , MSG_ReadString ( ) , sizeof ( key ) ) ;
Q_strncpyz ( value , MSG_ReadString ( ) , sizeof ( value ) ) ;
2023-04-14 01:51:39 +00:00
if ( cl_shownet . value = = 3 )
Con_Printf ( " \t %s=%s \n " , key , value ) ;
else
Con_DPrintf ( " SERVERINFO: %s=%s \n " , key , value ) ;
2004-08-23 00:15:46 +00:00
2018-07-05 16:21:44 +00:00
InfoBuf_SetStarKey ( & cl . serverinfo , key , value ) ;
2004-08-23 00:15:46 +00:00
CL_CheckServerInfo ( ) ;
}
/*
= = = = = = = = = = = = = = = = = = = = =
CL_SetStat
= = = = = = = = = = = = = = = = = = = = =
*/
2015-02-02 08:01:53 +00:00
static void CL_SetStat_Internal ( int pnum , int stat , int ivalue , float fvalue )
2004-08-23 00:15:46 +00:00
{
2015-02-02 08:01:53 +00:00
if ( cl . playerview [ pnum ] . stats [ stat ] ! = ivalue )
2004-12-05 08:19:54 +00:00
Sbar_Changed ( ) ;
2005-09-26 03:40:09 +00:00
2015-09-01 04:45:15 +00:00
# ifdef QUAKESTATS
2004-08-23 00:15:46 +00:00
if ( stat = = STAT_ITEMS )
{ // set flash times
2016-07-15 12:26:24 +00:00
int j ;
2004-08-23 00:15:46 +00:00
for ( j = 0 ; j < 32 ; j + + )
2015-02-02 08:01:53 +00:00
if ( ( ivalue & ( 1 < < j ) ) & & ! ( cl . playerview [ pnum ] . stats [ stat ] & ( 1 < < j ) ) )
2012-07-05 19:42:36 +00:00
cl . playerview [ pnum ] . item_gettime [ j ] = cl . time ;
2004-08-23 00:15:46 +00:00
}
2015-03-03 00:14:43 +00:00
if ( stat = = STAT_WEAPONMODELI )
2005-07-14 01:57:34 +00:00
{
2015-02-02 08:01:53 +00:00
if ( cl . playerview [ pnum ] . stats [ stat ] ! = ivalue )
2005-07-14 01:57:34 +00:00
{
2015-02-02 08:01:53 +00:00
if ( ivalue = = 0 )
2015-06-16 23:53:58 +00:00
TP_ExecTrigger ( " f_reloadstart " , false ) ;
2012-07-05 19:42:36 +00:00
else if ( cl . playerview [ pnum ] . stats [ stat ] = = 0 )
2015-06-16 23:53:58 +00:00
TP_ExecTrigger ( " f_reloadend " , false ) ;
2005-07-14 01:57:34 +00:00
}
}
2015-02-02 08:01:53 +00:00
if ( stat = = STAT_VIEWHEIGHT & & ( ( cls . z_ext & Z_EXT_VIEWHEIGHT ) | | cls . protocol = = CP_NETQUAKE ) )
cl . playerview [ pnum ] . viewheight = fvalue ;
2015-09-01 04:45:15 +00:00
# endif
2015-02-02 08:01:53 +00:00
cl . playerview [ pnum ] . stats [ stat ] = ivalue ;
cl . playerview [ pnum ] . statsf [ stat ] = fvalue ;
2004-09-30 22:42:34 +00:00
2020-04-19 01:23:32 +00:00
# ifdef QUAKESTATS
2004-09-30 22:42:34 +00:00
if ( pnum = = 0 )
2015-02-02 08:01:53 +00:00
TP_StatChanged ( stat , ivalue ) ;
2020-04-19 01:23:32 +00:00
# endif
2004-08-23 00:15:46 +00:00
}
2015-09-01 04:45:15 +00:00
# ifdef NQPROT
2017-08-16 02:14:07 +00:00
static void CL_SetStatMovevar ( int pnum , int stat , int ivalue , float value )
2013-07-26 17:19:06 +00:00
{
switch ( stat )
{
2017-08-16 02:14:07 +00:00
case STAT_FRAGLIMIT :
if ( cls . protocol = = CP_NETQUAKE & & CPNQ_IS_DP )
2018-07-05 16:21:44 +00:00
InfoBuf_SetKey ( & cl . serverinfo , " fraglimit " , va ( " %g " , value ) ) ;
2017-08-16 02:14:07 +00:00
break ;
case STAT_TIMELIMIT :
if ( cls . protocol = = CP_NETQUAKE & & CPNQ_IS_DP )
2018-07-05 16:21:44 +00:00
InfoBuf_SetKey ( & cl . serverinfo , " timelimit " , va ( " %g " , value ) ) ;
2017-08-16 02:14:07 +00:00
break ;
case STAT_MOVEVARS_AIRACCEL_QW_STRETCHFACTOR : //0
case STAT_MOVEVARS_AIRCONTROL_PENALTY : //0
case STAT_MOVEVARS_AIRSPEEDLIMIT_NONQW : //0
case STAT_MOVEVARS_AIRSTRAFEACCEL_QW : //0
case STAT_MOVEVARS_AIRCONTROL_POWER : //2
case STAT_MOVEVARS_WARSOWBUNNY_AIRFORWARDACCEL : //0
case STAT_MOVEVARS_WARSOWBUNNY_ACCEL : //0
case STAT_MOVEVARS_WARSOWBUNNY_TOPSPEED : //0
case STAT_MOVEVARS_WARSOWBUNNY_TURNACCEL : //0
case STAT_MOVEVARS_WARSOWBUNNY_BACKTOSIDERATIO : //0
case STAT_MOVEVARS_AIRSTOPACCELERATE : //0
case STAT_MOVEVARS_AIRSTRAFEACCELERATE : //0
case STAT_MOVEVARS_MAXAIRSTRAFESPEED : //0
case STAT_MOVEVARS_AIRCONTROL : //0
case STAT_MOVEVARS_WALLFRICTION : //0
case STAT_MOVEVARS_TIMESCALE : //sv_gamespeed
case STAT_MOVEVARS_JUMPVELOCITY : //270
case STAT_MOVEVARS_EDGEFRICTION : //2
case STAT_MOVEVARS_MAXAIRSPEED : //30
case STAT_MOVEVARS_AIRACCEL_QW : //1
case STAT_MOVEVARS_AIRACCEL_SIDEWAYS_FRICTION : //0
break ;
case STAT_MOVEVARS_STEPHEIGHT : //18
movevars . stepheight = value ;
break ;
case STAT_MOVEVARS_TICRATE : //cl_maxfps limiter hint
2018-01-03 04:40:06 +00:00
if ( cls . protocol = = CP_NETQUAKE & & CPNQ_IS_DP )
{
if ( value < = 0 )
cls . maxfps = 1.0 / value ;
else
cls . maxfps = 72 ;
}
2017-08-16 02:14:07 +00:00
break ;
case STAT_MOVEFLAGS :
2019-03-23 07:06:37 +00:00
movevars . flags = ivalue ;
2017-08-16 02:14:07 +00:00
break ;
2013-07-26 17:19:06 +00:00
case STAT_MOVEVARS_GRAVITY :
movevars . gravity = value ;
break ;
case STAT_MOVEVARS_STOPSPEED :
movevars . stopspeed = value ;
break ;
case STAT_MOVEVARS_MAXSPEED :
cl . playerview [ pnum ] . maxspeed = value ;
break ;
case STAT_MOVEVARS_SPECTATORMAXSPEED :
movevars . spectatormaxspeed = value ;
break ;
case STAT_MOVEVARS_ACCELERATE :
movevars . accelerate = value ;
break ;
case STAT_MOVEVARS_AIRACCELERATE :
movevars . airaccelerate = value ;
break ;
case STAT_MOVEVARS_WATERACCELERATE :
movevars . wateraccelerate = value ;
break ;
case STAT_MOVEVARS_FRICTION :
movevars . friction = value ;
break ;
case STAT_MOVEVARS_WATERFRICTION :
movevars . waterfriction = value ;
break ;
case STAT_MOVEVARS_ENTGRAVITY :
cl . playerview [ pnum ] . entgravity = value ;
break ;
}
}
2015-09-01 04:45:15 +00:00
# endif
2013-07-26 17:19:06 +00:00
2015-08-20 03:17:47 +00:00
//the two values are expected to be the same, they're just both provided for precision.
static void CL_SetStatNumeric ( int pnum , int stat , int ivalue , float fvalue )
2008-01-09 00:52:31 +00:00
{
if ( stat < 0 | | stat > = MAX_CL_STATS )
return ;
// Host_EndGame ("CL_SetStat: %i is invalid", stat);
2015-09-01 04:45:15 +00:00
# ifdef QUAKESTATS
2008-01-09 00:52:31 +00:00
if ( stat = = STAT_TIME & & ( cls . fteprotocolextensions & PEXT_ACCURATETIMINGS ) )
{
cl . oldgametime = cl . gametime ;
cl . oldgametimemark = cl . gametimemark ;
2015-08-20 03:17:47 +00:00
cl . gametime = fvalue * 0.001 ;
2008-01-09 00:52:31 +00:00
cl . gametimemark = realtime ;
}
2015-09-01 04:45:15 +00:00
# endif
2008-01-09 00:52:31 +00:00
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
if ( cls . demoplayback = = DPB_MVD )
2008-01-09 00:52:31 +00:00
{
extern int cls_lastto ;
2015-08-20 03:17:47 +00:00
cl . players [ cls_lastto ] . stats [ stat ] = ivalue ;
cl . players [ cls_lastto ] . statsf [ stat ] = fvalue ;
2008-01-09 00:52:31 +00:00
2023-04-14 01:51:39 +00:00
if ( cl_shownet . value = = 3 )
Con_Printf ( " \t %i: %i=%g \n " , cls_lastto , stat , fvalue ) ;
2008-01-09 00:52:31 +00:00
for ( pnum = 0 ; pnum < cl . splitclients ; pnum + + )
2015-07-03 02:07:41 +00:00
if ( cl . playerview [ pnum ] . cam_spec_track = = cls_lastto & & cl . playerview [ pnum ] . cam_state ! = CAM_FREECAM )
2015-08-20 03:17:47 +00:00
CL_SetStat_Internal ( pnum , stat , ivalue , fvalue ) ;
2008-01-09 00:52:31 +00:00
}
else
2015-11-18 07:37:39 +00:00
{
unsigned int pl = cl . playerview [ pnum ] . playernum ;
if ( pl < MAX_CLIENTS )
{
cl . players [ pl ] . stats [ stat ] = ivalue ;
cl . players [ pl ] . statsf [ stat ] = fvalue ;
}
2023-04-14 01:51:39 +00:00
if ( cl_shownet . value = = 3 )
Con_Printf ( " \t %i(%i): %i=%g \n " , pnum , pl , stat , fvalue ) ;
2015-08-20 03:17:47 +00:00
CL_SetStat_Internal ( pnum , stat , ivalue , fvalue ) ;
2015-11-18 07:37:39 +00:00
}
2008-01-09 00:52:31 +00:00
2015-09-01 04:45:15 +00:00
# ifdef QUAKESTATS
2015-08-20 03:17:47 +00:00
if ( stat = = STAT_VIEWHEIGHT & & ( ( cls . z_ext & Z_EXT_VIEWHEIGHT ) | | cls . protocol = = CP_NETQUAKE ) )
cl . playerview [ pnum ] . viewheight = fvalue ;
2015-09-01 04:45:15 +00:00
# endif
2008-05-25 22:23:43 +00:00
2015-09-01 04:45:15 +00:00
# ifdef NQPROT
2024-04-25 05:57:34 +00:00
if ( cls . protocol = = CP_NETQUAKE & & ( CPNQ_IS_DP | | ( cls . fteprotocolextensions2 & PEXT2_PREDINFO ) ) )
2013-07-26 17:19:06 +00:00
{
2015-08-20 03:17:47 +00:00
if ( cls . fteprotocolextensions2 & PEXT2_PREDINFO )
2017-08-16 02:14:07 +00:00
CL_SetStatMovevar ( pnum , stat , ivalue , fvalue ) ;
2015-08-20 03:17:47 +00:00
else
2017-08-16 02:14:07 +00:00
CL_SetStatMovevar ( pnum , stat , ivalue , * ( float * ) & ivalue ) ; //DP sucks.
2013-07-26 17:19:06 +00:00
}
2015-09-01 04:45:15 +00:00
# endif
2008-05-25 22:23:43 +00:00
}
2015-08-20 03:17:47 +00:00
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
static void CL_SetStatString ( int pnum , int stat , const char * value )
2008-05-25 22:23:43 +00:00
{
if ( stat < 0 | | stat > = MAX_CL_STATS )
return ;
// Host_EndGame ("CL_SetStat: %i is invalid", stat);
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
if ( cls . demoplayback = = DPB_MVD )
2008-05-25 22:23:43 +00:00
{
2020-04-29 10:43:22 +00:00
extern int cls_lastto ;
//Z_Free(cl.players[cls_lastto].statsstr[stat]);
//cl.players[cls_lastto].statsstr[stat]=Z_StrDup(value);
2008-05-25 22:23:43 +00:00
for ( pnum = 0 ; pnum < cl . splitclients ; pnum + + )
2020-04-29 10:43:22 +00:00
if ( cl . playerview [ pnum ] . cam_spec_track = = cls_lastto & & cl . playerview [ pnum ] . cam_state ! = CAM_FREECAM )
{
if ( cl . playerview [ pnum ] . statsstr [ stat ] )
Z_Free ( cl . playerview [ pnum ] . statsstr [ stat ] ) ;
cl . playerview [ pnum ] . statsstr [ stat ] = Z_StrDup ( value ) ;
}
2008-05-25 22:23:43 +00:00
}
else
{
2012-07-05 19:42:36 +00:00
if ( cl . playerview [ pnum ] . statsstr [ stat ] )
Z_Free ( cl . playerview [ pnum ] . statsstr [ stat ] ) ;
2020-04-29 10:43:22 +00:00
cl . playerview [ pnum ] . statsstr [ stat ] = Z_StrDup ( value ) ;
2008-05-25 22:23:43 +00:00
}
}
2004-08-23 00:15:46 +00:00
/*
= = = = = = = = = = = = = =
CL_MuzzleFlash
= = = = = = = = = = = = = =
*/
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
static void CL_MuzzleFlash ( int entnum )
2004-08-23 00:15:46 +00:00
{
2014-04-24 01:53:01 +00:00
dlight_t * dl ;
2004-08-23 00:15:46 +00:00
player_state_t * pl ;
packet_entities_t * pack ;
entity_state_t * s1 ;
int pnum ;
2014-04-24 01:53:01 +00:00
vec3_t org = { 0 , 0 , 0 } ;
vec3_t axis [ 3 ] = { { 0 , 0 , 0 } } ;
int dlightkey = 0 ;
extern int pt_muzzleflash ;
2005-01-13 16:29:20 +00:00
extern cvar_t cl_muzzleflash ;
//was it us?
2009-11-04 21:16:50 +00:00
if ( ! cl_muzzleflash . ival ) // remove all muzzleflashes
2005-06-04 12:40:12 +00:00
return ;
2004-08-23 00:15:46 +00:00
2014-04-24 01:53:01 +00:00
if ( cl_muzzleflash . value = = 2 )
{
//muzzleflash 2 removes muzzleflashes on us
for ( pnum = 0 ; pnum < cl . splitclients ; pnum + + )
if ( entnum - 1 = = cl . playerview [ pnum ] . playernum )
return ;
}
2004-08-23 00:15:46 +00:00
2014-04-24 01:53:01 +00:00
if ( ! dlightkey )
2004-08-23 00:15:46 +00:00
{
2014-04-24 01:53:01 +00:00
pack = & cl . inframes [ cl . validsequence & UPDATE_MASK ] . packet_entities ;
2004-08-23 00:15:46 +00:00
2014-04-24 01:53:01 +00:00
for ( pnum = 0 ; pnum < pack - > num_entities ; pnum + + ) //try looking for an entity with that id first
2004-08-23 00:15:46 +00:00
{
2014-04-24 01:53:01 +00:00
s1 = & pack - > entities [ pnum ] ;
if ( s1 - > number = = entnum )
{
dlightkey = entnum ;
VectorCopy ( s1 - > origin , org ) ;
AngleVectors ( s1 - > angles , axis [ 0 ] , axis [ 1 ] , axis [ 2 ] ) ;
break ;
}
2004-08-23 00:15:46 +00:00
}
}
2014-04-24 01:53:01 +00:00
if ( ! dlightkey )
2004-08-23 00:15:46 +00:00
{ //that ent number doesn't exist, go for a player with that number
2014-04-24 01:53:01 +00:00
if ( ( unsigned ) ( entnum ) < = cl . allocated_client_slots & & entnum > 0 )
2004-08-23 00:15:46 +00:00
{
2014-04-24 01:53:01 +00:00
pl = & cl . inframes [ cl . validsequence & UPDATE_MASK ] . playerstate [ entnum - 1 ] ;
2004-08-23 00:15:46 +00:00
2014-04-24 01:53:01 +00:00
if ( pl - > messagenum = = cl . validsequence )
{
dlightkey = - entnum ;
VectorCopy ( pl - > origin , org ) ;
AngleVectors ( pl - > viewangles , axis [ 0 ] , axis [ 1 ] , axis [ 2 ] ) ;
if ( pl - > szmins [ 2 ] = = 0 ) /*hull is 0-based, so origin is bottom of model, move the light up slightly*/
org [ 2 ] + = pl - > szmaxs [ 2 ] / 2 ;
}
2004-08-23 00:15:46 +00:00
}
}
2014-04-24 01:53:01 +00:00
if ( ! dlightkey )
return ;
2014-10-05 20:04:11 +00:00
if ( P_RunParticleEffectType ( org , axis [ 0 ] , 1 , pt_muzzleflash ) )
2014-04-24 01:53:01 +00:00
{
2019-09-04 07:59:40 +00:00
extern cvar_t r_muzzleflash_colour ;
extern cvar_t r_muzzleflash_fade ;
2014-04-24 01:53:01 +00:00
dl = CL_AllocDlight ( dlightkey ) ;
VectorMA ( org , 15 , axis [ 0 ] , dl - > origin ) ;
memcpy ( dl - > axis , axis , sizeof ( dl - > axis ) ) ;
dl - > minlight = 32 ;
dl - > die = cl . time + 0.1 ;
2019-09-04 07:59:40 +00:00
VectorCopy ( r_muzzleflash_colour . vec4 , dl - > color ) ;
dl - > radius = r_muzzleflash_colour . vec4 [ 3 ] + ( rand ( ) & 31 ) ;
VectorCopy ( r_muzzleflash_fade . vec4 , dl - > channelfade ) ;
dl - > decay = r_muzzleflash_fade . vec4 [ 3 ] ;
2014-04-13 04:27:21 +00:00
# ifdef RTLIGHTS
2014-04-24 01:53:01 +00:00
dl - > lightcolourscales [ 2 ] = 4 ;
2014-04-13 04:27:21 +00:00
# endif
2014-04-24 01:53:01 +00:00
}
2004-08-23 00:15:46 +00:00
}
2004-09-30 22:42:34 +00:00
//return if we want to print the message.
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
static char * CL_ParseChat ( char * text , player_info_t * * player , int * msgflags )
2005-09-26 03:40:09 +00:00
{
2005-12-13 02:31:57 +00:00
extern cvar_t cl_chatsound , cl_nofake , cl_teamchatsound , cl_enemychatsound ;
2005-09-07 14:55:25 +00:00
int flags ;
int offset = 0 ;
qboolean suppress_talksound ;
char * p ;
2004-08-23 00:15:46 +00:00
char * s ;
2005-11-30 01:20:53 +00:00
int check_flood ;
2004-08-30 07:08:13 +00:00
2005-09-07 14:55:25 +00:00
flags = TP_CategorizeMessage ( text , & offset , player ) ;
2015-06-26 13:21:04 +00:00
* msgflags = flags ;
2005-09-07 14:55:25 +00:00
s = text + offset ;
2004-08-30 07:08:13 +00:00
2005-09-07 14:55:25 +00:00
if ( flags )
2004-08-23 00:15:46 +00:00
{
2005-09-07 14:55:25 +00:00
if ( ! cls . demoplayback )
Sys_ServerActivity ( ) ; //chat always flashes the screen..
2007-09-17 20:35:39 +00:00
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
if ( * player & & Ignore_Message ( ( * player ) - > name , s , flags ) )
2019-09-17 19:49:39 +00:00
return NULL ;
2005-09-07 14:55:25 +00:00
//check f_ stuff
2017-01-24 23:57:43 +00:00
if ( * player & & ( ! strncmp ( s , " f_ " , 2 ) | | ! strncmp ( s , " q_ " , 2 ) ) )
2004-09-30 22:42:34 +00:00
{
2007-09-17 20:35:39 +00:00
Validation_Auto_Response ( * player - cl . players , s ) ;
2005-09-08 08:10:06 +00:00
return s ;
2005-09-07 14:55:25 +00:00
}
2007-09-17 20:35:39 +00:00
2005-09-07 14:55:25 +00:00
Validation_CheckIfResponse ( text ) ;
2004-09-30 22:42:34 +00:00
2006-01-13 06:27:18 +00:00
# ifdef PLUGINS
2006-01-01 09:01:15 +00:00
if ( ! Plug_ChatMessage ( text + offset , * player ? ( int ) ( * player - cl . players ) : - 1 , flags ) )
return NULL ;
2006-01-13 06:27:18 +00:00
# endif
2006-01-01 09:01:15 +00:00
2008-11-09 22:29:28 +00:00
if ( flags & ( TPM_TEAM | TPM_OBSERVEDTEAM ) & & ! TP_FilterMessage ( text + offset ) )
return NULL ;
2015-09-01 04:45:15 +00:00
# ifdef QUAKEHUD
2008-11-09 22:29:28 +00:00
if ( flags & ( TPM_TEAM | TPM_OBSERVEDTEAM ) & & Sbar_UpdateTeamStatus ( * player , text + offset ) )
2005-09-07 14:55:25 +00:00
return NULL ;
2015-09-01 04:45:15 +00:00
# endif
2005-11-30 01:20:53 +00:00
2008-11-09 22:29:28 +00:00
2005-11-30 01:20:53 +00:00
if ( ( int ) msg_filter . value & flags )
return NULL ; //filter chat
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
check_flood = Ignore_Check_Flood ( * player , s , flags ) ;
2005-12-13 02:31:57 +00:00
if ( check_flood = = IGNORE_NO_ADD )
2005-11-30 01:20:53 +00:00
return NULL ;
2005-12-13 02:31:57 +00:00
else if ( check_flood = = NO_IGNORE_ADD )
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
Ignore_Flood_Add ( * player , s ) ;
2005-09-07 14:55:25 +00:00
}
2006-01-13 06:27:18 +00:00
# ifdef PLUGINS
2006-01-01 09:01:15 +00:00
else
{
if ( ! Plug_ServerMessage ( text + offset , PRINT_CHAT ) )
return NULL ;
}
2006-01-13 06:27:18 +00:00
# endif
2004-09-30 22:42:34 +00:00
2005-09-07 14:55:25 +00:00
suppress_talksound = false ;
2004-09-30 22:42:34 +00:00
2005-09-07 14:55:25 +00:00
if ( flags = = 2 | | ( ! cl . teamplay & & flags ) )
suppress_talksound = TP_CheckSoundTrigger ( text + offset ) ;
2004-09-30 22:42:34 +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
if ( cls . demoseeking | |
! cl_chatsound . value | | // no sound at all
2005-09-07 14:55:25 +00:00
( cl_chatsound . value = = 2 & & flags ! = 2 ) ) // only play sound in mm2
suppress_talksound = true ;
2004-09-30 22:42:34 +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
2005-09-07 14:55:25 +00:00
if ( ! suppress_talksound )
2005-12-13 02:31:57 +00:00
{
2008-11-09 22:29:28 +00:00
if ( flags & ( TPM_OBSERVEDTEAM | TPM_TEAM ) & & cl . teamplay )
2005-12-13 02:33:03 +00:00
S_LocalSound ( cl_teamchatsound . string ) ;
2005-12-13 02:31:57 +00:00
else
2005-12-13 02:33:03 +00:00
S_LocalSound ( cl_enemychatsound . string ) ;
2005-12-13 02:31:57 +00:00
}
2004-09-30 22:42:34 +00:00
2011-12-23 03:12:29 +00:00
if ( flags )
{
2015-06-18 22:11:30 +00:00
if ( cl_nofake . value = = 1 | | ( cl_nofake . value = = 2 & & ! ( flags & ( TPM_OBSERVEDTEAM | TPM_TEAM ) ) ) )
{
2011-12-23 03:12:29 +00:00
for ( p = s ; * p ; p + + )
if ( * p = = 13 | | ( * p = = 10 & & p [ 1 ] ) )
* p = ' ' ;
}
2004-09-30 22:42:34 +00:00
}
2005-09-07 14:55:25 +00:00
return s ;
2004-08-23 00:15:46 +00:00
}
2005-09-26 08:07:26 +00:00
// CL_PlayerColor: returns color and mask for player_info_t
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
static int CL_PlayerColor ( player_info_t * plr , qboolean * name_coloured )
2005-09-26 08:07:26 +00:00
{
char * t ;
2012-04-24 07:59:11 +00:00
unsigned int c ;
2005-09-26 08:07:26 +00:00
2009-05-24 10:11:17 +00:00
* name_coloured = false ;
2005-09-26 08:07:26 +00:00
if ( cl . teamfortress ) //override based on team
{
2015-04-14 23:12:17 +00:00
//damn spies
if ( ! Q_strcasecmp ( plr - > team , " red " ) )
c = 1 ;
else if ( ! Q_strcasecmp ( plr - > team , " blue " ) )
c = 5 ;
else
2005-09-26 08:07:26 +00:00
// TODO: needs some work
2007-07-23 18:52:11 +00:00
switch ( plr - > rbottomcolor )
2005-09-26 08:07:26 +00:00
{ //translate q1 skin colours to console colours
case 10 :
case 1 :
2009-05-24 10:11:17 +00:00
* name_coloured = true ;
2005-09-26 08:07:26 +00:00
case 4 : //red
c = 1 ;
break ;
case 11 :
2009-05-24 10:11:17 +00:00
* name_coloured = true ;
2005-09-26 08:07:26 +00:00
case 3 : // green
c = 2 ;
break ;
case 5 :
2009-05-24 10:11:17 +00:00
* name_coloured = true ;
2005-09-26 08:07:26 +00:00
case 12 :
c = 3 ;
break ;
case 6 :
case 7 :
2009-05-24 10:11:17 +00:00
* name_coloured = true ;
2005-09-26 08:07:26 +00:00
case 8 :
case 9 :
2006-01-02 22:05:47 +00:00
c = 6 ;
2005-09-26 08:07:26 +00:00
break ;
case 2 : // light blue
2009-05-24 10:11:17 +00:00
* name_coloured = true ;
2005-09-26 08:07:26 +00:00
case 13 : //blue
case 14 : //blue
2006-01-02 22:05:47 +00:00
c = 5 ;
2005-09-26 08:07:26 +00:00
break ;
default :
2009-05-24 10:11:17 +00:00
* name_coloured = true ;
2005-09-26 08:07:26 +00:00
case 0 : // white
c = 7 ;
break ;
}
}
2005-11-01 23:25:15 +00:00
else if ( cl . teamplay )
{
// team name hacks
if ( ! strcmp ( plr - > team , " red " ) )
c = 1 ;
else if ( ! strcmp ( plr - > team , " blue " ) )
2006-01-02 22:05:47 +00:00
c = 5 ;
2005-11-01 23:25:15 +00:00
else
{
char * t ;
t = plr - > team ;
c = 0 ;
for ( t = plr - > team ; * t ; t + + )
{
c > > = 1 ;
c ^ = * t ; // TODO: very weak hash, replace
}
if ( ( c / 7 ) & 1 )
2009-05-24 10:11:17 +00:00
* name_coloured = true ;
2005-11-01 23:25:15 +00:00
c = 1 + ( c % 7 ) ;
}
}
2005-09-26 08:07:26 +00:00
else
{
// override chat color with tc infokey
// 0-6 is standard colors (red to white)
// 7-13 is using secondard charactermask
// 14 and afterwards repeats
2018-07-05 16:21:44 +00:00
t = InfoBuf_ValueForKey ( & plr - > userinfo , " tc " ) ;
2005-09-26 08:07:26 +00:00
if ( * t )
c = atoi ( t ) ;
else
2005-10-08 22:35:20 +00:00
c = plr - > userid ; // Quake2 can start from 0
2005-09-26 08:07:26 +00:00
if ( ( c / 7 ) & 1 )
2009-05-24 10:11:17 +00:00
* name_coloured = true ;
2005-09-26 08:07:26 +00:00
c = 1 + ( c % 7 ) ;
}
return c ;
}
2012-01-01 15:34:02 +00:00
void TTS_SayChatString ( char * * stringtosay ) ;
2006-01-01 09:01:15 +00:00
// CL_PrintChat: takes chat strings and performs name coloring and cl_parsewhitetext parsing
2005-09-08 08:10:06 +00:00
// NOTE: text in rawmsg/msg is assumed destroyable and should not be used afterwards
2015-04-14 23:12:17 +00:00
void CL_PrintChat ( player_info_t * plr , char * msg , int plrflags )
2005-09-07 14:55:25 +00:00
{
2011-06-16 02:03:57 +00:00
extern cvar_t con_separatechat ;
2005-09-08 08:10:06 +00:00
char * name = NULL ;
2005-09-07 14:55:25 +00:00
int c ;
2009-05-24 10:11:17 +00:00
qboolean name_coloured = false ;
2005-09-07 14:55:25 +00:00
extern cvar_t cl_parsewhitetext ;
qboolean memessage = false ;
2009-05-24 10:11:17 +00:00
char fullchatmessage [ 2048 ] ;
2010-12-23 08:53:23 +00:00
2009-05-24 10:11:17 +00:00
fullchatmessage [ 0 ] = 0 ;
2015-04-14 23:12:17 +00:00
/*if (plrflags & TPM_FAKED)
2005-09-08 08:10:06 +00:00
{
name = rawmsg ; // use rawmsg pointer and msg modification to generate null-terminated string
if ( msg )
* ( msg - 2 ) = 0 ; // it's assumed that msg has 2 chars before it due to strstr
2015-04-14 23:12:17 +00:00
} */
2005-09-08 08:10:06 +00:00
2015-06-18 22:11:30 +00:00
if ( 0 ) //*msg == '\r')
2015-06-14 01:28:01 +00:00
{
name = msg ;
msg = strstr ( msg , " : " ) ;
if ( msg )
{
name + + ;
* msg = 0 ;
msg + = 2 ;
plrflags & = ~ TPM_TEAM | TPM_OBSERVEDTEAM ;
}
else
{
msg = name ;
name = NULL ;
}
}
2005-09-07 14:55:25 +00:00
if ( msg [ 0 ] = = ' / ' & & msg [ 1 ] = = ' m ' & & msg [ 2 ] = = ' e ' & & msg [ 3 ] = = ' ' )
{
msg + = 4 ;
memessage = true ; // special /me formatting
}
2015-06-14 01:28:01 +00:00
if ( plr & & ! name ) // use special formatting with a real chat message
2005-09-08 08:10:06 +00:00
name = plr - > name ; // use player's name
2009-11-04 21:16:50 +00:00
if ( cl_standardchat . ival )
2005-09-07 14:55:25 +00:00
{
2009-05-24 10:11:17 +00:00
name_coloured = true ;
2005-09-08 08:10:06 +00:00
c = 7 ;
}
else
{
if ( plrflags & TPM_SPECTATOR ) // is an observer
2005-09-07 14:55:25 +00:00
{
// TODO: we don't even check for this yet...
2008-11-09 22:29:28 +00:00
if ( plrflags & ( TPM_TEAM | TPM_OBSERVEDTEAM ) ) // is on team
2005-09-07 14:55:25 +00:00
c = 0 ; // blacken () on observers
else
{
2009-05-24 10:11:17 +00:00
name_coloured = true ;
2005-09-07 14:55:25 +00:00
c = 7 ;
}
}
2005-09-08 08:10:06 +00:00
else if ( plr )
2009-05-24 10:11:17 +00:00
c = CL_PlayerColor ( plr , & name_coloured ) ;
2005-09-08 08:10:06 +00:00
else
{
// defaults for fake clients
2009-05-24 10:11:17 +00:00
name_coloured = true ;
2005-09-08 08:10:06 +00:00
c = 7 ;
2005-09-07 14:55:25 +00:00
}
2005-09-08 08:10:06 +00:00
}
2005-09-07 14:55:25 +00:00
2005-09-08 08:10:06 +00:00
c = ' 0 ' + c ;
2005-09-07 14:55:25 +00:00
2015-06-18 22:11:30 +00:00
if ( plrflags & TPM_QTV )
Q_strncatz ( fullchatmessage , " QTV ^m " , sizeof ( fullchatmessage ) ) ;
else if ( name )
2005-09-08 08:10:06 +00:00
{
2005-09-07 14:55:25 +00:00
if ( memessage )
{
2005-09-08 08:10:06 +00:00
if ( ! cl_standardchat . value & & ( plrflags & TPM_SPECTATOR ) )
2013-03-12 22:35:33 +00:00
Q_strncatz ( fullchatmessage , " ^0*^7 " , sizeof ( fullchatmessage ) ) ;
2005-09-07 14:55:25 +00:00
else
2013-03-12 22:35:33 +00:00
Q_strncatz ( fullchatmessage , " * " , sizeof ( fullchatmessage ) ) ;
2005-09-07 14:55:25 +00:00
}
2013-03-12 22:35:33 +00:00
else
Q_strncatz ( fullchatmessage , " \1 " , sizeof ( fullchatmessage ) ) ;
2005-09-07 14:55:25 +00:00
2017-02-21 20:22:07 +00:00
# if defined(HAVE_SPEECHTOTEXT)
2012-01-01 15:34:02 +00:00
TTS_SayChatString ( & msg ) ;
# endif
2008-11-09 22:29:28 +00:00
if ( plrflags & ( TPM_TEAM | TPM_OBSERVEDTEAM ) ) // for team chat don't highlight the name, just the brackets
2005-09-07 14:55:25 +00:00
{
2013-03-12 22:47:42 +00:00
Q_strncatz ( fullchatmessage , va ( " (^[^7%s%s^d \\ player \\ %i^]) " , name_coloured ? " ^m " : " " , name , ( int ) ( plr - cl . players ) ) , sizeof ( fullchatmessage ) ) ;
2009-05-24 10:11:17 +00:00
}
2009-11-04 21:16:50 +00:00
else if ( cl_standardchat . ival )
2009-05-24 10:11:17 +00:00
{
2013-03-12 22:47:42 +00:00
Q_strncatz ( fullchatmessage , va ( " ^[^7%s%s^d \\ player \\ %i^] " , name_coloured ? " ^m " : " " , name , ( int ) ( plr - cl . players ) ) , sizeof ( fullchatmessage ) ) ;
2005-09-07 14:55:25 +00:00
}
else
{
2013-03-12 22:47:42 +00:00
Q_strncatz ( fullchatmessage , va ( " ^[^7%s^%c%s^d \\ player \\ %i^] " , name_coloured ? " ^m " : " " , c , name , ( int ) ( plr - cl . players ) ) , sizeof ( fullchatmessage ) ) ;
2005-09-07 14:55:25 +00:00
}
if ( ! memessage )
{
// only print seperator with an actual player name
2005-09-08 08:10:06 +00:00
if ( ! cl_standardchat . value & & ( plrflags & TPM_SPECTATOR ) )
2009-05-24 10:11:17 +00:00
Q_strncatz ( fullchatmessage , " ^0: ^d " , sizeof ( fullchatmessage ) ) ;
2005-09-07 14:55:25 +00:00
else
2009-05-24 10:11:17 +00:00
Q_strncatz ( fullchatmessage , " : " , sizeof ( fullchatmessage ) ) ;
2005-09-07 14:55:25 +00:00
}
else
2009-05-24 10:11:17 +00:00
Q_strncatz ( fullchatmessage , " " , sizeof ( fullchatmessage ) ) ;
2005-09-07 14:55:25 +00:00
}
2015-06-14 01:28:01 +00:00
else
Q_strncatz ( fullchatmessage , " \1 " , sizeof ( fullchatmessage ) ) ;
2005-09-07 14:55:25 +00:00
// print message
2008-11-09 22:29:28 +00:00
if ( cl_parsewhitetext . value & & ( cl_parsewhitetext . value = = 1 | | ( plrflags & ( TPM_TEAM | TPM_OBSERVEDTEAM ) ) ) )
2005-09-07 14:55:25 +00:00
{
2005-09-26 08:07:26 +00:00
char * t , * u ;
2005-09-07 14:55:25 +00:00
2006-02-17 19:54:47 +00:00
while ( ( t = strchr ( msg , ' { ' ) ) )
2005-09-07 14:55:25 +00:00
{
2013-03-12 22:44:00 +00:00
int c ;
if ( t > msg & & t [ - 1 ] = = ' ^ ' )
{
for ( c = 1 ; t - c > msg ; c + + )
{
if ( t [ - c ] = = ' ^ ' )
break ;
}
if ( c & 1 )
{
* t = ' \0 ' ;
Q_strncatz ( fullchatmessage , va ( " %s{ " , msg ) , sizeof ( fullchatmessage ) ) ;
msg = t + 1 ;
continue ;
}
}
u = strchr ( t , ' } ' ) ;
2005-09-07 14:55:25 +00:00
if ( u )
{
* t = 0 ;
* u = 0 ;
2009-05-24 10:11:17 +00:00
Q_strncatz ( fullchatmessage , va ( " %s " , msg ) , sizeof ( fullchatmessage ) ) ;
Q_strncatz ( fullchatmessage , va ( " ^m%s^m " , t + 1 ) , sizeof ( fullchatmessage ) ) ;
2005-09-07 14:55:25 +00:00
msg = u + 1 ;
}
else
break ;
}
2009-05-24 10:11:17 +00:00
Q_strncatz ( fullchatmessage , va ( " %s " , msg ) , sizeof ( fullchatmessage ) ) ;
2005-09-07 14:55:25 +00:00
}
else
{
2009-05-24 10:11:17 +00:00
Q_strncatz ( fullchatmessage , va ( " %s " , msg ) , sizeof ( fullchatmessage ) ) ;
2005-09-07 14:55:25 +00:00
}
2009-05-24 10:28:26 +00:00
# ifdef CSQC_DAT
if ( CSQC_ParsePrint ( fullchatmessage , PRINT_CHAT ) )
return ;
# endif
2011-06-16 02:03:57 +00:00
if ( con_separatechat . ival )
{
if ( ! con_chat )
con_chat = Con_Create ( " chat " , CONF_HIDDEN | CONF_NOTIFY | CONF_NOTIFY_BOTTOM ) ;
if ( con_chat )
{
2014-10-05 20:04:11 +00:00
Con_PrintCon ( con_chat , fullchatmessage , con_chat - > parseflags ) ;
2011-06-16 02:03:57 +00:00
if ( con_separatechat . ival = = 1 )
{
2018-11-19 06:37:25 +00:00
console_t * c = Con_GetMain ( ) ;
Con_PrintCon ( c , fullchatmessage , c - > parseflags | PFS_NONOTIFY ) ;
2011-06-16 02:03:57 +00:00
return ;
}
}
}
2009-05-24 10:28:26 +00:00
Con_Printf ( " %s " , fullchatmessage ) ;
2005-09-07 14:55:25 +00:00
}
2005-09-26 08:07:26 +00:00
// CL_PrintStandardMessage: takes non-chat net messages and performs name coloring
// NOTE: msg is considered destroyable
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
static char acceptedchars [ ] = { ' . ' , ' ? ' , ' ! ' , ' \' ' , ' , ' , ' : ' , ' ' , ' \0 ' } ;
static void CL_PrintStandardMessage ( char * msgtext , int printlevel )
2005-09-26 08:07:26 +00:00
{
int i ;
2021-05-20 15:35:26 +00:00
player_info_t * p , * foundp = NULL ;
2015-06-12 14:44:50 +00:00
extern cvar_t cl_standardmsg , msg ;
char * begin = msgtext ;
2009-05-24 10:11:17 +00:00
char fullmessage [ 2048 ] ;
2021-05-20 15:35:26 +00:00
char * found ;
2015-06-12 14:44:50 +00:00
if ( printlevel < msg . ival )
return ;
2009-05-24 10:11:17 +00:00
fullmessage [ 0 ] = 0 ;
2005-09-26 08:07:26 +00:00
2021-05-20 15:35:26 +00:00
while ( * msgtext )
2005-09-26 08:07:26 +00:00
{
2021-05-20 15:35:26 +00:00
found = NULL ;
// search for player names in message
for ( i = 0 , p = cl . players ; i < cl . allocated_client_slots ; p + + , i + + )
2005-09-26 08:07:26 +00:00
{
2021-05-20 15:35:26 +00:00
char * v ;
char * name ;
int len ;
2005-11-26 03:02:55 +00:00
2021-05-20 15:35:26 +00:00
name = p - > name ;
if ( ! ( * name ) )
continue ;
len = strlen ( name ) ;
v = strstr ( msgtext , name ) ;
while ( v )
2005-10-16 03:47:32 +00:00
{
2021-05-20 15:35:26 +00:00
// name parsing rules
if ( v ! = begin & & * ( v - 1 ) ! = ' ' ) // must be space before name
{
v = strstr ( v + len , name ) ;
continue ;
}
2005-11-26 03:02:55 +00:00
2005-10-16 03:47:32 +00:00
{
2021-05-20 15:35:26 +00:00
int i ;
char aftername = * ( v + len ) ;
// search for accepted chars in char after name in msg
for ( i = 0 ; i < sizeof ( acceptedchars ) ; i + + )
{
if ( acceptedchars [ i ] = = aftername )
break ;
}
if ( sizeof ( acceptedchars ) = = i )
{
v = strstr ( v + len , name ) ;
continue ; // no accepted char found
}
2005-10-16 03:47:32 +00:00
}
2021-05-20 15:35:26 +00:00
if ( ! found | | v < found )
2005-10-16 03:47:32 +00:00
{
2021-05-20 15:35:26 +00:00
found = v ;
foundp = p ;
2005-10-16 03:47:32 +00:00
}
2021-05-20 15:35:26 +00:00
break ;
2005-10-16 03:47:32 +00:00
}
2021-05-20 15:35:26 +00:00
}
2005-10-16 03:47:32 +00:00
2021-05-20 15:35:26 +00:00
if ( found )
{
qboolean coloured ;
char c ;
int len = strlen ( foundp - > name ) ;
2009-05-24 10:11:17 +00:00
2005-09-26 08:07:26 +00:00
// print msg chunk
2021-05-20 15:35:26 +00:00
* found = 0 ; // cut off message
2015-06-12 14:44:50 +00:00
Q_strncatz ( fullmessage , msgtext , sizeof ( fullmessage ) ) ;
2021-05-20 15:35:26 +00:00
msgtext = found + len ; // update search point
2005-09-26 08:07:26 +00:00
// get name color
2021-05-20 15:35:26 +00:00
if ( foundp - > spectator | | cl_standardmsg . ival )
2005-09-26 08:07:26 +00:00
{
2009-05-24 10:11:17 +00:00
coloured = false ;
2005-09-26 08:07:26 +00:00
c = ' 7 ' ;
}
else
2021-05-20 15:35:26 +00:00
c = ' 0 ' + CL_PlayerColor ( foundp , & coloured ) ;
2005-09-26 08:07:26 +00:00
// print name
2021-05-20 15:35:26 +00:00
Q_strncatz ( fullmessage , va ( " ^[%s^%c%s^d \\ player \\ %i^] " , coloured ? " ^m " : " " , c , foundp - > name , ( int ) ( foundp - cl . players ) ) , sizeof ( fullmessage ) ) ;
2005-09-26 08:07:26 +00:00
}
2021-05-20 15:35:26 +00:00
else
break ; //nope, can't find anyone in there...
2005-09-26 08:07:26 +00:00
}
// print final chunk
2015-06-12 14:44:50 +00:00
Q_strncatz ( fullmessage , msgtext , sizeof ( fullmessage ) ) ;
2021-08-24 06:06:05 +00:00
# ifdef HAVE_LEGACY
2021-08-23 06:37:21 +00:00
if ( scr_usekfont . ival )
Con_PrintFlags ( fullmessage , PFS_FORCEUTF8 , 0 ) ;
else
2021-08-24 06:06:05 +00:00
# endif
2021-08-23 06:37:21 +00:00
Con_Printf ( " %s " , fullmessage ) ;
2015-04-14 23:12:17 +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
static char printtext [ 4096 ] ;
2023-09-11 09:31:09 +00:00
static void CL_ParsePrint ( const char * msg , int level )
2015-04-14 23:12:17 +00:00
{
2023-09-11 09:31:09 +00:00
char n , * e ;
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
if ( strlen ( printtext ) + strlen ( msg ) + 2 > = sizeof ( printtext ) )
2015-04-14 23:12:17 +00:00
{
Con_Printf ( " %s " , printtext ) ;
Q_strncpyz ( printtext , msg , sizeof ( printtext ) ) ;
}
else
strcat ( printtext , msg ) ; //safe due to size on if.
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
# ifdef HAVE_LEGACY //eztv is fucking nasty.
if ( level = = PRINT_CHAT & & * printtext = = ' # ' & & printtext [ 1 ] > = ' 0 ' & & printtext [ 1 ] < = ' 9 ' & & ! strchr ( printtext , ' \n ' ) )
strcat ( printtext , " \n " ) ;
# endif
2023-09-11 09:31:09 +00:00
while ( ( e = strchr ( printtext , ' \n ' ) ) | | ( e = strchr ( printtext , ' \r ' ) ) )
2015-04-14 23:12:17 +00:00
{
2023-09-11 09:31:09 +00:00
n = e [ 1 ] ;
e [ 1 ] = 0 ;
2015-04-14 23:12:17 +00:00
if ( ! cls . demoseeking )
{
if ( level = = PRINT_CHAT )
{
char * body ;
int msgflags ;
player_info_t * plr = NULL ;
if ( ! TP_SuppressMessage ( printtext ) )
{
body = CL_ParseChat ( printtext , & plr , & msgflags ) ;
if ( body )
CL_PrintChat ( plr , body , msgflags ) ;
}
}
else
{
2009-05-24 10:28:26 +00:00
# ifdef CSQC_DAT
2015-04-14 23:12:17 +00:00
if ( ! CSQC_ParsePrint ( printtext , level ) )
2009-05-24 10:28:26 +00:00
# endif
2016-07-26 11:47:59 +00:00
# ifdef PLUGINS
if ( Plug_ServerMessage ( printtext , level ) )
# endif
2017-07-10 15:40:42 +00:00
# ifdef QUAKEHUD
2016-07-26 11:47:59 +00:00
if ( ! Stats_ParsePickups ( printtext ) | | ! msg_filter_pickups . ival )
if ( ! Stats_ParsePrintLine ( printtext ) | | ! msg_filter_frags . ival )
2017-07-10 15:40:42 +00:00
# else
if ( ! msg_filter_pickups . ival )
if ( ! msg_filter_frags . ival )
# endif
2016-07-26 11:47:59 +00:00
CL_PrintStandardMessage ( printtext , level ) ;
2015-04-14 23:12:17 +00:00
}
}
TP_SearchForMsgTriggers ( printtext , level ) ;
2023-09-11 09:31:09 +00:00
e [ 1 ] = n ;
e + + ;
2015-04-14 23:12:17 +00:00
2023-09-11 09:31:09 +00:00
memmove ( printtext , e , strlen ( e ) + 1 ) ;
2015-04-14 23:12:17 +00:00
}
2005-09-26 08:07:26 +00:00
}
2015-10-27 15:20:15 +00:00
static void CL_ParseWeaponStats ( void )
{
# ifdef QUAKEHUD
int pl = atoi ( Cmd_Argv ( 0 ) ) ;
char * wname = Cmd_Argv ( 1 ) ;
unsigned int total = strtoul ( Cmd_Argv ( 2 ) , NULL , 0 ) ;
unsigned int hit = strtoul ( Cmd_Argv ( 3 ) , NULL , 0 ) ;
unsigned int idx ;
if ( pl > = cl . allocated_client_slots )
return ;
for ( idx = 0 ; idx < countof ( cl . players [ pl ] . weaponstats ) ; idx + + )
{
if ( ! strcmp ( cl . players [ pl ] . weaponstats [ idx ] . wname , wname ) | | ! * cl . players [ pl ] . weaponstats [ idx ] . wname )
{
Q_strncpyz ( cl . players [ pl ] . weaponstats [ idx ] . wname , wname , sizeof ( cl . players [ pl ] . weaponstats [ idx ] . wname ) ) ;
cl . players [ pl ] . weaponstats [ idx ] . total = total ;
cl . players [ pl ] . weaponstats [ idx ] . hit = hit ;
return ;
}
}
# endif
}
static void CL_ParseItemTimer ( void )
{
2017-05-28 15:42:32 +00:00
//it [cur/]duration x y z radius 0xRRGGBB "timername" owningent
float timeout ; // = atof(Cmd_Argv(0));
2015-10-27 15:20:15 +00:00
vec3_t org = { atof ( Cmd_Argv ( 1 ) ) ,
atof ( Cmd_Argv ( 2 ) ) ,
atof ( Cmd_Argv ( 3 ) ) } ;
float radius = atof ( Cmd_Argv ( 4 ) ) ;
2017-05-18 10:24:09 +00:00
unsigned int rgb = ( Cmd_Argc ( ) > 5 ) ? strtoul ( Cmd_Argv ( 5 ) , NULL , 16 ) : 0x202020 ;
2016-02-15 06:01:17 +00:00
// char *timername = Cmd_Argv(6);
2015-10-27 15:20:15 +00:00
unsigned int entnum = strtoul ( Cmd_Argv ( 7 ) , NULL , 0 ) ;
struct itemtimer_s * timer ;
2017-05-28 15:42:32 +00:00
float start = cl . time ;
char * e ;
timeout = strtod ( Cmd_Argv ( 0 ) , & e ) ;
if ( * e = = ' / ' )
{
start + = timeout ;
timeout = atof ( e + 1 ) ;
start - = timeout ;
}
2015-10-27 15:20:15 +00:00
if ( ! timeout )
timeout = FLT_MAX ;
if ( ! radius )
radius = 32 ;
for ( timer = cl . itemtimers ; timer ; timer = timer - > next )
{
2017-05-28 15:42:32 +00:00
if ( entnum )
{
if ( timer - > entnum = = entnum )
break ;
}
else if ( VectorCompare ( timer - > origin , org ) )
2015-10-27 15:20:15 +00:00
break ;
}
if ( ! timer )
{ //didn't find it.
timer = Z_Malloc ( sizeof ( * timer ) ) ;
timer - > next = cl . itemtimers ;
cl . itemtimers = timer ;
}
VectorCopy ( org , timer - > origin ) ;
timer - > radius = radius ;
timer - > duration = timeout ;
timer - > entnum = entnum ;
2017-05-28 15:42:32 +00:00
timer - > start = start ;
timer - > end = start + timer - > duration ;
2017-05-18 10:24:09 +00:00
timer - > rgb [ 0 ] = ( ( rgb > > 16 ) & 0xff ) / 255.0 ;
timer - > rgb [ 1 ] = ( ( rgb > > 8 ) & 0xff ) / 255.0 ;
timer - > rgb [ 2 ] = ( ( rgb ) & 0xff ) / 255.0 ;
2015-10-27 15:20:15 +00:00
}
2015-04-14 23:12:17 +00:00
2016-07-12 00:40:13 +00:00
# ifdef PLUGINS
2015-10-27 15:20:15 +00:00
static void CL_ParseTeamInfo ( void )
2015-06-29 23:46:31 +00:00
{
unsigned int pidx = atoi ( Cmd_Argv ( 1 ) ) ;
vec3_t org =
{
atof ( Cmd_Argv ( 2 ) ) ,
atof ( Cmd_Argv ( 3 ) ) ,
atof ( Cmd_Argv ( 4 ) )
} ;
float health = atof ( Cmd_Argv ( 5 ) ) ;
float armour = atof ( Cmd_Argv ( 6 ) ) ;
unsigned int items = strtoul ( Cmd_Argv ( 7 ) , NULL , 0 ) ;
char * nick = Cmd_Argv ( 8 ) ;
if ( pidx < cl . allocated_client_slots )
{
player_info_t * pl = & cl . players [ pidx ] ;
pl - > tinfo . time = cl . time + 5 ;
pl - > tinfo . health = health ;
pl - > tinfo . armour = armour ;
pl - > tinfo . items = items ;
VectorCopy ( org , pl - > tinfo . org ) ;
Q_strncpyz ( pl - > tinfo . nick , nick , sizeof ( pl - > tinfo . nick ) ) ;
}
}
2016-07-12 00:40:13 +00:00
# endif
2015-06-29 23:46:31 +00:00
2015-04-14 23:12:17 +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
static char stufftext [ 4096 ] ;
static void CL_ParseStuffCmd ( char * msg , int destsplit ) //this protects stuffcmds from network segregation.
2004-08-23 00:15:46 +00:00
{
2020-02-11 18:06:10 +00:00
int cbuflevel ;
2016-07-12 00:40:13 +00:00
# ifdef NQPROT
2023-04-11 07:20:09 +00:00
if ( ! * stufftext & & * msg = = 1 )
2016-07-12 00:40:13 +00:00
{
2023-04-11 07:20:09 +00:00
if ( developer . ival )
{
Con_DPrintf ( " Proquake Message: \n " ) ;
Con_HexDump ( msg , strlen ( msg ) , 1 ) ;
}
2016-07-12 00:40:13 +00:00
msg = CLNQ_ParseProQuakeMessage ( msg ) ;
}
# endif
2004-08-23 00:15:46 +00:00
strncat ( stufftext , msg , sizeof ( stufftext ) - 1 ) ;
2004-09-13 04:16:52 +00:00
while ( ( msg = strchr ( stufftext , ' \n ' ) ) )
2004-08-23 00:15:46 +00:00
{
* msg = ' \0 ' ;
2020-02-11 18:06:10 +00:00
cbuflevel = RESTRICT_SERVERSEAT ( destsplit ) ;
Con_DLPrintf ( ( cls . state = = ca_active ) ? 1 : 2 , " stufftext%i: %s \n " , destsplit , stufftext ) ;
2017-08-14 16:38:44 +00:00
if ( ! strncmp ( stufftext , " fullserverinfo " , 15 ) | | ! strncmp ( stufftext , " //fullserverinfo " , 17 ) )
2010-12-05 02:46:07 +00:00
{
2017-08-14 16:38:44 +00:00
Cmd_TokenizeString ( stufftext + 2 , false , false ) ;
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
if ( Cmd_Argc ( ) = = 2 )
{
cl . haveserverinfo = true ;
2018-07-05 16:21:44 +00:00
InfoBuf_FromString ( & cl . serverinfo , Cmd_Argv ( 1 ) , false ) ;
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
CL_CheckServerInfo ( ) ;
}
2010-12-23 08:53:23 +00:00
# if _MSC_VER > 1200
2010-12-05 02:46:07 +00:00
if ( cls . netchan . remote_address . type ! = NA_LOOPBACK )
2018-07-05 16:21:44 +00:00
Sys_RecentServer ( " +connect " , cls . servername , va ( " %s (%s) " , InfoBuf_ValueForKey ( & cl . serverinfo , " hostname " ) , cls . servername ) , " Join QW Server " ) ;
2010-12-23 08:53:23 +00:00
# endif
2010-12-05 02:46:07 +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
else if ( ! strncmp ( stufftext , " //svi " , 6 ) ) //for serverinfo over NQ protocols
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
Cmd_TokenizeString ( stufftext + 2 , false , false ) ;
Con_DPrintf ( " SERVERINFO: %s=%s \n " , Cmd_Argv ( 1 ) , Cmd_Argv ( 2 ) ) ;
2018-07-05 16:21:44 +00:00
InfoBuf_SetStarKey ( & cl . serverinfo , Cmd_Argv ( 1 ) , Cmd_Argv ( 2 ) ) ;
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
CL_CheckServerInfo ( ) ;
}
2019-09-10 15:40:04 +00:00
else if ( ! strncmp ( stufftext , " //ls " , 5 ) ) //for extended lightstyles
{
vec3_t rgb ;
Cmd_TokenizeString ( stufftext + 2 , false , false ) ;
rgb [ 0 ] = ( ( Cmd_Argc ( ) > 3 ) ? atof ( Cmd_Argv ( 3 ) ) : 1 ) ;
rgb [ 1 ] = ( ( Cmd_Argc ( ) > 5 ) ? atof ( Cmd_Argv ( 4 ) ) : rgb [ 0 ] ) ;
rgb [ 2 ] = ( ( Cmd_Argc ( ) > 5 ) ? atof ( Cmd_Argv ( 5 ) ) : rgb [ 0 ] ) ;
R_UpdateLightStyle ( atoi ( Cmd_Argv ( 1 ) ) , Cmd_Argv ( 2 ) , rgb [ 0 ] , rgb [ 1 ] , rgb [ 2 ] ) ;
}
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
# ifdef NQPROT
//DP's download protocol
else if ( cls . protocol = = CP_NETQUAKE & & ! strncmp ( stufftext , " cl_serverextension_download " , 28 ) ) //<supported>. server lets us know that it supports it.
cl_dp_serverextension_download = true ; //warning, this is sent BEFORE svc_serverdata, so cannot use cl.foo
else if ( cls . protocol = = CP_NETQUAKE & & ! strncmp ( stufftext , " cl_downloadbegin " , 17 ) ) //<size> <name>. server [reliably] lets us know that its going to start sending data.
CLDP_ParseDownloadBegin ( stufftext ) ;
else if ( cls . protocol = = CP_NETQUAKE & & ! strncmp ( stufftext , " cl_downloadfinished " , 20 ) ) //<size> <crc>. server [reliably] lets us know that we acked the entire thing
CLDP_ParseDownloadFinished ( stufftext ) ;
else if ( cls . protocol = = CP_NETQUAKE & & ! strcmp ( stufftext , " stopdownload " ) ) //download command reported failure. safe to request the next.
{
if ( cls . download )
2019-07-29 05:28:20 +00:00
CL_DownloadFailed ( cls . download - > remotename , cls . download , DLFAIL_CORRUPTED ) ;
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
}
//DP servers use these to report the correct csprogs.dat file+version to use.
//WARNING: these are sent BEFORE svc_serverdata, so we cannot store this state into cl.foo
//we poke the data into cl.serverinfo once we get the following svc_serverdata.
//we then clobber it from a fullserverinfo message if its an fte server running dpp7, but hey.
else if ( cls . protocol = = CP_NETQUAKE & & ! strncmp ( stufftext , " csqc_progname " , 14 ) )
COM_ParseOut ( stufftext + 14 , cl_dp_csqc_progsname , sizeof ( cl_dp_csqc_progsname ) ) ;
else if ( cls . protocol = = CP_NETQUAKE & & ! strncmp ( stufftext , " csqc_progsize " , 14 ) )
cl_dp_csqc_progssize = atoi ( stufftext + 14 ) ;
else if ( cls . protocol = = CP_NETQUAKE & & ! strncmp ( stufftext , " csqc_progcrc " , 13 ) )
cl_dp_csqc_progscrc = atoi ( stufftext + 13 ) ;
//NQ servers/mods like spamming this. Its annoying, but we might as well use it if we can, while also muting it.
2017-07-12 08:15:27 +00:00
else if ( ! strncmp ( stufftext , " cl_fullpitch " , 13 ) | | ! strncmp ( stufftext , " pq_fullpitch " , 13 ) )
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
{
if ( ! cl . haveserverinfo )
2011-10-27 15:46:36 +00:00
{
2018-07-05 16:21:44 +00:00
InfoBuf_SetKey ( & cl . serverinfo , " maxpitch " , ( atoi ( stufftext + 13 ) ) ? " 90 " : " " ) ;
InfoBuf_SetKey ( & cl . serverinfo , " minpitch " , ( atoi ( stufftext + 13 ) ) ? " -90 " : " " ) ;
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
CL_CheckServerInfo ( ) ;
2011-10-27 15:46:36 +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
}
# endif
else if ( ! strncmp ( stufftext , " //paknames " , 11 ) ) //so that the client knows what to download...
{ //there's a couple of prefixes involved etc
2021-05-27 11:36:01 +00:00
Z_StrCat ( & cl . serverpacknames , stufftext + ( cl . serverpackhashes ? 11 : 10 ) ) ;
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
cl . serverpakschanged = true ;
}
else if ( ! strncmp ( stufftext , " //paks " , 7 ) ) //gives the client a list of hashes to match against
{ //the client can re-order for cl_pure support, or download dupes to avoid version mismatches
2021-05-27 11:36:01 +00:00
Z_StrCat ( & cl . serverpackhashes , stufftext + ( cl . serverpackhashes ? 7 : 6 ) ) ;
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
cl . serverpakschanged = true ;
CL_CheckServerPacks ( ) ;
}
2019-04-16 22:40:05 +00:00
# ifdef HAVE_LEGACY
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
else if ( ! strncmp ( stufftext , " //vwep " , 7 ) ) //list of vwep model indexes, because using the normal model precaches wasn't cool enough
{ //(from zquake/ezquake)
int i ;
char * mname ;
Cmd_TokenizeString ( stufftext + 7 , false , false ) ;
for ( i = 0 ; i < Cmd_Argc ( ) ; i + + )
2009-06-21 17:45:33 +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
mname = Cmd_Argv ( i ) ;
if ( strcmp ( mname , " - " ) )
2009-07-06 01:20:20 +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
mname = va ( " progs/%s.mdl " , Cmd_Argv ( i ) ) ;
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
Z_StrDupPtr ( & cl . model_name_vwep [ i ] , mname ) ;
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
if ( cls . state = = ca_active )
2009-07-06 01:20:20 +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
CL_CheckOrEnqueDownloadFile ( cl . model_name_vwep [ i ] , NULL , 0 ) ;
cl . model_precache_vwep [ i ] = Mod_ForName ( cl . model_name_vwep [ i ] , MLV_WARN ) ;
2009-07-06 01:20:20 +00:00
}
}
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
else
{
Z_Free ( cl . model_name_vwep [ i ] ) ;
cl . model_name_vwep [ i ] = NULL ;
}
2009-06-21 17:45:33 +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
}
2018-09-01 04:18:08 +00:00
# endif
2017-07-12 08:15:27 +00:00
else if ( cls . demoplayback & & ! strncmp ( stufftext , " playdemo " , 9 ) )
{ //some demos (like speed-demos-archive's marathon runs) chain multiple demos with playdemo commands
//these should still chain properly even when the demo is in some archive(like .dz) or subdir
char newdemo [ MAX_OSPATH ] , temp [ MAX_OSPATH ] , * s ;
Cmd_TokenizeString ( stufftext , false , false ) ;
s = Cmd_Argv ( 1 ) ;
if ( strchr ( s , ' : ' ) | | strchr ( s , ' / ' ) | | strchr ( s , ' \\ ' ) )
Q_strncpyz ( newdemo , s , sizeof ( newdemo ) ) ;
else
{
newdemo [ 0 ] = 0 ;
if ( cls . lastdemowassystempath )
Q_strncatz ( newdemo , " # " , sizeof ( newdemo ) ) ;
Q_strncatz ( newdemo , cls . lastdemoname , sizeof ( newdemo ) ) ;
* COM_SkipPath ( newdemo ) = 0 ;
Q_strncatz ( newdemo , Cmd_Argv ( 1 ) , sizeof ( newdemo ) ) ;
}
2020-02-11 18:06:10 +00:00
Cbuf_AddText ( " playdemo " , cbuflevel ) ;
Cbuf_AddText ( COM_QuotedString ( newdemo , temp , sizeof ( temp ) , false ) , cbuflevel ) ;
Cbuf_AddText ( " \n " , cbuflevel ) ;
2017-07-12 08:15:27 +00:00
}
# ifdef CSQC_DAT
else if ( CSQC_StuffCmd ( destsplit , stufftext , msg ) )
{
}
# endif
else if ( ! strncmp ( stufftext , " //querycmd " , 11 ) ) //for servers to check if a command exists or not.
{
COM_Parse ( stufftext + 11 ) ;
if ( Cmd_Exists ( com_token ) )
{
2020-02-11 18:06:10 +00:00
Cbuf_AddText ( " cmd cmdsupported " , cbuflevel ) ;
Cbuf_AddText ( com_token , cbuflevel ) ;
Cbuf_AddText ( " \n " , cbuflevel ) ;
2017-07-12 08:15:27 +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
else if ( ! strncmp ( stufftext , " //exectrigger " , 14 ) ) //so that mods can add whatever 'alias grabbedarmour' or whatever triggers that users might want to script responses for, without errors about unknown commands
{
COM_Parse ( stufftext + 14 ) ;
2020-02-11 18:06:10 +00:00
if ( Cmd_AliasExist ( com_token , cbuflevel ) )
Cmd_ExecuteString ( com_token , cbuflevel ) ; //do this NOW so that it's done before any models or anything are loaded
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
}
else if ( ! strncmp ( stufftext , " //set " , 6 ) ) //equivelent to regular set, except non-spammy if it doesn't exist, and happens instantly without extra latency.
{
2020-02-11 18:06:10 +00:00
Cmd_ExecuteString ( stufftext + 2 , cbuflevel ) ; //do this NOW so that it's done before any models or anything are loaded
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
}
else if ( ! strncmp ( stufftext , " //at " , 5 ) ) //ktx autotrack hints
{
Cam_SetModAutoTrack ( atoi ( stufftext + 5 ) ) ;
}
else if ( ! strncmp ( stufftext , " //wps " , 5 ) ) //ktx weapon statistics
{
Cmd_TokenizeString ( stufftext + 5 , false , false ) ;
CL_ParseWeaponStats ( ) ;
}
else if ( ! strncmp ( stufftext , " //kickfile " , 11 ) ) //FTE sends this to give a more friendly error about modified BSP files, although it could be used for more stuff.
{
flocation_t loc ;
Cmd_TokenizeString ( stufftext + 2 , false , false ) ;
if ( FS_FLocateFile ( Cmd_Argv ( 1 ) , FSLF_IFFOUND , & loc ) )
2015-06-12 14:44:50 +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
if ( ! * loc . rawname )
Con_Printf ( " You have been kicked due to the file " U8 ( " %s " ) " being modified, inside " U8 ( " %s " ) " \n " , Cmd_Argv ( 1 ) , loc . search - > logicalpath ) ;
else
Con_Printf ( " You have been kicked due to the file " U8 ( " %s " ) " being modfied, located at " U8 ( " %s " ) " \n " , Cmd_Argv ( 1 ) , loc . rawname ) ;
2015-06-12 14:44:50 +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
}
else if ( ! strncmp ( stufftext , " //it " , 5 ) ) //it <timeout> <org xyz> <radius> <rgb> <timername> <entnum>
{
Cmd_TokenizeString ( stufftext + 5 , false , false ) ;
CL_ParseItemTimer ( ) ;
}
else if ( ! strncmp ( stufftext , " //fui " , 6 ) ) //ui <slot> <key> <value>. Full user info updates.
{
unsigned int slot ;
const char * value ;
Cmd_TokenizeString ( stufftext + 6 , false , false ) ;
slot = atoi ( Cmd_Argv ( 0 ) ) ;
value = Cmd_Argv ( 1 ) ;
if ( slot < MAX_CLIENTS )
2011-05-20 04:10: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
player_info_t * player = & cl . players [ slot ] ;
Con_DPrintf ( " SETINFO %s: %s \n " , player - > name , value ) ;
2018-07-05 16:21:44 +00:00
InfoBuf_FromString ( & player - > userinfo , value , false ) ;
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
player - > userinfovalid = true ;
CL_ProcessUserInfo ( slot , player ) ;
2011-05-20 04:10: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
}
2018-07-05 16:21:44 +00:00
else if ( ! strncmp ( stufftext , " //ui " , 5 ) ) //ui <slot> <key> <value>. Partial user info updates.
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
{
unsigned int slot ;
const char * key , * value ;
Cmd_TokenizeString ( stufftext + 5 , false , false ) ;
slot = atoi ( Cmd_Argv ( 0 ) ) ;
key = Cmd_Argv ( 1 ) ;
value = Cmd_Argv ( 2 ) ;
if ( slot < MAX_CLIENTS )
2015-10-27 15:20:15 +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
player_info_t * player = & cl . players [ slot ] ;
Con_DPrintf ( " SETINFO %s: %s=%s \n " , player - > name , key , value ) ;
2018-07-05 16:21:44 +00:00
InfoBuf_SetValueForStarKey ( & player - > userinfo , key , value ) ;
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
CL_ProcessUserInfo ( slot , player ) ;
2015-10-27 15:20:15 +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
}
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
else if ( ! strncmp ( stufftext , " //qul " , 6 ) ) //qtv user list
{
unsigned int cmd , id ;
const char * name ;
struct qtvviewers_s * * link , * v ;
Cmd_TokenizeString ( stufftext + 5 , false , false ) ;
cmd = atoi ( Cmd_Argv ( 0 ) ) ;
id = atoi ( Cmd_Argv ( 1 ) ) ;
name = Cmd_Argv ( 2 ) ;
for ( link = & cls . qtvviewers ; ( v = * link ) ; link = & v - > next )
{
if ( v - > userid = = id )
break ;
}
switch ( cmd )
{
case 3 : //del
if ( v )
{
* link = v - > next ;
Z_Free ( v ) ;
}
break ;
case 2 : //change
case 1 : //add
if ( ! v )
{ //new...
v = Z_Malloc ( sizeof ( * v ) ) ;
v - > next = cls . qtvviewers ;
cls . qtvviewers = v ;
v - > userid = id ;
}
Q_strncpyz ( v - > name , name , sizeof ( v - > name ) ) ;
break ;
}
}
2007-10-05 14:11:17 +00:00
# ifdef PLUGINS
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
else if ( ! strncmp ( stufftext , " //tinfo " , 8 ) ) //ktx-team-info <pidx> <org xyz> <health> <armour> <STAT_ITEMS> <nickname>
{
Cmd_TokenizeString ( stufftext + 2 , false , false ) ;
CL_ParseTeamInfo ( ) ;
Plug_Command_f ( ) ; //FIXME: deprecate this call
}
else if ( ! strncmp ( stufftext , " //sn " , 5 ) )
{
Cmd_TokenizeString ( stufftext + 2 , false , false ) ;
Plug_Command_f ( ) ;
}
2005-02-12 18:56:04 +00:00
# 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
else
{
if ( ! strncmp ( stufftext , " cmd " , 4 ) )
2020-02-11 18:06:10 +00:00
Cbuf_AddText ( va ( " p%i " , destsplit + 1 ) , cbuflevel ) ; //without this, in_forceseat can break directed cmds.
Cbuf_AddText ( stufftext , cbuflevel ) ;
Cbuf_AddText ( " \n " , cbuflevel ) ;
2004-08-23 00:15:46 +00:00
}
msg + + ;
memmove ( stufftext , msg , strlen ( msg ) + 1 ) ;
}
}
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
static void CL_ParsePrecache ( void )
2005-05-26 12:55:34 +00:00
{
2011-07-30 14:14:56 +00:00
int i , code = ( unsigned short ) MSG_ReadShort ( ) ;
2005-05-26 12:55:34 +00:00
char * s = MSG_ReadString ( ) ;
2013-03-12 22:44:00 +00:00
i = code & ~ PC_TYPE ;
switch ( code & PC_TYPE )
2005-05-26 12:55:34 +00:00
{
2013-03-12 22:44:00 +00:00
case PC_MODEL :
2014-09-17 03:04:08 +00:00
if ( i > = 1 & & i < MAX_PRECACHE_MODELS )
2005-05-26 12:55:34 +00:00
{
model_t * model ;
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
Z_StrDupPtr ( & cl . model_name [ i ] , s ) ;
2021-10-31 18:20:45 +00:00
CL_CheckOrEnqueDownloadFile ( s , s , DLLF_ALLOWWEB ) ;
2022-03-01 02:51:55 +00:00
model = Mod_ForName ( Mod_FixName ( s , cl . model_name [ 1 ] ) , ( i = = 1 & & ! cl . sendprespawn ) ? MLV_ERROR : MLV_WARN ) ;
2021-06-25 18:50:42 +00:00
// if (!model)
// Con_Printf("svc_precache: Mod_ForName(\"%s\") failed\n", s);
2005-05-26 12:55:34 +00:00
cl . model_precache [ i ] = model ;
}
else
2014-09-17 03:04:08 +00:00
Con_Printf ( " svc_precache: model index %i outside range %i...%i \n " , i , 1 , MAX_PRECACHE_MODELS ) ;
2011-07-30 14:14:56 +00:00
break ;
2013-03-12 22:44:00 +00:00
case PC_UNUSED :
2012-07-05 19:42:36 +00:00
break ;
2013-03-12 22:44:00 +00:00
case PC_SOUND :
2014-09-17 03:04:08 +00:00
if ( i > = 1 & & i < MAX_PRECACHE_SOUNDS )
2005-05-26 12:55:34 +00:00
{
sfx_t * sfx ;
2009-04-06 00:34:32 +00:00
if ( S_HaveOutput ( ) )
2021-10-31 18:20:45 +00:00
CL_CheckOrEnqueDownloadFile ( va ( " sound/%s " , s ) , NULL , DLLF_ALLOWWEB ) ;
2005-05-26 12:55:34 +00:00
sfx = S_PrecacheSound ( s ) ;
2021-06-25 18:50:42 +00:00
// if (!sfx)
// Con_Printf("svc_precache: S_PrecacheSound(\"%s\") failed\n", s);
2005-05-26 12:55:34 +00:00
cl . sound_precache [ i ] = sfx ;
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
Z_StrDupPtr ( & cl . sound_name [ i ] , s ) ;
2005-05-26 12:55:34 +00:00
}
else
2014-09-17 03:04:08 +00:00
Con_Printf ( " svc_precache: sound index %i outside range %i...%i \n " , i , 1 , MAX_PRECACHE_SOUNDS ) ;
2011-07-30 14:14:56 +00:00
break ;
2013-03-12 22:44:00 +00:00
case PC_PARTICLE :
if ( i > = 1 & & i < MAX_SSPARTICLESPRE )
2012-07-05 19:42:36 +00:00
{
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
Z_StrDupPtr ( & cl . particle_ssname [ i ] , s ) ;
2014-03-30 08:55:06 +00:00
cl . particle_ssprecache [ i ] = P_FindParticleType ( s ) ;
2013-03-12 22:44:00 +00:00
cl . particle_ssprecaches = true ;
2012-07-05 19:42:36 +00:00
}
2013-03-12 22:44:00 +00:00
else
Con_Printf ( " svc_precache: particle index %i outside range %i...%i \n " , i , 1 , MAX_SSPARTICLESPRE ) ;
2012-07-05 19:42:36 +00:00
break ;
2005-05-26 12:55:34 +00:00
}
}
2018-11-19 06:37:25 +00:00
static void Con_HexDump ( qbyte * packet , size_t len , size_t badoffset )
2006-01-11 22:24:08 +00:00
{
int i ;
int pos ;
pos = 0 ;
2015-04-21 04:12:00 +00:00
while ( pos < len )
2006-01-11 22:24:08 +00:00
{
Con_Printf ( " %5i " , pos ) ;
for ( i = 0 ; i < 16 ; i + + )
{
2015-04-21 04:12:00 +00:00
if ( pos > = len )
2010-08-16 02:03:02 +00:00
Con_Printf ( " - " ) ;
2018-11-19 06:37:25 +00:00
else if ( pos = = badoffset )
Con_Printf ( " ^b^1%2x " , packet [ pos ] ) ;
2006-01-11 22:24:08 +00:00
else
2015-04-21 04:12:00 +00:00
Con_Printf ( " %2x " , packet [ pos ] ) ;
2006-01-11 22:24:08 +00:00
pos + + ;
}
pos - = 16 ;
for ( i = 0 ; i < 16 ; i + + )
{
2015-04-21 04:12:00 +00:00
if ( pos > = len )
2006-01-11 22:24:08 +00:00
Con_Printf ( " X " ) ;
2013-03-12 22:35:33 +00:00
else if ( packet [ pos ] = = 0 | | packet [ pos ] = = ' \t ' | | packet [ pos ] = = ' \r ' | | packet [ pos ] = = ' \n ' )
2018-11-19 06:37:25 +00:00
{
if ( pos = = badoffset )
Con_Printf ( " ^b^1. " ) ;
else
Con_Printf ( " . " ) ;
}
2006-01-11 22:24:08 +00:00
else
2018-11-19 06:37:25 +00:00
{
if ( pos = = badoffset )
Con_Printf ( " ^b^1%c " , packet [ pos ] ) ;
else
Con_Printf ( " %c " , packet [ pos ] ) ;
}
2006-01-11 22:24:08 +00:00
pos + + ;
}
Con_Printf ( " \n " ) ;
}
2015-04-21 04:12:00 +00:00
}
void CL_DumpPacket ( void )
{
2022-03-08 05:34:26 +00:00
Con_HexDump ( net_message . data , net_message . cursize , MSG_GetReadCount ( ) - 1 ) ;
2006-01-11 22:24:08 +00:00
}
2005-05-26 12:55:34 +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
static void CL_ParsePortalState ( void )
2014-06-02 16:50:40 +00:00
{
int mode = MSG_ReadByte ( ) ;
2021-11-03 20:30:40 +00:00
int p = - 1 , a1 = - 1 , a2 = - 1 , state = - 1 ;
# define PS_NEW (1<<7)
# define PS_AREANUMS (1<<6) //q3 style
# define PS_PORTALNUM (1<<5) //q2 style
# define PS_LARGE (1<<1)
# define PS_OPEN (1<<0)
if ( mode & PS_NEW )
{
state = mode & 1 ;
if ( ! ( mode & PS_AREANUMS ) & & ! ( mode & PS_PORTALNUM ) )
mode | = PS_PORTALNUM ; //legacy crap
if ( mode & PS_PORTALNUM )
{ //q2 style
if ( mode & PS_LARGE )
p = MSG_ReadShort ( ) ;
else
p = MSG_ReadByte ( ) ;
2014-06-02 16:50:40 +00:00
}
2021-11-03 20:30:40 +00:00
if ( mode & PS_AREANUMS )
{ //q3 style
if ( mode & PS_LARGE )
{
a1 = MSG_ReadShort ( ) ;
a2 = MSG_ReadShort ( ) ;
}
else
{
a1 = MSG_ReadByte ( ) ;
a2 = MSG_ReadByte ( ) ;
}
2019-04-16 22:40:05 +00:00
}
2021-11-03 20:30:40 +00:00
}
else
{ //legacy crap
Con_Printf ( CON_WARNING " svc_setportalstate: legacy mode \n " ) ;
2014-06-02 16:50:40 +00:00
mode | = MSG_ReadByte ( ) < < 8 ;
2021-11-03 20:30:40 +00:00
p = ( mode & 0x7fff ) ;
state = ! ! ( mode & 0x8000 ) ;
2014-06-02 16:50:40 +00:00
}
2021-11-03 20:30:40 +00:00
# ifdef HAVE_SERVER
//reduce race conditions when we're both client+server.
if ( sv . active )
return ;
# endif
if ( cl . worldmodel & & cl . worldmodel - > loadstate = = MLS_LOADED & & cl . worldmodel - > funcs . SetAreaPortalState )
cl . worldmodel - > funcs . SetAreaPortalState ( cl . worldmodel , p , a1 , a2 , state ) ;
2014-06-02 16:50:40 +00:00
}
2021-08-04 21:16:57 +00:00
static void CL_ParseBaseAngle ( int seat )
{
int i ;
short diff [ 3 ] ;
short newbase [ 3 ] ;
vec3_t newang ;
inframe_t * inf = & cl . inframes [ cls . netchan . incoming_sequence & UPDATE_MASK ] ;
qbyte fl = MSG_ReadByte ( ) ; //pitch yaw roll lock
for ( i = 0 ; i < 3 ; i + + )
{
if ( fl & ( 1u < < i ) )
newbase [ i ] = MSG_ReadShort ( ) ;
else
newbase [ i ] = 0 ;
diff [ i ] = newbase [ i ] - cl . playerview [ seat ] . baseangles [ i ] ;
cl . playerview [ seat ] . baseangles [ i ] = newbase [ i ] ;
if ( fl & 8 ) //locking the view
newang [ i ] = SHORT2ANGLE ( newbase [ i ] ) ;
else //free-look
newang [ i ] = cl . playerview [ seat ] . viewangles [ i ] + SHORT2ANGLE ( diff [ i ] ) ;
}
if ( cl . ackedmovesequence )
{
//tweak all unacked input frames to the new base. the server will do similar on receipt of them.
i = min ( 64 , cl . movesequence - cl . ackedmovesequence ) ;
for ( i = cl . movesequence - i ; i < cl . movesequence ; i + + )
{
cl . outframes [ i & UPDATE_MASK ] . cmd [ seat ] . angles [ 0 ] + = diff [ 0 ] ;
cl . outframes [ i & UPDATE_MASK ] . cmd [ seat ] . angles [ 1 ] + = diff [ 1 ] ;
cl . outframes [ i & UPDATE_MASK ] . cmd [ seat ] . angles [ 2 ] + = diff [ 2 ] ;
}
}
if ( ! CSQC_Parse_SetAngles ( seat , newang , false ) )
{
if ( fl & 8 )
{
inf - > packet_entities . fixangles [ seat ] = true ;
VectorCopy ( newang , inf - > packet_entities . fixedangles [ seat ] ) ;
}
VectorCopy ( newang , cl . playerview [ seat ] . viewangles ) ;
}
VectorCopy ( newang , cl . playerview [ seat ] . intermissionangles ) ;
2021-12-20 10:06:43 +00:00
if ( fl & 8 )
VRUI_SnapAngle ( ) ;
2021-08-04 21:16:57 +00:00
}
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
void CLEZ_ParseHiddenDemoMessage ( void )
{
for ( ; ; )
{
static float throttle ;
int size = MSG_ReadLong ( ) ;
unsigned int cmd ;
if ( size = = - 1 | | msg_badread )
break ;
cmd = MSG_ReadUInt16 ( ) ;
switch ( cmd )
{
case 0xFFFF : //mvdhidden_extended
return ; //can't handle it... protocol is stupid.
case 0x0003 : //mvdhidden_demoinfo
MSG_ReadUInt16 ( ) ; //'more'
MSG_ReadSkip ( size - 2 ) ; //probably json
break ;
case 0x0007 : //mvdhidden_dmgdone
{
lerpents_t * le ;
unsigned short typeandflags = MSG_ReadUInt16 ( ) ;
unsigned short attacker = MSG_ReadUInt16 ( ) ;
unsigned short targ = MSG_ReadUInt16 ( ) ;
short dmg = MSG_ReadShort ( ) ;
unsigned short issplash = ! ! ( typeandflags & 0x8000 ) ;
unsigned short isteamdamage = ( attacker = = targ ) | | ( cl . teamplay & & attacker - 1 < countof ( cl . players ) & & targ - 1 < countof ( cl . players ) & & ! strcmp ( cl . players [ attacker ] . team , cl . players [ targ ] . team ) ) ;
typeandflags & = ~ 0x8000 ;
//let csqc handle it consistently with other ktx quirks.
for ( cmd = 0 ; cmd < cl . splitclients ; cmd + + )
if ( CL_TryTrackNum ( & cl . playerview [ cmd ] ) = = attacker )
{
if ( targ - 1u < countof ( cl . lerpplayers ) & & cl . lerpplayers [ targ - 1 ] . sequence = = cl . lerpentssequence )
le = & cl . lerpplayers [ targ - 1 ] ; //favour use player indexes... stoopid qw.
else if ( targ < cl . maxlerpents & & cl . lerpents [ targ ] . sequence = = cl . lerpentssequence )
le = & cl . lerpents [ targ ] ;
else
break ; //nope, can't place it... despite it being an mvd.
CL_ParseStuffCmd ( va ( " //ktx di %g %g %g %d %d %d %d \n " , le - > origin [ 0 ] , le - > origin [ 1 ] , le - > origin [ 2 ] , typeandflags , dmg , issplash , isteamdamage ) , cmd ) ;
}
}
break ;
/* case 0x0000://mvdhidden_antilag_position
case 0x0001 : //mvdhidden_usercmd // <byte: source playernum> <todo>
case 0x0002 : //mvdhidden_usercmd_weapons // <byte: source playernum> <int: items> <byte[4]: ammo> <byte: result> <byte*: weapon priority (nul terminated)>
case 0x0004 : //mvdhidden_commentary_track
case 0x0005 : //mvdhidden_commentary_data
case 0x0006 : //mvdhidden_commentary_text_segment
case 0x0008 : //mvdhidden_usercmd_weapons_ss // (same format as mvdhidden_usercmd_weapons)
case 0x0009 : //mvdhidden_usercmd_weapon_instruction // <byte: playernum> <byte: flags> <int: sequence#> <int: mode> <byte[10]: weaponlist>
case 0x000A : //mvdhidden_paused_duration
*/
default :
Con_ThrottlePrintf ( & throttle , 1 , " CL_ParseHiddenDemoMessage: Unknown cmd %i \n " , cmd ) ;
MSG_ReadSkip ( size ) ;
break ;
}
}
}
2022-03-08 05:34:26 +00:00
# define SHOWNETEOM(x) if(cl_shownet.value>=2)Con_Printf ("%3i:%s\n", MSG_GetReadCount(), x);
# define SHOWNET(x) if(cl_shownet.value>=2)Con_Printf ("%3i:%s\n", MSG_GetReadCount()-1, x);
# define SHOWNET2(x, y) if(cl_shownet.value>=2)Con_Printf ("%3i:%3i:%s\n", MSG_GetReadCount()-1, y, x);
2004-08-23 00:15:46 +00:00
/*
= = = = = = = = = = = = = = = = = = = = =
CL_ParseServerMessage
= = = = = = = = = = = = = = = = = = = = =
*/
2011-09-03 03:49:43 +00:00
void CLQW_ParseServerMessage ( void )
2004-08-23 00:15:46 +00:00
{
int cmd ;
char * s ;
int i , j ;
int destsplit ;
2017-08-14 16:38:44 +00:00
vec3_t ang ;
2008-05-25 22:23:43 +00:00
float f ;
2020-09-08 05:11:09 +00:00
qboolean suggestcsqcdebug = false ;
2013-07-26 17:19:06 +00:00
inframe_t * inf ;
extern vec3_t demoangles ;
2019-01-29 07:18:07 +00:00
unsigned int cmdstart ;
2004-08-23 00:15:46 +00:00
cl . last_servermessage = realtime ;
CL_ClearProjectiles ( ) ;
2013-07-26 17:19:06 +00:00
//clear out fixangles stuff
inf = & cl . inframes [ cls . netchan . incoming_sequence & UPDATE_MASK ] ;
for ( j = 0 ; j < MAX_SPLITS ; j + + )
inf - > packet_entities . fixangles [ j ] = false ;
if ( cls . demoplayback = = DPB_QUAKEWORLD )
{
inf - > packet_entities . fixangles [ 0 ] = 2 ;
VectorCopy ( demoangles , inf - > packet_entities . fixedangles [ 0 ] ) ;
}
2015-09-01 04:45:15 +00:00
else if ( cl . intermissionmode ! = IM_NONE )
2015-08-20 03:17:47 +00:00
{
for ( destsplit = 0 ; destsplit < cl . splitclients ; destsplit + + )
{
inf - > packet_entities . fixangles [ destsplit ] = 2 ;
VectorCopy ( cl . playerview [ destsplit ] . intermissionangles , inf - > packet_entities . fixedangles [ destsplit ] ) ;
}
}
2004-08-23 00:15:46 +00:00
//
// if recording demos, copy the message out
2005-03-12 23:40:42 +00:00
//
2004-08-23 00:15:46 +00:00
if ( cl_shownet . value = = 1 )
2013-11-29 14:36:47 +00:00
Con_Printf ( " %i " , net_message . cursize ) ;
2012-02-12 05:18:31 +00:00
else if ( cl_shownet . value > = 2 )
2013-11-29 14:36:47 +00:00
Con_Printf ( " ------------------ \n " ) ;
2004-08-23 00:15:46 +00:00
CL_ParseClientdata ( ) ;
2015-03-03 00:14:43 +00:00
//vanilla QW has no timing info in the client and depends upon the client for all timing.
//using the demo's timing for interpolation prevents unneccesary drift, and solves issues with demo seeking and other such things.
2015-06-16 23:53:58 +00:00
if ( cls . demoplayback = = DPB_QUAKEWORLD & & ! ( cls . fteprotocolextensions & PEXT_ACCURATETIMINGS ) )
2015-03-03 00:14:43 +00:00
{
extern float demtime ;
if ( cl . gametime ! = demtime )
{
cl . oldgametime = cl . gametime ;
cl . oldgametimemark = cl . gametimemark ;
cl . gametime = demtime ;
cl . gametimemark = realtime ;
}
}
2019-01-29 07:18:07 +00:00
if ( realtime > packetusageflushtime )
{
memcpy ( packetusage_saved , packetusage_pending , sizeof ( packetusage_saved ) ) ;
memset ( packetusage_pending , 0 , sizeof ( packetusage_pending ) ) ;
packetusageflushtime = realtime + packetusage_interval ;
}
2004-08-23 00:15:46 +00:00
//
// parse the message
//
while ( 1 )
{
if ( msg_badread )
{
2006-02-12 20:20:01 +00:00
CL_DumpPacket ( ) ;
2016-07-12 00:40:13 +00:00
Host_EndGame ( " CLQW_ParseServerMessage: Bad server message " ) ;
2004-08-23 00:15:46 +00:00
break ;
}
2022-03-08 05:34:26 +00:00
cmdstart = MSG_GetReadCount ( ) ;
2004-08-23 00:15:46 +00:00
cmd = MSG_ReadByte ( ) ;
2008-05-25 22:23:43 +00:00
if ( cmd = = svcfte_choosesplitclient )
2004-08-23 00:15:46 +00:00
{
2014-03-30 08:55:06 +00:00
SHOWNET2 ( svc_qwstrings [ cmd ] , cmd ) ;
2004-08-23 00:15:46 +00:00
2010-07-11 02:22:39 +00:00
destsplit = MSG_ReadByte ( ) % MAX_SPLITS ;
2004-08-23 00:15:46 +00:00
cmd = MSG_ReadByte ( ) ;
}
else
2015-06-12 14:44:50 +00:00
destsplit = cl . defaultnetsplit ;
2004-08-23 00:15:46 +00:00
if ( cmd = = - 1 )
{
2022-03-08 05:34:26 +00:00
SHOWNETEOM ( " END OF MESSAGE " ) ;
2004-08-23 00:15:46 +00:00
break ;
}
2014-03-30 08:55:06 +00:00
SHOWNET2 ( svc_qwstrings [ cmd ] , cmd ) ;
2005-09-26 03:40:09 +00:00
2004-08-23 00:15:46 +00:00
// other commands
switch ( cmd )
{
default :
2006-01-11 22:24:08 +00:00
CL_DumpPacket ( ) ;
2022-03-08 05:34:26 +00:00
Host_EndGame ( " CLQW_ParseServerMessage: Illegible server message (%i@%i)%s " , cmd , MSG_GetReadCount ( ) - 1 , ( ! cl . csqcdebug & & suggestcsqcdebug ) ? " \n 'sv_csqcdebug 1' might aid in debugging this. " : " " ) ;
2004-08-23 00:15:46 +00:00
return ;
case svc_time :
2005-05-26 12:55:34 +00:00
cl . oldgametime = cl . gametime ;
2004-08-23 00:15:46 +00:00
cl . gametime = MSG_ReadFloat ( ) ;
cl . gametimemark = realtime ;
break ;
2005-09-26 03:40:09 +00:00
2004-08-23 00:15:46 +00:00
case svc_nop :
// Con_Printf ("svc_nop\n");
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
//If we're using cl_shownet 2, combine large padding blocks into a single line, otherwise we'll get 1000+ lines from a single packet.
while ( svc_nop = = MSG_PeekByte ( ) )
MSG_ReadByte ( ) ;
2004-08-23 00:15:46 +00:00
break ;
2005-09-26 03:40:09 +00:00
2004-08-23 00:15:46 +00:00
case svc_disconnect :
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
if ( cls . demoplayback = = DPB_MVD ) //eztv fails to detect the end of demos.
{
s = MSG_ReadString ( ) ;
Con_Printf ( CON_WARNING " svc_disconnect: %s \n " , s ) ;
}
2011-06-05 01:36:14 +00:00
else if ( cls . demoplayback )
{
CL_Disconnect_f ( ) ;
return ;
}
2008-01-09 00:52:31 +00:00
else if ( cls . state = = ca_connected )
2004-08-23 00:15:46 +00:00
{
2014-09-02 02:44:43 +00:00
Host_EndGame ( " Server disconnected \n " ) ;
2004-08-23 00:15:46 +00:00
}
else
Host_EndGame ( " Server disconnected " ) ;
break ;
case svc_print :
i = MSG_ReadByte ( ) ;
s = MSG_ReadString ( ) ;
2015-04-14 23:12:17 +00:00
CL_ParsePrint ( s , i ) ;
2004-08-23 00:15:46 +00:00
break ;
2005-09-26 03:40:09 +00:00
2004-08-23 00:15:46 +00:00
case svc_centerprint :
2006-01-01 09:01:15 +00:00
s = MSG_ReadString ( ) ;
2006-01-13 06:27:18 +00:00
# ifdef PLUGINS
2006-01-01 09:01:15 +00:00
if ( Plug_CenterPrintMessage ( s , destsplit ) )
2006-01-13 06:27:18 +00:00
# endif
2008-11-09 22:29:28 +00:00
SCR_CenterPrint ( destsplit , s , false ) ;
2004-08-23 00:15:46 +00:00
break ;
2005-09-26 03:40:09 +00:00
2004-08-23 00:15:46 +00:00
case svc_stufftext :
s = MSG_ReadString ( ) ;
2005-09-26 03:40:09 +00:00
CL_ParseStuffCmd ( s , destsplit ) ;
2004-08-23 00:15:46 +00:00
break ;
case svc_damage :
2013-06-23 02:17:02 +00:00
V_ParseDamage ( & cl . playerview [ destsplit ] ) ;
2004-08-23 00:15:46 +00:00
break ;
case svc_serverdata :
Cbuf_Execute ( ) ; // make sure any stuffed commands are done
2011-07-30 14:14:56 +00:00
CLQW_ParseServerData ( ) ;
2004-08-23 00:15:46 +00:00
break ;
2018-03-25 09:36:14 +00:00
case svcfte_splitscreenconfig :
2021-06-25 18:50:42 +00:00
j = cl . splitclients ;
2015-06-24 17:59:57 +00:00
cl . splitclients = MSG_ReadByte ( ) ;
2018-03-25 09:36:14 +00:00
for ( i = 0 ; i < cl . splitclients & & i < MAX_SPLITS ; i + + )
2015-06-24 17:59:57 +00:00
{
cl . playerview [ i ] . playernum = MSG_ReadByte ( ) ;
cl . playerview [ i ] . viewentity = cl . playerview [ i ] . playernum + 1 ;
2021-06-25 18:50:42 +00:00
if ( i > = j ) //its new.
cl . playerview [ i ] . chatstate = 0 ;
2015-06-24 17:59:57 +00:00
}
if ( i < cl . splitclients )
{
Con_Printf ( " Server sent us too many seats! \n " ) ;
for ( ; i < cl . splitclients ; i + + )
{ //svcfte_choosesplitclient has a modulo that is also broken, but at least there's no parse errors this way
MSG_ReadByte ( ) ;
2021-07-17 15:10:10 +00:00
// CL_SendSeatClientCommand(true, i, drop");
2015-06-24 17:59:57 +00:00
}
cl . splitclients = MAX_SPLITS ;
}
break ;
2004-08-23 00:15:46 +00:00
# ifdef PEXT_SETVIEW
case svc_setview :
if ( ! ( cls . fteprotocolextensions & PEXT_SETVIEW ) )
2008-11-09 22:29:28 +00:00
Con_Printf ( " ^1PEXT_SETVIEW is meant to be disabled \n " ) ;
2013-06-23 02:17:02 +00:00
cl . playerview [ destsplit ] . viewentity = MSGCL_ReadEntity ( ) ;
2004-08-23 00:15:46 +00:00
break ;
# endif
2021-08-04 21:16:57 +00:00
case svcfte_setanglebase :
CL_ParseBaseAngle ( destsplit ) ;
break ;
2010-12-05 02:46:07 +00:00
case svcfte_setangledelta :
for ( i = 0 ; i < 3 ; i + + )
2017-08-14 16:38:44 +00:00
ang [ i ] = cl . playerview [ destsplit ] . viewangles [ i ] + MSG_ReadAngle16 ( ) ;
if ( ! CSQC_Parse_SetAngles ( destsplit , ang , true ) )
VectorCopy ( ang , cl . playerview [ destsplit ] . viewangles ) ;
2015-08-20 03:17:47 +00:00
VectorCopy ( cl . playerview [ destsplit ] . viewangles , cl . playerview [ destsplit ] . simangles ) ;
VectorCopy ( cl . playerview [ destsplit ] . viewangles , cl . playerview [ destsplit ] . intermissionangles ) ;
2010-12-05 02:46:07 +00:00
break ;
2004-08-23 00:15:46 +00:00
case svc_setangle :
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
if ( cls . demoplayback = = DPB_MVD )
2004-08-23 00:15:46 +00:00
{
2017-08-14 16:38:44 +00:00
//I really don't get the point of fixangles in an mvd. just to disable interpolation for that frame?
int pl = MSG_ReadByte ( ) ;
2004-08-23 00:15:46 +00:00
for ( i = 0 ; i < 3 ; i + + )
2010-11-06 23:05:29 +00:00
ang [ i ] = MSG_ReadAngle ( ) ;
for ( j = 0 ; j < cl . splitclients ; j + + )
{
2013-06-23 02:17:02 +00:00
playerview_t * pv = & cl . playerview [ j ] ;
2017-08-14 16:38:44 +00:00
if ( Cam_TrackNum ( pv ) = = pl )
2010-11-06 23:05:29 +00:00
{
2013-07-26 17:19:06 +00:00
inf - > packet_entities . fixangles [ j ] = true ;
VectorCopy ( ang , inf - > packet_entities . fixedangles [ j ] ) ;
2010-11-06 23:05:29 +00:00
}
}
2004-08-23 00:15:46 +00:00
}
2017-08-14 16:38:44 +00:00
else
2013-07-26 17:19:06 +00:00
{
2017-08-14 16:38:44 +00:00
inframe_t * inf = & cl . inframes [ cls . netchan . incoming_sequence & UPDATE_MASK ] ;
2017-12-28 16:24:50 +00:00
if ( cls . ezprotocolextensions1 & EZPEXT1_SETANGLEREASON )
MSG_ReadByte ( ) ; //0=unknown, 1=tele, 2=spawn
2017-08-14 16:38:44 +00:00
for ( i = 0 ; i < 3 ; i + + )
ang [ i ] = MSG_ReadAngle ( ) ;
if ( ! CSQC_Parse_SetAngles ( destsplit , ang , false ) )
{
inf - > packet_entities . fixangles [ destsplit ] = true ;
VectorCopy ( ang , cl . playerview [ destsplit ] . viewangles ) ;
VectorCopy ( ang , inf - > packet_entities . fixedangles [ destsplit ] ) ;
}
VectorCopy ( cl . playerview [ destsplit ] . viewangles , cl . playerview [ destsplit ] . intermissionangles ) ;
2013-07-26 17:19:06 +00:00
}
2004-08-23 00:15:46 +00:00
break ;
case svc_lightstyle :
i = MSG_ReadByte ( ) ;
2019-09-10 15:40:04 +00:00
if ( i > = MAX_NET_LIGHTSTYLES )
2004-08-23 00:15:46 +00:00
Host_EndGame ( " svc_lightstyle > MAX_LIGHTSTYLES " ) ;
2023-04-14 01:51:39 +00:00
s = MSG_ReadString ( ) ;
if ( cl_shownet . value = = 3 )
Con_Printf ( " \t %i= \" %s \" \n " , i , s ) ;
R_UpdateLightStyle ( i , s , 1 , 1 , 1 ) ;
2004-08-23 00:15:46 +00:00
break ;
# ifdef PEXT_LIGHTSTYLECOL
2008-05-25 22:23:43 +00:00
case svcfte_lightstylecol :
2004-08-23 00:15:46 +00:00
if ( ! ( cls . fteprotocolextensions & PEXT_LIGHTSTYLECOL ) )
Host_EndGame ( " PEXT_LIGHTSTYLECOL is meant to be disabled \n " ) ;
2014-06-25 03:53:11 +00:00
{
int bits ;
vec3_t rgb ;
2019-09-10 15:40:04 +00:00
i = MSG_ReadByte ( ) ;
2014-06-25 03:53:11 +00:00
bits = MSG_ReadByte ( ) ;
2019-09-10 15:40:04 +00:00
if ( bits & 0x40 )
i | = MSG_ReadByte ( ) < < 8 ; //high bits of style index.
2014-06-25 03:53:11 +00:00
if ( bits & 0x80 )
{
2019-09-10 15:40:04 +00:00
rgb [ 0 ] = ( bits & 1 ) ? MSG_ReadShort ( ) / 1024.0 : 0 ;
rgb [ 1 ] = ( bits & 2 ) ? MSG_ReadShort ( ) / 1024.0 : 0 ;
rgb [ 2 ] = ( bits & 4 ) ? MSG_ReadShort ( ) / 1024.0 : 0 ;
2014-06-25 03:53:11 +00:00
}
else
{
rgb [ 0 ] = ( bits & 1 ) ? 1 : 0 ;
rgb [ 1 ] = ( bits & 2 ) ? 1 : 0 ;
rgb [ 2 ] = ( bits & 4 ) ? 1 : 0 ;
}
2019-09-10 15:40:04 +00:00
if ( i > = MAX_NET_LIGHTSTYLES )
Host_EndGame ( " svc_lightstyle > MAX_LIGHTSTYLES " ) ;
2014-06-25 03:53:11 +00:00
R_UpdateLightStyle ( i , MSG_ReadString ( ) , rgb [ 0 ] , rgb [ 1 ] , rgb [ 2 ] ) ;
}
2004-08-23 00:15:46 +00:00
break ;
# endif
case svc_sound :
------------------------------------------------------------------------
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
CLQW_ParseStartSoundPacket ( ) ;
2004-08-23 00:15:46 +00:00
break ;
2008-11-28 20:34:51 +00:00
# ifdef PEXT_SOUNDDBL
case svcfte_soundextended :
CLNQ_ParseStartSoundPacket ( ) ;
break ;
# endif
2005-09-26 03:40:09 +00:00
2004-08-23 00:15:46 +00:00
case svc_stopsound :
i = MSG_ReadShort ( ) ;
S_StopSound ( i > > 3 , i & 7 ) ;
break ;
2005-09-26 03:40:09 +00:00
2010-11-15 02:40:31 +00:00
# ifdef PEXT2_VOICECHAT
case svcfte_voicechat :
2010-11-20 22:01:16 +00:00
S_Voip_Parse ( ) ;
2010-11-15 02:40:31 +00:00
break ;
# endif
2015-04-14 23:12:17 +00:00
# ifdef TERRAIN
case svcfte_brushedit :
CL_Parse_BrushEdit ( ) ;
break ;
# endif
2004-08-23 00:15:46 +00:00
case svc_updatefrags :
Sbar_Changed ( ) ;
i = MSG_ReadByte ( ) ;
if ( i > = MAX_CLIENTS )
Host_EndGame ( " CL_ParseServerMessage: svc_updatefrags > MAX_SCOREBOARD " ) ;
cl . players [ i ] . frags = MSG_ReadShort ( ) ;
2005-09-26 03:40:09 +00:00
break ;
2004-08-23 00:15:46 +00:00
case svc_updateping :
i = MSG_ReadByte ( ) ;
if ( i > = MAX_CLIENTS )
Host_EndGame ( " CL_ParseServerMessage: svc_updateping > MAX_SCOREBOARD " ) ;
cl . players [ i ] . ping = MSG_ReadShort ( ) ;
break ;
2005-09-26 03:40:09 +00:00
2004-08-23 00:15:46 +00:00
case svc_updatepl :
i = MSG_ReadByte ( ) ;
if ( i > = MAX_CLIENTS )
Host_EndGame ( " CL_ParseServerMessage: svc_updatepl > MAX_SCOREBOARD " ) ;
cl . players [ i ] . pl = MSG_ReadByte ( ) ;
break ;
2005-09-26 03:40:09 +00:00
2004-08-23 00:15:46 +00:00
case svc_updateentertime :
// time is sent over as seconds ago
i = MSG_ReadByte ( ) ;
if ( i > = MAX_CLIENTS )
Host_EndGame ( " CL_ParseServerMessage: svc_updateentertime > MAX_SCOREBOARD " ) ;
2015-06-24 17:59:57 +00:00
cl . players [ i ] . realentertime = realtime - MSG_ReadFloat ( ) ;
2004-08-23 00:15:46 +00:00
break ;
2005-09-26 03:40:09 +00:00
2004-08-23 00:15:46 +00:00
case svc_spawnbaseline :
------------------------------------------------------------------------
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
i = MSGCL_ReadEntity ( ) ;
2006-07-24 04:24:41 +00:00
if ( ! CL_CheckBaselines ( i ) )
Host_EndGame ( " CL_ParseServerMessage: svc_spawnbaseline failed with size %i " , i ) ;
2016-07-12 00:40:13 +00:00
CL_ParseBaseline ( cl_baselines + i , CPNQ_ID ) ;
2004-08-23 00:15:46 +00:00
break ;
2008-05-25 22:23:43 +00:00
case svcfte_spawnbaseline2 :
2017-01-16 08:13:51 +00:00
CL_ParseBaselineDelta ( ) ;
2004-08-23 00:15:46 +00:00
break ;
case svc_spawnstatic :
2017-01-16 08:13:51 +00:00
CL_ParseStaticProt ( CPNQ_ID ) ;
2004-08-23 00:15:46 +00:00
break ;
2013-03-12 22:35:33 +00:00
case svcfte_spawnstatic2 :
2017-01-18 11:34:44 +00:00
CL_ParseStaticProt ( - 1 ) ;
2004-08-23 00:15:46 +00:00
break ;
case svc_temp_entity :
# ifdef NQPROT
CL_ParseTEnt ( false ) ;
# else
CL_ParseTEnt ( ) ;
# endif
break ;
2020-09-08 05:11:09 +00:00
case svcfte_temp_entity_sized :
CL_ParseTEnt_Sized ( ) ;
break ;
2008-05-25 22:23:43 +00:00
case svcfte_customtempent :
2004-08-23 00:15:46 +00:00
CL_ParseCustomTEnt ( ) ;
break ;
case svc_particle :
2005-03-10 03:55:18 +00:00
CLNQ_ParseParticleEffect ( ) ;
2004-08-23 00:15:46 +00:00
break ;
2008-05-25 22:23:43 +00:00
case svcfte_particle2 :
2005-03-10 03:55:18 +00:00
CL_ParseParticleEffect2 ( ) ;
2004-08-23 00:15:46 +00:00
break ;
2008-05-25 22:23:43 +00:00
case svcfte_particle3 :
2005-03-10 03:55:18 +00:00
CL_ParseParticleEffect3 ( ) ;
2004-08-23 00:15:46 +00:00
break ;
2008-05-25 22:23:43 +00:00
case svcfte_particle4 :
2005-03-10 03:55:18 +00:00
CL_ParseParticleEffect4 ( ) ;
2004-08-23 00:15:46 +00:00
break ;
case svc_killedmonster :
2013-06-23 02:17:02 +00:00
//fixme: update all player stats
2015-09-01 04:45:15 +00:00
# ifdef QUAKESTATS
2012-07-05 19:42:36 +00:00
cl . playerview [ destsplit ] . stats [ STAT_MONSTERS ] + + ;
2013-06-23 02:17:02 +00:00
cl . playerview [ destsplit ] . statsf [ STAT_MONSTERS ] + + ;
2015-09-01 04:45:15 +00:00
# endif
2004-08-23 00:15:46 +00:00
break ;
case svc_foundsecret :
2013-06-23 02:17:02 +00:00
//fixme: update all player stats
2015-09-01 04:45:15 +00:00
# ifdef QUAKESTATS
2012-07-05 19:42:36 +00:00
cl . playerview [ destsplit ] . stats [ STAT_SECRETS ] + + ;
2013-06-23 02:17:02 +00:00
cl . playerview [ destsplit ] . statsf [ STAT_SECRETS ] + + ;
2015-09-01 04:45:15 +00:00
# endif
2004-08-23 00:15:46 +00:00
break ;
2012-09-30 05:52:03 +00:00
case svcqw_updatestatbyte :
2004-08-23 00:15:46 +00:00
i = MSG_ReadByte ( ) ;
j = MSG_ReadByte ( ) ;
2015-08-20 03:17:47 +00:00
CL_SetStatNumeric ( destsplit , i , j , j ) ;
2004-08-23 00:15:46 +00:00
break ;
2012-09-30 05:52:03 +00:00
case svcqw_updatestatlong :
2004-08-23 00:15:46 +00:00
i = MSG_ReadByte ( ) ;
j = MSG_ReadLong ( ) ; //make qbyte if nq compatability?
2015-08-20 03:17:47 +00:00
CL_SetStatNumeric ( destsplit , i , j , j ) ;
2008-05-25 22:23:43 +00:00
break ;
case svcfte_updatestatstring :
i = MSG_ReadByte ( ) ;
s = MSG_ReadString ( ) ;
CL_SetStatString ( destsplit , i , s ) ;
break ;
case svcfte_updatestatfloat :
i = MSG_ReadByte ( ) ;
f = MSG_ReadFloat ( ) ;
2015-08-20 03:17:47 +00:00
CL_SetStatNumeric ( destsplit , i , f , f ) ;
2004-08-23 00:15:46 +00:00
break ;
2005-09-26 03:40:09 +00:00
2004-08-23 00:15:46 +00:00
case svc_spawnstaticsound :
2012-11-27 03:23:19 +00:00
CL_ParseStaticSound ( false ) ;
2004-08-23 00:15:46 +00:00
break ;
2022-06-29 07:20:24 +00:00
case svcfte_spawnstaticsound2 :
CL_ParseStaticSound ( MSG_ReadByte ( ) ) ;
break ;
2004-08-23 00:15:46 +00:00
case svc_cdtrack :
2013-10-08 16:29:54 +00:00
{
2014-06-21 17:58:17 +00:00
//quakeworld got a crippled svc_cdtrack.
2013-10-08 16:29:54 +00:00
unsigned int firsttrack ;
firsttrack = MSG_ReadByte ( ) ;
Media_NumberedTrack ( firsttrack , firsttrack ) ;
}
2004-08-23 00:15:46 +00:00
break ;
case svc_intermission :
2015-09-01 04:45:15 +00:00
if ( cl . intermissionmode = = IM_NONE )
2015-06-16 23:53:58 +00:00
{
TP_ExecTrigger ( " f_mapend " , false ) ;
2022-05-28 17:59:51 +00:00
if ( cl . playerview [ destsplit ] . spectator | | cls . demoplayback )
2015-06-16 23:53:58 +00:00
TP_ExecTrigger ( " f_specmapend " , true ) ;
2022-05-28 17:59:51 +00:00
else
TP_ExecTrigger ( " f_playmapend " , true ) ;
2015-09-01 04:45:15 +00:00
cl . completed_time = cl . gametime ;
2015-06-16 23:53:58 +00:00
}
2015-09-01 04:45:15 +00:00
cl . intermissionmode = IM_QWSCORES ;
2004-08-23 00:15:46 +00:00
for ( i = 0 ; i < 3 ; i + + )
2012-07-05 19:42:36 +00:00
cl . playerview [ destsplit ] . simorg [ i ] = MSG_ReadCoord ( ) ;
2004-08-23 00:15:46 +00:00
for ( i = 0 ; i < 3 ; i + + )
2013-07-26 17:19:06 +00:00
cl . playerview [ destsplit ] . intermissionangles [ i ] = MSG_ReadAngle ( ) ;
2004-08-23 00:15:46 +00:00
break ;
case svc_finale :
2015-09-01 04:45:15 +00:00
if ( cl . intermissionmode = = IM_NONE )
2013-07-26 17:19:06 +00:00
{
2012-01-17 07:57:46 +00:00
for ( i = 0 ; i < MAX_SPLITS ; i + + )
2013-06-23 02:17:02 +00:00
cl . playerview [ i ] . simorg [ 2 ] + = cl . playerview [ i ] . viewheight ;
2013-07-26 17:19:06 +00:00
VectorCopy ( cl . playerview [ destsplit ] . simangles , cl . playerview [ destsplit ] . intermissionangles ) ;
2015-09-01 04:45:15 +00:00
cl . completed_time = cl . gametime ;
2013-07-26 17:19:06 +00:00
}
2015-09-01 04:45:15 +00:00
cl . intermissionmode = IM_NQFINALE ;
2023-01-09 05:11:34 +00:00
SCR_CenterPrint ( destsplit , TL_Translate ( com_language , MSG_ReadString ( ) ) , false ) ;
2004-08-23 00:15:46 +00:00
break ;
2005-09-26 03:40:09 +00:00
2004-08-23 00:15:46 +00:00
case svc_sellscreen :
2011-04-20 23:05:45 +00:00
Cmd_ExecuteString ( " help " , RESTRICT_SERVER ) ;
2004-08-23 00:15:46 +00:00
break ;
case svc_smallkick :
2017-02-21 20:22:07 +00:00
cl . playerview [ destsplit ] . punchangle_cl = - 2 ;
2004-08-23 00:15:46 +00:00
break ;
case svc_bigkick :
2017-02-21 20:22:07 +00:00
cl . playerview [ destsplit ] . punchangle_cl = - 4 ;
2004-08-23 00:15:46 +00:00
break ;
case svc_muzzleflash :
2014-04-24 01:53:01 +00:00
CL_MuzzleFlash ( MSGCL_ReadEntity ( ) ) ;
2004-08-23 00:15:46 +00:00
break ;
case svc_updateuserinfo :
CL_UpdateUserinfo ( ) ;
break ;
case svc_setinfo :
2007-02-23 00:21:33 +00:00
CL_ParseSetInfo ( ) ;
2004-08-23 00:15:46 +00:00
break ;
case svc_serverinfo :
CL_ServerInfo ( ) ;
break ;
2019-03-12 05:04:27 +00:00
case svcfte_setinfoblob :
CL_ParseSetInfoBlob ( ) ;
break ;
2004-08-23 00:15:46 +00:00
case svc_download :
2016-10-22 07:06:51 +00:00
CL_ParseDownload ( false ) ;
2004-08-23 00:15:46 +00:00
break ;
case svc_playerinfo :
2017-12-28 16:24:50 +00:00
CLQW_ParsePlayerinfo ( ) ;
2004-08-23 00:15:46 +00:00
break ;
case svc_nails :
2004-12-08 04:14:52 +00:00
CL_ParseProjectiles ( cl_spikeindex , false ) ;
break ;
case svc_nails2 :
CL_ParseProjectiles ( cl_spikeindex , true ) ;
2004-08-23 00:15:46 +00:00
break ;
case svc_chokecount : // some preceding packets were choked
i = MSG_ReadByte ( ) ;
for ( j = 0 ; j < i ; j + + )
2013-09-06 22:57:44 +00:00
cl . outframes [ ( cls . netchan . incoming_acknowledged - 1 - j ) & UPDATE_MASK ] . latency = - 2 ;
2004-08-23 00:15:46 +00:00
break ;
case svc_modellist :
CL_ParseModellist ( false ) ;
break ;
2008-05-25 22:23:43 +00:00
case svcfte_modellistshort :
2004-08-23 00:15:46 +00:00
CL_ParseModellist ( true ) ;
break ;
case svc_soundlist :
2008-11-28 20:34:51 +00:00
CL_ParseSoundlist ( false ) ;
break ;
# ifdef PEXT_SOUNDDBL
case svcfte_soundlistshort :
CL_ParseSoundlist ( true ) ;
2004-08-23 00:15:46 +00:00
break ;
2008-11-28 20:34:51 +00:00
# endif
2004-08-23 00:15:46 +00:00
case svc_packetentities :
------------------------------------------------------------------------
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
CLQW_ParsePacketEntities ( false ) ;
2004-08-23 00:15:46 +00:00
break ;
case svc_deltapacketentities :
------------------------------------------------------------------------
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
CLQW_ParsePacketEntities ( true ) ;
2004-08-23 00:15:46 +00:00
break ;
2012-02-12 05:18:31 +00:00
case svcfte_updateentities :
CLFTE_ParseEntities ( ) ;
break ;
2004-08-23 00:15:46 +00:00
2011-05-20 04:10:46 +00:00
case svc_maxspeed :
2013-06-23 02:17:02 +00:00
cl . playerview [ destsplit ] . maxspeed = MSG_ReadFloat ( ) ;
2004-08-23 00:15:46 +00:00
break ;
2011-05-20 04:10:46 +00:00
case svc_entgravity :
2013-06-23 02:17:02 +00:00
cl . playerview [ destsplit ] . entgravity = MSG_ReadFloat ( ) ;
2004-08-23 00:15:46 +00:00
break ;
case svc_setpause :
cl . paused = MSG_ReadByte ( ) ;
2013-11-21 23:02:28 +00:00
// Media_SetPauseTrack(!!cl.paused);
2004-08-23 00:15:46 +00:00
break ;
------------------------------------------------------------------------
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
// case svc_ftesetclientpersist:
// CL_ParseClientPersist();
// break;
2004-08-23 00:15:46 +00:00
case svc_setportalstate :
2014-06-02 16:50:40 +00:00
CL_ParsePortalState ( ) ;
2004-08-23 00:15:46 +00:00
break ;
2004-09-01 00:01:08 +00:00
2008-05-25 22:23:43 +00:00
case svcfte_showpic :
2004-09-01 00:01:08 +00:00
SCR_ShowPic_Create ( ) ;
break ;
2008-05-25 22:23:43 +00:00
case svcfte_hidepic :
2004-09-01 00:01:08 +00:00
SCR_ShowPic_Hide ( ) ;
break ;
2008-05-25 22:23:43 +00:00
case svcfte_movepic :
2004-09-01 00:01:08 +00:00
SCR_ShowPic_Move ( ) ;
break ;
2008-05-25 22:23:43 +00:00
case svcfte_updatepic :
2004-09-01 00:01:08 +00:00
SCR_ShowPic_Update ( ) ;
break ;
2004-10-10 06:32:29 +00:00
2008-05-25 22:23:43 +00:00
case svcfte_effect :
2004-11-22 00:00:54 +00:00
CL_ParseEffect ( false ) ;
break ;
2008-05-25 22:23:43 +00:00
case svcfte_effect2 :
2004-11-22 00:00:54 +00:00
CL_ParseEffect ( true ) ;
break ;
2005-02-28 07:16:19 +00:00
2018-03-24 04:02:09 +00:00
# ifdef CSQC_DAT
2008-05-25 22:23:43 +00:00
case svcfte_csqcentities :
2020-09-08 05:11:09 +00:00
suggestcsqcdebug = true ;
CSQC_ParseEntities ( cl . csqcdebug ) ;
break ;
case svcfte_csqcentities_sized :
CSQC_ParseEntities ( true ) ;
2005-02-28 07:16:19 +00:00
break ;
# endif
2008-05-25 22:23:43 +00:00
case svcfte_precache :
2005-05-26 12:55:34 +00:00
CL_ParsePrecache ( ) ;
break ;
2008-11-09 22:29:28 +00:00
case svcfte_trailparticles :
2012-07-05 19:42:36 +00:00
CL_ParseTrailParticles ( ) ;
2008-11-09 22:29:28 +00:00
break ;
case svcfte_pointparticles :
2012-07-05 19:42:36 +00:00
CL_ParsePointParticles ( false ) ;
2008-11-09 22:29:28 +00:00
break ;
case svcfte_pointparticles1 :
2012-07-05 19:42:36 +00:00
CL_ParsePointParticles ( true ) ;
2008-11-09 22:29:28 +00:00
break ;
2009-04-01 22:03:56 +00:00
2020-09-08 05:11:09 +00:00
case svcfte_cgamepacket_sized :
# ifdef CSQC_DAT
if ( CSQC_ParseGamePacket ( destsplit , true ) )
break ;
# endif
Con_Printf ( " Unable to parse gamecode packet \n " ) ;
break ;
2009-04-01 22:03:56 +00:00
case svcfte_cgamepacket :
2020-09-08 05:11:09 +00:00
suggestcsqcdebug = true ;
2013-12-29 22:48:28 +00:00
# ifdef HLCLIENT
if ( CLHL_ParseGamePacket ( ) )
break ;
2015-10-11 11:34:58 +00:00
# endif
# ifdef CSQC_DAT
2020-09-08 05:11:09 +00:00
if ( CSQC_ParseGamePacket ( destsplit , cl . csqcdebug ) )
2015-10-11 11:34:58 +00:00
break ;
2009-04-01 22:03:56 +00:00
# endif
Con_Printf ( " Unable to parse gamecode packet \n " ) ;
break ;
2004-08-23 00:15:46 +00:00
}
2019-01-29 07:18:07 +00:00
2022-03-08 05:34:26 +00:00
packetusage_pending [ cmd ] + = MSG_GetReadCount ( ) - cmdstart ;
2004-08-23 00:15:46 +00:00
}
}
# ifdef Q2CLIENT
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
static void CLQ2_ParseZPacket ( void )
2016-10-22 07:06:51 +00:00
{
# ifndef AVAIL_ZLIB
Host_EndGame ( " CLQ2_ParseZPacket: zlib not supported in this build " ) ;
# else
z_stream s ;
char * indata , * outdata ; //we're hacking stuff onto the end of the current buffer, to avoid issues if something errors out and doesn't leave net_message in a clean state
unsigned short clen = MSG_ReadShort ( ) ;
unsigned short ulen = MSG_ReadShort ( ) ;
sizebuf_t restoremsg ;
2022-03-08 05:34:26 +00:00
if ( clen > net_message . cursize - MSG_GetReadCount ( ) )
2016-10-22 07:06:51 +00:00
Host_EndGame ( " CLQ2_ParseZPacket: svcr1q2_zpacket truncated " ) ;
if ( ulen > net_message . maxsize - net_message . cursize )
Host_EndGame ( " CLQ2_ParseZPacket: svcr1q2_zpacket overflow " ) ;
2022-03-08 05:34:26 +00:00
indata = net_message . data + MSG_GetReadCount ( ) ;
2016-10-22 07:06:51 +00:00
outdata = net_message . data + net_message . cursize ;
MSG_ReadSkip ( clen ) ;
restoremsg = net_message ;
2022-03-08 05:34:26 +00:00
net_message . currentbit = net_message . cursize < < 3 ;
2016-10-22 07:06:51 +00:00
net_message . cursize + = ulen ;
memset ( & s , 0 , sizeof ( s ) ) ;
s . next_in = indata ;
s . avail_in = clen ;
s . total_in = 0 ;
s . next_out = outdata ;
s . avail_out = ulen ;
s . total_out = 0 ;
if ( inflateInit2 ( & s , - 15 ) ! = Z_OK )
Host_EndGame ( " CLQ2_ParseZPacket: unable to initialise zlib " ) ;
if ( inflate ( & s , Z_FINISH ) ! = Z_STREAM_END )
Host_EndGame ( " CLQ2_ParseZPacket: stream truncated " ) ;
if ( inflateEnd ( & s ) ! = Z_OK )
Host_EndGame ( " CLQ2_ParseZPacket: stream truncated " ) ;
if ( s . total_out ! = ulen | | s . total_in ! = clen )
Host_EndGame ( " CLQ2_ParseZPacket: stream truncated " ) ;
CLQ2_ParseServerMessage ( ) ;
net_message = restoremsg ;
msg_badread = false ;
# 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
static void CLR1Q2_ParseSetting ( void )
2016-10-22 07:06:51 +00:00
{
int setting = MSG_ReadLong ( ) ;
int value = MSG_ReadLong ( ) ;
if ( setting = = R1Q2_SVSET_FPS )
{
cl . q2svnetrate = value ;
if ( cl . validsequence )
Con_Printf ( " warning: fps rate changed mid-game \n " ) ; //fixme: we need to clean up lerping stuff. if its now lower, we might have a whole load of things waiting ages for a timeout.
}
}
2023-09-11 09:31:09 +00:00
static void CLQ2EX_ParseFog ( void )
{
float d = 0 ;
qbyte r = 255 , g = 255 , b = 255 ;
unsigned short t = 0 ;
unsigned int flags = MSG_ReadByte ( ) ;
if ( flags & ( 1 < < 7 ) )
flags | = MSG_ReadByte ( ) < < 8 ;
if ( flags & ( 1 < < 0 ) ) d = MSG_ReadFloat ( ) ; //density
if ( flags & ( 1 < < 0 ) ) MSG_ReadByte ( ) ; //density
if ( flags & ( 1 < < 1 ) ) r = MSG_ReadByte ( ) ; //r
if ( flags & ( 1 < < 2 ) ) g = MSG_ReadByte ( ) ; //g
if ( flags & ( 1 < < 3 ) ) b = MSG_ReadByte ( ) ; //b
if ( flags & ( 1 < < 4 ) ) t = MSG_ReadUInt16 ( ) ; //time
if ( flags & ( 1 < < 5 ) ) MSG_ReadFloat ( ) ; //h falloff
if ( flags & ( 1 < < 6 ) ) MSG_ReadFloat ( ) ; //h density
if ( flags & ( 1 < < 8 ) ) MSG_ReadByte ( ) ; //h s r
if ( flags & ( 1 < < 9 ) ) MSG_ReadByte ( ) ; //h s g
if ( flags & ( 1 < < 10 ) ) MSG_ReadByte ( ) ; //h s b
if ( flags & ( 1 < < 11 ) ) MSG_ReadLong ( ) ; //h s dist
if ( flags & ( 1 < < 12 ) ) MSG_ReadByte ( ) ; //h e r
if ( flags & ( 1 < < 13 ) ) MSG_ReadByte ( ) ; //h e g
if ( flags & ( 1 < < 14 ) ) MSG_ReadByte ( ) ; //h e b
if ( flags & ( 1 < < 15 ) ) MSG_ReadLong ( ) ; //h e dist
CL_ResetFog ( FOGTYPE_AIR ) ;
cl . fog [ FOGTYPE_AIR ] . density = d ;
cl . fog [ FOGTYPE_AIR ] . colour [ 0 ] = SRGBf ( r / 255.0f ) ;
cl . fog [ FOGTYPE_AIR ] . colour [ 1 ] = SRGBf ( g / 255.0f ) ;
cl . fog [ FOGTYPE_AIR ] . colour [ 2 ] = SRGBf ( b / 255.0f ) ;
cl . fog [ FOGTYPE_AIR ] . time + = ( t ) / 100.0 ;
cl . fog_locked = ! ! cl . fog [ FOGTYPE_AIR ] . density ;
}
static char * CLQ2EX_ReformatBinds ( int seat , const char * source , char * buffer , size_t buffersize )
{ //q2e has various "%bind:cmd:$desc%" tags that should be expanded to some "<BUTTON> Desc\n" string instead, for tutorialy areas.
//we're too dumb to know about any artwork for each key.
//note that multiple can exist in any centerprint.
char * s = buffer ;
if ( s ! = source )
Q_strncpyz ( buffer , source , buffersize ) ;
while ( ! strncmp ( s , " %bind: " , 6 ) )
{
int keys [ 1 ] , keymods [ countof ( keys ) ] ;
char * cmd = s + 6 ;
char * desc = strchr ( cmd , ' : ' ) ;
char * e ;
const char * rep , * key ;
if ( ! desc )
break ;
e = strchr ( desc , ' % ' ) ;
if ( ! e )
break ;
* desc + + = 0 ;
* e + + = 0 ;
rep = TL_Translate ( com_language , desc ) ; //sigh
if ( M_FindKeysForCommand ( 0 , seat , cmd , keys , keymods , countof ( keys ) ) > 0 )
key = Key_KeynumToLocalString ( keys [ 0 ] , keymods [ 0 ] ) ;
else
key = " UNBOUND " ;
rep = va ( " <%s> %s \n " , key , rep ) ;
if ( s + strlen ( rep ) > = buffer + buffersize )
rep = " " ; //would overflow, just strip it out instead.
memmove ( s + strlen ( rep ) , e , strlen ( e ) + 1 ) ;
memcpy ( s , rep , strlen ( rep ) ) ;
s + = strlen ( rep ) ;
}
return buffer ;
}
static void CLQ2EX_LocPrint ( int targetseat )
{
int seat ;
qbyte flags = MSG_ReadByte ( ) ;
qbyte level = flags & 7 ;
qboolean broadcast = ! ! ( flags & ( 1 < < 3 ) ) ; //meaningful clientside for splitscreen, at least with centerprints.
qboolean nonotify = flags & ( 1 < < 4 ) ;
unsigned short count , a ;
const char * arg [ 256 ] ;
static char formatted [ 8192 ] ;
char inputs [ 8192 ] ;
size_t ofs = 0 ;
char * s ;
arg [ 0 ] = MSG_ReadString ( ) ;
count = MSG_ReadByte ( ) ;
for ( a = 1 ; a < = count & & a < countof ( arg ) ; )
{
arg [ a ] = MSG_ReadStringBuffer ( inputs + ofs , sizeof ( inputs ) - ofs - 1 ) ;
if ( ! strncmp ( arg [ a ] , " ##P " , 3 ) )
{
int p = atoi ( arg [ a ] + 3 ) ;
if ( p < cl . allocated_client_slots )
{
inputs [ ofs ] = 0 ;
arg [ a ] = cl . players [ p ] . name ; //FIXME: do colours here instead of CL_ParsePrint?
}
}
a + + ;
ofs + = strlen ( inputs + ofs ) + 1 ;
if ( ofs > = sizeof ( inputs ) )
break ;
}
for ( ; a < = count ; a + + )
MSG_ReadString ( ) ; //don't lose space, though we can't buffer it.
TL_Reformat ( com_language , formatted , sizeof ( formatted ) , a , arg ) ;
if ( level = = 4 )
{ //'typewriter'...
for ( seat = ( broadcast ? 0 : targetseat ) ; ( broadcast ? ( seat < cl . splitclients ) : ( seat = = targetseat ) ) ; seat + + )
{
s = va ( " /Q/W%s/.%s " , nonotify ? " /N0 " : " " , CLQ2EX_ReformatBinds ( seat , formatted , inputs , sizeof ( inputs ) ) ) ;
SCR_CenterPrint ( seat , s , false ) ;
}
return ;
}
else if ( level = = 5 )
{ //centerprint
for ( seat = ( broadcast ? 0 : targetseat ) ; ( broadcast ? ( seat < cl . splitclients ) : ( seat = = targetseat ) ) ; seat + + )
{
s = va ( " %s/.%s " , nonotify ? " /N0 " : " " , CLQ2EX_ReformatBinds ( seat , formatted , inputs , sizeof ( inputs ) ) ) ;
SCR_CenterPrint ( seat , s , false ) ;
}
return ;
}
else if ( level > = 6 )
level = 3 ; //TTS
CL_ParsePrint ( formatted , level ) ;
}
static void CLQ2EX_ParseDamage ( int seat )
{ //not really sure what this is useful for, when there's already damage blend info in the playerstate messages.
vec3_t dir ;
qbyte count = MSG_ReadByte ( ) ;
while ( count - - > 0 )
{
/*bits =*/ MSG_ReadByte ( ) ;
//dam = (bits&0x1f)*3;
//health= !!(bits&0x20);
//armour= !!(bits&0x40);
//shield= !!(bits&0x80);
MSG_ReadDir ( dir ) ;
}
}
extern sizebuf_t * msg_readmsg ;
# ifdef AVAIL_ZLIB
size_t ZLib_DecompressBuffer ( qbyte * in , size_t insize , qbyte * out , size_t maxoutsize ) ;
# endif
static void CLQ2EX_ParseBlast ( void ( * func ) ( void ) )
{
# ifdef AVAIL_ZLIB
sizebuf_t tmp , * prevmsg = msg_readmsg ;
unsigned int csize = MSG_ReadUInt16 ( ) ;
unsigned int usize = MSG_ReadUInt16 ( ) ;
void * cdata = msg_readmsg - > data + ( msg_readmsg - > currentbit > > 3 ) ;
MSG_ReadSkip ( csize ) ;
if ( msg_badread )
return ; //erk?!?
//create a new uncompressed buffer...
MSG_BeginWriting ( & tmp , msg_readmsg - > prim , alloca ( usize ) , usize ) ;
if ( ZLib_DecompressBuffer ( cdata , csize , SZ_GetSpace ( & tmp , usize ) , usize ) ! = usize )
{
msg_badread = true ;
return ; //wut?
}
//and read it...
MSG_BeginReading ( & tmp , msg_readmsg - > prim ) ;
while ( tmp . currentbit > > 3 < msg_readmsg - > cursize )
func ( ) ;
//before returning to our original buffer.
msg_readmsg = prevmsg ;
# else
msg_badread = true ;
# endif
}
static void CLQ2EX_ParseRouteMarker ( void )
{
qboolean isfirst ;
vec3_t pos ;
vec3_t dir ;
float timeout = 10 ;
float radius = 16 ;
struct itemtimer_s * timer ;
float start = cl . time ;
isfirst = MSG_ReadByte ( ) ;
MSG_ReadPos ( pos ) ;
MSG_ReadDir ( dir ) ;
// pos[2]-=24;
if ( isfirst )
radius * = 2 ;
timer = Z_Malloc ( sizeof ( * timer ) ) ;
timer - > next = cl . itemtimers ;
cl . itemtimers = timer ;
VectorCopy ( pos , timer - > origin ) ;
timer - > start = cl . time ;
timer - > duration = timeout ;
timer - > radius = radius ;
timer - > duration = timeout ;
timer - > entnum = 0 ;
timer - > start = start ;
timer - > end = start + timer - > duration ;
timer - > rgb [ 0 ] = 0.15 ;
timer - > rgb [ 1 ] = 1 ;
timer - > rgb [ 2 ] = 0.1 ;
}
static void CLQ2EX_ParseLevelRestart ( void )
{ //fast restart... allowing us to skip (full)configstrings and baselines
int id ;
char * str ;
while ( ! msg_badread )
{
id = MSG_ReadShort ( ) ;
if ( id = = - 1 )
break ; //end of our svc.
str = MSG_ReadString ( ) ;
CLQ2_UpdateConfigString ( id , str ) ;
}
//clear out some stuff that should not be lingering...
for ( id = 0 ; id < cl . splitclients ; id + + )
SCR_CenterPrint ( id , NULL , true ) ;
}
2016-01-18 05:22:07 +00:00
void CL_WriteDemoMessage ( sizebuf_t * msg , int payloadoffset ) ;
2023-09-11 09:31:09 +00:00
static const char * q2svcnames [ ] = {
" svcq2_bad " , //0
// these ops are known to the game dll
" svcq2_muzzleflash " , //1
" svcq2_muzzleflash2 " , //2
" svcq2_temp_entity " , //3
" svcq2_layout " , //4
" svcq2_inventory " , //5
// the rest are private to the client and server
" q2_nop " , //6
" q2_disconnect " , //7
" q2_reconnect " , //8
" q2_sound " , //9
" q2_print " , //10
" q2_stufftext " , //11
" q2_serverdata " , //12
" q2_configstring " , //13
" q2_spawnbaseline " , //14
" q2_centerprint " , //15
" q2_download " , //16
" q2_playerinfo " , //17
" q2_packetentities " , //18
" q2_deltapacketentities " , //19
" q2_frame " , //20
//extended tat.
" q2ex_splitclient/r1q2_zpacket " , //21
" q2ex_configblast/r1q2_zdownload " , //22
" q2ex_spawnbaselineblast/r1q2_playerupdate/q2pro_gamestate " , //23
" q2ex_Levelrestart/r1q2_setting/q2pro_setting " , //24
" q2ex_danage " , //25
" q2ex_locprint " , //26
" q2ex_fog " , //27
" q2ex_waiting " , //28
" q2ex_botchat " , //29
" q2ex_mapmarker " , //30
" q2ex_routemarker " , //31
" q2ex_achievement " , //32
} ;
2004-08-23 00:15:46 +00:00
void CLQ2_ParseServerMessage ( void )
{
2023-09-11 09:31:09 +00:00
int cmd , last = - 1 ;
const char * s ;
2016-01-18 05:22:07 +00:00
int i ;
unsigned int seat ;
// int j;
2022-03-08 05:34:26 +00:00
int startpos = MSG_GetReadCount ( ) ;
2004-08-23 00:15:46 +00:00
cl . last_servermessage = realtime ;
CL_ClearProjectiles ( ) ;
//
// if recording demos, copy the message out
//
if ( cl_shownet . value = = 1 )
2013-11-29 14:36:47 +00:00
Con_Printf ( " %i " , net_message . cursize ) ;
2023-04-14 01:51:39 +00:00
else if ( cl_shownet . value > = 2 )
2013-11-29 14:36:47 +00:00
Con_Printf ( " ------------------ \n " ) ;
2004-08-23 00:15:46 +00:00
CL_ParseClientdata ( ) ;
//
// parse the message
//
while ( 1 )
{
if ( msg_badread )
{
2023-09-11 09:31:09 +00:00
if ( cl_shownet . ival )
CL_DumpPacket ( ) ;
Host_EndGame ( " CLQ2_ParseServerMessage: Bad server message (last %i) " , last ) ;
2004-08-23 00:15:46 +00:00
break ;
}
cmd = MSG_ReadByte ( ) ;
2016-01-18 05:22:07 +00:00
seat = 0 ;
if ( cmd = = svcq2_playerinfo & & ( cls . fteprotocolextensions & PEXT_SPLITSCREEN ) )
2016-02-15 06:01:17 +00:00
{ //playerinfo should not normally be seen here.
//so we can just 'borrow' it for seat numbers for targetted svcs.
2016-01-18 05:22:07 +00:00
SHOWNET ( va ( " %i " , cmd ) ) ;
seat = MSG_ReadByte ( ) ;
2023-09-11 09:31:09 +00:00
seatedcommand :
2016-01-18 05:22:07 +00:00
if ( seat > = MAX_SPLITS )
2016-02-15 06:01:17 +00:00
Host_EndGame ( " CLQ2_ParseServerMessage: Unsupported seat (%i) " , seat ) ;
2016-01-18 05:22:07 +00:00
cmd = MSG_ReadByte ( ) ;
}
2004-08-23 00:15:46 +00:00
if ( cmd = = - 1 )
{
2022-03-08 05:34:26 +00:00
SHOWNETEOM ( " END OF MESSAGE " ) ;
2004-08-23 00:15:46 +00:00
break ;
}
2023-09-11 09:31:09 +00:00
SHOWNET ( cmd > = countof ( q2svcnames ) ? va ( " %i " , cmd ) : q2svcnames [ cmd ] ) ;
2005-09-26 03:40:09 +00:00
2004-08-23 00:15:46 +00:00
// other commands
switch ( cmd )
{
default :
2023-09-11 09:31:09 +00:00
isillegible :
2015-12-28 17:41:39 +00:00
if ( cls . protocol_q2 = = PROTOCOL_VERSION_R1Q2 | | cls . protocol_q2 = = PROTOCOL_VERSION_Q2PRO )
{
switch ( cmd & 0x1f )
{
case svcq2_frame : //20 (the bastard to implement.)
CLQ2_ParseFrame ( cmd > > 5 ) ;
break ;
default :
2023-09-11 09:31:09 +00:00
if ( cl_shownet . ival )
CL_DumpPacket ( ) ;
Host_EndGame ( " CLQ2_ParseServerMessage: Illegible server message (%i, last %i) " , cmd , last ) ;
2015-12-28 17:41:39 +00:00
return ;
}
break ;
}
2023-09-11 09:31:09 +00:00
if ( cl_shownet . ival )
CL_DumpPacket ( ) ;
Host_EndGame ( " CLQ2_ParseServerMessage: Illegible server message (%i, last %i) " , cmd , last ) ;
2004-08-23 00:15:46 +00:00
return ;
//known to game
case svcq2_muzzleflash :
2005-09-26 03:40:09 +00:00
CLQ2_ParseMuzzleFlash ( ) ;
2004-08-23 00:15:46 +00:00
break ;
case svcq2_muzzleflash2 :
CLQ2_ParseMuzzleFlash2 ( ) ;
return ;
case svcq2_temp_entity :
CLQ2_ParseTEnt ( ) ;
break ;
case svcq2_layout :
s = MSG_ReadString ( ) ;
2016-01-18 05:22:07 +00:00
Q_strncpyz ( cl . q2layout [ seat ] , s , sizeof ( cl . q2layout [ seat ] ) ) ;
2004-08-23 00:15:46 +00:00
break ;
case svcq2_inventory :
2016-01-18 05:22:07 +00:00
CLQ2_ParseInventory ( seat ) ;
2005-09-04 05:48:26 +00:00
break ;
2004-08-23 00:15:46 +00:00
// the rest are private to the client and server
case svcq2_nop : //6
2023-09-11 09:31:09 +00:00
break ; //q2e sends these when it has nothing else to send, for some reason.
//or they're never seen and thus probably a bug.
2004-08-23 00:15:46 +00:00
Host_EndGame ( " CL_ParseServerMessage: svcq2_nop not implemented " ) ;
return ;
case svcq2_disconnect :
if ( cls . state = = ca_connected )
Host_EndGame ( " Server disconnected \n "
" Server version may not be compatible " ) ;
else
Host_EndGame ( " Server disconnected " ) ;
return ;
2015-12-28 17:41:39 +00:00
case svcq2_reconnect : //8. this is actually kinda weird to have
2013-11-29 14:36:47 +00:00
Con_TPrintf ( " reconnecting... \n " ) ;
2015-12-28 17:41:39 +00:00
# if 1
2018-12-06 04:55:35 +00:00
CL_Disconnect ( " Reconnect request " ) ;
2015-12-28 17:41:39 +00:00
CL_BeginServerReconnect ( ) ;
return ;
# else
2005-03-23 22:14:08 +00:00
CL_SendClientCommand ( true , " new " ) ;
2004-08-23 00:15:46 +00:00
break ;
2015-12-28 17:41:39 +00:00
# endif
2004-08-23 00:15:46 +00:00
case svcq2_sound : //9 // <see code>
CLQ2_ParseStartSoundPacket ( ) ;
break ;
case svcq2_print : //10 // [qbyte] id [string] null terminated string
i = MSG_ReadByte ( ) ;
s = MSG_ReadString ( ) ;
2023-09-11 09:31:09 +00:00
if ( i ! = PRINT_CHAT )
s = TL_Translate ( com_language , s ) ;
2005-11-30 02:26:12 +00:00
2015-04-14 23:12:17 +00:00
CL_ParsePrint ( s , i ) ;
2004-08-23 00:15:46 +00:00
break ;
case svcq2_stufftext : //11 // [string] stuffed into client's console buffer, should be \n terminated
s = MSG_ReadString ( ) ;
Con_DPrintf ( " stufftext: %s \n " , s ) ;
if ( ! strncmp ( s , " precache " , 8 ) ) //big major hack. Q2 uses a command that q1 has as a cvar.
{ //call the q2 precache function.
CLQ2_Precache_f ( ) ;
}
else
Cbuf_AddText ( s , RESTRICT_SERVER ) ; //don't let the local user cheat
break ;
case svcq2_serverdata : //12 // [long] protocol ...
Cbuf_Execute ( ) ; // make sure any stuffed commands are done
CLQ2_ParseServerData ( ) ;
break ;
case svcq2_configstring : //13 // [short] [string]
CLQ2_ParseConfigString ( ) ;
break ;
2005-09-26 03:40:09 +00:00
case svcq2_spawnbaseline : //14
2004-08-23 00:15:46 +00:00
CLQ2_ParseBaseline ( ) ;
break ;
case svcq2_centerprint : //15 // [string] to put in center of the screen
2023-09-11 09:31:09 +00:00
s = TL_Translate ( com_language , MSG_ReadString ( ) ) ;
if ( * s = = ' % ' ) //grr!
s = CLQ2EX_ReformatBinds ( seat , s , alloca ( 8192 ) , 8192 ) ;
2006-01-01 09:01:15 +00:00
2006-01-13 06:27:18 +00:00
# ifdef PLUGINS
2016-01-18 05:22:07 +00:00
if ( Plug_CenterPrintMessage ( s , seat ) )
2006-01-13 06:27:18 +00:00
# endif
2016-01-18 05:22:07 +00:00
SCR_CenterPrint ( seat , s , false ) ;
2004-08-23 00:15:46 +00:00
break ;
case svcq2_download : //16 // [short] size [size bytes]
2016-10-22 07:06:51 +00:00
CL_ParseDownload ( false ) ;
2004-08-23 00:15:46 +00:00
break ;
case svcq2_playerinfo : //17 // variable
2015-12-12 19:25:15 +00:00
Host_EndGame ( " CL_ParseServerMessage: svcq2_playerinfo not as part of svcq2_frame " ) ;
2004-08-23 00:15:46 +00:00
return ;
case svcq2_packetentities : //18 // [...]
2015-12-12 19:25:15 +00:00
Host_EndGame ( " CL_ParseServerMessage: svcq2_packetentities not as part of svcq2_frame " ) ;
2004-08-23 00:15:46 +00:00
return ;
case svcq2_deltapacketentities : //19 // [...]
2015-12-12 19:25:15 +00:00
Host_EndGame ( " CL_ParseServerMessage: svcq2_deltapacketentities not as part of svcq2_frame " ) ;
2004-08-23 00:15:46 +00:00
return ;
case svcq2_frame : //20 (the bastard to implement.)
2015-12-28 17:41:39 +00:00
CLQ2_ParseFrame ( 0 ) ;
2004-08-23 00:15:46 +00:00
break ;
2016-10-22 07:06:51 +00:00
2023-09-11 09:31:09 +00:00
case 21 :
2016-10-22 07:06:51 +00:00
if ( cls . protocol_q2 = = PROTOCOL_VERSION_R1Q2 | | cls . protocol_q2 = = PROTOCOL_VERSION_Q2PRO )
2023-09-11 09:31:09 +00:00
//case svcr1q2_zpacket: //r1q2, just try to ignore it.
2016-10-22 07:06:51 +00:00
CLQ2_ParseZPacket ( ) ;
2023-09-11 09:31:09 +00:00
else if ( cls . protocol_q2 = = PROTOCOL_VERSION_Q2EX )
{
//case svcq2ex_splitclient:
seat = MSG_ReadByte ( ) - 1 ;
goto seatedcommand ;
}
2016-10-22 07:06:51 +00:00
else
2023-09-11 09:31:09 +00:00
goto isillegible ;
2016-10-22 07:06:51 +00:00
break ;
2023-09-11 09:31:09 +00:00
case 22 :
2016-10-22 07:06:51 +00:00
if ( cls . protocol_q2 = = PROTOCOL_VERSION_R1Q2 | | cls . protocol_q2 = = PROTOCOL_VERSION_Q2PRO )
2023-09-11 09:31:09 +00:00
//case svcr1q2_zdownload:
2016-10-22 07:06:51 +00:00
CL_ParseDownload ( true ) ;
2023-09-11 09:31:09 +00:00
else if ( cls . protocol_q2 = = PROTOCOL_VERSION_Q2EX )
//case svcq2ex_configblast:
CLQ2EX_ParseBlast ( CLQ2_ParseConfigString ) ;
2016-10-22 07:06:51 +00:00
else
2023-09-11 09:31:09 +00:00
goto isillegible ;
2016-10-22 07:06:51 +00:00
break ;
2023-09-11 09:31:09 +00:00
case 23 :
2016-10-22 07:06:51 +00:00
if ( cls . protocol_q2 = = PROTOCOL_VERSION_R1Q2 )
2023-09-11 09:31:09 +00:00
//case svcr1q2_playerupdate:
2016-10-22 07:06:51 +00:00
CLR1Q2_ParsePlayerUpdate ( ) ;
2023-09-11 09:31:09 +00:00
else if ( cls . protocol_q2 = = PROTOCOL_VERSION_Q2EX )
//case svcq2ex_spawnbaselineblast:
CLQ2EX_ParseBlast ( CLQ2_ParseBaseline ) ;
2016-10-22 07:06:51 +00:00
else
2023-09-11 09:31:09 +00:00
goto isillegible ;
2016-10-22 07:06:51 +00:00
break ;
2023-09-11 09:31:09 +00:00
case 24 :
2016-10-22 07:06:51 +00:00
if ( cls . protocol_q2 = = PROTOCOL_VERSION_R1Q2 )
2023-09-11 09:31:09 +00:00
//case svcr1q2_setting:
2016-10-22 07:06:51 +00:00
CLR1Q2_ParseSetting ( ) ;
2023-09-11 09:31:09 +00:00
else if ( cls . protocol_q2 = = PROTOCOL_VERSION_Q2EX )
//case svcq2ex_levelrestart:
CLQ2EX_ParseLevelRestart ( ) ;
else
goto isillegible ;
break ;
case 25 :
if ( cls . protocol_q2 = = PROTOCOL_VERSION_Q2EX )
//case svcq2ex_danage:
CLQ2EX_ParseDamage ( seat ) ;
else
goto isillegible ;
break ;
case 26 :
if ( cls . protocol_q2 = = PROTOCOL_VERSION_Q2EX )
//case svcq2ex_locprint:
CLQ2EX_LocPrint ( seat ) ;
else
goto isillegible ;
break ;
case 27 :
if ( cls . protocol_q2 = = PROTOCOL_VERSION_Q2EX )
//case svcq2ex_fog:
CLQ2EX_ParseFog ( ) ;
else
goto isillegible ;
break ;
case 28 :
if ( cls . protocol_q2 = = PROTOCOL_VERSION_Q2EX )
//case svcq2ex_waiting:
MSG_ReadByte ( ) ; //number of players remaining
else
goto isillegible ;
break ;
case 29 :
if ( cls . protocol_q2 = = PROTOCOL_VERSION_Q2EX )
{
//case svcq2ex_botchat:
MSG_ReadString ( ) ;
MSG_ReadUInt16 ( ) ;
MSG_ReadString ( ) ;
}
else
goto isillegible ;
break ;
case 30 :
if ( cls . protocol_q2 = = PROTOCOL_VERSION_Q2EX )
{
//case svcq2ex_mapmarker:
vec3_t pos ;
/*id=*/ MSG_ReadUInt16 ( ) ;
/*time=*/ MSG_ReadUInt16 ( ) ;
MSG_ReadPos ( pos ) ;
/*image=*/ MSG_ReadUInt16 ( ) ;
/*paltint=*/ MSG_ReadByte ( ) ;
/*flags=*/ MSG_ReadByte ( ) ;
}
else
goto isillegible ;
break ;
case 31 :
if ( cls . protocol_q2 = = PROTOCOL_VERSION_Q2EX )
//case svcq2ex_routemarker:
CLQ2EX_ParseRouteMarker ( ) ;
else
goto isillegible ;
break ;
case 32 :
if ( cls . protocol_q2 = = PROTOCOL_VERSION_Q2EX )
//case svcq2ex_muzzleflash3:
CLQ2EX_ParseMuzzleFlash3 ( ) ;
else
goto isillegible ;
break ;
case 33 :
if ( cls . protocol_q2 = = PROTOCOL_VERSION_Q2EX )
//case svcq2ex_achievement:
Con_Printf ( " ACHIEVEMENT! %s \n " , MSG_ReadString ( ) ) ;
2016-10-22 07:06:51 +00:00
else
2023-09-11 09:31:09 +00:00
goto isillegible ;
2016-10-22 07:06:51 +00:00
break ;
2004-08-23 00:15:46 +00:00
}
2023-09-11 09:31:09 +00:00
last = cmd ;
2004-08-23 00:15:46 +00:00
}
CL_SetSolidEntities ( ) ;
2016-01-18 05:22:07 +00:00
if ( cls . demohadkeyframe )
CL_WriteDemoMessage ( & net_message , startpos ) ; //FIXME: incomplete frames might be awkward
2004-08-23 00:15:46 +00:00
}
# endif
# ifdef NQPROT
2005-10-16 03:53:31 +00:00
//Proquake specific stuff
# define pqc_nop 1
# define pqc_new_team 2
# define pqc_erase_team 3
# define pqc_team_frags 4
# define pqc_match_time 5
# define pqc_match_reset 6
# define pqc_ping_times 7
2016-07-12 00:40:13 +00:00
static int MSG_ReadBytePQ ( char * * s )
2005-10-16 03:53:31 +00:00
{
int ret = ( * s ) [ 0 ] * 16 + ( * s ) [ 1 ] - 272 ;
* s + = 2 ;
return ret ;
}
2016-07-12 00:40:13 +00:00
static int MSG_ReadShortPQ ( char * * s )
2005-10-16 03:53:31 +00:00
{
return MSG_ReadBytePQ ( s ) * 256 + MSG_ReadBytePQ ( s ) ;
}
2016-07-12 00:40:13 +00:00
static char * CLNQ_ParseProQuakeMessage ( char * s )
2005-10-16 03:53:31 +00:00
{
2005-11-30 01:20:53 +00:00
int cmd ;
int ping ;
2010-11-21 03:39:12 +00:00
int team , shirt , frags ;
2005-10-16 03:53:31 +00:00
s + + ;
cmd = * s + + ;
2005-11-26 03:02:55 +00:00
2005-10-16 03:53:31 +00:00
switch ( cmd )
{
default :
Con_DPrintf ( " Unrecognised ProQuake Message %i \n " , cmd ) ;
break ;
2010-11-21 03:39:12 +00:00
case pqc_new_team :
cl . teamplay = true ;
team = MSG_ReadBytePQ ( & s ) - 16 ;
shirt = MSG_ReadBytePQ ( & s ) - 16 ;
Sbar_PQ_Team_New ( team , shirt ) ;
2005-10-16 03:53:31 +00:00
break ;
case pqc_erase_team :
2010-11-21 03:39:12 +00:00
team = MSG_ReadBytePQ ( & s ) - 16 ;
Sbar_PQ_Team_New ( team , 0 ) ;
Sbar_PQ_Team_Frags ( team , 0 ) ;
2005-10-16 03:53:31 +00:00
break ;
case pqc_team_frags :
2010-11-21 03:39:12 +00:00
team = MSG_ReadBytePQ ( & s ) - 16 ;
frags = MSG_ReadShortPQ ( & s ) ;
2005-10-16 03:53:31 +00:00
if ( frags & 32768 )
frags = frags - 65536 ;
2010-11-21 03:39:12 +00:00
Sbar_PQ_Team_Frags ( team , frags ) ;
2005-11-26 03:02:55 +00:00
break ;
2005-10-16 03:53:31 +00:00
case pqc_match_time :
2015-06-14 01:28:01 +00:00
cl . matchgametimestart = MSG_ReadBytePQ ( & s ) * 60 ;
cl . matchgametimestart + = MSG_ReadBytePQ ( & s ) ;
cl . matchgametimestart = cl . gametime - cl . matchgametimestart ;
2005-10-16 03:53:31 +00:00
break ;
case pqc_match_reset :
2010-11-21 03:39:12 +00:00
Sbar_PQ_Team_Reset ( ) ;
2005-10-16 03:53:31 +00:00
break ;
2010-11-21 03:39:12 +00:00
2005-10-16 03:53:31 +00:00
case pqc_ping_times :
2011-12-05 15:23:40 +00:00
cl . last_ping_request = realtime ;
2005-10-16 03:53:31 +00:00
while ( ( ping = MSG_ReadShortPQ ( & s ) ) )
{
if ( ( ping / 4096 ) > = MAX_CLIENTS )
Host_Error ( " CL_ParseProQuakeMessage: pqc_ping_times > MAX_CLIENTS " ) ;
cl . players [ ping / 4096 ] . ping = ping & 4095 ;
}
break ;
}
2016-07-12 00:40:13 +00:00
return s ;
2005-10-16 03:53:31 +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
static qboolean CLNQ_ParseNQPrints ( char * s )
2010-08-16 02:03:02 +00:00
{
int i ;
char * start = s ;
2022-01-16 18:41:44 +00:00
if ( ! strcmp ( s , " Client ping times: \n " ) & & ! cls . qex )
2017-01-24 10:27:39 +00:00
{
cl . nqparseprint = CLNQPP_PINGS ;
return true ;
}
else if ( cl . nqparseprint = = CLNQPP_PINGS )
2010-08-16 02:03:02 +00:00
{
char * pingstart ;
2017-01-24 10:27:39 +00:00
cl . nqparseprint = CLNQPP_NONE ;
2010-08-16 02:03:02 +00:00
while ( * s = = ' ' )
s + + ;
pingstart = s ;
if ( * s = = ' - ' )
s + + ;
if ( * s > = ' 0 ' & & * s < = ' 9 ' )
2010-12-23 08:53:23 +00:00
{
2010-08-16 02:03:02 +00:00
while ( * s > = ' 0 ' & & * s < = ' 9 ' )
s + + ;
2013-03-12 22:35:33 +00:00
if ( * s = = ' ' & & s - start > = 3 )
2010-08-16 02:03:02 +00:00
{
s + + ;
start = s ;
s = strchr ( s , ' \n ' ) ;
if ( ! s )
return false ;
* s = 0 ;
2013-10-29 17:38:22 +00:00
for ( i = 0 ; i < cl . allocated_client_slots ; i + + )
2010-08-16 02:03:02 +00:00
{
if ( ! strcmp ( start , cl . players [ i ] . name ) )
break ;
}
2013-10-29 17:38:22 +00:00
if ( i = = cl . allocated_client_slots )
2010-08-16 02:03:02 +00:00
{
}
2013-10-29 17:38:22 +00:00
if ( i ! = cl . allocated_client_slots )
2010-08-16 02:03:02 +00:00
{
cl . players [ i ] . ping = atoi ( pingstart ) ;
}
2017-01-24 10:27:39 +00:00
cl . nqparseprint = CLNQPP_PINGS ;
2010-08-16 02:03:02 +00:00
return true ;
}
}
s = start ;
}
2022-01-16 18:41:44 +00:00
if ( ! strncmp ( s , " host: " , 9 ) & & ! cls . qex )
2010-08-16 02:03:02 +00:00
{
2017-01-24 10:27:39 +00:00
cl . nqparseprint = CLNQPP_STATUS ;
return cls . nqexpectingstatusresponse ;
}
else if ( cl . nqparseprint = = CLNQPP_STATUS )
{
if ( ! strncmp ( s , " players: " , 9 ) )
{
cl . nqparseprint = CLNQPP_STATUSPLAYER ;
return cls . nqexpectingstatusresponse ;
}
else if ( strchr ( s , ' : ' ) )
return cls . nqexpectingstatusresponse ;
cl . nqparseprint = CLNQPP_NONE ; //error of some kind...
cls . nqexpectingstatusresponse = false ;
}
if ( cl . nqparseprint = = CLNQPP_STATUSPLAYER )
{
if ( * s = = ' # ' )
{
cl . nqparseprint = CLNQPP_STATUSPLAYERIP ;
cl . nqparseprintplayer = atoi ( s + 1 ) - 1 ;
if ( cl . nqparseprintplayer > = 0 & & cl . nqparseprintplayer < cl . allocated_client_slots )
return cls . nqexpectingstatusresponse ;
}
cl . nqparseprint = CLNQPP_NONE ; //error of some kind...
cls . nqexpectingstatusresponse = false ;
}
if ( cl . nqparseprint = = CLNQPP_STATUSPLAYERIP )
{
if ( ! strncmp ( s , " " , 3 ) )
{
while ( * s = = ' ' )
s + + ;
COM_ParseOut ( s , cl . players [ cl . nqparseprintplayer ] . ip , sizeof ( cl . players [ cl . nqparseprintplayer ] . ip ) ) ;
IPLog_Add ( cl . players [ cl . nqparseprintplayer ] . ip , cl . players [ cl . nqparseprintplayer ] . name ) ;
if ( * cl . players [ cl . nqparseprintplayer ] . ip ! = ' [ ' & & * cl . players [ cl . nqparseprintplayer ] . ip < ' 0 ' & & * cl . players [ cl . nqparseprintplayer ] . ip > ' 9 ' )
* cl . players [ cl . nqparseprintplayer ] . ip = 0 ; //non-numeric addresses are not useful.
cl . nqparseprint = CLNQPP_STATUSPLAYER ;
return cls . nqexpectingstatusresponse ;
}
cl . nqparseprint = CLNQPP_NONE ; //error of some kind...
cls . nqexpectingstatusresponse = false ;
2010-08-16 02:03:02 +00:00
}
return false ;
}
2005-10-16 03:53:31 +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
static void CLNQ_CheckPlayerIsSpectator ( int i )
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
{
cl . players [ i ] . spectator =
( cl . players [ i ] . frags = = - 999 ) | | //DP mods tend to use -999
( cl . players [ i ] . frags = = - 99 ) ; //crmod uses -99 for spectators, which is annoying.
//we can't add any colour checks, as apparently this fucks up too.
if ( ! * cl . players [ i ] . name )
cl . players [ i ] . spectator = false ;
}
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
# ifdef HEXEN2
# define svch2_particle2 34
# define svch2_cutscene 35
# define svch2_midiname 36
# define svch2_updateclass 37
# define svch2_particle3 38
# define svch2_particle4 39
# define svch2_setviewflags 40
# define svch2_clearviewflags 41
# define svch2_starteffect 42
# define svch2_endeffect 43
# define svch2_plaque 44
# define svch2_particleexplosion 45
# define svch2_setviewtint 46
# define svch2_ref 47
# define svch2_clearedicts 48
# define svch2_updateinv 49
# define svch2_setanglelerp 50
# define svch2_updatekoth 51
# define svch2_togglestatbar 52
# define svch2_soundpos 53
static qboolean CLH2_ParseServerSubMessage ( int cmd )
{
const int destsplit = 0 ;
int i , j ;
const int svch2_first = svch2_particle2 ;
static const char * svc_h2strings [ ] =
{
" h2_particle2 " ,
" h2_cutscene " ,
" h2_midiname " ,
" h2_updateclass " ,
" h2_particle3 " ,
" h2_particle4 " ,
" h2_setviewflags " ,
" h2_clearviewflags " ,
" h2_starteffect " ,
" h2_endeffect " ,
" h2_plaque " ,
" h2_particleexplosion " ,
" h2_setviewtint " ,
" h2_ref " ,
" h2_clearedicts " ,
" h2_updateinv " ,
" h2_setanglelerp " ,
" h2_updatekoth " ,
" h2_togglestatbar " ,
" h2_soundpos " ,
} ;
//no fastupdate checks needed here.
SHOWNET2 ( ( cmd > = svch2_first & & cmd < svch2_first + countof ( svc_h2strings ) ) ? svc_h2strings [ cmd - svch2_first ] : svc_nqstrings [ cmd > ( sizeof ( svc_nqstrings ) / sizeof ( char * ) ) ? 0 : cmd ] , cmd ) ;
switch ( cmd )
{
case svch2_midiname :
MSG_ReadString ( ) ;
break ;
case svch2_particle2 :
CL_ParseParticleEffect2 ( ) ;
break ;
case svch2_particle3 :
CL_ParseParticleEffect3 ( ) ;
break ;
case svch2_particle4 :
CL_ParseParticleEffect4 ( ) ;
break ;
case svch2_starteffect :
i = MSG_ReadByte ( ) ; //handle
j = MSG_ReadByte ( ) ; //type
switch ( j )
{
case 1 /*ce_rain*/ :
MSG_ReadCoord ( ) ;
MSG_ReadCoord ( ) ;
MSG_ReadCoord ( ) ;
MSG_ReadCoord ( ) ;
MSG_ReadCoord ( ) ;
MSG_ReadCoord ( ) ;
MSG_ReadCoord ( ) ;
MSG_ReadCoord ( ) ;
MSG_ReadCoord ( ) ;
MSG_ReadCoord ( ) ;
MSG_ReadCoord ( ) ;
MSG_ReadCoord ( ) ;
MSG_ReadShort ( ) ;
MSG_ReadShort ( ) ;
MSG_ReadFloat ( ) ;
break ;
case 4 /*ce_white_smoke*/ :
MSG_ReadCoord ( ) ;
MSG_ReadCoord ( ) ;
MSG_ReadCoord ( ) ;
MSG_ReadFloat ( ) ;
MSG_ReadFloat ( ) ;
MSG_ReadFloat ( ) ;
MSG_ReadFloat ( ) ;
MSG_ReadFloat ( ) ;
break ;
case 5 /*ce_bluespark*/ :
case 6 /*ce_yellowspark*/ :
case 9 /*ce_sm_white_flash*/ :
case 13 /*ce_sm_blue_flash*/ :
case 15 /*ce_sm_explosion*/ :
case 16 /*ce_lg_explosion*/ :
case 17 /*ce_floor_explosion*/ :
case 19 /*ce_blue_explosion*/ :
case 32 /*ce_xbow_explosion*/ :
case 33 /*ce_new_explosion*/ :
case 34 /*ce_magic_missile_explosion*/ :
case 38 /*ce_teleporterpuffs*/ :
MSG_ReadCoord ( ) ;
MSG_ReadCoord ( ) ;
MSG_ReadCoord ( ) ;
break ;
case 39 /*ce_teleporterbody*/ :
MSG_ReadCoord ( ) ;
MSG_ReadCoord ( ) ;
MSG_ReadCoord ( ) ;
MSG_ReadFloat ( ) ;
MSG_ReadFloat ( ) ;
MSG_ReadFloat ( ) ;
MSG_ReadFloat ( ) ;
break ;
case 40 /*ce_boneshard*/ :
MSG_ReadCoord ( ) ;
MSG_ReadCoord ( ) ;
MSG_ReadCoord ( ) ;
MSG_ReadFloat ( ) ;
MSG_ReadFloat ( ) ;
MSG_ReadFloat ( ) ;
MSG_ReadFloat ( ) ;
MSG_ReadFloat ( ) ;
MSG_ReadFloat ( ) ;
MSG_ReadFloat ( ) ;
MSG_ReadFloat ( ) ;
MSG_ReadFloat ( ) ;
break ;
case 43 /*ce_snow*/ :
MSG_ReadCoord ( ) ;
MSG_ReadCoord ( ) ;
MSG_ReadCoord ( ) ;
MSG_ReadCoord ( ) ;
MSG_ReadCoord ( ) ;
MSG_ReadCoord ( ) ;
MSG_ReadByte ( ) ;
MSG_ReadCoord ( ) ;
MSG_ReadCoord ( ) ;
MSG_ReadCoord ( ) ;
MSG_ReadByte ( ) ;
break ;
case 55 /*ce_chunk*/ :
MSG_ReadCoord ( ) ;
MSG_ReadCoord ( ) ;
MSG_ReadCoord ( ) ;
MSG_ReadByte ( ) ;
MSG_ReadCoord ( ) ;
MSG_ReadCoord ( ) ;
MSG_ReadCoord ( ) ;
MSG_ReadByte ( ) ;
break ;
default :
Host_EndGame ( " svch2_starteffect: unknown type %i " , j ) ;
return false ;
}
break ;
case svch2_endeffect :
MSG_ReadByte ( ) ; //handle
break ;
case svch2_updateclass :
i = MSG_ReadByte ( ) ;
j = MSG_ReadByte ( ) ;
if ( i < MAX_CLIENTS )
InfoBuf_SetValueForKey ( & cl . players [ i ] . userinfo , " cl_playerclass " , va ( " %i " , j ) ) ;
break ;
case svch2_updateinv :
cmd = MSG_ReadByte ( ) ;
i = j = 0 ;
if ( cmd & ( 1 < < 0 ) ) i | = MSG_ReadByte ( ) < < 0 ;
if ( cmd & ( 1 < < 1 ) ) i | = MSG_ReadByte ( ) < < 8 ;
if ( cmd & ( 1 < < 2 ) ) i | = MSG_ReadByte ( ) < < 16 ;
if ( cmd & ( 1 < < 3 ) ) i | = MSG_ReadByte ( ) < < 24 ;
if ( cmd & ( 1 < < 4 ) ) j | = MSG_ReadByte ( ) < < 0 ;
if ( cmd & ( 1 < < 5 ) ) j | = MSG_ReadByte ( ) < < 8 ;
if ( cmd & ( 1 < < 6 ) ) j | = MSG_ReadByte ( ) < < 16 ;
if ( cmd & ( 1 < < 7 ) ) j | = MSG_ReadByte ( ) < < 24 ;
if ( i & ( 1u < < 0 ) ) CL_SetStatInt ( destsplit , STAT_HEALTH , MSG_ReadShort ( ) ) ;
if ( i & ( 1u < < 1 ) ) CL_SetStatInt ( destsplit , STAT_H2_LEVEL , MSG_ReadByte ( ) ) ;
if ( i & ( 1u < < 2 ) ) CL_SetStatInt ( destsplit , STAT_H2_INTELLIGENCE , MSG_ReadByte ( ) ) ;
if ( i & ( 1u < < 3 ) ) CL_SetStatInt ( destsplit , STAT_H2_WISDOM , MSG_ReadByte ( ) ) ;
if ( i & ( 1u < < 4 ) ) CL_SetStatInt ( destsplit , STAT_H2_STRENGTH , MSG_ReadByte ( ) ) ;
if ( i & ( 1u < < 5 ) ) CL_SetStatInt ( destsplit , STAT_H2_DEXTERITY , MSG_ReadByte ( ) ) ;
if ( i & ( 1u < < 6 ) ) CL_SetStatInt ( destsplit , STAT_ACTIVEWEAPON , MSG_ReadByte ( ) ) ;
if ( i & ( 1u < < 7 ) ) CL_SetStatInt ( destsplit , STAT_H2_BLUEMANA , MSG_ReadByte ( ) ) ;
if ( i & ( 1u < < 8 ) ) CL_SetStatInt ( destsplit , STAT_H2_GREENMANA , MSG_ReadByte ( ) ) ;
if ( i & ( 1u < < 9 ) ) CL_SetStatInt ( destsplit , STAT_H2_EXPERIENCE , MSG_ReadLong ( ) ) ;
if ( i & ( 1u < < 10 ) ) CL_SetStatInt ( destsplit , STAT_H2_CNT_TORCH , MSG_ReadByte ( ) ) ;
if ( i & ( 1u < < 11 ) ) CL_SetStatInt ( destsplit , STAT_H2_CNT_H_BOOST , MSG_ReadByte ( ) ) ;
if ( i & ( 1u < < 12 ) ) CL_SetStatInt ( destsplit , STAT_H2_CNT_SH_BOOST , MSG_ReadByte ( ) ) ;
if ( i & ( 1u < < 13 ) ) CL_SetStatInt ( destsplit , STAT_H2_CNT_MANA_BOOST , MSG_ReadByte ( ) ) ;
if ( i & ( 1u < < 14 ) ) CL_SetStatInt ( destsplit , STAT_H2_CNT_TELEPORT , MSG_ReadByte ( ) ) ;
if ( i & ( 1u < < 15 ) ) CL_SetStatInt ( destsplit , STAT_H2_CNT_TOME , MSG_ReadByte ( ) ) ;
if ( i & ( 1u < < 16 ) ) CL_SetStatInt ( destsplit , STAT_H2_CNT_SUMMON , MSG_ReadByte ( ) ) ;
if ( i & ( 1u < < 17 ) ) CL_SetStatInt ( destsplit , STAT_H2_CNT_INVISIBILITY , MSG_ReadByte ( ) ) ;
if ( i & ( 1u < < 18 ) ) CL_SetStatInt ( destsplit , STAT_H2_CNT_GLYPH , MSG_ReadByte ( ) ) ;
if ( i & ( 1u < < 19 ) ) CL_SetStatInt ( destsplit , STAT_H2_CNT_HASTE , MSG_ReadByte ( ) ) ;
if ( i & ( 1u < < 20 ) ) CL_SetStatInt ( destsplit , STAT_H2_CNT_BLAST , MSG_ReadByte ( ) ) ;
if ( i & ( 1u < < 21 ) ) CL_SetStatInt ( destsplit , STAT_H2_CNT_POLYMORPH , MSG_ReadByte ( ) ) ;
if ( i & ( 1u < < 22 ) ) CL_SetStatInt ( destsplit , STAT_H2_CNT_FLIGHT , MSG_ReadByte ( ) ) ;
if ( i & ( 1u < < 23 ) ) CL_SetStatInt ( destsplit , STAT_H2_CNT_CUBEOFFORCE , MSG_ReadByte ( ) ) ;
if ( i & ( 1u < < 24 ) ) CL_SetStatInt ( destsplit , STAT_H2_CNT_INVINCIBILITY , MSG_ReadByte ( ) ) ;
if ( i & ( 1u < < 25 ) ) CL_SetStatFloat ( destsplit , STAT_H2_ARTIFACT_ACTIVE , MSG_ReadFloat ( ) ) ;
if ( i & ( 1u < < 26 ) ) CL_SetStatFloat ( destsplit , STAT_H2_ARTIFACT_LOW , MSG_ReadFloat ( ) ) ;
if ( i & ( 1u < < 27 ) ) CL_SetStatInt ( destsplit , STAT_H2_MOVETYPE , MSG_ReadByte ( ) ) ;
if ( i & ( 1u < < 28 ) ) CL_SetStatInt ( destsplit , STAT_H2_CAMERAMODE , MSG_ReadByte ( ) ) ;
if ( i & ( 1u < < 29 ) ) CL_SetStatFloat ( destsplit , STAT_H2_HASTED , MSG_ReadFloat ( ) ) ;
if ( i & ( 1u < < 30 ) ) CL_SetStatInt ( destsplit , STAT_H2_INVENTORY , MSG_ReadByte ( ) ) ;
if ( i & ( 1u < < 31 ) ) CL_SetStatFloat ( destsplit , STAT_H2_RINGS_ACTIVE , MSG_ReadFloat ( ) ) ;
if ( j & ( 1u < < 0 ) ) CL_SetStatFloat ( destsplit , STAT_H2_RINGS_LOW , MSG_ReadFloat ( ) ) ;
if ( j & ( 1u < < 1 ) ) CL_SetStatInt ( destsplit , STAT_H2_ARMOUR1 , MSG_ReadByte ( ) ) ;
if ( j & ( 1u < < 2 ) ) CL_SetStatInt ( destsplit , STAT_H2_ARMOUR2 , MSG_ReadByte ( ) ) ;
if ( j & ( 1u < < 3 ) ) CL_SetStatInt ( destsplit , STAT_H2_ARMOUR3 , MSG_ReadByte ( ) ) ;
if ( j & ( 1u < < 4 ) ) CL_SetStatInt ( destsplit , STAT_H2_ARMOUR4 , MSG_ReadByte ( ) ) ;
if ( j & ( 1u < < 5 ) ) CL_SetStatInt ( destsplit , STAT_H2_FLIGHT_T , MSG_ReadByte ( ) ) ;
if ( j & ( 1u < < 6 ) ) CL_SetStatInt ( destsplit , STAT_H2_WATER_T , MSG_ReadByte ( ) ) ;
if ( j & ( 1u < < 7 ) ) CL_SetStatInt ( destsplit , STAT_H2_TURNING_T , MSG_ReadByte ( ) ) ;
if ( j & ( 1u < < 8 ) ) CL_SetStatInt ( destsplit , STAT_H2_REGEN_T , MSG_ReadByte ( ) ) ;
if ( j & ( 1u < < 9 ) ) /*CL_SetStatFloat(destsplit, STAT_H2_HASTE_T,*/ ( MSG_ReadFloat ( ) ) ;
if ( j & ( 1u < < 10 ) ) /*CL_SetStatFloat(destsplit, STAT_H2_TOMB_T,*/ ( MSG_ReadFloat ( ) ) ;
if ( j & ( 1u < < 11 ) ) CL_SetStatString ( destsplit , STAT_H2_PUZZLE1 , MSG_ReadString ( ) ) ;
if ( j & ( 1u < < 12 ) ) CL_SetStatString ( destsplit , STAT_H2_PUZZLE2 , MSG_ReadString ( ) ) ;
if ( j & ( 1u < < 13 ) ) CL_SetStatString ( destsplit , STAT_H2_PUZZLE3 , MSG_ReadString ( ) ) ;
if ( j & ( 1u < < 14 ) ) CL_SetStatString ( destsplit , STAT_H2_PUZZLE4 , MSG_ReadString ( ) ) ;
if ( j & ( 1u < < 15 ) ) CL_SetStatString ( destsplit , STAT_H2_PUZZLE5 , MSG_ReadString ( ) ) ;
if ( j & ( 1u < < 16 ) ) CL_SetStatString ( destsplit , STAT_H2_PUZZLE6 , MSG_ReadString ( ) ) ;
if ( j & ( 1u < < 17 ) ) CL_SetStatString ( destsplit , STAT_H2_PUZZLE7 , MSG_ReadString ( ) ) ;
if ( j & ( 1u < < 18 ) ) CL_SetStatString ( destsplit , STAT_H2_PUZZLE8 , MSG_ReadString ( ) ) ;
if ( j & ( 1u < < 19 ) ) CL_SetStatInt ( destsplit , STAT_H2_MAXHEALTH , MSG_ReadShort ( ) ) ;
if ( j & ( 1u < < 20 ) ) CL_SetStatInt ( destsplit , STAT_H2_MAXMANA , MSG_ReadByte ( ) ) ;
if ( j & ( 1u < < 21 ) ) CL_SetStatFloat ( destsplit , STAT_H2_FLAGS , MSG_ReadFloat ( ) ) ;
if ( j & ( 1u < < 22 ) ) CL_SetStatInt ( destsplit , STAT_H2_OBJECTIVE1 , MSG_ReadLong ( ) ) ;
if ( j & ( 1u < < 23 ) ) CL_SetStatInt ( destsplit , STAT_H2_OBJECTIVE2 , MSG_ReadLong ( ) ) ;
//if (j & (1u<<24)) CL_SetStat(destsplit, STAT_H2_, MSG_Read());
//if (j & (1u<<25)) CL_SetStat(destsplit, STAT_H2_, MSG_Read());
//if (j & (1u<<26)) CL_SetStat(destsplit, STAT_H2_, MSG_Read());
//if (j & (1u<<27)) CL_SetStat(destsplit, STAT_H2_, MSG_Read());
//if (j & (1u<<28)) CL_SetStat(destsplit, STAT_H2_, MSG_Read());
//if (j & (1u<<29)) CL_SetStat(destsplit, STAT_H2_, MSG_Read());
//if (j & (1u<<30)) CL_SetStat(destsplit, STAT_H2_, MSG_Read());
//if (j & (1u<<31)) CL_SetStat(destsplit, STAT_H2_, MSG_Read());
break ;
case svch2_ref :
if ( cls . signon = = 4 - 1 )
{ // first update is the final signon stage
cls . signon = 4 ;
CLNQ_SignonReply ( ) ;
}
CLH2_ParseEntities ( ) ;
break ;
case svch2_clearedicts : //should have been handled by CLH2_ParseEntities (this also applies to fastupdates)
Host_EndGame ( " CLNQ_ParseServerMessage: Unexpected server message (%i@%i) " , cmd , MSG_GetReadCount ( ) - 1 ) ;
return false ;
case svch2_togglestatbar :
break ; //wtf
case svch2_setanglelerp : //urgh... demo playback has its own angle values, and with greater precision.
MSG_ReadAngle ( ) ;
MSG_ReadAngle ( ) ;
MSG_ReadAngle ( ) ;
break ;
case svch2_cutscene :
case svch2_setviewflags :
case svch2_clearviewflags :
case svch2_plaque :
case svch2_particleexplosion :
case svch2_setviewtint :
case svch2_updatekoth :
case svch2_soundpos :
//we're only aiming for demo compat, so we ignore this tat.
Host_EndGame ( " CLH2_ParseServerMessage: Unimplemented server message (%i@%i) " , cmd , MSG_GetReadCount ( ) - 1 ) ;
return false ;
default :
return false ;
}
return true ; //handled.
}
# endif
2004-08-23 00:15:46 +00:00
void CLNQ_ParseServerMessage ( void )
{
2013-06-23 02:17:02 +00:00
const int destsplit = 0 ;
2004-08-23 00:15:46 +00:00
int cmd ;
char * s ;
int i , j ;
2017-08-14 16:38:44 +00:00
vec3_t ang ;
2024-04-25 05:57:34 +00:00
unsigned int cmdstart ;
2004-08-23 00:15:46 +00:00
// cl.last_servermessage = realtime;
CL_ClearProjectiles ( ) ;
//
// if recording demos, copy the message out
//
if ( cl_shownet . value = = 1 )
2013-11-29 14:36:47 +00:00
Con_Printf ( " %i " , net_message . cursize ) ;
2023-04-14 01:51:39 +00:00
else if ( cl_shownet . value > = 2 )
2013-11-29 14:36:47 +00:00
Con_Printf ( " ------------------ \n " ) ;
2004-08-23 00:15:46 +00:00
//
// parse the message
//
while ( 1 )
{
if ( msg_badread )
{
2006-02-12 20:20:01 +00:00
CL_DumpPacket ( ) ;
2004-08-23 00:15:46 +00:00
Host_EndGame ( " CL_ParseServerMessage: Bad server message " ) ;
break ;
}
2024-04-25 05:57:34 +00:00
cmdstart = MSG_GetReadCount ( ) ;
2004-08-23 00:15:46 +00:00
cmd = MSG_ReadByte ( ) ;
if ( cmd = = - 1 )
{
2022-03-08 05:34:26 +00:00
SHOWNETEOM ( " END OF MESSAGE " ) ;
2004-08-23 00:15:46 +00:00
break ;
}
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
# ifdef HEXEN2
if ( cls . protocol_nq = = CPNQ_H2MP )
2004-08-23 00:15:46 +00:00
{
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
if ( CLH2_ParseServerSubMessage ( cmd ) )
2024-04-25 05:57:34 +00:00
{
packetusage_pending [ cmd ] + = MSG_GetReadCount ( ) - cmdstart ;
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
continue ;
2024-04-25 05:57:34 +00:00
}
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
//handle as a regular nq packet.
2004-08-23 00:15:46 +00:00
}
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
else
# endif
{
if ( cmd & 128 )
{
SHOWNET ( " fast update " ) ;
CLNQ_ParseEntity ( cmd & 127 ) ;
2024-04-25 05:57:34 +00:00
packetusage_pending [ 128 ] + = MSG_GetReadCount ( ) - cmdstart ;
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
continue ;
}
2004-08-23 00:15:46 +00:00
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
SHOWNET2 ( svc_nqstrings [ cmd > ( sizeof ( svc_nqstrings ) / sizeof ( char * ) ) ? 0 : cmd ] , cmd ) ;
}
2005-09-26 03:40:09 +00:00
2004-08-23 00:15:46 +00:00
// other commands
switch ( cmd )
{
default :
2022-01-16 18:41:44 +00:00
badsvc :
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
case svc_bad :
2006-02-12 20:20:01 +00:00
CL_DumpPacket ( ) ;
2022-03-08 05:34:26 +00:00
Host_EndGame ( " CLNQ_ParseServerMessage: Illegible server message (%i@%i) " , cmd , MSG_GetReadCount ( ) - 1 ) ;
2004-08-23 00:15:46 +00:00
return ;
2005-09-26 03:40:09 +00:00
2004-08-23 00:15:46 +00:00
case svc_nop :
// Con_Printf ("svc_nop\n");
2005-09-26 03:40:09 +00:00
break ;
2004-08-23 00:15:46 +00:00
case svc_print :
2022-08-19 13:30:16 +00:00
s = MSG_ReadString ( ) ;
//fallthrough...
2022-01-16 18:41:44 +00:00
svcprint :
2004-09-30 22:42:34 +00:00
if ( * s = = 1 | | * s = = 2 )
2016-07-26 11:47:59 +00:00
{
//FIXME: should be using the first char of the line, not the first char of the last segment.
2015-04-14 23:12:17 +00:00
CL_ParsePrint ( s + 1 , PRINT_CHAT ) ;
2016-07-26 11:47:59 +00:00
}
2015-04-14 23:12:17 +00:00
else if ( CLNQ_ParseNQPrints ( s ) )
break ;
2004-09-30 22:42:34 +00:00
else
2015-04-14 23:12:17 +00:00
CL_ParsePrint ( s , PRINT_HIGH ) ;
2004-08-23 00:15:46 +00:00
break ;
case svc_disconnect :
2018-12-06 04:55:35 +00:00
CL_Disconnect ( " Server disconnected " ) ;
2013-07-26 17:19:06 +00:00
return ;
2005-09-26 03:40:09 +00:00
2004-08-23 00:15:46 +00:00
case svc_centerprint :
2022-08-19 13:30:16 +00:00
s = MSG_ReadString ( ) ;
svccentreprint :
2006-01-13 06:27:18 +00:00
# ifdef PLUGINS
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
if ( Plug_CenterPrintMessage ( s , destsplit ) )
2006-01-13 06:27:18 +00:00
# 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
SCR_CenterPrint ( destsplit , s , false ) ;
2004-08-23 00:15:46 +00:00
break ;
2005-09-26 03:40:09 +00:00
2004-08-23 00:15:46 +00:00
case svc_stufftext :
s = MSG_ReadString ( ) ;
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
CL_ParseStuffCmd ( s , destsplit ) ;
2004-08-23 00:15:46 +00:00
break ;
2013-07-26 17:19:06 +00:00
case svc_version :
CLNQ_ParseProtoVersion ( ) ;
break ;
2004-08-23 00:15:46 +00:00
case svc_serverdata :
2015-10-27 15:20:15 +00:00
if ( * printtext )
2016-07-12 00:40:13 +00:00
{ //work around a missing-eol issue.
2015-10-27 15:20:15 +00:00
CL_PrintStandardMessage ( printtext , PRINT_HIGH ) ;
printtext [ 0 ] = 0 ;
}
2004-08-23 00:15:46 +00:00
Cbuf_Execute ( ) ; // make sure any stuffed commands are done
CLNQ_ParseServerData ( ) ;
break ;
2005-05-26 12:55:34 +00:00
case svcdp_precache :
2022-01-16 18:41:44 +00:00
//also svcqex_levelcompleted
if ( cls . qex )
{ //svcqex_levelcompleted
//not really sure why this even exists.
MSG_ReadSkip ( 10 ) ;
MSG_ReadString ( ) ;
break ;
}
2005-05-26 12:55:34 +00:00
CL_ParsePrecache ( ) ;
2004-12-05 08:19:54 +00:00
break ;
2004-08-23 00:15:46 +00:00
case svc_cdtrack :
2013-10-08 16:29:54 +00:00
{
unsigned int firsttrack ;
unsigned int looptrack ;
firsttrack = MSG_ReadByte ( ) ;
looptrack = MSG_ReadByte ( ) ;
2023-06-25 00:42:11 +00:00
if ( cls . demotrack ! = - 1 )
firsttrack = looptrack = cls . demotrack ;
2013-10-08 16:29:54 +00:00
Media_NumberedTrack ( firsttrack , looptrack ) ;
}
2005-09-26 03:40:09 +00:00
break ;
2004-08-23 00:15:46 +00:00
case svc_setview :
2014-10-05 20:04:11 +00:00
i = MSGCL_ReadEntity ( ) ;
2013-06-23 02:17:02 +00:00
if ( ! cl . playerview [ destsplit ] . viewentity )
2006-01-28 19:04:13 +00:00
{
2015-01-12 12:28:13 +00:00
if ( ! i | | i > cl . allocated_client_slots )
cl . playerview [ destsplit ] . playernum = cl . allocated_client_slots ; //the mvd spectator slot.
else
cl . playerview [ destsplit ] . playernum = ( unsigned int ) i - 1 ;
2006-01-28 19:04:13 +00:00
}
2014-10-05 20:04:11 +00:00
cl . playerview [ destsplit ] . viewentity = i ;
2004-08-23 00:15:46 +00:00
break ;
2018-03-25 09:36:14 +00:00
case svcnq_signonnum :
2004-08-23 00:15:46 +00:00
i = MSG_ReadByte ( ) ;
if ( i < = cls . signon )
Host_EndGame ( " Received signon %i when at %i " , i , cls . signon ) ;
cls . signon = i ;
CLNQ_SignonReply ( ) ;
break ;
case svc_setpause :
cl . paused = MSG_ReadByte ( ) ;
2017-02-21 20:22:07 +00:00
// Media_SetPauseTrack(!!cl.paused);
2004-08-23 00:15:46 +00:00
break ;
case svc_spawnstaticsound :
2012-11-27 03:23:19 +00:00
CL_ParseStaticSound ( false ) ;
2004-08-23 00:15:46 +00:00
break ;
case svc_spawnstatic :
2017-01-16 08:13:51 +00:00
CL_ParseStaticProt ( CPNQ_ID ) ;
2004-08-23 00:15:46 +00:00
break ;
2005-09-26 03:40:09 +00:00
2004-08-23 00:15:46 +00:00
case svc_spawnbaseline :
------------------------------------------------------------------------
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
i = MSGCL_ReadEntity ( ) ;
2006-07-24 04:24:41 +00:00
if ( ! CL_CheckBaselines ( i ) )
2010-12-23 08:53:23 +00:00
Host_EndGame ( " CLNQ_ParseServerMessage: svc_spawnbaseline failed with size %i " , i ) ;
2016-07-12 00:40:13 +00:00
CL_ParseBaseline ( cl_baselines + i , CPNQ_ID ) ;
2004-08-23 00:15:46 +00:00
break ;
2013-03-12 22:35:33 +00:00
//PEXT_REPLACEMENTDELTAS
case svcfte_updateentities :
if ( cls . signon = = 4 - 1 )
{ // first update is the final signon stage
cls . signon = 4 ;
CLNQ_SignonReply ( ) ;
}
2017-08-29 02:29:06 +00:00
CL_ParseClientdata ( ) ;
2013-03-12 22:35:33 +00:00
CLFTE_ParseEntities ( ) ;
break ;
case svcfte_spawnstatic2 :
2017-01-18 11:34:44 +00:00
CL_ParseStaticProt ( - 1 ) ;
2013-03-12 22:35:33 +00:00
break ;
case svcfte_spawnbaseline2 :
2017-01-16 08:13:51 +00:00
CL_ParseBaselineDelta ( ) ;
2013-03-12 22:35:33 +00:00
break ;
2020-09-08 05:11:09 +00:00
case svcfte_cgamepacket_sized :
# ifdef CSQC_DAT
if ( CSQC_ParseGamePacket ( destsplit , true ) )
break ;
# endif
Con_Printf ( " Unable to parse gamecode packet \n " ) ;
break ;
2013-08-21 07:14:39 +00:00
case svcfte_cgamepacket :
# ifdef HLCLIENT
if ( CLHL_ParseGamePacket ( ) )
break ;
# endif
# ifdef CSQC_DAT
2020-09-08 05:11:09 +00:00
if ( CSQC_ParseGamePacket ( destsplit , cl . csqcdebug ) )
2013-08-21 07:14:39 +00:00
break ;
# endif
Con_Printf ( " Unable to parse gamecode packet \n " ) ;
break ;
2004-08-23 00:15:46 +00:00
case svc_time :
2017-08-29 02:29:06 +00:00
CL_ParseClientdata ( ) ;
2013-06-23 02:17:02 +00:00
//fixme: move this stuff to a common place
2013-07-26 17:19:06 +00:00
// cl.playerview[destsplit].oldfixangle = cl.playerview[destsplit].fixangle;
// VectorCopy(cl.playerview[destsplit].fixangles, cl.playerview[destsplit].oldfixangles);
2020-04-30 14:33:58 +00:00
// cl.playerview[destsplit].fixangle = FIXANGLE_NO;
2013-07-26 17:19:06 +00:00
if ( cls . demoplayback )
{
// extern vec3_t demoangles;
2020-04-30 14:33:58 +00:00
// cl.playerview[destsplit].fixangle = FIXANGLE_FIXED;
2013-07-26 17:19:06 +00:00
// VectorCopy(demoangles, cl.playerview[destsplit].fixangles);
}
2005-10-01 03:09:17 +00:00
cls . netchan . outgoing_sequence + + ;
cls . netchan . incoming_sequence = cls . netchan . outgoing_sequence - 1 ;
2013-03-12 22:35:33 +00:00
cl . validsequence = cls . netchan . incoming_sequence ;
2005-10-01 03:09:17 +00:00
2004-08-23 00:15:46 +00:00
cl . last_servermessage = realtime ;
2005-10-01 03:09:17 +00:00
2005-05-26 12:55:34 +00:00
cl . oldgametime = cl . gametime ;
2005-06-04 04:20:20 +00:00
cl . oldgametimemark = cl . gametimemark ;
2004-08-23 00:15:46 +00:00
cl . gametime = MSG_ReadFloat ( ) ;
cl . gametimemark = realtime ;
2005-10-01 03:09:17 +00:00
2016-10-22 07:06:51 +00:00
if ( cls . fteprotocolextensions2 & PEXT2_PREDINFO )
{
unsigned int seq = ( cl . ackedmovesequence & 0xffff0000 ) | MSG_ReadShort ( ) ;
if ( seq > cl . ackedmovesequence )
seq - = 0x10000 ; //protect against wraps.
cl . ackedmovesequence = seq ;
}
2013-07-26 17:19:06 +00:00
{
extern vec3_t demoangles ;
int fr = cls . netchan . incoming_sequence & UPDATE_MASK ;
if ( cls . demoplayback )
{
cl . inframes [ fr & UPDATE_MASK ] . packet_entities . fixangles [ destsplit ] = true ;
VectorCopy ( demoangles , cl . inframes [ fr & UPDATE_MASK ] . packet_entities . fixedangles [ destsplit ] ) ;
}
else
cl . inframes [ fr & UPDATE_MASK ] . packet_entities . fixangles [ destsplit ] = false ;
}
cl . inframes [ cls . netchan . incoming_sequence & UPDATE_MASK ] . receivedtime = realtime ;
2013-09-06 22:57:44 +00:00
cl . inframes [ cls . netchan . incoming_sequence & UPDATE_MASK ] . frameid = cls . netchan . incoming_sequence ;
------------------------------------------------------------------------
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
Added sys_openfile console command(and menu option) to web and flatpak(via cmake+dbus) builds, to 'install' packages on sandboxed systems a bit more easily.
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues).
Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos.
Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM).
fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg).
fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes.
Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively.
Web: Fix support for ogg vorbis. Add support for voip.
Web: Added basic support for WebXR.
QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set.
QTV: add support for some eztv extensions.
MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info.
qwfwd: hack around a hack in qwfwd, allowing it to work again.
recording: favour qwd in single player, instead of mvd.
Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl.
hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects.
in_xflip: restored this setting.
fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'.
gl_overbright_models: Added cvar to match QS.
netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets.
Win: try a few other versions of xinput too.
CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials.
MenuQC: Added support for the skeletal objects API.
2024-04-09 17:13:59 +00:00
if ( CPNQ_IS_DP | | cls . protocol_nq = = CPNQ_H2MP )
2012-01-28 10:30:44 +00:00
{
int n = cls . netchan . incoming_sequence & UPDATE_MASK , o = ( cls . netchan . incoming_sequence - 1 ) & UPDATE_MASK ;
2013-03-12 22:53:23 +00:00
cl . inframes [ n ] . packet_entities . num_entities = cl . inframes [ o ] . packet_entities . num_entities ;
if ( cl . inframes [ n ] . packet_entities . max_entities < cl . inframes [ o ] . packet_entities . num_entities )
2012-01-28 10:30:44 +00:00
{
2013-03-12 22:53:23 +00:00
cl . inframes [ n ] . packet_entities . max_entities = cl . inframes [ o ] . packet_entities . max_entities ;
cl . inframes [ n ] . packet_entities . entities = BZ_Realloc ( cl . inframes [ n ] . packet_entities . entities , sizeof ( entity_state_t ) * cl . inframes [ n ] . packet_entities . max_entities ) ;
2012-01-28 10:30:44 +00:00
}
2013-03-12 22:53:23 +00:00
memcpy ( cl . inframes [ n ] . packet_entities . entities , cl . inframes [ o ] . packet_entities . entities , sizeof ( entity_state_t ) * cl . inframes [ o ] . packet_entities . num_entities ) ;
cl . inframes [ n ] . packet_entities . servertime = cl . inframes [ o ] . packet_entities . servertime ;
2012-01-28 10:30:44 +00:00
}
else
2004-11-27 08:16:25 +00:00
{
2013-03-12 22:53:23 +00:00
// cl.inframes[(cls.netchan.incoming_sequence-1)&UPDATE_MASK].packet_entities = cl.frames[cls.netchan.incoming_sequence&UPDATE_MASK].packet_entities;
cl . inframes [ cl . validsequence & UPDATE_MASK ] . packet_entities . num_entities = 0 ;
cl . inframes [ cl . validsequence & UPDATE_MASK ] . packet_entities . servertime = cl . gametime ;
2004-11-27 08:16:25 +00:00
}
2017-02-22 00:16:43 +00:00
# ifdef QUAKESTATS
2017-02-21 20:22:07 +00:00
for ( i = 0 ; i < cl . splitclients ; i + + )
{
cl . inframes [ cl . validsequence & UPDATE_MASK ] . packet_entities . punchangle [ i ] [ 0 ] = cl . playerview [ i ] . statsf [ STAT_PUNCHANGLE_X ] ;
cl . inframes [ cl . validsequence & UPDATE_MASK ] . packet_entities . punchangle [ i ] [ 1 ] = cl . playerview [ i ] . statsf [ STAT_PUNCHANGLE_Y ] ;
cl . inframes [ cl . validsequence & UPDATE_MASK ] . packet_entities . punchangle [ i ] [ 2 ] = cl . playerview [ i ] . statsf [ STAT_PUNCHANGLE_Z ] ;
cl . inframes [ cl . validsequence & UPDATE_MASK ] . packet_entities . punchorigin [ i ] [ 0 ] = cl . playerview [ i ] . statsf [ STAT_PUNCHVECTOR_X ] ;
cl . inframes [ cl . validsequence & UPDATE_MASK ] . packet_entities . punchorigin [ i ] [ 1 ] = cl . playerview [ i ] . statsf [ STAT_PUNCHVECTOR_Y ] ;
cl . inframes [ cl . validsequence & UPDATE_MASK ] . packet_entities . punchorigin [ i ] [ 2 ] = cl . playerview [ i ] . statsf [ STAT_PUNCHVECTOR_Z ] ;
}
2017-02-22 00:16:43 +00:00
# endif
2004-08-23 00:15:46 +00:00
break ;
case svc_updatename :
Sbar_Changed ( ) ;
i = MSG_ReadByte ( ) ;
2005-05-17 02:36:54 +00:00
if ( i > = MAX_CLIENTS )
2006-01-28 19:04:13 +00:00
MSG_ReadString ( ) ;
else
2009-03-03 01:52:30 +00:00
{
2006-01-28 19:04:13 +00:00
strcpy ( cl . players [ i ] . name , MSG_ReadString ( ) ) ;
2009-03-03 01:52:30 +00:00
if ( * cl . players [ i ] . name )
cl . players [ i ] . userid = i + 1 ;
2018-07-05 16:21:44 +00:00
InfoBuf_SetValueForKey ( & cl . players [ i ] . userinfo , " name " , cl . players [ i ] . name ) ;
2017-01-24 10:27:39 +00:00
if ( ! cl . nqplayernamechanged )
cl . nqplayernamechanged = realtime + 2 ;
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
CLNQ_CheckPlayerIsSpectator ( i ) ;
2009-03-03 01:52:30 +00:00
}
2004-08-23 00:15:46 +00:00
break ;
case svc_updatefrags :
Sbar_Changed ( ) ;
i = MSG_ReadByte ( ) ;
2005-05-17 02:36:54 +00:00
if ( i > = MAX_CLIENTS )
2006-01-28 19:04:13 +00:00
MSG_ReadShort ( ) ;
else
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
{
2006-01-28 19:04:13 +00:00
cl . players [ i ] . frags = MSG_ReadShort ( ) ;
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
CLNQ_CheckPlayerIsSpectator ( i ) ;
}
2004-08-23 00:15:46 +00:00
break ;
case svc_updatecolors :
{
2009-03-03 01:52:30 +00:00
int a ;
i = MSG_ReadByte ( ) ;
a = MSG_ReadByte ( ) ;
2013-10-29 17:38:22 +00:00
if ( i < cl . allocated_client_slots )
2009-03-03 01:52:30 +00:00
{
2017-08-14 16:38:44 +00:00
// cl.players[i].rtopcolor = a&0x0f;
// cl.players[i].rbottomcolor = (a&0xf0)>>4;
// sprintf(cl.players[i].team, "%2d", cl.players[i].rbottomcolor);
2004-08-23 00:15:46 +00:00
2020-09-29 07:09:01 +00:00
InfoBuf_SetValueForKey ( & cl . players [ i ] . userinfo , " topcolor " , va ( " %i " , ( a & 0xf0 ) > > 4 ) ) ;
InfoBuf_SetValueForKey ( & cl . players [ i ] . userinfo , " bottomcolor " , va ( " %i " , ( a & 0x0f ) ) ) ;
InfoBuf_SetValueForKey ( & cl . players [ i ] . userinfo , " team " , va ( " %i " , ( a & 0x0f ) + 1 ) ) ;
2017-08-14 16:38:44 +00:00
CL_ProcessUserInfo ( i , & cl . players [ i ] ) ;
// CLNQ_CheckPlayerIsSpectator(i);
2004-08-23 00:15:46 +00:00
2018-03-04 14:41:16 +00:00
# ifdef QWSKINS
2009-03-03 01:52:30 +00:00
if ( cls . state = = ca_active )
Skin_Find ( & cl . players [ i ] ) ;
2013-06-23 02:17:02 +00:00
if ( i = = cl . playerview [ destsplit ] . playernum )
2009-04-01 22:03:56 +00:00
Skin_FlushPlayers ( ) ;
2009-03-03 01:52:30 +00:00
CL_NewTranslation ( i ) ;
2018-03-04 14:41:16 +00:00
# endif
Sbar_Changed ( ) ;
2009-03-03 01:52:30 +00:00
}
2004-08-23 00:15:46 +00:00
}
break ;
case svc_lightstyle :
i = MSG_ReadByte ( ) ;
2019-09-10 15:40:04 +00:00
if ( i > = MAX_NET_LIGHTSTYLES )
2005-10-01 03:09:17 +00:00
{
Con_Printf ( " svc_lightstyle: %i >= MAX_LIGHTSTYLES \n " , i ) ;
MSG_ReadString ( ) ;
break ;
}
2014-06-25 03:53:11 +00:00
R_UpdateLightStyle ( i , MSG_ReadString ( ) , 1 , 1 , 1 ) ;
2004-08-23 00:15:46 +00:00
break ;
2012-09-30 05:52:03 +00:00
case svcnq_updatestatlong :
2005-09-26 03:40:09 +00:00
i = MSG_ReadByte ( ) ;
2004-08-23 00:15:46 +00:00
j = MSG_ReadLong ( ) ;
2015-08-20 03:17:47 +00:00
CL_SetStatNumeric ( 0 , i , j , j ) ;
2004-08-23 00:15:46 +00:00
break ;
2005-09-26 03:40:09 +00:00
case svcdp_updatestatbyte :
2018-05-06 16:09:07 +00:00
//case svcneh_fog:
2022-01-16 18:41:44 +00:00
//also svcqex_seq
if ( cls . qex )
{ //svcqex_seq
unsigned seq = MSG_ReadULEB128 ( ) ;
if ( ! cls . demoplayback & & 0 )
CL_AckedInputFrame ( cls . netchan . incoming_sequence , seq , true ) ;
break ;
}
2018-06-18 16:44:29 +00:00
if ( CPNQ_IS_BJP | | cls . protocol_nq = = CPNQ_NEHAHRA )
2018-05-06 16:09:07 +00:00
{
2019-10-18 08:37:38 +00:00
CL_ResetFog ( FOGTYPE_AIR ) ;
2018-05-06 16:09:07 +00:00
if ( MSG_ReadByte ( ) )
{
2019-10-18 08:37:38 +00:00
cl . fog [ FOGTYPE_AIR ] . density = MSG_ReadFloat ( ) ;
cl . fog [ FOGTYPE_AIR ] . colour [ 0 ] = SRGBf ( MSG_ReadByte ( ) / 255.0f ) ;
cl . fog [ FOGTYPE_AIR ] . colour [ 1 ] = SRGBf ( MSG_ReadByte ( ) / 255.0f ) ;
cl . fog [ FOGTYPE_AIR ] . colour [ 2 ] = SRGBf ( MSG_ReadByte ( ) / 255.0f ) ;
cl . fog [ FOGTYPE_AIR ] . time + = 0.25 ; //change fairly fast, but not instantly
2018-05-06 16:09:07 +00:00
}
2019-10-18 08:37:38 +00:00
cl . fog_locked = ! ! cl . fog [ FOGTYPE_AIR ] . density ;
2018-05-06 16:09:07 +00:00
}
else
{
i = MSG_ReadByte ( ) ;
j = MSG_ReadByte ( ) ;
CL_SetStatNumeric ( 0 , i , j , j ) ;
}
2004-12-05 08:19:54 +00:00
break ;
2015-07-06 14:47:46 +00:00
case svcfte_updatestatstring :
i = MSG_ReadByte ( ) ;
s = MSG_ReadString ( ) ;
CL_SetStatString ( destsplit , i , s ) ;
break ;
case svcfte_updatestatfloat :
i = MSG_ReadByte ( ) ;
{
float f = MSG_ReadFloat ( ) ;
2015-08-20 03:17:47 +00:00
CL_SetStatNumeric ( destsplit , i , f , f ) ;
2015-07-06 14:47:46 +00:00
}
break ;
2021-08-04 21:16:57 +00:00
case svcfte_setanglebase :
CL_ParseBaseAngle ( destsplit ) ;
break ;
2017-01-29 13:10:53 +00:00
case svcfte_setangledelta :
for ( i = 0 ; i < 3 ; i + + )
2017-08-14 16:38:44 +00:00
ang [ i ] = cl . playerview [ destsplit ] . viewangles [ i ] + MSG_ReadAngle16 ( ) ;
if ( ! CSQC_Parse_SetAngles ( destsplit , ang , true ) )
VectorCopy ( ang , cl . playerview [ destsplit ] . viewangles ) ;
2017-01-29 13:10:53 +00:00
VectorCopy ( cl . playerview [ destsplit ] . viewangles , cl . playerview [ destsplit ] . simangles ) ;
VectorCopy ( cl . playerview [ destsplit ] . viewangles , cl . playerview [ destsplit ] . intermissionangles ) ;
break ;
2004-08-23 00:15:46 +00:00
case svc_setangle :
2013-07-26 17:19:06 +00:00
{
inframe_t * inf = & cl . inframes [ cls . netchan . incoming_sequence & UPDATE_MASK ] ;
2021-08-04 21:16:57 +00:00
if ( cls . ezprotocolextensions1 & EZPEXT1_SETANGLEREASON )
MSG_ReadByte ( ) ; //0=unknown, 1=tele, 2=spawn
2013-07-26 17:19:06 +00:00
for ( i = 0 ; i < 3 ; i + + )
2017-08-14 16:38:44 +00:00
ang [ i ] = MSG_ReadAngle ( ) ;
if ( ! CSQC_Parse_SetAngles ( destsplit , ang , false ) )
{
inf - > packet_entities . fixangles [ destsplit ] = true ;
VectorCopy ( ang , cl . playerview [ destsplit ] . viewangles ) ;
VectorCopy ( ang , inf - > packet_entities . fixedangles [ destsplit ] ) ;
}
VectorCopy ( cl . playerview [ destsplit ] . viewangles , cl . playerview [ destsplit ] . intermissionangles ) ;
2021-12-20 10:06:43 +00:00
VRUI_SnapAngle ( ) ;
2013-07-26 17:19:06 +00:00
}
2004-08-23 00:15:46 +00:00
break ;
2013-07-26 17:19:06 +00:00
case svcnq_clientdata :
2005-09-26 03:40:09 +00:00
CLNQ_ParseClientdata ( ) ;
2004-08-23 00:15:46 +00:00
break ;
case svc_sound :
CLNQ_ParseStartSoundPacket ( ) ;
break ;
2012-02-27 12:23:15 +00:00
case svc_stopsound :
i = MSG_ReadShort ( ) ;
S_StopSound ( i > > 3 , i & 7 ) ;
break ;
2004-08-23 00:15:46 +00:00
2017-01-17 19:04:09 +00:00
# ifdef PEXT2_VOICECHAT
case svcfte_voicechat :
S_Voip_Parse ( ) ;
break ;
# endif
2004-08-23 00:15:46 +00:00
case svc_temp_entity :
CL_ParseTEnt ( true ) ;
break ;
2020-09-08 05:11:09 +00:00
case svcfte_temp_entity_sized :
CL_ParseTEnt_Sized ( ) ;
break ;
2005-09-26 03:40:09 +00:00
2004-08-23 00:15:46 +00:00
case svc_particle :
2005-03-10 03:55:18 +00:00
CLNQ_ParseParticleEffect ( ) ;
2004-08-23 00:15:46 +00:00
break ;
case svc_killedmonster :
2013-06-23 02:17:02 +00:00
cl . playerview [ destsplit ] . stats [ STAT_MONSTERS ] + + ;
cl . playerview [ destsplit ] . statsf [ STAT_MONSTERS ] + + ;
2004-08-23 00:15:46 +00:00
break ;
case svc_foundsecret :
2013-06-23 02:17:02 +00:00
cl . playerview [ destsplit ] . stats [ STAT_SECRETS ] + + ;
cl . playerview [ destsplit ] . statsf [ STAT_SECRETS ] + + ;
2004-08-23 00:15:46 +00:00
break ;
case svc_intermission :
2015-09-01 04:45:15 +00:00
if ( cl . intermissionmode = = IM_NONE )
{
2015-06-16 23:53:58 +00:00
TP_ExecTrigger ( " f_mapend " , false ) ;
2022-05-28 17:59:51 +00:00
if ( cl . playerview [ destsplit ] . spectator | | cls . demoplayback )
TP_ExecTrigger ( " f_specmapend " , true ) ;
else
TP_ExecTrigger ( " f_playmapend " , true ) ;
2015-09-01 04:45:15 +00:00
cl . completed_time = cl . gametime ;
}
cl . intermissionmode = IM_NQSCORES ;
2004-08-23 00:15:46 +00:00
break ;
case svc_finale :
2015-09-01 04:45:15 +00:00
if ( cl . intermissionmode = = IM_NONE )
{
TP_ExecTrigger ( " f_mapend " , false ) ;
2022-05-28 17:59:51 +00:00
if ( cl . playerview [ destsplit ] . spectator | | cls . demoplayback )
TP_ExecTrigger ( " f_specmapend " , true ) ;
else
TP_ExecTrigger ( " f_playmapend " , true ) ;
2015-09-01 04:45:15 +00:00
cl . completed_time = cl . gametime ;
}
cl . intermissionmode = IM_NQFINALE ;
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
SCR_CenterPrint ( destsplit , MSG_ReadString ( ) , false ) ;
2004-08-23 00:15:46 +00:00
break ;
case svc_cutscene :
2015-09-01 04:45:15 +00:00
if ( cl . intermissionmode = = IM_NONE )
{
TP_ExecTrigger ( " f_mapend " , false ) ;
2022-05-28 17:59:51 +00:00
if ( cl . playerview [ destsplit ] . spectator | | cls . demoplayback )
TP_ExecTrigger ( " f_specmapend " , true ) ;
else
TP_ExecTrigger ( " f_playmapend " , true ) ;
2015-09-01 04:45:15 +00:00
cl . completed_time = cl . gametime ;
}
cl . intermissionmode = IM_NQCUTSCENE ;
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
SCR_CenterPrint ( destsplit , MSG_ReadString ( ) , false ) ;
2004-08-23 00:15:46 +00:00
break ;
case svc_sellscreen : //pantsie
2011-04-20 23:05:45 +00:00
Cmd_ExecuteString ( " help 0 " , RESTRICT_SERVER ) ;
2004-08-23 00:15:46 +00:00
break ;
case svc_damage :
2013-06-23 02:17:02 +00:00
V_ParseDamage ( & cl . playerview [ destsplit ] ) ;
2004-08-23 00:15:46 +00:00
break ;
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
case svcfitz_skybox :
2017-08-29 02:29:06 +00:00
R_SetSky ( MSG_ReadString ( ) ) ;
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
break ;
case svcfitz_bf :
2011-04-20 23:05:45 +00:00
Cmd_ExecuteString ( " bf " , RESTRICT_SERVER ) ;
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
break ;
case svcfitz_fog :
2019-10-18 08:37:38 +00:00
CL_ResetFog ( FOGTYPE_AIR ) ;
cl . fog [ FOGTYPE_AIR ] . density = MSG_ReadByte ( ) / 255.0f ;
cl . fog [ FOGTYPE_AIR ] . colour [ 0 ] = SRGBf ( MSG_ReadByte ( ) / 255.0f ) ;
cl . fog [ FOGTYPE_AIR ] . colour [ 1 ] = SRGBf ( MSG_ReadByte ( ) / 255.0f ) ;
cl . fog [ FOGTYPE_AIR ] . colour [ 2 ] = SRGBf ( MSG_ReadByte ( ) / 255.0f ) ;
cl . fog [ FOGTYPE_AIR ] . time + = ( ( unsigned short ) MSG_ReadShort ( ) ) / 100.0 ;
cl . fog_locked = ! ! cl . fog [ FOGTYPE_AIR ] . density ;
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
break ;
case svcfitz_spawnbaseline2 :
------------------------------------------------------------------------
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
i = MSGCL_ReadEntity ( ) ;
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
if ( ! CL_CheckBaselines ( i ) )
Host_EndGame ( " CLNQ_ParseServerMessage: svcfitz_spawnbaseline2 failed with ent %i " , i ) ;
2016-07-12 00:40:13 +00:00
CL_ParseBaseline ( cl_baselines + i , CPNQ_FITZ666 ) ;
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
break ;
2013-07-26 17:19:06 +00:00
case svcfitz_spawnstatic2 :
2017-01-16 08:13:51 +00:00
CL_ParseStaticProt ( CPNQ_FITZ666 ) ;
2013-07-26 17:19:06 +00:00
break ;
case svcfitz_spawnstaticsound2 :
2015-04-14 23:12:17 +00:00
CL_ParseStaticSound ( true ) ;
2013-07-26 17:19:06 +00:00
break ;
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
2004-11-20 01:21:17 +00:00
case svcnq_effect :
2022-01-16 18:41:44 +00:00
//also svcqex_achievement
if ( cls . qex )
{ //svcqex_achievement
MSG_ReadString ( ) ;
break ;
}
2024-04-25 05:57:34 +00:00
# ifdef HAVE_LEGACY
if ( ! memcmp ( net_message . data + cmdstart + 1 , " ACH_ " , 4 ) )
{ //HIDEOUS UGLY HACK!
int l = 0 ;
char * s = net_message . data + cmdstart + 5 ;
while ( * s )
{
if ( ( * s > = ' A ' & & * s < = ' Z ' ) | | * s = = ' _ ' )
{
s + + ;
l + + ;
}
else break ;
}
if ( ! * s & & l > = 8 ) //'ACH_PACIFIST' seems the shortest existing one.
{ //got to the end of the string and found only capitals... good chance its qe debris
s = MSG_ReadString ( ) ;
Con_Printf ( CON_WARNING " Got svcnq_effect - assuming stray svcqe_achievement(%s) \n " , s ) ;
break ;
}
}
# endif
2004-11-20 01:21:17 +00:00
CL_ParseEffect ( false ) ;
break ;
case svcnq_effect2 :
2022-01-16 18:41:44 +00:00
//also svcqex_chat
if ( cls . qex )
{ //svcqex_chat
//in qex this text is in some small special chat box. which disappears quickly rendering its contents kinda unreadable. and its messagemode stuff seems broken too, so whatever. and it seems to have newline issues.
//FIXME: figure out the player index so we can kickban/mute/etc them.
qbyte plcolour = MSG_ReadByte ( ) ;
qbyte chatcolour = MSG_ReadByte ( ) ;
2023-01-09 05:11:34 +00:00
char * pcols [ ] = { S_COLOR_WHITE , S_COLOR_GREEN , S_COLOR_CYAN , S_COLOR_YELLOW } ;
char * ccols [ ] = { S_COLOR_WHITE , S_COLOR_CYAN } ; //say, say_team
2022-01-16 18:41:44 +00:00
Con_Printf ( " ^[%s%s " /*"\\player\\%i"*/ " ^]: " , pcols [ plcolour % countof ( pcols ) ] , MSG_ReadString ( ) ) ;
Con_Printf ( " %s%s \n " , ccols [ chatcolour % countof ( ccols ) ] , MSG_ReadString ( ) ) ;
break ;
}
2004-11-20 01:21:17 +00:00
CL_ParseEffect ( true ) ;
break ;
2004-11-27 08:16:25 +00:00
2007-06-20 00:02:54 +00:00
case svcdp_entities :
2022-08-19 13:30:16 +00:00
if ( cls . qex )
{ //svcqex_prompt
CLQEX_ParsePrompt ( ) ;
break ;
}
2004-12-05 08:19:54 +00:00
if ( cls . signon = = 4 - 1 )
{ // first update is the final signon stage
cls . signon = 4 ;
CLNQ_SignonReply ( ) ;
2005-09-26 03:40:09 +00:00
}
2018-05-06 16:09:07 +00:00
//well, it's really any protocol, but we're only going to support version 5 (through 7).
2012-02-12 05:18:31 +00:00
CLDP_ParseDarkPlaces5Entities ( ) ;
2004-11-27 08:16:25 +00:00
break ;
2016-07-12 00:40:13 +00:00
case svcdp_spawnbaseline2 :
i = MSGCL_ReadEntity ( ) ;
if ( ! CL_CheckBaselines ( i ) )
Host_EndGame ( " CLNQ_ParseServerMessage: svcdp_spawnbaseline2 failed with ent %i " , i ) ;
CL_ParseBaseline ( cl_baselines + i , CPNQ_DP5 ) ;
break ;
2007-06-20 00:02:54 +00:00
2017-01-16 08:13:51 +00:00
case svcdp_spawnstatic2 :
CL_ParseStaticProt ( CPNQ_DP5 ) ;
break ;
2012-11-27 03:23:19 +00:00
case svcdp_spawnstaticsound2 :
CL_ParseStaticSound ( true ) ;
break ;
2018-03-24 04:02:09 +00:00
# ifdef CSQC_DAT
2007-06-20 00:02:54 +00:00
case svcdp_csqcentities :
2022-08-19 13:30:16 +00:00
if ( cls . qex )
{
s = CLQEX_ReadStrings ( ) ;
goto svccentreprint ;
}
2020-09-08 05:11:09 +00:00
CSQC_ParseEntities ( false ) ;
break ;
case svcfte_csqcentities_sized :
CSQC_ParseEntities ( true ) ;
2007-06-20 00:02:54 +00:00
break ;
2009-07-18 20:46:42 +00:00
# endif
2007-06-20 00:02:54 +00:00
case svcdp_downloaddata :
2022-01-16 18:41:44 +00:00
//also svcqex_servervars:
if ( cls . qex )
CLQEX_ParseServerVars ( ) ;
else
CLDP_ParseDownloadData ( ) ;
2007-06-20 00:02:54 +00:00
break ;
2008-11-09 22:29:28 +00:00
case svcdp_trailparticles :
2012-07-05 19:42:36 +00:00
CL_ParseTrailParticles ( ) ;
2008-11-09 22:29:28 +00:00
break ;
case svcdp_pointparticles :
2012-07-05 19:42:36 +00:00
CL_ParsePointParticles ( false ) ;
2008-11-09 22:29:28 +00:00
break ;
case svcdp_pointparticles1 :
2012-07-05 19:42:36 +00:00
CL_ParsePointParticles ( true ) ;
2008-11-09 22:29:28 +00:00
break ;
2022-01-16 18:41:44 +00:00
case svcqex_updateping :
if ( cls . qex )
{ //svcqex_updateping
int ping ;
i = MSG_ReadByte ( ) ;
ping = MSG_ReadSignedQEX ( ) ;
if ( i < MAX_CLIENTS )
cl . players [ i ] . ping = ping ;
break ;
}
goto badsvc ;
case svcqex_updatesocial :
if ( cls . qex )
{ //svcqex_updatesocial
//both ints are -1 for lan/direct clients, and 0 for the host. I guess this is for chatting to people via steam.
/*slot =*/ MSG_ReadByte ( ) ;
/*??? =*/ MSG_ReadLong ( ) ;
/*??? =*/ MSG_ReadLong ( ) ;
break ;
}
goto badsvc ;
case svcqex_updateplinfo :
if ( cls . qex )
{ //svcqex_updateplinfo
unsigned int slot = MSG_ReadByte ( ) ;
int health = MSG_ReadSignedQEX ( ) ;
int armour = MSG_ReadSignedQEX ( ) ;
if ( slot < MAX_CLIENTS )
{
InfoBuf_SetValueForKey ( & cl . players [ slot ] . userinfo , " health " , va ( " %i " , health ) ) ;
InfoBuf_SetValueForKey ( & cl . players [ slot ] . userinfo , " health " , va ( " %i " , armour ) ) ;
}
break ;
}
goto badsvc ;
2022-08-19 13:30:16 +00:00
case svcqex_locprint :
2022-01-16 18:41:44 +00:00
if ( cls . qex )
{ //svcqex_'raw'print
2022-08-19 13:30:16 +00:00
s = CLQEX_ReadStrings ( ) ;
2022-01-16 18:41:44 +00:00
goto svcprint ;
}
goto badsvc ;
2004-08-23 00:15:46 +00:00
}
2007-06-20 00:02:54 +00:00
2024-04-25 05:57:34 +00:00
packetusage_pending [ cmd ] + = MSG_GetReadCount ( ) - cmdstart ;
2004-08-23 00:15:46 +00:00
}
}
# endif
2019-01-29 07:18:07 +00:00
struct sortedsvcs_s
{
const char * name ;
size_t bytes ;
} ;
2019-02-16 19:09:07 +00:00
static int QDECL sorttraffic ( const void * l , const void * r )
2019-01-29 07:18:07 +00:00
{
const struct sortedsvcs_s * a = l , * b = r ;
if ( a - > bytes = = b - > bytes )
return 0 ;
if ( a - > bytes > b - > bytes )
return - 1 ;
return 1 ;
}
void CL_ShowTrafficUsage ( float x , float y )
{
const char * * svcnames , * n ;
size_t svccount , i , j = 0 ;
size_t total ;
struct sortedsvcs_s sorted [ 256 ] ;
2019-01-29 19:41:31 +00:00
switch ( cls . protocol )
2019-01-29 07:18:07 +00:00
{
2019-01-29 19:41:31 +00:00
# ifdef NQPROT
case CP_NETQUAKE :
2019-01-29 07:18:07 +00:00
svcnames = svc_nqstrings ;
svccount = countof ( svc_nqstrings ) ;
2019-01-29 19:41:31 +00:00
break ;
# endif
case CP_QUAKEWORLD :
2019-01-29 07:18:07 +00:00
svcnames = svc_qwstrings ;
svccount = countof ( svc_qwstrings ) ;
2019-01-29 19:41:31 +00:00
break ;
default :
return ; //panic!
2019-01-29 07:18:07 +00:00
}
total = 0 ;
for ( i = 0 ; i < 256 ; i + + )
total + = packetusage_saved [ i ] ;
for ( i = 0 ; i < 256 ; i + + )
{
if ( ! packetusage_saved [ i ] )
continue ; //don't show if there's no point.
if ( i < svccount )
n = svcnames [ i ] ;
else
n = va ( " svc %u " , ( unsigned ) i ) ;
sorted [ j ] . name = n ;
sorted [ j ] . bytes = packetusage_saved [ i ] ;
j + + ;
}
qsort ( sorted , j , sizeof ( * sorted ) , sorttraffic ) ;
for ( i = 0 ; i < j ; i + + )
{
Draw_FunString ( x , y , va ( " %22s:%5.1f%% (%.0f/s) " , sorted [ i ] . name , ( 100.0 * sorted [ i ] . bytes ) / total , ( sorted [ i ] . bytes / packetusage_interval ) ) ) ;
y + = 8 ;
}
2019-03-23 07:06:37 +00:00
}