Commit Graph

660 Commits

Author SHA1 Message Date
Kevin Shanahan
7ff23f9704 model: hack around remaining client/server differences
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-13 13:14:21 +10:30
Kevin Shanahan
205bcef939 model: add leaf overflow check to QWSV
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-13 12:53:52 +10:30
Kevin Shanahan
e4612389d0 model: move client-only functions together
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-13 12:50:19 +10:30
Kevin Shanahan
24c5172ade model: fake SV_Error so we can share NQ/QWSV code
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-13 12:48:40 +10:30
Kevin Shanahan
b1e14a37e6 model: move sprite model loading code to separate file
Moving stuff that qwsv doesn't care about out into separate compilation
units so I can look at sharing the main BSP loading code.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-13 12:17:01 +10:30
Kevin Shanahan
cc48642b50 model: move alias model loading code to separate file
Moving stuff that qwsv doesn't care about out into separate compilation
units so I can look at sharing the main BSP loading code.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-13 10:35:30 +10:30
Kevin Shanahan
b4989d267c zone: constify name arguments to alloc functions
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-13 10:33:40 +10:30
Kevin Shanahan
e74e08e909 world: move world.c to common directory
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-13 09:27:45 +10:30
Kevin Shanahan
55d20d27b5 world: hack around remaining world.c differences
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-13 09:27:12 +10:30
Kevin Shanahan
ffd6dd4590 world: copy paranoid check into QWSV code
Update the comment while I still remember what that was (probably) about.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-13 09:17:26 +10:30
Kevin Shanahan
d33296695c world: re-order header includes for merging
Also include the correct model file for SW vs. GL.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-13 09:14:05 +10:30
Kevin Shanahan
79a44f2fd3 world: fake SV_Error so we can share NQ/QWSV code
Also update one error string on the QWSV side - makes all error messages
identical.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-13 08:53:04 +10:30
Kevin Shanahan
e63df56984 progs: move pr_edict.c to the common directory
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-12 16:31:21 +10:30
Kevin Shanahan
4afe9347b6 progs: hack around the remaining differences in pr_edict.c
PR_LoadProgs got a bit messy, but there's still plenty of common code to
make this worthwhile.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-12 16:30:01 +10:30
Kevin Shanahan
c139514d85 progs: carry over NQ fix for keynames with trailing spaces
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-12 14:51:05 +10:30
Kevin Shanahan
c41d98ca6e progs: fix arg check in ED_PrintEdict_f
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-12 14:48:15 +10:30
Kevin Shanahan
2e5c67ec08 progs: reorder some declarations
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-12 14:37:58 +10:30
Kevin Shanahan
c0d8595212 progs: cleanup QWSV edict print debug code
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-12 14:36:42 +10:30
Kevin Shanahan
3bf5cb3661 progs: fake SV_Error so we can share NQ/QWSV code
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-12 14:30:27 +10:30
Kevin Shanahan
8667c0e907 progs: reorder includes in pr_edict.c
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-12 14:29:23 +10:30
Kevin Shanahan
6158521300 progs: normalise error strings in pr_edict.c files
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-12 14:10:12 +10:30
Kevin Shanahan
02795c7686 progs: update an old comment about type_size
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-12 14:02:17 +10:30
Kevin Shanahan
6fc65c506e progs: NUM_FOR_EDICT's argument can be const
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-12 13:58:32 +10:30
Kevin Shanahan
49ffa951e0 world: remove some #if 0'd debugging code
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-12 12:00:11 +10:30
Kevin Shanahan
b29d95b927 world: check for overflow of sv_areanodes
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-12 11:51:45 +10:30
Kevin Shanahan
8585d004ad world: move world.h to shared include directory
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-12 11:46:38 +10:30
Kevin Shanahan
e27da6be75 world: merge remaining differences between world.h files
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-12 11:44:29 +10:30
Kevin Shanahan
388f8fcacc world: remove unused function SV_TruePointContents
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-12 11:40:04 +10:30
Kevin Shanahan
5083ac05c2 world: remove unneeded client include from world.h
Fix chase.c to include client.h, previously had via world.h

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-12 11:36:11 +10:30
Kevin Shanahan
5b54008603 world: move SV_AddLinksToPmove to world.c
Removes visibility of the areadnode_t structure from world.h and makes
sv_areanodes private again.  pmove_mins and pmove_maxs no longer need to
be globals in sv_user.c either.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-12 11:25:30 +10:30
Kevin Shanahan
b8d76716fc world: remove AddLinksToPmove dependence on global pmove_mins/maxs
Apart from this function, sv_areanodes are private to world.c, so prepare
this function to be moved across.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-12 11:07:50 +10:30
Kevin Shanahan
db9f66ed5b progs: merge progs.h headers and move to include dir
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-12 09:22:48 +10:30
Kevin Shanahan
500e5325f4 progs: remove unneeded includes from qwsv progs.h
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-12 09:15:42 +10:30
Kevin Shanahan
d269f32cc6 progs: merge progdefs.h header and move to include directory
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-12 09:13:27 +10:30
Kevin Shanahan
8e2e532958 progs: move the qcc generated qw progs to progdefs-qw.h
Create the progdefs.h file similar to NQ.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-12 08:34:00 +10:30
Kevin Shanahan
6086ccbf40 progs: rename the q1 (id1) progs header
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-12 08:27:41 +10:30
Kevin Shanahan
1fac3cc2ee progs: remove unused q2 progs definitions
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-12 08:23:31 +10:30
Kevin Shanahan
de501c4b8a model: better include stdint.h header here
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-11 19:18:24 +10:30
Kevin Shanahan
cb8d3fcf4b model: trivial cleanups
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-11 19:12:59 +10:30
Kevin Shanahan
e8b0931c03 model: conceptual correction in Mod_LoadTexInfo
Although this doesn't change the end result in memory, load the texinfo in
a way consistent with the layout of the vecs in the struct.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-11 19:10:18 +10:30
Kevin Shanahan
eb908191e0 model: calculate mipadjust in the same way as client
Not referenced by the server anyway, so just make the calculation
consistent.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-11 19:01:07 +10:30
Kevin Shanahan
7beeca27aa model: server bug fixes for loading huge maps
Import fixes related to signed/unsigned shorts from the client BSP model
loading code. Would in theory allow the QW server to load huge maps with
e.g. > 32767 marksurfaces or clipnodes.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-11 18:58:01 +10:30
Kevin Shanahan
0a84c30a7f model: consistently use the function name in error messages
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-11 18:56:36 +10:30
Kevin Shanahan
91a20cca52 model: import Mod_LoadBrushModel improvements into qwsv
Pull in improvements from the client code and minimise syntactic
differences.

- Tidy up the header byte swapping
- Tighter checks on lump sizes and bounds against each other and the size
  of the file
- Zero the flags field
- Calculate the model radius

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-11 18:48:30 +10:30
Kevin Shanahan
c9bd7334a2 gl: fix test to prevent player being drawn in full darkness
Also broken by 293084b (cl_visedicts handling). Doesn't seem to be any
other places where the same assumption about the entity pointer is made.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-11 16:42:04 +10:30
Kevin Shanahan
74a6903d8e gl: fix player colours in nq multiplayer
This broke with 293084b when I changed the handling of cl_visedicts. Kind
of a hackish workaround for now.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-11 16:38:34 +10:30
Kevin Shanahan
e71e7cc26e net: Replace nq's qsockaddr with same netadr_t structure used in qw
The struct qsockaddr used in NQ assumes some things about the binary
comptibility with the OS struct sockaddr_in, which caused some problems
with the networking on at least OpenBSD.  Use the same netadr_t structure
that we currently have in QW.

Would have been nice to split this into smaller sub-patches, but it just
got messy each time I tried to do that.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-11 13:34:49 +10:30
Kevin Shanahan
c1ed8eecf4 net: remove unused StringToAddr functions
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-07 16:50:23 +10:30
Kevin Shanahan
f4b25a0d94 net: remove Connect from the landriver operations struct
All our LAN protocols (just IPv4 UDP) are connectionless, so remove the
connect operation completely from the code.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-07 16:50:23 +10:30
Kevin Shanahan
ce2dc9ecf7 snd: Add OpenBSD sndio sound driver
Add a sound driver for the OpenBSD sndio API. A copy of this driver was
sent to me by Toni Spets <toni.spets@gmail.com>, but with credit to Jacob
Meuser <jakemsr@sdf.lonestar.org> for writing the driver code.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-05 17:59:59 +10:30