Commit Graph

1929 Commits

Author SHA1 Message Date
Bill Currie c4ee7ff68a [qw] Check packet size before checking ping ack
Ping ack (A2A_ACK) is always a 1-byte packet, so check that the A2A_ACK
is the only byte in the packet before passing the packet to the server
list code. Fixes the mysterious dropped packet every 256 packets as the
low eight bits of the packet's sequence number equalled A2A_ACK.
2021-07-11 09:26:05 +09:00
Bill Currie 3c0ad2ca71 [qw] Fix some server status output issues
The uptime display had not been updated for the offset Sys_DoubleTime,
so add Sys_DoubleTimeBase to make it easy to use Sys_DoubleTime as
uptime.

Line up the layout of the client list was not consistent for drop and
qport.
2021-07-11 08:18:02 +09:00
Bill Currie 755ef524e4 [video] Use views instead of conwidth and conheight
conwidth and conheight have been moved into vid.conview (probably change
the name at some time), and scr_vrect has been replaced by a view as
well. This makes it much easier to create 2d elements that follow the
screen size (taking advantage of a view's gravity) which will, in the
end, make changing the window size easier.
2021-07-10 18:04:34 +09:00
Bill Currie e81d690b51 [input] Create QF input library using keys.c
This refactors (as such) keys.c so that it no longer depends on console
or gib, and pulls keys out of video targets. The eventual plan is to
move all high-level general input handling into libQFinput, and probably
low-level (eg, /dev/input handling for joysticks etc on Linux).

Fixes #8
2021-07-05 16:26:07 +09:00
Bill Currie 813497a1aa [ui] Create library for UI support code
Currently this has text buffer, input line, vrect and view code.
2021-06-12 22:50:51 +09:00
Bill Currie 1e9329ccf6 [nq,qw] Stop wring to config.cfg
QF now uses its own configuration file (quakeforge.cfg for now) rather
than overwriting config.cfg so that people trying out QF in their normal
quake installs don't trash their config.cfg for other quake clients. If
quakeforge.cfg is present, all other config files are ignored except
that quake.rc is scanned for a startdemos command and that is executed.
2021-04-12 22:09:09 +09:00
Bill Currie 972b0f8a70 [util] Make sizebuf and msg sizes unisgned
And clean up the mess.
2021-04-04 15:53:53 +09:00
Bill Currie 63e30e6ae0 [win] Fix a handful of small bugs for windows
Only 64-bit windows is tested, and there are still various failures, but
QF is limping along in windows again.

nq-sdl works for sw, and sw32, gl and glsl are mostly black (but not
entirely for gl?),  vulkan is not supported with sdl.

nq-win works for sw and sw32, and sort of for vulkan (very dark and
upside-down?). gl and glsl complain about vid mode,

qw-client-[sdl,win] seem to be the same, but something is wrong with the
console (reading keyboard input).
2021-03-30 20:19:20 +09:00
Bill Currie e93cff124c [nq,qw] Fix strftime formats for windows
The incorrectness was hidden by the non-literal strings.
2021-03-30 17:38:42 +09:00
Bill Currie 5f93c115ff [util] Make developer flag names easier to manage
They're now an enum, and the flag part of the name is all lowercase, but
now the flag definitions and names list will never get out of sync.
2021-03-29 22:38:47 +09:00
Bill Currie 6fea5f5e1a [build] Add -Wformat-non-literal option
While this caused some trouble for pr_strings and configurable strftime
(evil hacks abound), it's the result of discovering an ancient (from
maybe as early as 2004, definitely before 2012) bug in qwaq's printing
that somehow got past months of trial-by-fire testing (origin understood
thanks to the warning finding it).
2021-03-29 17:27:06 +09:00
Bill Currie a754dbca37 [util] Make va return const char *
And clean up the resulting mess.

I don't know why it wasn't doing so, but it certainly should have been.
2021-03-29 17:24:30 +09:00
Bill Currie 88ff254f42 Get QF cross-compiling using MXE/mingw32
This includes -win clients (no clue if anything actually works yet).
2021-03-27 20:09:37 +09:00
Bill Currie a9bd436837 [build] Autoconfiscate printf format attribute
I don't know if gnu_printf is appropriate for all cases, but it is
needed for mingw32.
2021-03-27 19:52:59 +09:00
Bill Currie c9f1d770e0 Merge master into csqc-improvements
That was a mess
2021-03-25 22:01:31 +09:00
Bill Currie d39adc6a64 Reduce the diff noise for client_state_t.
And add a struct tag. Any added fields are, of course, unused. Most of the
changes are to bring the comments into agreement.
2021-03-25 18:16:12 +09:00
Bill Currie 0a89e88ef3 Clean up some nasty formatting. 2021-03-25 18:15:45 +09:00
Bill Currie bc8e37332c Make qw's cl.players dynamically allocated. 2021-03-25 18:15:28 +09:00
Bill Currie d514d4e465 Bring client_state_t a little closer to matching. 2021-03-25 18:15:02 +09:00
Bill Currie 52b714ea57 Move qw's player_info_t to client/state.h
And use it instead of scoreboard_t in nq.
2021-03-25 18:14:53 +09:00
Bill Currie 66fda1fddb Rewrite edict access.
The server edict arrays are now stored outside of progs memory, only the
entity data itself (ie data accessible to progs via ent.fld) is stored in
progs memory. Many of the changes were due to code accessing edicts and
entity fields directly rather than through the provided macros.
2021-03-25 18:13:48 +09:00
Bill Currie 457306edad [qw] Fix handling of sky box name
The handling was broken during some merge work. Need to find a good way
to unify it all (probably by giving nq a fake serverinfo).
2021-03-25 15:56:01 +09:00
Bill Currie a3c1b2e992 [util] Rename qfplist.[ch]
The name is a hold-over from before the current quakeforge tree and the
QF include directory.
2021-03-21 16:13:03 +09:00
Bill Currie e3444b726f [model] Add a re-entrant Mod_LeafPVS
Double benefit, actually: faster when building a fat PVS (don't need to
copy as much) and can be used in multiple threads. Also, default visiblity
can be set, and the buffer size has its own macro.
2021-03-20 12:13:58 +09:00
Bill Currie 0ace799b27 [util] Support commands with a data parameter
Useful for avoiding a pile of wrapper functions that merely pass on
command-specific data to the actual implementation. Used to clean up the
wrappers in nq and qw cl_input.c
2021-03-20 03:56:16 +09:00
Bill Currie dc7cb97481 [qw] Remove viewangles from client state
Other than the one line in cl_pred.c, it's redundant, but it looks to be
just a redundant copy from ancient times.
2021-03-20 02:24:47 +09:00
Bill Currie 5cf1da7c25 [client] Finish moving onground to viewstate
Missed this in the entity cleanup (really, should have been separate
commits, but oh well).
2021-03-20 00:58:37 +09:00
Bill Currie 82e58dae5f [qw] Disable lerping on player model change
This seems to be an ancient bug, but may have been exposed by the recent
entity changes (was certainly highlighted by Vulkan)
2021-03-20 00:08:21 +09:00
Bill Currie 5bf21931c7 [renderer] Remove more old fields from entity_t
The only transform related field remaining is old_origin. This also
brings the renderer closer to using simd (lots of stuff to fix still,
though).
2021-03-20 00:08:21 +09:00
Bill Currie 2015474468 Move and clean up clview.h
Redundant or dead prototypes deleted, and the client/view.h seems a good
place for the file.
2021-03-12 11:48:53 +09:00
Bill Currie 8466de2325 [client] Use vec4_t in entity_state_t
And clean up the mess (sort of:P)
2021-03-11 16:19:49 +09:00
Bill Currie 36761192a6 [qw] Partially clean up muzzle flash handling
It needs some more work (see FIXME in the code).
2021-03-11 15:23:35 +09:00
Bill Currie ca38f9b616 [qw] Use entity_state_t as a base for player_state_t
This will, in the long run, help clean up a lot of the differences in
the handling of entities in the clients.
2021-03-11 14:27:36 +09:00
Bill Currie c9bbc2971a [qw] Rename view_message to view_state
Makes more sense to me.
2021-03-11 12:47:08 +09:00
Bill Currie abaccbec53 [client] Move qw's loc code into client
This makes the location code available to nq (not used yet) but more
importantly moves some definitely client-side code into the right place.
2021-03-11 11:53:38 +09:00
Bill Currie b8267f2edd [client] Merge nq/qw entity effects code 2021-03-11 11:25:04 +09:00
Bill Currie 51e8694195 [qw] Use a dynamic array to track static entities
This takes care of another fixme in the cleanup of entity_t.
2021-03-11 09:11:08 +09:00
Bill Currie 098ceed5ff [client] Merge nq and qw temp entity handling
This finally gets cl_tent merged away.
2021-03-10 18:04:18 +09:00
Bill Currie fbc1bd9f6e [renderer] Clean up entity_t to a certain extent
This is the first step towards component-based entities.

There's still some transform-related stuff in the struct that needs to
be moved, but it's all entirely client related (rather than renderer)
and will probably go into a "client" component. Also, the current
components are directly included structs rather than references as I
didn't want to deal with the object management at this stage.

As part of the process (because transforms use simd) this also starts
the process of moving QF to using simd for vectors and matrices. There's
now a mess of simd and sisd code mixed together, but it works
surprisingly well together.
2021-03-10 00:01:41 +09:00
Bill Currie 0bfb60775e [util] Ensure hunk allocs are cache alligned
This doesn't seem to make much difference in the vulkan renderer, but it
certainly doesn't hurt.
2021-02-03 13:19:19 +09:00
Bill Currie 34dc7cf2df [models] Move brush data into its own struct
This is a big step towards a cleaner api. The struct reference in
model_t really should be a pointer, but bsp submodel(?) loading messed
that up, though that's just a matter of taking more care in the loading
code. It seems sensible to make that a separate step.
2021-02-01 19:31:11 +09:00
Bill Currie bb6c6963d2 [model] Clean up the globals around model loading
Covers only the generic load code (alias etc to follow), but this should
take care of a lot of issues in the future.
2021-02-01 14:39:00 +09:00
Bill Currie 7970525ef4 [util] Make va thread-safe
It now takes a context pointer (opaque data) that holds the buffers it
uses for the temporary strings. If the context pointer is null, a static
context is used (making those uses of va NOT thread-safe). Most calls to
va use the static context, but all such calls have been formatted
consistently so they are easy to find when it comes time to do a full
audit.
2021-01-31 16:05:48 +09:00
Bill Currie 6e636a27d0 [renderer] Continue the job of merging SCR_UpdateScreen
I think this is probably as merged as it will get (though the update
callbacks can probably do with some merging).
2021-01-11 16:57:31 +09:00
Bill Currie ab04a1915e [build] Fix a pile of gcc 10 issues
gcc got stricter about array accesses, complicating progs macros, and
much better at detecting buffer overflows.
2020-12-21 14:14:29 +09:00
Bill Currie 86b5b30b45 Merge branch 'master' into vulkan 2020-06-25 14:03:52 +09:00
Bill Currie 6d5ffa9f8e [build] Move to non-recursive make
There's still some cleanup to do, but everything seems to be working
nicely: `make -j` works, `make distcheck` passes. There is probably
plenty of bitrot in the package directories (RPM, debian), though.

The vc project files have been removed since those versions are way out
of date and quakeforge is pretty much dependent on gcc now anyway.

Most of the old Makefile.am files  are now Makemodule.am.  This should
allow for new Makefile.am files that allow local building (to be added
on an as-needed bases).  The current remaining Makefile.am files are for
standalone sub-projects.a

The installable bins are currently built in the top-level build
directory. This may change if the clutter gets to be too much.

While this does make a noticeable difference in build times, the main
reason for the switch was to take care of the growing dependency issues:
now it's possible to build tools for code generation (eg, using qfcc and
ruamoko programs for code-gen).
2020-06-25 11:35:37 +09:00
Bill Currie 4cef9792f4 [util] Make hash-tables semi-thread-safe
They take a pointer to a free-list used for hashlinks so the hashlink
pools can be per-thread. However, hash tables that are not updated are
always thread-safe, so this affects only updates. progs_t has been set
up such that it is easy for multiple progs within one thread can share
hashlinks.
2020-03-25 15:43:16 +09:00
Bill Currie d0c8d75e92 Clean up unnecessary includes of signal.h 2020-03-23 16:18:08 +09:00
Bill Currie 88b4046632 [util] Pass a data pointer to shutdown functions
And clean up the mess.
2020-03-22 00:57:54 +09:00
Bill Currie ae70efcaf5 [qw] Clean up a comment 2020-03-21 16:27:53 +09:00
Bill Currie 1a7add3f6d Merge branch 'master' into vulkan 2020-03-20 13:04:41 +09:00
Bill Currie 6739f5df4d Fix an out-by-one error
Noticed while sorting out pr_argc
2020-02-25 17:39:34 +09:00
Bill Currie a55b9544ac Improve handling of pr_argc
It is now set to 0 when progs are loaded and every time
PR_ExecuteProgram() returns. This takes care of the default case, but
when setting parameters, pr_argc needs to be set correctly in case a
vararg function is called.
2020-02-25 17:36:29 +09:00
Bill Currie 4b7ecdf74a Make PR_Init take an instance to initialize
This allows internal sub-systems to do per-instance initializations
without other engine systems having to know about them.
2020-02-23 18:32:16 +09:00
Bill Currie 81083698a8 Move to using an in-memory form of ddef_t
This allows the VM to work with extended ddefs transparently. It seems
to have uncovered a typedef alias relocation bug, though.
2020-02-22 22:33:44 +09:00
Bill Currie 9ff4eefe65 Merge branch 'master' into vulkan 2020-02-16 18:17:50 +09:00
Bill Currie df7c08a010 Add support for doubles to Ruamoko
Only as scalars, I still need to think about what to do for vectors and
quaternions due to param size issues. Also, doubles are not yet
guaranteed to be correctly aligned.
2020-02-15 23:49:12 +09:00
Bill Currie 4e4d1b99b4 Clean up all the system shutdown calls
I added Sys_RegisterShutdown years ago and never really did anything
with it: now any system that needs to be shutdown can ensure it gets
shutdown on program exit, and in the correct order (ie, reverse to init
order).
2019-07-12 23:15:26 +09:00
Bill Currie 3e1520c246 Move vid callback access into vid
The plan is to move the callbacks into a "private" struct.
2019-07-08 12:46:22 +09:00
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
Bill Currie 66ef8e16c1 Fix the ghost entities in demo playback.
Really, when cl_nodelta is in effect (eg, .qwd demo recording and thus
playback). QW now uses the new shared entity state block as I'd intended.
Thanks to the cleanup of ghost entities (ie, entities that have been
removed but continue to be rendered), glsl overkill has gone from 157 to
163 fps :)
2012-07-05 19:06:35 +09:00
Bill Currie 80bc0e9fb8 Make nq and qw use the new entity state struct.
This isn't really the best solution, but it does get things being shared
with the minimum of fuss.
2012-07-05 09:39:16 +09:00
Bill Currie b65c41efcb Move the colormod lookup table into a new lib.
libQFclient is now here :) The first shared code is the lookup table.
2012-07-05 09:39:16 +09:00
Bill Currie 1a1b406e5b Fix timedemo in qw.
td_lastframe needs to be a float in qw. It seems the meaning changed from
nq to qw, but that's rather bogus. I need to look further into juat what's
going on, but at least now timedemo works.
2012-07-02 20:59:03 +09:00
Bill Currie 3d56084f59 Fix a memory leak.
Entity/Edict leafs weren't being freed when the entity was freed.
2012-07-01 09:05:16 +09:00
Bill Currie 249eb8e5d2 Bah, more segfaults :P 2012-06-29 20:26:27 +09:00
Bill Currie cf48d5ab04 Make "playdemo" without args replay the last demo. 2012-06-29 18:44:42 +09:00
Bill Currie 7eaa6b72d6 Spawn a green dlight for chatting players.
It's not very big, and shows as green only in gl, but at least there's some
indication until I sort out icons etc.
2012-06-29 18:00:21 +09:00
Bill Currie 891500ac58 Fix yet another segfault.
Yet more bugs related to the change to using info key direct access :P
2012-06-29 18:00:21 +09:00
Bill Currie 39241867bb Pass the chat info key onto clients.
The server's info key filtering is "explicit permit".
2012-06-29 18:00:21 +09:00
Bill Currie baa0948bcb Set the chat info key to the appropriate value on key_dest change. 2012-06-29 18:00:21 +09:00
Bill Currie 52146947c1 First part of chat info support.
The idea is to allow other clients know when the player is chatting,
fiddling with the console, etc.
2012-06-29 18:00:21 +09:00
Bill Currie a3fe8d56b8 Don't broadcast name changes for spectators.
At the request of freewill. There might be a better mechanism, though...
2012-06-29 15:13:03 +09:00
Bill Currie 3406cad99a Many distcheck fixes.
Yay, bitrot :P
2012-06-29 10:49:21 +09:00
Bill Currie bf00009cc8 A touch of whitespace cleanup. 2012-06-28 16:12:06 +09:00
Bill Currie 276b6f9662 Add support for sv_antilag (from fteqw).
I'm not 100% certain it actually works, but it doesn't seem to have broken
anything :)
2012-06-28 16:03:56 +09:00
Bill Currie 40da338674 Change SV_ClipToLinks's clip.type to be flags.
More feature swiping from fte: the flags are needed for antilag, but I
thought I'd grab the related features (mainly linking) while I was at it.
2012-06-28 15:09:49 +09:00
Bill Currie 64bfde7320 Allow extension builins to override standard builtins. 2012-06-28 15:07:03 +09:00
Bill Currie 3626f34c9a Add entnum to edict_t for faster edict->num.
Swiped from fte :)
2012-06-28 14:43:29 +09:00
Bill Currie 6e5bc62f78 More client.h cleanup. 2012-06-28 07:22:28 +09:00
Bill Currie 8584021311 More client.h tidyup.
Whitespace and shuffling fields around. Now diffing the two headers makes
sense in client_static_t and client_state_t.
2012-06-28 07:22:28 +09:00
Bill Currie f128aca207 Nuke a FIXME.
That was a rather evil hack, but what's worse is when I finally fixed the
problem, I didn't fix the fixme :P
2012-06-28 07:22:28 +09:00
Bill Currie bcc1de3b84 Fix the missing health pickup sound on aerowalk.
Caused by an out-by-one error thanks to the insane way the sound list is
built. Came about when doing the model/sound list sanitation during the
GLSL project, but this one was sneakier as it resulted only in a missing
sound rather than a segfault.
2012-06-26 11:06:59 +09:00
Bill Currie 9b3f3905b5 Make CL_ParseStartSoundPacket easier to read.
Really just add a "bits" var from which to extract the info rather than
overloading "channel".
2012-06-26 10:51:11 +09:00
Bill Currie 409604ebfd Fix some build errors that snuck in. 2012-06-23 19:39:24 +09:00
Bill Currie c7a6293780 Make the logic around the call to CL_ModelEffects more sensible. 2012-06-20 20:41:26 +09:00
Bill Currie 608c30942c Factor out model based particle effects.
Moving them into a separate function both cleans up entity linking and
makes things easier for csqc when it comes.
2012-06-20 08:02:29 +09:00
Bill Currie ca1a5dfe8f Fix the missing console prompt on demo stop.
CL_StopPlayback was incorrectly calling Key_SetKeyDest with key_game. As
CL_SetState calls Key_SetKeyDest with the appropriate parameter,
CL_StopPlayback calling Key_SetKeyDest is actually redundate, so just
change key_game_target back to IMT_0.
2012-06-16 16:05:24 +09:00
Bill Currie b0b07d09b9 Support demos recorded by qizmo.
I guess it's just part of how qizmo works, but a few extra packets get into
the demo before the packet with the serverdata svc :/ More checking needs
to be done (only the initial connect packet is checked), but this works for
now.
2012-06-16 13:15:48 +09:00
Bill Currie 2897dc5a16 Frame-rate independent cshift fades.
As per mh's post on inside3d.com. I don't see any difference, but it still
fades well, so... :)
http://forums.inside3d.com/viewtopic.php?f=12&t=4899
2012-06-15 22:02:18 +09:00
Bill Currie fc67f8ce93 Fix up some comments.
Lowsy grammar and inaccurate info...
2012-06-15 22:02:18 +09:00
Bill Currie 01466e4e43 Factor out the next packet check code. 2012-06-15 22:02:18 +09:00
Bill Currie e04777571d Factor out the demo packet reading. 2012-06-15 22:02:18 +09:00
Bill Currie 1a9fca531e Factor out the demotime get/rewind code.
One step towards a tidier CL_GetDemoMessage :)
2012-06-15 22:02:18 +09:00
Bill Currie aa2a8e8909 Mostly "merge" cl_screen.c.
Down to protocol/networking differences.
2012-06-15 22:02:17 +09:00
Bill Currie d37b85f73f Split out the rss code into its own file. 2012-06-15 22:02:17 +09:00
Bill Currie 8dc1961e8c Yet more diff noise reduction. 2012-06-15 22:02:17 +09:00
Bill Currie c8e3cf05d0 Finish the "merge" of V_CalcBob.
qw now uses cl.onground instead of pmove's onground (d'oh). nq now has a
dummy spectator flag.
2012-06-15 22:02:17 +09:00
Bill Currie c4d7b65a05 Much diff noise reduction in V_CalcRefdef.
NQ's client-side onground now works similarly to QW's: -1 = not on ground,
0+ = on ground (plane num?) but only 0 is used in NQ as the necessary
information is not sent over the network.
2012-06-15 22:02:17 +09:00
Bill Currie 7dd400d04a "Merge" V_CalcRoll. 2012-06-15 22:02:16 +09:00