Commit graph

142 commits

Author SHA1 Message Date
Zack Middleton
c80f341711 Handle ERR_DROP during Com_GameRestart
If ERR_DROP during Com_GameRestart after shutting down client, Com_Error
needs to restart the client otherwise there is just a black window. Also,
clear the game restarting flag in Com_Error otherwise it's not possible to
run Com_GameRestart again later.

I don't know of a way to trigger ERR_DROP, in FS_Restart for instance,
without engine changes however.
2016-10-09 19:17:58 -05:00
Zack Middleton
755b2f38f0 Offer post-crash safe settings on a per-mod basis
Offer to restore settings when loading a mod that crashed, not the first
mod that gets loaded after a crash. Before the first mod loaded (usually
baseq3) would get the option even if missionpack or some other mod crashed.

- Make pid files separate for each fs_game.
- Remove/write pid every time switching fs_game.
- Create path before writing pid file otherwise it fails on first run.
- Show mod description.txt or fs_game instead of engine name in abnormal
  exit message.
- Check com_fullyInitialized in Com_Error before removing PID,
  otherwise "ioquake3 --version" segfaults when accessing fs_gamevar->string
  (plus not fully initialized isn't really a normal shutdown).
2016-10-09 18:18:08 -05:00
Tim Angus
cce24668f7 Merge pull request #225 from smcv/reproducible-date
Pick up date from SOURCE_DATE_EPOCH, for reproducible builds
2016-09-27 21:05:24 +01:00
Simon McVittie
9c76b546e3 Pick up date from SOURCE_DATE_EPOCH, for reproducible builds
The goal of reproducible builds is that a rebuild of the same source
code with the same compiler, libraries, etc. should result in the same
binaries. SOURCE_DATE_EPOCH provides a standard way for build systems
to fill in the date of the latest source change, typically from a git
commit or from metadata like the debian/changelog in Debian packages.

This does not change anything if SOURCE_DATE_EPOCH is not defined;
the intention is that a larger build system like a Debian package
will define it.

Please see https://reproducible-builds.org/ for more information about
reproducible builds.
2016-09-22 09:02:20 +01:00
Simon McVittie
7d4f9525df Fix mis-spellings of "separating" as "seperating"
Found by Debian's Lintian tool.
2016-09-22 08:56:30 +01:00
Thilo Schulz
9d6a95d4ad Missed this Cvar_Get() on com_introPlayed 2016-06-16 03:29:26 +02:00
Thilo Schulz
bb7ad55382 Only play logo/intro if their filenames have been defined in q_shared.h 2016-06-16 03:01:21 +02:00
Zack Middleton
8b458e5457 Fix warnings that names passed to Name_PlayerNameCompletion is not const 2016-05-09 10:41:58 -05: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
Zachary J. Slater
5555788867 Merge pull request #103 from openmoh/ioq3-intro
Have custom intro cinematics for standalone game
2015-12-28 08:56:20 -08:00
/dev/humancontroller
c4a2836269 Fix Com_RandomBytes weak-random case
255 is valid for unsigned char too.
2015-03-20 18:50:58 -05:00
Michael Rieder
7c5feef6a2 Have custom intro cinematics for standalone game 2015-01-07 23:47:18 +01:00
Tim Angus
f83334d81b Add facility to describe cvars 2014-09-26 14:29:51 +01:00
Tim Angus
43b21055b8 Actually, that's not suppressing, that's changing behaviour 2014-09-01 13:07:08 +01:00
Tim Angus
eeaf0227f7 Suppress warning of (deliberate) null pointer deference 2014-09-01 11:19:57 +01:00
Pan7
f62d4c7f1c sayto cmd with player name completion 2014-07-18 00:15:05 +02:00
Tequila
baca82d64e Bunch of comment fixes 2014-03-13 02:20:54 +01:00
/dev/humancontroller
9e9d6fa52c clean up return statements a bit more 2013-05-30 15:43:21 -05:00
/dev/humancontroller
9d626b6a12 drop some useless return statements 2013-05-30 15:43:21 -05:00
/dev/humancontroller
830d93aa38 add some noreturn annotations 2013-05-30 15:39:22 -05:00
Tim Angus
98360bcd57 Fix some of the things clang --analyze flagged 2013-03-26 16:50:03 +00:00
Zachary Slater
20a77764dd Increase various arbitrary limits - Bug #5463 2013-01-06 01:36:39 -08:00
Zack Middleton
2fbf9d9006 Removed unused functoin Hunk_Trash. 2011-12-08 22:54:45 +00:00
Zack Middleton
7b2f842053 Show file/line/label in Com_Error messages when run out of memory in debug build. 2011-12-08 22:25:25 +00:00
Tim Angus
fd986dae06 * Fix various warnings with GCC and clang 2011-10-27 21:32:28 +00:00
Tim Angus
675e7a641a * clang support 2011-10-21 22:48:53 +00:00
Zack Middleton
5d24905c8d Simulate line buffering and fix the overflow bug in Com_ReadFromPipe(), patch from DevHC. 2011-08-05 21:45:22 +00:00
Thilo Schulz
8ab91bde8e - Fix already defined command warnings for minimize
- Fix recursive CL_Shutdown warning and "command already defined" warnings when quitting while playing on a server that changed the gamedir.
2011-08-01 10:16:40 +00:00
Thilo Schulz
40dfcee06e Modular rendering system. Patch by use.less01
This might break MSVC builds. I'll take care of it later
2011-08-01 01:19:55 +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
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
265d6e0374 Remove one unnecessary loop in the beginning 2011-07-13 19:16:25 +00:00
Thilo Schulz
1c3ecb3d3c - Make sure at least one round of download packets and packet queues gets sent each frame
- Fix timeVal select timeout value for case of unlimited data rate and now downloads are active
2011-07-13 18:57:32 +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
309c322b80 Forgot to set default rate back to 100kbyte/s 2011-07-12 11:01:49 +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
5c4813da51 Add forced VM unloading to Com_Quit_f 2011-06-25 09:05:57 +00:00
Thilo Schulz
d57ba6a57b - Automatically reset fs_game to "" if it was supplied by the user and is equal to com_basegame
- Fix problem where users could change values of CVAR_INIT variables after the call to Cvar_Get() via Com_StartupVariable()
- Move sound shutdown after client shutdown so VMs don't hold invalid sound handles in memory
2011-06-22 23:00:36 +00:00
Thilo Schulz
664f8e578d - align sse control word storage space to 16 byte boundary for snapvector
- replace some whitespace with tabs in snapvector.c
- Give gcc a bit more freedom in choice of registers
2011-06-22 14:36:11 +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
a5f31084d4 - Fix memory leak in DMA sound after S_Shutdown()
- Make codec load use temp hunk memory instead of zone mem
- Fix sound issues with direct sound and game_restart (#4526)
2011-06-17 23:29:19 +00:00
Thilo Schulz
a447aa82af Fix #if macros for idx64 and id386 2011-06-15 14:10:20 +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
Thilo Schulz
c95bd0a684 Remove newlines from Com_Error message format strings, patch by DevHC 2011-05-12 14:02:48 +00:00
Thilo Schulz
d34c6b7e0b Revert protocol 69 pending further discussion (#4962) 2011-04-27 20:17:45 +00:00
Thilo Schulz
a5580d8974 - Harden the client and server protocol against UDP spoofing attacks. This will defend ioquake3 against http://aluigi.altervista.org/papers/q3noclient.txt (#3041)
- Retains full compatibility to the old but unsecure protocol between clients and servers
- Harden the connection process against DoS attacks, possibly connected to UDP spoofing
2011-04-27 16:03:35 +00:00