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>
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>
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>
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>
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>
COM_FindFile now just calls COM_FOpenFile, so rename it and get rid of
the former. Remove use of Sys_FileOpen integer handles and use FILE *
instead. Fix the comment above the funcion in both nq and qw.
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
Instead of interger handles from sys_*, use standard C FILE * operations,
same as we do for qw already.
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
No problem with circular dependency anymore. Also folded in some whitespace
changes to reduce the QW/NQ diff.
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
Remove the definition from QW/common/common.c and add it to common.h and
include the header. Remove the definitions from quakedef.h files.
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
Previous implementation of COM_ScanDirPak completely ignored any path
component in the pak filename. Switch to snprintf in COM_ScanDir as well
while we're at it.
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
Factor out the texture resampling routines for the player skins. QW
needs the extra "stride" parameter because it only uses a
sub-rectangle of the full skin texture.
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
Reduces the indentation of the rest of the function by one tab stop
and makes it easier to see the real differences between the qw and nq
implementations.
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>