Commit graph

213 commits

Author SHA1 Message Date
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
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
2295c1e4f7 Remove a dead field. 2012-06-20 08:03:57 +09:00
Bill Currie
8612696816 Clean up entity_state_t diffs. 2012-06-20 08:01:32 +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
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
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
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
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
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
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
Bill Currie
7bfddd7ffe Gut most of the old skin code.
Custom skins are smashed on most targets. Player colors don't work, etc.
However, this will let me do a much cleaner implementation.
2012-01-23 16:16:30 +09:00
Bill Currie
ffa79eed01 Don't lie about the number of models.
The renderer being told there were 2048 models when there were only ~160
was a bit of an unpleasant surprise :P
2012-01-09 16:22:39 +09:00
Bill Currie
423e08ce21 Add demo to "movie" conversion.
It currently writes a series of png files (QF/qfmvNNNNNN.png), at a fixed
rate of 30fps, with no sound recording.
2012-01-05 19:19:37 +09:00
Bill Currie
890963423b Big cleanup of Host_Init.
Eventually, all init functions will chain to their dependencies.
2011-12-22 16:54:22 +09:00
Bill Currie
0086fee233 Rename host_skin.c to cl_skin.c.
I don't know why I thost host was a good idea.
2011-12-22 16:54:22 +09:00
Bill Currie
29306f7799 Merge nq and qw sv_phys.c
sv_move and world are now identical between the two directories.
2011-12-22 16:54:22 +09:00
Bill Currie
3eb859a88f Move the entity transform setup into the clients.
This has several benifits:
  o The silly issue with alias model pitches being backwards is kept out
    of the renderer (it's a quakec thing: entites do their pitch
    backwards, but originally, only alias models were rotated. Hipnotic
    did brush entity rotations in the correct direction).
  o Angle to frame vector conversions are done only when the entity's
    angles vector changes, rather than every frame. This avoids a lot of
    unnecessary trig function calls.
  o Once transformed, an entity's frame vectors are always available.
    However, the vectors are left handed rather than right handed (ie,
    forward/left/up instead of forward/right/up): just a matter of
    watching the sign. This avoids even more trig calls (flag models in
    qw).
  o This paves the way for merging brush entity surface rendering with the
    world model surface rendering (the actual goal of this patch).
  o This also paves the way for using quaternions to represent entity
    orientation, as that would be a protocol change.
2011-12-15 17:09:01 +09:00
Bill Currie
4b515a961b Back out the fitzquake lerp changes.
That's not the direction I wish to take the renderer.
2011-12-13 17:01:15 +09:00
Bill Currie
054e52528e Revive the loading plaque.
At the request of scar3crow.
2011-12-09 18:41:52 +09:00
Bill Currie
cb9a30e949 Fix registered game detection.
registered detection needs qfs to be initted, but qfs needs game to be
inited... so move the qfs init into game init before the registered check.
2011-09-11 15:40:36 +09:00
Bill Currie
8bab548d16 Make the hud type configurable via dirconf.
Currently only "id", "hipnotic" and "rogue" are supported (anything else is
treated as "id"). Has no effect in quakeworld (good thing too: changing
gamedirs is a little broken).
2011-09-11 08:13:26 +09:00
Bill Currie
e1b6f50345 Clean up the diffs a bit between qw and nq sv_pr_cmds
Add some missing functions to nq.
In qw, Sys_Printf is mapped to SV_Printf, so no harm there.
2011-09-07 09:41:05 +09:00
Bill Currie
514f085e88 Reduce the diffs in cl_demo.c.
Starting to look like a change in protocol rather than a complete rewrite.
2011-09-04 09:58:12 +09:00
Bill Currie
62b17d3629 Split out the entity linking code.
This should smooth the merge process a little.
2011-09-04 09:58:11 +09:00
Bill Currie
245cfb0b6f Much diff reduction.
In the process, found a bug where the yaw speed was not being limited as
desired.
2011-09-04 09:58:11 +09:00
Bill Currie
88005f6710 Diff reduction. 2011-09-04 09:58:11 +09:00
Bill Currie
3061270d3a Support jumping off pretty much anything.
See http://forums.inside3d.com/viewtopic.php?t=1675 for inspiration.

As this might break the gameplay of certain maps, the new sv_jump_any
cvar can be used to disable this feature (bringing back the old behavior).
2011-06-11 13:19:31 +09:00
Bill Currie
2ecdec91a8 Clean up the demo api a little.
This way, I can be more assured of what might be called from outside
cl_demo.c.
2011-06-03 22:47:32 +09:00
Bill Currie
12da412871 Get entity alpha (mostly) working.
I'm not sure if bsp model rendering is correct (backside issues), but
enities now sport transparency. Good test map:
http://www.celephais.net/board/view_thread.php?id=60157&
2010-12-16 09:34:29 +09:00
Bill Currie
aad204e80c Set the skybox from the map's worldspawn sky field. 2010-12-10 17:17:30 +09:00
Bill Currie
bc91faf51e Change back to storing the leafnum.
Still unlimited, of course :)
2010-12-09 17:24:38 +09:00
Bill Currie
3ae2ef8d11 Remove non-progs data from edict_t.
All data that is irrelevant to the progs engine itself has been removed
from edict_t and moved into the sv_progs code.
2010-12-09 17:24:37 +09:00
Bill Currie
1291766298 Remove all "cosmetic" differences between nq and qw sv_phys.c 2010-12-09 08:52:40 +09:00
Bill Currie
9b9fde244b Move the EndFrame function "pointer" into the sv_funcs struct. 2010-12-08 21:20:35 +09:00