Commit Graph

1792 Commits

Author SHA1 Message Date
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
Bill Currie 301a6431c6 Correct a comment, and more diff reduction.
It turns out NQ "never" sent coordinats at 1/16 resolution: even q1source
sends coords at 1/8 resolution. This gets rid of an annoying difference.
2012-06-15 22:02:16 +09:00
Bill Currie 5bae5b3740 Much diff noise reduction. 2012-06-15 22:02:16 +09:00
Bill Currie 81dc750857 Pretend to allow screen offsets.
Because qw's maxclients is always > 1, they'll never work, though :)
2012-06-15 22:02:16 +09:00
Bill Currie e6ce44fde7 Change qw's punchangle to a vector.
Consistency with nq :) (however, only pitch works in qw).
2012-06-15 22:02:16 +09:00
Bill Currie d561d5587d Move the simangles hack out of cl_view.
The places that will need to be fixed are now three, but cl_view.c now
doesn't mess with values it shouldn't alter.
2012-06-15 22:02:16 +09:00
Bill Currie a49c123d84 Shuffle some fields around in cient_state_t. 2012-06-15 22:02:15 +09:00
Bill Currie 83d6dd7262 Fix idealpitch and viewheight in qw.
For certain values of "fix" ;). Both are brought back to life but
idealpitch is never set (always 0) and veiwheight is set in V_RenderView().
However, this brings the rest of the code in cl_view.c just that little bit
closer to merged :)
2012-06-15 22:02:15 +09:00
Bill Currie 3fd279ea6c Use info strings for scoreboard names in nq.
Nukes a strcpy and a buffer, and is one step closer to merged client data.
2012-06-15 22:02:15 +09:00
Bill Currie afec630d1a Nuke some obsolete fields.
scoreboard_t and player_info_t haven't used the
_color/_topcolor/_bottomcolor fields for a while (since glsl).
2012-06-15 22:02:15 +09:00
Bill Currie fd78d900e9 Complete all stuff commands when getting server info/data.
When the stufftext buffering was implemented, we forgot about
svc_serverdata...

While nq might normally not have the issue, I thought it best to implement
in nq, too.
2012-06-15 22:02:15 +09:00
Bill Currie 17b43ba736 Clean up svc_disconnect differences.
Now that nq has distinct ca_active and ca_connected, this will work :)
2012-06-15 22:02:14 +09:00
Bill Currie e730608dd7 Implement r_flatlightstyles from fitzquake. 2012-06-15 22:02:14 +09:00
Bill Currie 7299ca7bec More cl_parse tidyup.
svcs are now in order: makes it even easier to see what's different between
nq and qw.
2012-06-15 22:02:14 +09:00
Bill Currie 9c440ad9e2 Rename entity_state_t's skln to skinnum in nq.
Also some whitespace and comment corrections.
2012-06-15 22:02:14 +09:00
Bill Currie 25cb618e4d Clean up client_static_t a little more. 2012-06-15 22:02:13 +09:00
Bill Currie 1aa2c22169 Nuke MAX_SCOREBOARDNAME from qw.
It was different from nq's MAX_SCOREBOARDNAME, and not really necessary,
what with being able to uuse info_key_t caches.
2012-06-15 22:02:13 +09:00
Bill Currie b4ad695e16 Make info_t opaque.
I didn't like the way client/server code was poking around at the
implementation. Instead, provide a couple of accessor functions for the
same information.
2012-06-14 22:46:23 +09:00
Bill Currie e7c3ae911f Clean up some diff noise. 2012-06-14 22:45:24 +09:00
Bill Currie 96785ccec7 Clean up chase/spectator camera stuff.
o  Rename nq's cl_cam.c to cl_chase.c.
 o  Split out the chase cam stuff from qw's cl_cam.c to cl_chase.c
2012-06-14 22:45:05 +09:00
Bill Currie 2dfa871794 Try mvd before qwd when no extension is given. 2012-06-03 20:12:34 +09:00
Bill Currie 93e35d7ec0 Add demo format auto-detection.
nq now rejects anything that doesn't look like a .dem, and qw not only
rejects anything that looks like neither a .qwd nor a .mvd, but even
detects which one is being played by the contents rather than the file name
(foo.mvd.gz would be mis-detected as a qwd!!).
2012-06-03 20:04:02 +09:00
Bill Currie dfc8f8bb20 Minor cleanup of CL_Record() and give nq default demo names. 2012-06-03 20:03:43 +09:00
Bill Currie 23a38738fc Massive whitespace cleanup.
Lots of trailing whitespace and otherwise blank lines.
2012-05-22 08:23:22 +09:00
Bill Currie 01773c7cd3 Fix the infinite think loop when playing honey.
The change to nq SV_RunThink to match that in qw finally bit my bum. I
suspect it's really a bug in the honey progs (using ltime on a non-pusher),
but QF locking up is not very friendly. I want to keep the option of having
a think loop in the same frame for progs that expect it (using
self.nextthink = time), but also NQ's original method of running think
every frame.  Hopefully no progs expect "self.nextthink = time" to run
every frame rather than loop within the current frame.
2012-05-20 22:45:30 +09:00
Bill Currie f9a384ffd4 Make simple gravity acceleration framerate independent.
Now it doesn't matter if you get 22 fps or 72, you jump the same height,
which actually happens to be slightly higher than the previous 72fps jump.
Effectively, you jump the height you would if you got infinite fps ;)
2012-04-28 14:54:58 +09:00
Bill Currie a7870a98a1 Apply a couple of patches from calim of nouveau.
One's an actual bug, the other a bit of error checking (not sure how
necessary it is, but it's in code that we don't /want/ to run, so it can't
hurt :)
2012-04-25 08:48:46 +09:00
Bill Currie bc1b483525 Nuke the rcsid stuff.
It's pretty useless in git.
2012-04-22 10:56:32 +09:00
Bill Currie 97968422f8 Fix an uninitialized variable found by valgrind. 2012-04-11 14:58:56 +09:00
Bill Currie a0e143e601 Check for fog functions before calling them.
Not all renderers support fog.
2012-04-11 14:58:55 +09:00
Bill Currie 4d9c3408a1 Start putting the pieces back together.
The renderer now gets initialized and things sort of work (qw-client will
idle, though nothing is displayed). However, as the viddef stuff is broken,
it segs on trying to run the overkill demo.
2012-04-11 14:58:55 +09:00
Bill Currie 352eb5ece4 Move console init to after vid/render init. 2012-04-11 14:58:55 +09:00
Bill Currie 437ff888c0 Fix some missing backslashes in qw's Makefile.am.
Wow, everything links with static plugins.
2012-04-11 14:58:55 +09:00
Bill Currie 7ed33f6345 Hide D_FlushCaches.
There'd been a way to do so all along :/ There might be some issues with
this, but those will be easy to fix :)
2012-04-11 14:58:55 +09:00
Bill Currie ad61c7a30c Start working on creating the render plugins.
Things blow up quite nicely. :)
2012-04-11 14:58:53 +09:00
Bill Currie 8530959752 Link the model libs to the render plugins. 2012-04-11 14:58:53 +09:00
Bill Currie 8e91fb7bc1 Get the basics linking.
Still, nothing will work: no plugins are loaded and they're all broken
anyway.

glx, sgl, glslx etc are going away, just the basics will be built: fbdev
(probably go away eventually), sdl, x11 and hopefully someday win. That's
actually the only reason anything links.
2012-04-11 14:58:53 +09:00
Bill Currie a4c280f2b2 Take the first step towards render plugins.
No clients link. Even if they did, nothing would work.
2012-04-11 14:58:53 +09:00