Commit graph

597 commits

Author SHA1 Message Date
Thilo Schulz
71b8fe477d - Use EmitCallDoSyscall() to call the jump violations function which guarantees 16-byte stack alignment
- Add x64 code for MSVC _asm() blocks, not tested yet.
2011-06-06 14:29:45 +00:00
Thilo Schulz
c174143dc2 - Add x86_64 support to vm_x86.c
- Fix warning on mingw64
2011-06-01 15:17:18 +00:00
Thilo Schulz
3e229af710 Fix is*() functions for windows where long value is 4 bytes 2011-06-01 01:50:19 +00:00
Thilo Schulz
eedccac818 Fix compilation on mingw64 2011-05-31 20:47:18 +00:00
Thilo Schulz
bd8d60f55c Add instruction number checks to jumps and calls to SPARC VM, patch by David Miller 2011-05-24 19:46:52 +00:00
Thilo Schulz
4b1418c4ad - Implement opStack protection: Use register %ebx for scaled indexed addressing mode to access opStack, make opStack push/pop operate on %bl portion only
- Add a third pass to VM compilation for computation of jump address offsets, removing the need to dereference into vm->instructionPointers[] for every call/jump
- Make use of 0F opcode prefix relative jumps
- Call Com_Memcpy for OP_BLOCK_COPY
- Fix several missing range checks for vm->dataBase memory access
2011-05-23 00:46:46 +00:00
Thilo Schulz
e08299faf4 - Do assignment of value 0xDEADBEEF after the 4-byte alignment
- Add all GPR to clobber list as GCC function callAsmCall seems to change register r11 without saving it to stack first, which may result in SIGSEGV in VM_CallCompiled()
2011-05-23 00:36:27 +00:00
Thilo Schulz
b8ef880d85 I don't seem to get these constraints right. This should fix it 2011-05-19 03:47:35 +00:00
Thilo Schulz
a42239e1e5 Fix VM call for release version, bug introduced by myself in r1994 2011-05-18 16:06:08 +00:00
Thilo Schulz
61d6e6eb68 Use scaled indexing mode n=4 for addressing opStack, this way we can use the 8 bit offset value in %%bl to address an OPSTACK_SIZE of 1024 which was the old value. 2011-05-18 00:17:02 +00:00
Thilo Schulz
3f9ec83ce0 - Use edx for CALLs instead of ecx, as the latter does not require any push to stack
- Make Linux AT&T asm code consistent with the MASM codeblock
2011-05-17 12:07:56 +00:00
Thilo Schulz
c7a68bf283 - Set default opStack size to 256
- Fix integer wraparound. opStack offset in rbx will always be >= 0
2011-05-16 18:17:01 +00:00
Thilo Schulz
5aa3da2f84 - Fix SEGV in while loop getop() after t = b = 0
- Fix iss8, iss16 and iss32 which would not correctly detect 32-bit signed integer range
- Add support for "addb", "subb" etc. assembler mnemonic
- Change opStack protection for x86_64 VM: No overflow checks necessary anymore as offset register is 1 byte long only
2011-05-16 17:55:07 +00:00
Thilo Schulz
01ed417ee1 Optimise VectorNormalize functions, patch by Matt Turner 2011-05-15 14:55:47 +00:00
Thilo Schulz
b003422d92 - Fix lokisetup makefile problems
- Bump version number to 1.36
2011-05-15 14:49:38 +00:00
Thilo Schulz
3cdfb7aea8 Refactor and bugfix COM_*Extension functions, patch by DevHC 2011-05-15 14:11:26 +00:00
Thilo Schulz
b509d770a7 - Remove Q_strrchr(), replace with standard, portable strrchr()
- Add strrchr() to bg_lib.c, patch by DevHC
2011-05-15 14:08:03 +00:00
Thilo Schulz
3ddc59a3ba move MIN/MAX definition, use MIN() instead of min(), patch by DevHC 2011-05-15 13:27:24 +00:00
Thilo Schulz
017bc7e5da - Add vm_x86.c optimization patch by Eugene C.
- Remove ASM syntax specific code (AT&T vs MASM) for OP_CALL and replace with machine code
2011-05-15 13:15:14 +00:00
Thilo Schulz
716caf396e - Reverting accidentally committed vm_x86.c
- Last commit contained some refactoring for vm_x86_64.c
2011-05-14 14:39:48 +00:00
Thilo Schulz
30059eb8ce ensure that ent->classname is always non-null (for entity numbers up to level.num_entities-1, and ENTITYNUM_WORLD and ENTITYNUM_NONE), for player entities and #ENTITYNUM_NONE in particular, patch by DevHC 2011-05-14 14:34:18 +00:00
Thilo Schulz
4cfb7d376b Ffffuuuuuu I don't even know.... 2011-05-14 14:28:31 +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
a9696d3558 Refactoring patch by DevHC 2011-05-11 14:21:27 +00:00
Thilo Schulz
9706e6ca29 whoops, that one was not Com_Error() 2011-05-10 10:18:07 +00:00
Thilo Schulz
d0a095396e - Remove newlines in Com_Error()
- Update register description
2011-05-10 10:07:34 +00:00
Thilo Schulz
a7ea395bd0 Add opStack protection to defend against malicious QVMs 2011-05-10 09:14:49 +00:00
Thilo Schulz
5f63ab9160 Choose better alignment for heavy-duty rendering structures, patch by Matt Turner (#4981) 2011-05-09 23:39:40 +00:00
Thilo Schulz
36314a1622 Add error handling to malloc as well 2011-05-09 15:40:30 +00:00
Thilo Schulz
876fd7dcb9 - Add HOMEPATH default name define to q_shared.c, patch by uZu (#4973)
- Reverted change from (#4972) and implemented the other suggestion to be consistent with cl_cgame.c and cl_ui.c
2011-05-04 15:39:35 +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
Thilo Schulz
a0582fb21a Fix a little quirk still 2011-04-26 02:32:05 +00:00
Thilo Schulz
797d127dfc Use memcmp instead of self-built while loop 2011-04-26 02:30:12 +00:00
Thilo Schulz
6a203bc8e9 - Fix data alignment issue with glReadPixel call, reported by Guillaume Bougard (#4954)
- Fix data alignment issue in raw AVI recording for weird resolutions (like 1366x768)
2011-04-18 16:06:10 +00:00
Tim Angus
52ead6fa36 * Crash recovery for com_pipeFile (Lakitu7) 2011-03-30 21:58:31 +00:00
Ludwig Nussel
1b27ae23c1 include vm_local.h in vm_powerpc_asm.c
Patch by Simon McVittie, bug 4930
2011-03-13 16:54:41 +00:00
Thilo Schulz
641256f7f0 strtod exists in bg_lib.c now so Q_isanumber will work in the VMs, too. 2011-03-11 13:51:36 +00:00
Tim Angus
a9830934ba * Fix misplaced ; in MSVC _vsnprintf wrapper 2011-03-10 22:06:55 +00:00
Thilo Schulz
3bf8ec2dab (#4925) - com_pipefile to create a named pipe for sending commands from other processes, patch by Chris Schwarz 2011-03-10 01:01:27 +00:00
Thilo Schulz
e5cec15fbf Fix bug where Com_StartupVariable would set CVAR_USER_CREATED on already existing cvars 2011-03-09 22:50:06 +00:00
Thilo Schulz
8c3f320504 (#3767) Some protection from malicious qvms - patches and ideas by Amanieu d'Antras and Ben Millwood 2011-03-08 01:39:34 +00:00
Thilo Schulz
c0cca7a0a8 - Fix potential out-of-bounds read in files.c, fix by using new FS_IsExt
- Add capability to load demos with com_protocol suffix, partially applied patches from Simon McVittie
- Fix demo loading if protocol number has more digits than 2
- Minor refactoring, replace all occurances of suffix "dm_" with global macro DEMOEXT
2011-03-07 22:08:48 +00:00
Thilo Schulz
fef4d12d68 Refactoring patch by DevHC 2011-03-05 19:20:37 +00:00
Thilo Schulz
21668c0616 Fix systeminfo command, fix by DevHC 2011-03-05 19:11:56 +00:00
Thilo Schulz
0387b8002e Add cvar "protocol" so user can change protocol version on command line, for standalone games. Most of the patch by Simon McVittie with a few minor modifications by myself 2011-03-05 19:10:23 +00:00
Thilo Schulz
3639108763 Also send empty valued system cvars, fix proposed by DevHC 2011-03-05 19:07:56 +00:00
Thilo Schulz
34e0a6c6f6 Make NET_Sleep wait 1ms less than requested, then busy-wait the last ms for better timeout precision. 2011-02-23 18:09:17 +00:00
Thilo Schulz
ccd24cd647 - Fix unterminated string errors in Q_vsnprintf() on windows. Thanks to Eugene C. for reporting (#4907)
- Get rid of bigbuffer in Com_sprintf()
- Get rid of Q_snprintf and replace with Com_sprintf()
2011-02-23 16:17:09 +00:00
Thilo Schulz
4dc750aedb Merge "which" command upstream from Tremulous, patch provided by Chris Schwarz 2011-02-10 23:07:07 +00:00
Thilo Schulz
614f315ce8 Fix console tab autocomplete for exec and condump on pure servers, patch by Zack Middleton 2011-02-10 19:58:20 +00:00
Thilo Schulz
e05c9ad1c2 - Make some string functions in g_cmds.c cleaner, by DevHC
- embed VM_FREEBUFFERS() macro in do-while-loop
2011-02-10 18:56:18 +00:00
Thilo Schulz
544a1c0c1a - Use MAP_FAILED error code for check whether mmap() was successful
- Replace various malloc() with Z_Malloc
- Fix several memory leaks when VM compilation failed and Com_Error is called
- Make failed mmap/VirtualAlloc/malloc calls fatal
2011-02-10 18:45:28 +00:00
Zachary Slater
5e0d0efd2e http://www.angryflower.com/aposter.html
(minor English issues, most of which are via /dev/humancontroller)
2011-02-09 05:51:33 +00:00
Thilo Schulz
3b40467599 Finally fix missionpack compiling for STANDALONE=1, yes, this is tested. 2011-02-09 00:42:54 +00:00
Thilo Schulz
956c9a262a First batch of getting replacing malloc() with Z_Malloc 2011-02-09 00:02:42 +00:00
Thilo Schulz
eb11388cac Fix STANDALONE in files.c 2011-02-08 20:27:49 +00:00
Thilo Schulz
2d2bdea553 Cleanup STANDALONE 2011-02-08 19:51:43 +00:00
Thilo Schulz
2b52867b74 Code cleanup patch by devhc 2011-02-08 18:19:31 +00:00
Thilo Schulz
48b03a035b Ok, getifaddrs() is not POSIX compliant. Fix #3984 as suggested by Vincent Cojot 2011-02-07 05:20:31 +00:00
Thilo Schulz
1d2d67cdde strdup still not accepted by some systems. *sigh*. 2011-02-07 03:56:15 +00:00
Thilo Schulz
0e6427f3ff - Hopefully fix (#3984) compiler errors on Solaris while not introducing too many new ones on the other platforms
- With _BSD_SOURCE now explicitly defined bring back strdup to vm_x86_64_assembler.c
2011-02-06 20:26:18 +00:00
Thilo Schulz
7bb5906599 Patch by Simon McVittie to improve dynamic library loading (#4700) 2011-02-04 17:47:57 +00:00
Thilo Schulz
d2f8b9f4bb Support GNU/kFreeBSD, patch by Cyril Brulebois. Thanks. 2011-02-04 17:31:12 +00:00
Thilo Schulz
e66abb3237 - Add support for linearly desaturating images via r_greyscale
- Use correct luminance values for rendering textures
Patch submitted by Forrest Voight.
2011-02-04 16:04:37 +00:00
Thilo Schulz
2cddb3e0ea https://bugzilla.icculus.org/show_bug.cgi?id=4460 2011-02-04 13:43:41 +00:00
Thilo Schulz
67a8b273c2 - Add cvars cl_gamename, sv_heartbeat, sv_flatline so standalone games can customise their messages to the master server 2011-02-04 13:25:51 +00:00
Thilo Schulz
0eb5d1720c Fix banfile writing to wrong game directory 2011-02-04 12:34:11 +00:00
Thilo Schulz
3148416c04 - Change runtime standalone detection:
* com_standalone now read-only
  * add new cvars com_basegame, com_homepath
  * standalone now automatically detected when com_basegame is set to something different than baseq3 and no id pak pk3s are found
  * This fixes https://bugzilla.icculus.org/show_bug.cgi?id=4699
- Replace a few hardcoded string literals with macros
- Add checks for Team Arena PK3s to FS_CheckPak0()
2011-02-04 12:04:56 +00:00
Thilo Schulz
cf791d14c5 - Fix bug #4769 remote server crash
- Fix potential 1-byte-buffer overflow in gamecode
2011-02-03 02:54:36 +00:00
Thilo Schulz
16c83ae2c5 Server crash can cause recursive call to Com_Error, too 2011-02-02 23:57:22 +00:00
Thilo Schulz
4982bf8e6b r1833 now made some Linux systems spit out warnings. Fix this once and for all 2011-02-02 16:49:52 +00:00
Thilo Schulz
e5dbce839a - Use select() to sleep when idle as opposed to busy waiting.
- Introduce com_busyWait cvar to go back to old behaviour
2011-02-02 16:46:23 +00:00
Thilo Schulz
0baadba7d1 Windows doesn't know z in format string 2011-01-31 21:13:37 +00:00
Thilo Schulz
0c662f25f2 Make Ludwig happy 2011-01-27 16:41:08 +00:00
Thilo Schulz
d1c0401c73 well, shit. 2011-01-27 12:34:58 +00:00
Thilo Schulz
92495a70bc Fix compiler warnings (#4887) 2011-01-27 11:13:39 +00:00
Thilo Schulz
74be070642 Make sure com_developer global var gets written right after developer has been read from cmd line 2011-01-25 16:18:49 +00:00
Thilo Schulz
5c0ae99642 Make number of supported master servers tunable via define 2011-01-25 02:04:25 +00:00
Thilo Schulz
bf07014b1d Make this change so standalone developers will know to change the HEARTBEAT game string for their versions, too. 2011-01-24 18:09:20 +00:00
Thilo Schulz
6179036ac9 Fix name resolution for domains with A and AAAA record 2011-01-24 01:55:12 +00:00
Thilo Schulz
8243a77c0e Revert changes because dpmaster doesn't work that way. 2011-01-24 01:24:07 +00:00
Thilo Schulz
7861cde4a2 Make it use the correct game name in getserversExt queries 2011-01-24 00:21:33 +00:00
Tim Angus
c314f29290 * Use correct compiler defines for OS detection on Windows 2010-12-19 16:34:35 +00:00
Ludwig Nussel
c51d99117c use mmap on freebsd too 2010-11-22 07:12:35 +00:00
Thilo Schulz
83a3e2ae1b First batch of bug fixes reported and patched by Zack "ZTurtleMan" Middleton:
#4736
#4730
#4731
#4732
#4733
#4735
#4736
#4737
#4738
#4739
2010-08-29 17:32:54 +00:00
Thilo Schulz
3ff2666375 Fix buffer overflow, report and patch by Eugene C. (#4669) 2010-07-02 20:21:20 +00:00
Ludwig Nussel
233fcb0caa fix stack alignment dynamically for OP_BLOCK_COPY 2010-06-02 14:46:16 +00:00
Ludwig Nussel
2950bb98ea fix OP_BLOCK_COPY alignment for win64 (patch by Marcus Meissner) 2010-05-17 08:59:53 +00:00
Ludwig Nussel
760f4a1949 64bit Windows support (patch by Michael Menegakis) 2010-02-28 09:00:02 +00:00
Ludwig Nussel
a9fdf0ef3b need to hardcode "baseq3" to prevent download of id files even if compiled STANDALONE 2010-02-28 08:56:54 +00:00
Tim Angus
3ebe048968 * Fix a memory leak in OS X Sys_Dialog
* Fix compilation on Snow Leopard
2010-02-26 16:32:49 +00:00
Tim Angus
005f870ebe * Sys_Dialog for more user friendly error reporting
* (bug #3932) Recovery from bad video settings
2010-02-15 16:20:33 +00:00
Ludwig Nussel
4876413217 __WORDSIZE is not available on non-GNU systems (Dominic Fandrey) 2010-01-16 10:55:51 +00:00
Tim Angus
9018fedd16 * Clean-up whitespace in net_ip.c 2010-01-10 18:28:32 +00:00
Tim Angus
240b25a41f * (bug #4271) FreeBSD fixes (Dominic Fandrey) 2010-01-07 19:53:52 +00:00
Tim Angus
e7f9b8d193 * That probably deserves a Com_DPrintf as well 2010-01-03 22:07:20 +00:00
Tim Angus
bb30f51f67 * (bug #4357) CVAR_ROM+CVAR_ARCHIVE is not read from q3config 2010-01-03 19:44:37 +00:00
Tim Angus
78df7a1de4 * (bug #4346) Dedicated server uses 100% CPU when stdin is not a TTY
* com_speeds reports misleading values on dedicated server (Guillaume Bougard)
2009-12-24 00:40:39 +00:00
Tim Angus
fa2a698aa3 * (bug #4369) Cvar modified flags are not updated in Cvar_Get (Lakitu7) 2009-12-18 21:57:56 +00:00
Thilo Schulz
10cdcdb0a1 Forgot this one 2009-11-14 01:59:01 +00:00
Thilo Schulz
258429efe7 - Add unset command for cvars created by the user
- Fix crash bug when maximum number of cvars has been reached
- Fix cvar_restart
- Add possibility to cleanly switch mods ingame (#2819)
2009-11-09 22:41:42 +00:00
Thilo Schulz
606ce66726 This is true always, anyways. 2009-11-09 13:50:48 +00:00
Thilo Schulz
5785b45e6a Shut up warn_unused_result warning 2009-11-08 17:00:27 +00:00
Tim Angus
108705d31f * Rewrite win32 Sys_Mkdir to use CreateDirectory
* Make FS_ReplaceSeparators filter out runs of multiple separators
* Make FS_CreatePath skip creation of the root directory
2009-11-07 16:43:02 +00:00
Tim Angus
0f9a5e09eb * Improve displayed error message when pak?.pk3 is missing 2009-11-06 16:25:14 +00:00
Thilo Schulz
4ba2452f83 Use new Sys_SetEnv here 2009-11-06 10:50:16 +00:00
Tim Angus
eee9770fbf * Reimplement r1597-1598 in a better way (Oopss)
* Fix Sys_SetEnv warning
2009-11-05 20:20:23 +00:00
Thilo Schulz
621f91783c Different default values for multicast-scope on Windows and non-Windows OS 2009-11-04 00:42:22 +00:00
Ludwig Nussel
3d7d2d9f5b check all jumps (#4249) 2009-11-01 19:58:27 +00:00
Ludwig Nussel
12189381b5 fix cmp imm reg 2009-11-01 19:58:25 +00:00
Ludwig Nussel
da31866f6d report memory violations in debug mode 2009-11-01 19:58:21 +00:00
Ludwig Nussel
4722d311fd better range checks 2009-11-01 19:58:18 +00:00
Ludwig Nussel
b7eae0dca5 implement immediate argument for call 2009-11-01 19:58:16 +00:00
Ludwig Nussel
ed98f65d10 optimize const before jump 2009-11-01 19:58:12 +00:00
Ludwig Nussel
a7dee44def check const jump argument 2009-11-01 19:58:09 +00:00
Ludwig Nussel
469c986640 more security checks in interpreter (#4249) 2009-11-01 19:58:07 +00:00
Ludwig Nussel
cc9a74a218 Define stack sizes at central place
also reverts bug 4282 as stack is included in bss already so nothing that needs fixing
2009-11-01 19:58:03 +00:00
Ludwig Nussel
2fecf6d6bc get rid of gas remains 2009-10-26 21:59:03 +00:00
Tim Angus
f9c4003186 * Make [sv|cl]_packetdelay work when timescale is not 1 (arQon) 2009-10-25 21:54:45 +00:00
Ludwig Nussel
2fc4023e0b fix zlib includes 2009-10-24 14:19:39 +00:00
Thilo Schulz
c05d9c9f0c Fix uninitialized words in VM interpreter, reported by Patrick Baggett (4281) 2009-10-23 03:02:08 +00:00
Tim Angus
c8583df572 * D'oh, vm_ppc.c isn't used any more 2009-10-20 11:47:34 +00:00
Tim Angus
d47509b861 * Sort out the white space disaster in vm_ppc.c 2009-10-20 11:44:25 +00:00
Tim Angus
60ed7a4cc4 * (bug #4249) Fix similar overflow in PPC VM (untested) 2009-10-20 11:36:45 +00:00
Tim Angus
5663ff1362 * (bug #4249) Fix buffer overflow in x86 VM 2009-10-19 23:01:00 +00:00
Thilo Schulz
fd57c987c4 Fix infinite loop in case an invalid pk3 file has been downloaded from the server. Thanks tjw for reporting (#3074) 2009-10-19 22:36:17 +00:00
Thilo Schulz
d93cc3c997 Shut up warnings 2009-10-19 18:54:09 +00:00
Thilo Schulz
585e6f9840 - Applied patch from /dev/humancontroller to set cvar_modifiedFlags from Cvar_Set_f (#3636)
- Exchanged ugly code with Cmd_ArgsFrom()
2009-10-19 16:52:16 +00:00
Thilo Schulz
cc919c05fd Just unix2dos, nothing to see here ... 2009-10-19 14:00:16 +00:00
Tim Angus
639fdb4ed3 * Fix MinGW build (it doesn't have _putenv_s) 2009-10-13 15:58:23 +00:00
Thilo Schulz
186f30a74f Fix netcode inconsistency, thanks to /dev/humancontroller for the patch, see http://bugzilla.icculus.org/show_bug.cgi?id=4060 2009-10-12 17:17:15 +00:00
Thilo Schulz
e48b56559d MinGW doesn't have setenv() either, so..... 2009-10-12 16:20:01 +00:00
Thilo Schulz
d86dd71327 Fix environment variable handling for Linux, make setenv command added before parsing of configuration files. (https://bugzilla.icculus.org/show_bug.cgi?id=3626) 2009-10-12 16:03:18 +00:00
Thilo Schulz
5a882a72e4 fs_fakeChkSum is indeed obsolete and unnecessary. Removing it altogether now. 2009-10-12 03:20:44 +00:00
Thilo Schulz
fd90f4f579 Fix fake checksum handling if client is unpure, make sure client does not remain unpure after FS_Restart. Thanks to /dev/humancontroller for reporting. http://bugzilla.icculus.org/show_bug.cgi?id=3605, thanks 2009-10-11 16:34:26 +00:00
Tim Angus
8d8ed0b47a * Fix bad syntax in 64bit assembler (Undeference) 2009-10-06 17:56:36 +00:00
Thilo Schulz
b2c1618f36 Revert back color code change 2009-10-03 21:41:22 +00:00
Thilo Schulz
b433f3d01c - Modify color generating codes to only accept numbers and not alphabetical chars anymore
- Fix client clean name so that it cannot be tricked anymore, see https://bugzilla.icculus.org/show_bug.cgi?id=3313
2009-10-03 21:15:23 +00:00
Tim Angus
a7d33b1c54 * (bug #3639) BoxOnPlaneSide rewrite (Diego de Estrada/Patrick Bagget/Daniel
Gibson)
2009-09-21 00:20:43 +00:00
Tim Angus
15ec986478 * ...and make sure it compiles 2009-09-17 20:05:56 +00:00
Tim Angus
cc8990495a * (bug #4282) Fix potential overlap of VM stack and bss sections (Patrick
Baggett)
2009-09-17 09:42:05 +00:00
Tim Angus
083bd1b005 * ...and actually r1626 this time 2009-09-16 09:30:21 +00:00
Ryan C. Gordon
826f05f95f Let a separate libdir be specified for loading libraries.
Partially fixes Bugzilla #4271.
2009-09-15 06:32:05 +00:00
Ryan C. Gordon
31ce89361d Fixed amd64 JIT output bug.
Partially fixes Bugzilla #4271.
2009-09-15 06:30:00 +00:00
Ryan C. Gordon
3bca280948 Add x86_64 ARCH_STRING for FreeBSD.
Partially fixes Bugzilla #4271.
2009-09-15 06:27:19 +00:00
Ryan C. Gordon
ed241a8b73 Echo console command now colorizes by string, not token.
Fixes Bugzilla #3879.
2009-09-15 05:57:14 +00:00
Ryan C. Gordon
aedf24bd72 Allow Cvar_Toggle_f() to iterate through a list of values.
Fixes Bugzilla #3591.
2009-09-15 05:43:53 +00:00
Ryan C. Gordon
33beb9df27 Patched to compile. 2009-09-15 05:30:08 +00:00
Ryan C. Gordon
bccd80e523 Added Intel CC compatibility to vm_x86.c's inline asm.
Fixes Bugzilla #3338.
2009-09-15 03:42:29 +00:00
Ryan C. Gordon
e2d63b1fea Enable -fvisibility=hidden on Linux.
This will prevent further symbol clashes, and makes the shared libraries
 10 to 20 percent smaller.

We should enable this on other platforms, too, if we can guarantee they'll
 use gcc 4.0 or later and the platform supports it.
2009-09-15 02:48:17 +00:00
Ryan C. Gordon
5079343ecd Fixed infinite recursion of writing crashlog because we're out of file handles.
Fixes Bugzilla #3772.
2009-09-15 00:19:22 +00:00
Ryan C. Gordon
76b7468a9d Don't allow negative arguments to the "wait" console command. 2009-09-14 23:56:09 +00:00
Ryan C. Gordon
82d437ee4f Fixed uninitialized variable. 2009-09-14 19:31:42 +00:00
Ryan C. Gordon
569edcb04e Minor reworking to check command line cvars before Com_InitZoneMemory().
This lets you set com_zoneMegs from the command line (although still not
 from a config file, but oh well).

  Fixes Bugzilla #2571.
2009-09-14 19:28:59 +00:00
Thilo Schulz
9b2b9abd25 - Add error handling for Opensolaris f***ing up a numeric getnameinfo() call.
- Fix memory leak in getaddrinfo() call
Many thanks to Ben Millwood for reporting this.
2009-06-26 18:11:45 +00:00
Thilo Schulz
948f7a6015 - fix typo in previous commit to net_ip.c
- Make servers send heartbeats to master servers in ipv4 as well as ipv6 if master server has both protocols
2009-06-23 00:59:47 +00:00
Thilo Schulz
78254a626f Move these definitions over for other files to use in preparation of the next commit 2009-06-23 00:45:07 +00:00
Thilo Schulz
fb5f2a40ad minor cleanup 2009-06-23 00:19:08 +00:00
Thilo Schulz
0d6741fb23 Fix setsockopt so that setting the IPV6ONLY flag really works. 2009-06-22 23:32:11 +00:00
Thilo Schulz
3dddabcc52 Fix highest file descriptor for select(), thanks to Ben Millwood for reporting 2009-06-05 18:54:47 +00:00
Thilo Schulz
18cc7c1ed3 Make servers echo challenge codes from client getchallenge commands 2009-06-01 05:28:47 +00:00
Thilo Schulz
eaaaa6f5fc Replace a few sprintf with Com_sprintf 2009-06-01 00:18:02 +00:00
Thilo Schulz
e0a2100df5 Fix warning in Sys_RandomBytes() usage 2009-05-31 20:31:56 +00:00
Thilo Schulz
4e8a181073 I'll retain the new way seeding the random number generator.. these calls are therefore redundant 2009-05-31 20:30:37 +00:00
Thilo Schulz
e4d0c14f70 Revert changes of rand() to random() as random() was redefined in quake3. 2009-05-31 20:24:10 +00:00
Thilo Schulz
b40f1507ea - Introduce seeding of the random number generator at startup
- Replaced all engine-side occurances of rand() with random()
2009-05-31 19:48:28 +00:00
Thilo Schulz
7aed7e8861 Make command net_restart work so that port/ip settings can be changed without server restart 2009-05-29 03:14:49 +00:00
Thilo Schulz
50ca55702f - Introduce new NET_CompareBaseAdrMask for easy comparison of ip address ranges
- Overhaul of the new banning functions:
  * basic check for redundant bans/exceptions
  * introduction of sv_banFile to make it possible to configure the file where to read bans and exceptions from
  * bans can now be deleted by giving address ranges, too.
2009-05-24 16:58:08 +00:00
Thilo Schulz
09d9e5e19b Minor code cleanups 2009-05-21 21:10:25 +00:00
Ludwig Nussel
31ae3826ae make Cvar_Command use all arguments just like Cvar_Set_f (#4063) 2009-05-08 09:13:16 +00:00
Ludwig Nussel
68fa0b55a9 cvarlist: also display systeminfo and user created flags 2009-05-08 09:13:13 +00:00
Ludwig Nussel
abda6d984a whitespace correction 2009-05-08 09:13:09 +00:00
Ludwig Nussel
ec846d23b2 define STRING and XSTRING in q_shared.h (#4054) 2009-05-05 18:19:29 +00:00
Ludwig Nussel
84fbc2252f align stack before re-entering engine to make sse work (#4051) 2009-05-02 17:15:51 +00:00
Tim Angus
1bd63e59e5 * Remove superfluous comments committed with fix to bug #3999 2009-03-02 22:26:36 +00:00
Ludwig Nussel
35a27638fe initialize qport with random value instead of time (#3999) 2009-03-02 18:08:13 +00:00
Ludwig Nussel
844ee46627 qcommon: vm: Add sparc JIT compiler.
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 17:29:40 +00:00
Ludwig Nussel
30c44b1a87 qcommon: vm: sparc, like 386, doesn't need var-args conversion.
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 17:29:35 +00:00
Ludwig Nussel
17a81ff7c9 qcommon: Add idsparc and set when __sparc__ && !C_ONLY
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02 17:29:30 +00:00
Tim Angus
48d8c8876b * s/FS_FilenameIsExecutable/FS_CheckFilenameIsNotExecutable/g
* Fix potential buffer under run in FS_CheckFilenameIsNotExecutable
2009-02-26 13:02:59 +00:00
Ludwig Nussel
f5aae78481 security fix: prevent command injection via callvote 2009-01-17 23:09:58 +00:00
Tim Angus
72dea0a184 * Fix some new GCC 4.3 warnings
* Fix many many strict aliasing warnings, now that it's re-enabled
2008-11-10 23:55:22 +00:00
Ludwig Nussel
01dca75d9f realloc vm->instructionPointers on ppc64
rename VM_Malloc, VM_Free to PPC_Malloc, PPC_Free
safer constant optimization handling

Patch by Przemysław Iskra (#3796)
2008-11-10 09:46:31 +00:00
Ludwig Nussel
235945c6bb new PowerPC vm
Patch by Przemysław Iskra (#3796)
2008-11-10 09:46:01 +00:00
Ludwig Nussel
c754d6fdfb fix strict aliasing issues
Patch by Przemysław Iskra (#3805)
2008-11-03 17:03:54 +00:00
Ludwig Nussel
f86f8e8ed8 fix 64bit VM interface to work on ppc64 (#3838) 2008-11-03 17:03:44 +00:00
Thilo Schulz
83540695b3 Patch to make getnameinfo() call work on OpenBSD systems. Created by agent59692154@spamcorptastic.com 2008-10-29 15:53:46 +00:00
Tim Angus
130c0c6575 * Move command argument completion from being hard coded to being associated
with the individual commands to be completed
2008-09-16 21:05:22 +00:00
Tim Angus
47ee177430 * Supply specific identifier to the master server (Mathieu Olivier) 2008-09-15 20:24:04 +00:00
Tim Angus
b2d87c4b2a * Add Com_HexStrToInt
* Fixed some whacky indentation in q_shared.c
* Allow single character keys e.g. 'c' to be used in cl_consoleKeys in addition
  to ASCII characters
* Experimental code to ignore dead keys
2008-09-05 23:38:35 +00:00
Thilo Schulz
9dd887b2ea - Add scope id to ipv6 addresses.
- Clean up a few other ipv6 issues like removing the seemingly unnecessary MacOSX workaround.
- Bring ipv6 master server up to speed for dpmaster

Thanks go out to Mathieu Olivier for this work.
2008-08-31 19:54:29 +00:00
Tim Angus
9d0e643425 * Fix to console completion bug introduced by the last fix (from the oops
dept.)
2008-08-30 22:07:50 +00:00
Tim Angus
f1faa1d12a * Collapse common command completion code into one function and fix the
incorrect buffer size parameter to strncpy (from the
  how-the-fuck-did-this-ever-work dept.)
2008-08-27 20:00:34 +00:00
Tim Angus
36a43f2aa1 * Handle dead keys more gracefully by taking a "best guess" rather than ignoring
completely
* When activating or deactivating the mouse flush any pending motion events;
  this should stop the view moving unpredictably in these circumstances
* Add keyname completion to "unbind"
2008-08-25 21:15:25 +00:00
Tim Angus
a6382d2d9b * Fix unused variable warning
* Add USE_LOCAL_HEADERS guards to sys_loadlib.h
2008-08-23 22:45:30 +00:00
Tim Angus
b555d68b3f * (bug #3729) server dependencies on client.h (Ben Millwood)
* (bug #3731) BUILD_MISSIONPACK flag in Makefile (Gabriel Schnoering
  <gabriel.schnoering@gmail.com>)
* (bug #3756) Q3VM crashes on unaligned block copy with SIGBUS (Patrick Baggett
  <baggett.patrick@figglesoftware.com>) and...
* (bug #3755) IOQuake3 shouldn't use GCC-specific __FUNCTION__
2008-08-22 22:47:26 +00:00
Tim Angus
1af6eb9592 * More robust x86 vm entrypoint/callback assembly (Tron) 2008-08-17 23:22:06 +00:00
Tim Angus
7edcc7d16a * Use IPv6 header qcommon/wspiapi.h if it has been added by the end user
* Update README to explain the Windows XP requirement
2008-08-09 19:12:30 +00:00
Tim Angus
9a5d971705 * Fix memory leak in win32 VM code (arQon/dmitry) 2008-08-06 16:09:29 +00:00