Commit Graph

1769 Commits

Author SHA1 Message Date
Bill Currie 82809eb856 Simplify the call to PR_LoadProgsFile.
I've decided that setting pr.max_edicts and pr.zone_size as part of the
local progs initialization rather than in PR_LoadProgsFile makes more
sense. For one, it is unlikely for the limits to change every time progs is
reloaded. Also, they seem to be a property of the VM rather than the progs.
However, there is nothing stopping the caller from updating max_edicts and
zone_size every call.
2018-10-11 10:06:48 +09:00
Bill Currie 34bcf7faab Do a pure/const/noreturn/format attribute pass.
I always wanted these, but as gcc now provides warnings for functions that
could do with such attributes, finding all the functions is much easier.
2018-10-09 12:42:21 +09:00
Bill Currie 59e85b7d5e Fix a pile of dead assignments.
Some were actual bugs!
2018-09-08 22:23:57 +09:00
Bill Currie 8fd5be0ee0 Fix a pile of sizeof goofs.
While scan-build wasn't what I was looking for, it has proven useful
anyway: many of the sizeof errors were just noise, but a few were actual
bugs (allocating too much or too little memory).
2018-09-07 20:00:57 +09:00
Bill Currie 4f58429137 Fix an unhealthy pile of gcc 8 warnings.
While some of the warnings were merely annoying, some where actual bugs or
unearthed bugs in related code.
2018-08-20 00:05:00 +09:00
Bill Currie 0de0eb2fc7 Fix a bunch of bit-rot. 2018-06-08 13:21:30 +09:00
Bill Currie c3e3ed944c Plug a memory leak.
Courtesy Maraakate.
2015-10-12 23:56:42 +09:00
Bill Currie ab3f554a0e Limit the search for lit and ent files.
The search for these files will stop in the vpath that contains the .bsp
file to which they belong. This will prevent problems with
id1/maps/start.lit being used for shadows/maps/start.bsp.
2014-01-28 16:22:05 +09:00
Bill Currie 3efb0c538f Separate file search from loading.
QFS_LoadFile (and its wrappers) now  take a file handle rather than a
path. This will make vpath usage a little cleaner to implement.
2014-01-28 16:22:05 +09:00
Bill Currie a561477274 Nuke QFS_LoadStackFile().
It was used in only one place and is really not necessary (these days,
anyway).
2014-01-28 16:22:05 +09:00
Bill Currie 25a060f369 Remove the foundname param from _QFS_FOpenFile.
It's now obsolete with qfs_foundfile.
2014-01-28 16:22:05 +09:00
Bill Currie 576c73cf7c Replace qfs_file_from_pak with qfs_foundfile.
This exposes the found name, vpath and in_pak status.
2014-01-28 16:22:05 +09:00
Bill Currie e5148493db Prepend qfs_ to file_from_pak.
A little better name-spacing.
2014-01-28 16:22:05 +09:00
Bill Currie f5501fbf24 Fix a pile of automake deprecation warnings.
s/INCLUDES/AM_CPPFLAGS/g

I <3 sed :)
2013-11-24 13:11:50 +09:00
Bill Currie 6288684fa2 Fix more gcc 4.8 errors.
More actual bugs found, too.
2013-09-27 23:09:37 +09:00
Bill Currie 03fb47d7ba Fix some sizeof goofs.
Yay for continually improving gcc warnings :)
2013-09-26 17:45:30 +09:00
Bill Currie 9992a08285 Make the timedemo related timers double.
Their being float didn't cause noticeable trouble when time was 0-based,
but with it 4Gs based, timedemo results got very weird.
2013-02-27 14:32:29 +09:00
Bill Currie ad7834631c Clean out some dead code and vars from the registered checks.
The data needed for the checks has been gone from QF for a very long time
(since Jan 2000), and good riddance to it, really: I suspect it's in
violation of id's copyright on the game data (ok, it might be fair use, but
still...).
2013-02-19 13:39:09 +09:00
Bill Currie f6966f89ec Add DL_LIBS to the -x11 targets.
Something is funny with Ubuntu such that -ldl needs to be specifically
added even though QFutil's .la specifies it. I don't know if it's a libtool
issue or not, but this does work.

More will probably be necessary, but this was sufficient to get prover to
the point where qfcc segged building qwaq (0.7.2).
2013-02-14 09:54:36 +09:00
Bill Currie 0cc90a75e3 Fix a snafu in do_precache.
It seems I copied the code from precache_sound, but forgot to change
MAX_SOUNDS to max.
2013-01-31 17:03:49 +09:00
Bill Currie c376ac1ebd Add some #define magic for SOL_IP on BSD-based stacks. 2013-01-29 12:13:59 +09:00
Bill Currie e27d7cbd2d Handle alloca "correctly".
Use AC_FUNC_ALLOCA and the #ifdef mess suggested by the autoconf docs
(hidden in qfalloca.h).
2013-01-22 21:02:50 +09:00
Bill Currie ace8d9ebc5 Implement dynamic IMTs.
Now the user can create and destroy IMTs at will, though currently
destroying IMTs is currently all or nothing (imt_drop_all).

An IMT is created via imt_create which takes the keydest name (key_game
etc), the name of the IMT (must be unique for all IMTs) and optionally the
name of the IMT to which the key binding search will fall back if there is
no binding in the current IMT, but must be already defined and on the same
keydest. This means that IMTs now have user determined fallback paths. The
requirements for the fallback IMT prevent loops and other weird behaviour.

Actual key binding via in_bind is unaffected. This is why the IMT name must
be unique across all IMTs.

The "imt" command works with the key_game keydest, but imt_keydest is
provided for specifying the active IMT for a specific keydest.

At startup, default IMTs are setup to emulate the previous static IMTs so
old configs will continue to work (mostly). New config files will be
written with commands to drop all of the current IMTs and build new ones,
with the bindings and active IMT set as well.
2013-01-16 19:48:54 +09:00
Bill Currie ec6ba8a03c Make key_dest private to keys.c
This has the bonus feature of making nq pause the game when input focus is
lost (same conditions as dropping the console or bringing up the menu).
2013-01-16 19:48:54 +09:00
Bill Currie 5d8aab744f Eliminate key_none.
It is no longer needed as it was a hack to get key repeat control working
properly.
2013-01-16 19:48:54 +09:00
Bill Currie cf0729c818 Support more than one keydest callback. 2013-01-16 19:48:54 +09:00
Bill Currie 0bfe387ce4 Split up Sbar_Draw.
The view visibility setting and drawing needs to be separated so the
drawing happens every frame (for fps counter etc).
2013-01-13 20:08:01 +09:00
Bill Currie bc7cd457e3 Force a status bar update if scr_copyeverything is true.
This fixes the flickering status bar for those renderers that use
scr_copyeverything correctly. sw and sw32. glsl flukes out by not touching
scr_copyeverything and gl is wrong by always clearing it to 0 and never
setting it later.
2013-01-13 17:10:11 +09:00
Bill Currie f738e74e9d Set the hull depth for the client box_hull.
Yet another missed hull :/
2013-01-12 21:58:30 +09:00
Bill Currie b0b2b02725 Separate the drawing of the sbar from the console.
Now sbar stuff gets cshifted, but the console stuff does not.
2013-01-08 21:36:28 +09:00
Bill Currie 3aa0b1a7c0 Shuffle the client screen function order a little.
The cshift is now drawn before centerprint, console and the loading plaque.
Unfortunately, due to something odd going on, the sbar stuff is drawn by
the console rather than by Sbar_Draw :P.
2013-01-08 20:37:36 +09:00
Bill Currie 35aa510ddf Break out of think loop if nextthink doesn't progress.
This fixes the infinite loop in Sock's shadows mode. Thanks to Spike for
helping me with what should be happening. However, we're still uncertain
about just how the thinktime/sv.time logic should behave.
2013-01-06 12:02:37 +09:00
Bill Currie 04a7e87b75 Set the hull depth for the server box_hull.
I'd forgotten about server generated hulls when I did the hull depth
changes.
2012-12-29 16:25:47 +09:00
Bill Currie 6eb6b6c0ba Change pointer_t to unsigned and clean up the mess.
It doesn't make sense to have negative pointers. The size of the commit is
from enabling gcc's -Wtype-limits warning and cleaning up that mess too.
2012-12-21 21:53:13 +09:00
Bill Currie 69d9a2b452 Hit some inlining issues with a big stick.
It turns out gcc has a way to force functions to inline even when it thinks
doing so would not be a good idea (call to a modest sized function unlikely).
2012-11-29 10:18:52 +09:00
Bill Currie 1cd58b30f4 Fix the library dependencies for the servers.
It's so rarely I build without clients...
2012-11-27 13:18:23 +09:00
Bill Currie 206ab9a997 Whitespace. 2012-11-14 20:54:35 +09:00
Bill Currie ec42bde527 Make hash tables more const correct.
And clean up the resulting mess :/
2012-10-27 11:44:31 +09:00
Bill Currie 68feab89f9 Avoid PATH_MAX.
Not available in ps3toolchain, and this avoids a stack buffer :)
2012-08-18 21:44:02 +09:00
Bill Currie 9250eb83bf Yet more char index issues.
Should be getting near the end of these as qfcc tries to link in my hacked
up tree :)
2012-08-18 21:42:49 +09:00
Bill Currie 2f49a66282 Make "serverinfo key" display the value for the key.
localinfo, too. From mvdsv.
2012-07-15 06:58:24 +09:00
Bill Currie 45311e55c2 Fix an off-by-one error in qwe's substr implementation. 2012-07-14 08:07:41 +09:00
Bill Currie b1c1bf51ef Unlimited signon buffers.
Turns out it wasn't really necessary for qte2m1, but still, nice to nuke
another limit.
2012-07-13 15:22:53 +09:00
Bill Currie 16520e4aaf Get "cancel" working correctly.
First, it was segging due to closing the file handle prematurely, then it
wasn't deleting the mvd (only the text).
2012-07-13 14:41:10 +09:00
Bill Currie 02de92abb0 Use "return" strings instead of temp strings for qwe.
QF's temp strings have very different semantics. Return strings are the
ones with the same semantics (only 16 slots instead of 8 in mvdsv:)
2012-07-13 11:43:37 +09:00
Bill Currie 2dea74ce91 Get the client entnum from the right place.
When trying to get the client ent num from an entity's owner, it helps if
the owner field is used :P Fixes a segfault firing nails (and sometimes
rockets) in freewill's coop mod. Hopefully fixes his "trigger in clipping
list" bug.
2012-07-13 11:12:31 +09:00
Bill Currie 6fe32103ea Do a bit of bound() usage auditing.
While these seem to be mostly harmless, having function calls in the
bounded value can be nasty.
2012-07-12 19:33:51 +09:00
Bill Currie 20ad50407d Correct the size adjustment for qwe's newstr.
It seems the correct interpretation is that the size parameter includes the
trailing 0 (going by mvdsv source).
2012-07-06 10:53:24 +09:00
Bill Currie a558f1b0f4 Re-enable the location marker code.
Drawing is controlled via the cl_draw_locs command. Entities are still
drawn, but that might not be such a bad thing after all.
2012-07-06 10:39:28 +09:00
Bill Currie 3519931b78 Limit beams to one per entity.
Note that this is only a soft-limit and prevents excessive beams when only
one is expected. If more beams are desirned, just use 0 for the entity
number.
2012-07-06 08:29:21 +09:00