1257 Commits

Author SHA1 Message Date
Kevin Shanahan
6f7446d5ee server: pass a trace pointer into SV_Move
Instead of passing back a copy.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-16 21:37:42 +10:30
Kevin Shanahan
62c433755f server: use a bounds struct to arrange moveclip_t
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-16 20:57:51 +10:30
Kevin Shanahan
34c3044748 server: relink moved corpses in SV_PushMove in NQ as well
Can't see a reason *not* to do this, and it doesn't *seem* to have had
any negative effects...

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-16 19:15:58 +10:30
Kevin Shanahan
9961b8c34b server: remove extra re-link in SV_Push
We already restore moved entities below, only we hadn't called
SV_LinkEdict with touch_triggers set to true. However, this isn't needed
since the entity was not moved from it's original position.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-16 19:05:39 +10:30
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
08d79a93c4 world: constify a bunch more interfaces...
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-16 14:03:01 +10:30
Kevin Shanahan
3442de81d0 world: constify edict pointer in trace_t
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-16 13:28:34 +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
40d27b77d0 world: constify SV_HullPointContents
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-16 13:20:43 +10:30
Kevin Shanahan
e3ab0af17f gl: minor cleanup of GL header compat code
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-16 10:53:24 +10:30
Kevin Shanahan
43782dde5e sys: change Sys_MakeCodeWritable API to take start/end addrs
All the callers had their start and end addresses anyway, so do the length
calculation in just one place. Fixes the last few WIN64 specific build
warnings as well.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-16 10:51:22 +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
0c2d56ae37 cd: WIN64 build warning fixes
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-16 09:26:10 +10:30
Kevin Shanahan
a5d8cd8a32 build: add WIN64 target for building with MinGW-64
The main win targets all build, though there's a few warnings to be fixed.
SDL not working yet - might just need to rebuild the library, but might
also need to point to a different sdl2-config binary?

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-16 08:49:32 +10:30
Kevin Shanahan
e3fc6defa1 trivial: use C99 style variable arrays instead of gcc [0] extension
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-02-28 13:27:57 +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
57761da674 progs: add missing byte to svc_fitz_spawnstatic2
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-01-17 19:47:00 +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
10fbc8eb2b vid: remove some old vendor-specific gl hacks
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-01-17 16:38:55 +10:30
Kevin Shanahan
aba276576f vid: convert vid width, height, rowbytes to signed quantities
Mostly important for the rowbytes, which are negative for a bottom-up
windows DIB. Big thanks to szo for posting about this gotcha to the forum.

Also had to change a few places where a bit shift was used to divide
rowbytes by 2. Behaviour is undefined for signed numbers with negative
values.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-01-17 16:18:27 +10:30
Kevin Shanahan
440b9a360c vid: remove mgl and make import mh's GDI code
Re-write vid_win based on mh's version with all the mgl dependencies
removed and purely using GDI. Seems to work really well - hopefully I
didn't miss anything too glaring...

  http://forums.inside3d.com/viewtopic.php?f=3&t=2182&sid=fa84752fa03ad142663a8223dd825be2#p23868

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-01-17 15:41:16 +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
bd8219e18f trivial: whitespace and error message cleanups
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-01-16 17:55:51 +10:30
Kevin Shanahan
2ad1bcabba progs: mark PF_break noreturn and call abort
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-01-16 17:55:23 +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
32803be575 client: expose MSG_WriteAngle16 in common.h for NQ
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-01-14 21:01:29 +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
1c842c0bac draw: trivial re-arrangement of long line
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-01-14 19:41:26 +10:30
Kevin Shanahan
7e9395bc49 render: add reminder to look at intersecting bmodels
Currently not supported by the software renderer. Intersecting bmodel
surfaces will behave weirdly (and people tend to assume it does work,
because glquake handle's it just fine).

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-01-14 19:41:26 +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
d951fa51c0 render: exit early if spanstate indicates no work to do
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-01-14 19:41:26 +10:30
Kevin Shanahan
03796f9042 render: more loop re-arrangement in R_LeadingEdge
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-01-14 19:41:26 +10:30
Kevin Shanahan
c117cbbb7f render: reduce indentation levels in R_LeadinEdge
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-01-14 19:41:26 +10:30
Kevin Shanahan
a5c2377abf render: use precalculated clipflags in R_DrawSubmodelPolygons
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-01-14 19:41:26 +10:30
Kevin Shanahan
f0f0c06cb0 draw: comment out some over-verbose debug info (for now)
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-01-14 18:48:31 +10:30
Kevin Shanahan
4d9c4ecbb7 trivial: whitespace
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-01-14 18:47:25 +10:30
Kevin Shanahan
7aea445a46 model: define surf flags using bit shifts
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-01-14 18:46:59 +10:30
Kevin Shanahan
02602d562d render: check clipflags before BOPS test in R_CullSubmodelSurfaces
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-01-14 18:45:18 +10:30
Ozkan Sezer
b83f54b94c sound: fix off-by-one error in SND_InitScaletable
This really seems like a thinko to me.  Patch below.

snd_mix.c (SND_InitScaletable): fixed an off-by-one mistake in the
signed char conversion.

Signed-off-by: Ozkan Sezer <sezero@users.sourceforge.net>
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-01-14 18:38:31 +10:30
Kevin Shanahan
a011101a1b trivial: small cleanup in R_AddEfrags
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-01-08 16:06:46 +10:30
Kevin Shanahan
b16099cfc3 render: cull submodel polygons to the view frustum using bbox info
Pre-calculate the frustum clip flags and cull backward facing bmodel
faces. This takes advantage of the surface bbox info and gives a small
speedup on maps having large/complex submodels.

Restructured the main loop in R_DrawBEntitiesOnList so that there are a
few less levels of code indentation there.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-01-08 16:02:56 +10:30
Kevin Shanahan
9a9dbb5141 model: check surf->numedges at loadtime
...so we don't need to check while drawing.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-01-08 10:29:14 +10:30
Kevin Shanahan
1334ef1125 view: draw the view weapon model if fov > 90
Yes, it looks like crap but not really any worse than it looks in glquake.
Will do something to fix it at some stage...

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-01-08 10:04:15 +10:30
Kevin Shanahan
7aae0a40a7 build: just use gcc's builtin ffsl() function by default
Pretty GCC dependent at this point anyway, may as well just do it this way
and get rid of issues building on different platforms.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-01-08 08:39:44 +10:30