Commit graph

186 commits

Author SHA1 Message Date
Zack Middleton
615b73288f Use Opus for VoIP
Server/client VoIP protocol is handled by adding new cvars
cl_voipProtocol and sv_voipProtocol, sv_voip and cl_voip
are used to auto set/clear them. All users need to touch
are cl/sv_voip as 0 or 1 just like before.

Old Speex VoIP packets in demos are skipped.
New VoIP packets are skipped in demos if sv_voipProtocol
doesn't match cl_voipProtocol.

Notable difference between usage of speex and opus codecs,
when using Speex client would be sent 80ms at a time.
Using Opus, 60ms is sent at a time. This was changed because
the Opus codec supports encoding up to 60ms at a time.
(Simpler to send only one codec frame in a packet.)
2016-01-06 05:19:10 -06:00
Zachary J. Slater
fe619680f8 Merge pull request #73 from Pan7/sayto
sayto cmd with player name completion
2015-12-28 09:04:19 -08:00
Zack Middleton
c4f5176af4 Set bsp_trace_t::surface.flags to surfaceFlags in server and game
Revert last commit so that grapple sky check is compatible with BSPC
BotImport_Trace in (removed from repo) code/bspc/be_aas_bspq3.c.

Set bsp_trace_t::surface.flags instead of surface.value to trace_t::surfaceFlags.
surface.flags is only used for the sky check for grapple AAS reachability.
surface.value is not used at all.

bsp_trace_t is not part of the game VM API, so this does not affect VM compatibility.
BotAI_Trace in game was changed to match server. surface.value/flags are not used in game.
2015-02-18 15:17:57 -06:00
Tim Angus
dd82b9d1a8 Fix case where interval overflows (thanks jackeri)
[17:58] <Jacker> hey, you might be interested in checking out this
4da5a397b5 (diff-acaedc9d8b492f9af8966ae68597392cR615)
[17:58] <Jacker> its related to the ddos protection code you wrote
[17:59] <Jacker> in continuation to:
ab9b08e584
[17:59] <Jacker> in a case if the client has in the past connected to
the server days/weeks earlier and time wraps the client wont be able to
connect
[18:00] <Jacker> since in that case if the bucket of that clients ip
still exists it wont get checked correctly
2014-12-29 19:08:42 +00:00
Pan7
f62d4c7f1c sayto cmd with player name completion 2014-07-18 00:15:05 +02:00
Zack Middleton
7a4ef47476 Fix max bans range check in SV_AddBanToList
Adding too many bans would write out of bounds. Found by Coverity.
2014-05-25 18:41:51 -05:00
MAN-AT-ARMS
94e36c288c Fix colored name padding and allow IPv6 address to fit in output of
'status' command
2014-02-22 20:47:18 -05:00
Zack Middleton
718d0a0d11 Fix sending pk3 download error messages to clients
Disabled in e52a492f61.
2014-02-09 20:23:48 -06:00
Zack Middleton
d8e42cf02f Merge pull request #35 from inolen/no_renderer_restart
don't restart renderer in SV_SpawnServer unless client running dedicated
2014-02-01 16:22:24 -08:00
Anthony Pesch
278d7533e5 restart the renderer after the hunk mark has been set 2014-02-01 09:58:49 -08:00
Zack Middleton
a889d7a14f Remove extra client_t::csUpdated[] slot
sv.configstrings[] is limited to 0 to MAX_CONFIGSTRINGS-1, make client_t::csUpdated[] the same.
2014-01-11 17:37:06 -06:00
Zack Middleton
690b281e4d Remove unused models from server_t 2013-07-11 23:26:30 -05:00
Zack Middleton
6b13806066 Fix getting servers from and being listed on id's q3 master server
Use q3 master protocol when com_gamename is Quake3Arena (the default), otherwise use dpmaster protocol.
2013-07-07 16:31:36 -05:00
Tim Angus
7b15415042 Rate limit getchallenge 2013-06-10 20:31:15 +01:00
/dev/humancontroller
bbd17d75ce reduce the amount of compiler warnings for variable shadowing 2013-05-30 15:43:20 -05:00
Zack Middleton
feb012152c Give botlib com_basegame for botlib.log path
Before it always used BASEGAME fallback code.
2013-04-22 23:11:10 -05:00
Zack Middleton
ac621642ac Unify/cleanup max snapshot entities on client and server 2013-02-11 15:49:47 -06:00
Zack Middleton
b943d506bf Fix clients being able to reset their player state and respawn using donedl. 2012-12-15 08:08:46 +00:00
Zack Middleton
50475fc37b Fix server ignoring client move commands if voip data is included. 2012-12-13 23:54:58 +00:00
Thilo Schulz
6b811ada7a Add length check here as well, thanks Ensiform 2012-12-03 17:58:55 +00:00
Zack Middleton
8234225459 Change more operator commands to require sv_running to be usable. Patch by Ensiform. 2012-11-01 06:03:15 +00:00
Zack Middleton
b82c02fc03 Don't replay to status OOB requests in Team Arena single player. 2012-08-16 21:38:02 +00:00
Thilo Schulz
a3c7003d9c prevent using getinfo as an amplifier for DDOS attacks (#5678). Patch by DevHC 2012-07-01 14:18:31 +00:00
Zack Middleton
afa607c3b6 Added kicknum, kickall, and kickbots commands, patch by Ensiform. 2012-06-19 15:52:08 +00:00
Zack Middleton
2a4f775d6c Fixed comment in server.h (ent->v.absmax to ent->r.absmax). 2012-06-18 22:25:35 +00:00
Zack Middleton
1d70ffc9b2 fix the usage description of the clientkick server command (also rename SV_KickNum_f() to SV_ClientKick_f())
found by Ensiform
2012-06-18 16:33:13 +00:00
Zack Middleton
997615168a fix some typos
From /dev/humancontroller.
2012-06-18 16:25:13 +00:00
Zack Middleton
a4c61d874d add a missing '\n', remove some unwanted ones
From /dev/humancontroller.
2012-06-18 16:16:57 +00:00
Zack Middleton
ce3ec3ceef #5453 - Tell command for server. 2012-04-05 22:43:32 +00:00
Thilo Schulz
3241ca6e7b Add the new ioquake3 master server as standard for sv_master2 2012-01-24 23:42:16 +00:00
Thilo Schulz
f9cde509b2 [18:48:20] <Ensiform> Thilo: http://pastebin.com/2UUmSCQK fixes point contents on the server side related to the cg fix with moving water. Dunno why s.origin and s.angles was ever used, the rest of sv_world.c always uses r.currentOrigin and r.currentAngles
[18:58:10] <Thilo> mhm
[18:58:15] <Thilo> Ensiform: it doesnt break anything?
[18:59:20] <Ensiform> nah
2011-10-14 17:03:59 +00:00
Thilo Schulz
7eba074ce4 Allow VM_Restart to load unpure qagame.qvm so that local server won't crash after map_restart if server operator has qagame.qvm residing outside pak file (#5196)
Thanks to "rg3" for providing a shell account
2011-09-27 22:16:07 +00:00
Zack Middleton
d9b72dedc1 Require gamename if not supporting legacy protocol. 2011-09-07 19:38:19 +00:00
Thilo Schulz
ba385fa43c - Switch master server protocol to dpmaster for better game separation. Based partly on patch by Zack Middleton
- Get rid of ugly cvars sv_heartbeat and cl_gamename and replace with single com_gamename
- Remove sv_flatline. Flatlines are ignored by dpmaster and are considered to be insecure because flatlines can be udp-spoofed.
2011-07-29 13:46:50 +00:00
Thilo Schulz
23f6fd1633 Bug 5094 - Code cleanup, patch by Zack Middleton and DevHC. Fixes unused-but-set gcc warnings 2011-07-29 12:27:00 +00:00
Thilo Schulz
2349148cf1 - Apply parts of Ben Millwood's target bitfield patch (#3787)
- Fix Ryan's FIXME and have voip packet buffer on the server dynamically allocated via Z_Malloc and store pointers in a circular buffer
- Improve voip target parsing on top of Ben Millwood's patch
- Add new "spatial" target where speaker is spatialized in 3d space and can be heard by all clients in hearing range (s_alMaxDistance)
  (#4467)
- Decrease voip sound lengths from 240ms to 80ms per voip packet to mitigate udp packet loss and decrease latency
- Protocol version incremented to 71
2011-07-27 15:47:29 +00:00
Thilo Schulz
9dc32d55e2 Bug 4812 - GCC __attribute__ annotations for printf, non-returning functions etc., patch by linux@youmustbejoking.demon.co.uk and Zack Middleton 2011-07-18 14:56:57 +00:00
Thilo Schulz
69a7ada911 Fix delta compression breaking due to packet queuing 2011-07-18 14:23:54 +00:00
Thilo Schulz
8a831d34ab Fix legacy protocol with new packet queueing 2011-07-17 23:43:33 +00:00
Thilo Schulz
4c5e9963e3 Fix compile for USE_VOIP=0 2011-07-16 11:14:20 +00:00
Thilo Schulz
e6ba500164 Move rate limiting / queued packet sending logic from Com_Frame() to sv_main.c 2011-07-15 16:51:54 +00:00
Thilo Schulz
58a5d3d383 Have server send protocol version in challengeResponse so protocol negotiation works. (Where did this one get lost?) 2011-07-15 14:49:51 +00:00
Thilo Schulz
f6d6ed4b30 - Revert back to Z_Malloc from Hunk_FreeTempMemory introduced in r2077 as Hunk_FreeTempMemory must be freed in LIFO order (#5079)
- Introduce SV_ClientFree() to prevent memory leaks r2077 was supposed to fix
2011-07-15 14:44:06 +00:00
Thilo Schulz
d827447da8 - Forgot to mention: last rev (2077) bumped default protocol version to 70
- Fix queued packet rate control
2011-07-13 18:37:26 +00:00
Thilo Schulz
ac30d86db0 - Improve snapshot rate and data rate control
- Make server send packet fragments and queued packets when server is idle
- Voip protocol detection is tied to com_protocol making past-end-of-message reading unncessary
- Use Hunk_AllocateTempMemory() for buffering VOIP packets and fix buffering scheme that ryan hates so much
- Disable packet scrambling for new protocol as it is useless now
- Get rid of the old packet scrambling functions predating latest point release
- Use Hunk_AllocateTempMemory() for netchan packet queue to fix memory leak when client gets disconnected with packets in the queue
- Use Hunk_AllocateTempMemory() for download blocks to fix memory leak when client gets disconnected with download blocks in the queue
- Fix SV_RateMsec to account for udp/udp6 packet lengths
2011-07-13 17:11:30 +00:00
Thilo Schulz
e06c117e9e - Implement dual protocol support (#4962)
- Fix several UDP spoofing security issues
2011-07-12 11:59:48 +00:00
Thilo Schulz
e52a492f61 - Greatly improve UDP downloading speed for clients
- Add download rate control cvar sv_dlRate
- Don't send snapshots to downloading clients
2011-07-12 11:01:20 +00:00
Thilo Schulz
74e538ffcf - Add better protection against DoSing connecting users from connecting
- Have Com_sprintf return string length
- add STR_LEN macro for static strings
2011-07-07 16:07:58 +00:00
Thilo Schulz
dee3724a13 - Improve game_restart:
* differing screen resolutions and network settings are now honoured when changing fs_game
  * Fix hunk memory leak on game_restart
  * Move cls.state and cls.servername to clc so connection state is fully preserved over game_restart
  * Revert back to previous fs_game after disconnecting from a server that triggered a game_restart
  * Fix error dialog popping up after every game_restart if an error happened previously (reported by Ensiform)
- Fixed that not all commands added by CL_Init() would be removed by CL_Shutdown()
2011-06-21 11:18:35 +00:00
Thilo Schulz
03201aff22 - Add MASM assembler files for MSVC x64 projects to support vm_x86 in x64 mode
- Clean up ftol()/snapvector() mess
- Make use of SSE instructions for ftol()/snapvector() if available
- move ftol/snapvector pure assembler to inline assembler, this will add x86_64 and improve support for different calling conventions
- Set FPU control word at program startup to get consistent behaviour on all platforms
2011-06-13 09:56:39 +00:00