424 Commits

Author SHA1 Message Date
Kevin Shanahan
193a229fcf server: move sv_phys.c to common directory
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-16 18:46:57 +10:30
Kevin Shanahan
af6973e6ab server: perpare sv_phys.c for merging
Quite a bit of churn here, but mostly nothing non-obvious. The only part I
probably changed more than I should have for this changeset was
SV_PushMove, since QW had factored out SV_Push from that. However, a quick
test of both NQ and QW seems to have everything working as normal.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-16 18:44:38 +10:30
Kevin Shanahan
98d99cecd5 sv: define enum for movetypes and use consistently with SV_Move()
Replace all uses of 0, 1, 2, true and false with the proper enum value for
SV_Move type.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-16 16:19:05 +10:30
Kevin Shanahan
e180d3fb00 sv: make SV_Impact static and constify arguments
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-16 13:26:18 +10:30
Kevin Shanahan
4053376008 win: various WIN64 build warning fixes
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-16 10:43:44 +10:30
Kevin Shanahan
1e8bda566b client: output last command to help debugging protocol errors
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-02-28 13:26:40 +10:30
Kevin Shanahan
4b31f51458 misc: try to keep angle ranges consistent
Try to avoid cases where -180 != 180 or 0 != 360 by ensuring that we
use the ranges (closed->open) of [0, 360) or [-180, 180).

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-02-28 13:23:41 +10:30
Kevin Shanahan
9929bc34c2 net: fix missing break after svc_fitz_spawnbaseline2
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-01-17 18:13:37 +10:30
Kevin Shanahan
50be9c0f3c net: more clearly label the FitzQuake network constants
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-01-17 17:22:48 +10:30
Kevin Shanahan
f94f9cbc78 net: switch from winsock to winsock2
Nothing really to change except the headers included and the library to
link against. Switched on WIN32_LEAN_AND_MEAN, so had to add a few extra
includes for that.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-01-17 08:39:50 +10:30
Kevin Shanahan
6c0850f2f4 server: enable tab completion of numeric sv_protocol args
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-01-16 17:29:58 +10:30
Kevin Shanahan
51ca4d6880 net: fix incorrect use of gethostbyname() results
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-01-16 09:24:59 +10:30
Kevin Shanahan
83be6de16d server: quick and dirty implementation of FitzQuake protocol
Not very well tested, but the loopback client works. Still missing entity
alpha, lerpfinish and a few other things.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-01-15 20:21:05 +10:30
Kevin Shanahan
ef14eecafe client: send 16-bit angles when server is fitzquake
This should now be all that is needed on the client side for FitzQuake
protocol (666) support.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-01-14 20:57:20 +10:30
Kevin Shanahan
6e6f63889a client: implement enough of FitzQuake protocol for demo playback
Still need to implement the server side and the changes for outgoing
client commands, but this is enough that I can playback demos recorded
with protocol 666.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-01-14 19:41:26 +10:30
Kevin Shanahan
b5e1863636 model: define a leafbits type for use with PVS/PHS operations
Uses unsigned long instead of byte so we don't need to cast between bytes
and int/long and we can use the long type for the bit tests as well. Had
to rewrite the decompress routine so that the bit order is correct within
the long words.

Things not as neat as I'd like on the QWSV side where the whole PVS/PHS
is decompressed - a bit too much pointer arithmetic to juggle but working
for now.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-01-04 18:36:50 +10:30
Kevin Shanahan
22f7a1821b server: remove static checkpvs buffer from PF_CheckClient
Instead of saving the PVS into a static buffer, save the leaf of the
client entity into the server_t struct and look up the PVS as needed. If
it is done frequently, the PVS cache should stop performance from
becoming too terrible.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-01-03 18:15:03 +10:30
Kevin Shanahan
3c40fcf6d4 model: move SV_FatPVS functionality to model.c
Re-implement SV_FatPVS as Mod_FatPVS and move to model.c. The buffer for
the FatPVS can then be allocated the appropraite size at map load time.
Also made the bitwise OR of vis data use unsigned long type for
(potentially) better efficiency.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-01-03 17:37:09 +10:30
Kevin Shanahan
b075c60764 client: raise MAX_VISEDICTS
Thought I had some weird bug with vis info, leaf data or something but it
was just a lack of visedicts. Wicked.bsp now playable :)

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-01-01 12:11:13 +10:30
Kevin Shanahan
66d5daa13f net: trivial model limit comment update
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-01-01 10:21:12 +10:30
Kevin Shanahan
02074866f1 net: paranoia check for mtu <= MAX_DATAGRAM
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-01-01 10:16:33 +10:30
Kevin Shanahan
c7233c17e3 trivial: whitespace
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-01-01 10:15:09 +10:30
Kevin Shanahan
65961a4502 server: trivial coding style cleanups in sv_main.c
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-01-01 10:14:07 +10:30
Kevin Shanahan
2701723a74 server: comment silent dropping of particle/sound messages
If not enough room in the send buffer, we silently drop messages about
particles and sounds. Get the byte counts right and make a comment about
this being done intentionally and that it's currently broken...

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-01-01 09:22:54 +10:30
Kevin Shanahan
1d62b7d047 net: raise the MAX_MSGLEN/MAX_DATAGRAM limits
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-01-01 09:16:54 +10:30
Kevin Shanahan
a0a9f4ad33 net: set server signon and reliable dgrm buffers to MAX_MSGLEN
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-01-01 09:06:01 +10:30
Kevin Shanahan
7e7d6f535c net: make the loop driver MTU equal to the max message
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-01-01 09:04:33 +10:30
Kevin Shanahan
0e9ade6aef net: allow for header size when setting socket MTU
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-01-01 07:09:16 +10:30
Kevin Shanahan
e16f59c899 net: NET_MAXMESSAGE should be MAX_MSGLEN instead of MAX_DATAGRAM
Finally starting to see how this all fits together. "Message" corresponds
to the reliable messages and "datagram" corresponds to the unreliable
messages. There shouldn't be any problem having reliable messages be
composed of many datagrams.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-01-01 06:46:37 +10:30
Kevin Shanahan
8e637363a0 net: statics for net_dgrm.c
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-12-31 17:32:02 +10:30
Kevin Shanahan
5f2a28942e net: consult the socket mtu instead of assuming MAX_DATAGRAM
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-12-31 17:25:26 +10:30
Kevin Shanahan
648601ea60 net: factor out common code in datagram send functions
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-12-31 17:21:52 +10:30
Kevin Shanahan
6c342a3bc3 net: define NET_MAXMESSAGE in terms of MAX_DATAGRAM
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-12-31 17:17:57 +10:30
Kevin Shanahan
8e1cb8076d sbar: constify qpic_t usage
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-12-22 16:26:09 +10:30
Kevin Shanahan
f568a9ab75 menu: constify qpic_t usage
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-12-22 16:25:06 +10:30
Kevin Shanahan
e4e756bb88 common: return void * from COM_Load*File
Remove unneccessary casts from callers.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-12-22 15:43:10 +10:30
Kevin Shanahan
f569b16c0e draw: add argument completion for gl_texturemode command
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-12-22 15:20:36 +10:30
Kevin Shanahan
725e244599 sbar: constify Sbar_DrawString and make static
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-12-22 14:57:18 +10:30
Kevin Shanahan
2383fae7ac common: constify basedir parm and remove cachedir
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-12-22 14:45:16 +10:30
Kevin Shanahan
81de4e67fc net: char * const correction
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-12-22 14:44:19 +10:30
Kevin Shanahan
83bf26b81c menu: char * const corrections
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-12-22 14:39:26 +10:30
Kevin Shanahan
48272947c5 net: constify StrAddr debugging function
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-12-22 14:33:04 +10:30
Kevin Shanahan
cb5e04de37 client: constify CL_EstablishConnection
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-12-22 14:31:16 +10:30
Kevin Shanahan
144dcb7ff8 net: constify NET_Connect interface
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-12-22 14:30:26 +10:30
Kevin Shanahan
11cdcce576 client: constify svc_strings (and make static)
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-12-22 14:19:18 +10:30
Kevin Shanahan
119f1dcfa5 progs: move pr_cmds.c to the common directory
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-12-22 07:10:16 +10:30
Kevin Shanahan
67a2b5bed2 progs: merge differences between pr_cmds.c files
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-12-22 07:09:19 +10:30
Kevin Shanahan
eabed8ea13 progs: constify PF_VarString
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-12-21 19:44:12 +10:30
Kevin Shanahan
73fca333a3 progs: constify PF_{Get,Set}String
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-12-21 19:39:01 +10:30
Kevin Shanahan
5392549d65 server: constify lightstyles in server_t
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-12-21 18:48:51 +10:30