Commit graph

1080 commits

Author SHA1 Message Date
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
7c1d9d2b84 Make the angle and light hacks optional.
I'd forgotten that ED_ConvertToPlist mangled light into light_lev and
single component angle values into a vector. This fixes much of the
breakage in qflight (but not the light levels)
2013-03-07 09:11:23 +09:00
Bill Currie
675db274a6 Use Sys_Error instead of PR_Error in ED_ConvertToPlist.
ED_ConvertToPlist is now independent of the progs engine as its only use
for the progs_t * param was for PR_Error.
2013-03-07 09:11:22 +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
6edf8133aa Handle hipnotic demos when checking for .dem.
hipdemo1.dem has a single leading space. They probably did "%2d" for the
track number, as there is no space before the minus sign in the other
hipnotic demos.
2013-01-31 17:03:59 +09:00
Johnny on Flame
637d751aa7 Saves axes behaviours on the config file. 2013-01-27 13:17:12 +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
3cb0f3e183 Remove viddef in favor of vid in the renderers.
This fixes the status bar refresh issues in sw. The problem was that with
two viddef's hanging around, things got a little confused and recalc_refdef
wasn't getting into the renderer.
2013-01-16 11:23:47 +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
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
6b97967a68 Use g instead of e for the fp values.
Need to up the precision by one due to the difference between g and e, but
much prettier. Might need to rename that function :P I wish I'd thought to
check if g would work, but thanks to divVerent for the suggestion.
2013-01-08 20:15:24 +09:00
Bill Currie
b096a0242e Write fp values to saved games with enough precision.
That is, enough precision to uniquely identify the fp values. No drifts!
2013-01-08 18:50:44 +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
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
b5f2da0b78 Copy the entity leaf leak from qw. 2012-11-29 10:15:52 +09:00
Bill Currie
130494f774 Bail out if the saved game data has too many entities. 2012-07-22 12:08:09 +09:00
Bill Currie
3042c2bb1a Create backups of quick.sav.
F6 is fantastic, until you hit it by mistake after dieing when you meant
to hit F9 (I've done that way too often). quick.sav is still the last file
written via F6 (so F9 is unaffected), but now the previous quick.sav
becomes quick1.sav. Up to 5 (currently) backups will be kept: quick1 is
the newest, quick5 the oldest. A menu for accessing the backups has been
added as a sub-menu of the load menu.
2012-07-21 22:41:57 +09:00
Bill Currie
068bc7a627 Potential client state fix ala Baker.
I'm not sure it's really relevant to QF, but applying it doesn't hurt.
2012-07-21 17:53:49 +09:00
Bill Currie
543c4b2442 Don't force the console for ca_connected.
It's valid not to draw the console in ca_connected when changing levels.
2012-07-21 16:37:14 +09:00
Bill Currie
ec94a1e459 Update entity origin and angles even when invisible.
This fixes the broken intermissions. There might be a better fix, but this
will do for now because the one alternative solution (getting
V_CalcIntermissionRefdef to poke directly at entity states) is not
something I particularly want to do.
2012-07-21 15:39:11 +09:00
Bill Currie
1bc2080bd3 Make noclipping players not touch triggers. 2012-07-18 14:51:53 +09:00
Bill Currie
b1a0086dae Fix the "missing" grenades in nq demos (gl).
Actually, they were microscoping (scale 0!)
2012-07-13 19:26:27 +09:00
Bill Currie
d4f4e450e6 Fix the bogus loading plaque when disconnected (nq). 2012-07-06 10:44:29 +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
dea2f48477 Move entity_state_t into client/entities.h
Also, start working on the shared entity manager.
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
49f7d1ad6d Fix the bogus entity scales in the gl render.
It seems none of the other renderers support entity scale...
2012-07-03 20:07:18 +09:00
Bill Currie
602cd84e21 FIx some player color issues found by valgrind. 2012-07-02 19:24:39 +09:00
Bill Currie
cf48d5ab04 Make "playdemo" without args replay the last demo. 2012-06-29 18:44:42 +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
0d8cd72a89 Fix colormap and colormod.
Fitzquake doesn't support colormod, so it needs to be copied from baseline
at all times.

colormap was just a thinko/typo.
2012-06-28 14:36:05 +09:00
Bill Currie
e41d269617 Fix the messed up smoke trails. 2012-06-28 07:22:29 +09:00
Bill Currie
d15ec2c95b Fix the funny angle lerp for grenades etc. 2012-06-28 07:22:29 +09:00
Bill Currie
53212deb61 Fix the funky roll angle glitch.
Introduced in the cl_view merging :/
2012-06-28 07:22:28 +09:00
Bill Currie
f962db1820 Nuke cl_entity_state_t.
It was a hack to help with cleaning up the renderer, but is now in the way
of merging the clients.

This happens to fix the position/angle lerping, though angles behave a
little oddly.
2012-06-28 07:22:28 +09:00
Bill Currie
6e5bc62f78 More client.h cleanup. 2012-06-28 07:22:28 +09:00
Bill Currie
56f68cf119 Nuke looptrack from nq's client_state_t.
It's never actually used. The byte is still read from the network packet,
of course.
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
9cb7e00946 FIx the segfault on changing levels caused by ca_active changes.
Host_Reconnect_f only set cls.signon to 0, so finding it as a place to
tweak was not so trivial :P Now it calls CL_SetState to do the job properly
:)
2012-06-24 11:22:37 +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
0dbdf6e1ac Factor out the extra entity effects code.
NQ only (not applicable to QW). Makes the entity loop a little easier to
read.
2012-06-20 19:53:14 +09:00
Bill Currie
2295c1e4f7 Remove a dead field. 2012-06-20 08:03:57 +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
8612696816 Clean up entity_state_t diffs. 2012-06-20 08:01:32 +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
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
3a1e065a57 Use Sys_DoubleTime instead of realtime for timedemos.
Currently, realtime is not really real time thanks to demo_speed.
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
cc1bf68d1f Dead code nukage.
Commented out even in q1source :P
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
b2290d92c9 Nuke UNALIGNED_OK.
It's not really necessary (and was effectively dead anyway).
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
84b5869b30 Make the view offsets make sense.
Now the gun doesn't move around strangely when looking up and down with
view offsets set.
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
86ecab4ff7 "Merge" V_ParseDamage 2012-06-15 22:02:16 +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
42256021fc Fix nq's idle swaying to match qw's.
In nq, the gun would sway strangly relative to the player's view, but in
qw, the gun is fixed. Now it is in both.
2012-06-15 22:02:15 +09:00
Bill Currie
a49c123d84 Shuffle some fields around in cient_state_t. 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
bf751cafe0 Split nq's colors into topcolor/bottomcolor.
The protocol is not affected: the incoming colors byte is split into the
two fields when read from the packet. This simplifies a lot of code
elsewhere.
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
28d16b6f57 Implement qw's safe stufftext buffering in nq.
Avoid stuffing incomplete commands.
2012-06-15 22:02:14 +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
b20daaf611 Nuke mapstring and spawnparms from client_static_t.
They're completely useless. Even though spawnparms was sent over the
network, the server ignored it. mapstring was never read anywhere.
2012-06-15 22:02:13 +09:00
Bill Currie
da8355a5f6 Remove some commented code. 2012-06-14 22:45:59 +09:00
Bill Currie
65bb35509f Rearrange the offset cheat prevention.
Rather than (expensively) setting the cvars to 0 every frame, just ignore
their values in multiplayer mode.
2012-06-14 22:45:40 +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
cf2377e76f Fix view angles when loading saved games.
As per mh's post on inside3d.com.
2012-06-10 16:50:35 +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
82a41017ec Create a proper ca_active state.
Yay, no more ugly "SIGNONS" hack for whether to render :)
2012-06-03 20:01:42 +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
bc1b483525 Nuke the rcsid stuff.
It's pretty useless in git.
2012-04-22 10:56:32 +09:00
Bill Currie
878764f79d Fix some segfaults in nq-server. 2012-04-15 15:11:16 +09:00
Bill Currie
a16ff08240 Make nq-x11 work for sw.
Same state as qw-client-x11.
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