1213 Commits

Author SHA1 Message Date
Kevin Shanahan
d904c9ab8d cam: pass pmove into InitFlyby/Cam_TryFlyby
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-20 13:38:20 +10:30
Kevin Shanahan
8cdc1a7f16 cam: roll up loop in InitFlyby
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-20 13:29:30 +10:30
Kevin Shanahan
bbde1656a4 cam: constify player_state_t pointers
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-20 13:23:51 +10:30
Kevin Shanahan
92acc7b47d cam: pass playermove_t into Cam_DoTrace
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-20 13:18:57 +10:30
Kevin Shanahan
a1bc3136f7 pmove: start disentangling global playermove_t state
Now only PlayerMove() within pmove.c refers to the global, the rest
get the struct passed in.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-20 13:11:19 +10:30
Kevin Shanahan
f02bbd42aa pmove: make player_mins/maxs const
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-20 12:45:43 +10:30
Kevin Shanahan
f57d9c8b4f pmove: various whitespace, comment housekeeping
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-20 12:45:19 +10:30
Kevin Shanahan
6ba1901f3f pmove: calculate anglevectors locally, remove global forward/right/up
Some inefficiency due to extra unneeded calculations, but at least
reducing the global state dependencies. Will optimise later.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-20 12:42:15 +10:30
Kevin Shanahan
d0e466a2bd pmove: make pmove.c local functions static
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-20 11:54:26 +10:30
Kevin Shanahan
9eb42be7a7 pmove: use same MOVE_CLIP_* flags as sv_phys.c
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-20 11:46:12 +10:30
Kevin Shanahan
66899f26be model: use mplane in trace_t instead of defining a new plane_t
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-20 11:37:24 +10:30
Kevin Shanahan
3ceb51f1d0 pmove: move player_mins/maxs declaration to pmove.h
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-20 11:33:02 +10:30
Kevin Shanahan
854b4bb552 build: fix for text documentation generation
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-20 10:41:43 +10:30
Kevin Shanahan
f35f89d4eb model: whitespace, follow my own style properly...
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-20 10:22:45 +10:30
Kevin Shanahan
7cf8d49d86 pmove: replace the use of pmtrace_t with shared trace_t from model.h
All the Quakeworld client pmove trace functions seem to be pretty much
identical to the server ones originally from world.c, so shared all
the bits which are common and remove that duplicated code.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-19 21:07:05 +10:30
Kevin Shanahan
5560a9ce5f server: switch pmove to using Mod_HullPointContents and Mod_CreateBoxhull
This neatly cleans up a makefile hack since now all targets use the
ASM implementation of Mod_HullPointContents. Removes a bunch of
duplicated code and also make Pmove_Init unneccessary.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-19 16:33:28 +10:30
Kevin Shanahan
1aa86c8290 world: move box hull creation to model.c
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-19 16:05:15 +10:30
Kevin Shanahan
4a76fa3f79 world: move the shared 'box hull' onto the stack
We initialise the shared clipnodes statically and only provide const
pointers to them. We then provide a const template for the planes and
hull which can be quickly memcpy'd and just the planes pointer + plane
dists updated.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-19 15:00:48 +10:30
Kevin Shanahan
cf33822658 model: make planes and clipnodes members of hull_t const
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-19 14:54:00 +10:30
Kevin Shanahan
c07716b8b6 model: remove p1f/p2f arguments to Mod_TraceHull
Always 0/1, so just pass those from the wrapper to the recursive function.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-19 13:55:18 +10:30
Kevin Shanahan
c9b73cb472 world: move hull point/line testing to model.c/modela.S
Now that the edict member of trace_t has been extracted, hull testing
has only to do with the models and not the server, so we can move them
into model.c. Functions renamed:

* SV_HullPointContents -> Mod_HullPointContents
* SV_RecursiveHullCheck -> Mode_TraceHull

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-19 13:47:38 +10:30
Kevin Shanahan
f0b8f362d6 world: ent member of trace_t is no longer needed
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-19 12:00:24 +10:30
Kevin Shanahan
db044dec07 server: make SV_PushEntity take trace as argument and return blocking entity
Callers updated to use the returned entity information if needed and
to pass in a pointer to the trace struct to be filled out.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-19 11:35:41 +10:30
Kevin Shanahan
07879dafce server: define constants for SV_FlyMove clip flags
Define constants for the SV_FlyMove clip flags used and add use them
consistently. Most nearby comments got a tidy up / style changes as
well. SV_FlyMove also now uses the return value from
SV_TraceMoveEntity instead of trace.ent to find the blocking entity.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-19 11:06:36 +10:30
Kevin Shanahan
2189d16768 world: use TraceMove, etc. return values in sv_move.c
General tidy up of SV_movestep as well.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-19 10:33:37 +10:30
Kevin Shanahan
16e1e961a8 world: use TraceMove, etc. return values in pr_cmds.c
Use the values returned from TraceLine/TraceMove, etc. rather than
trace.ent.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-19 10:32:40 +10:30
Kevin Shanahan
0d1177a9f5 world: return clip entity from SV_TraceMove wrappers as well
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-19 09:58:12 +10:30
Kevin Shanahan
8d100a32e5 world: return clip entity from SV_TraceMove
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-19 09:54:36 +10:30
Kevin Shanahan
cf8032f48e world: rename ClipMoveToEntity -> ClipToEntity
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-19 09:23:23 +10:30
Kevin Shanahan
0813590c3b world: trivial comment/naming changes in SV_RecursiveHullCheck
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-18 16:11:25 +10:30
Kevin Shanahan
33ab1648c5 build: insert the date/version into the man pages
Not sure why the html docs don't get the version number generated.
A limiation of groff's html output processor?

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-18 15:30:50 +10:30
Kevin Shanahan
acd8364e0b build: mall tidy up to version number generation
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-18 14:09:51 +10:30
Kevin Shanahan
679e3de254 build: improve man2txt and man2html rules
* Output to temp file and only move to final location upon success
* Fix echo of command in verbose mode (requires quotes)
* Don't use $(call ...) to invoke the groff command
* Use printf to generate the \r for the sed "unix2dos" replacement

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-18 13:53:44 +10:30
Kevin Shanahan
033c77328c doc: add (still incomplete) man page documentation
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-18 09:47:20 +10:30
Kevin Shanahan
1b9f1ab485 build: grab the version number from git if available
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-18 09:22:07 +10:30
Kevin Shanahan
649e6d671a server: refer to player origin, angles, velocity directly in SV_ClientThink
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-18 08:49:58 +10:30
Kevin Shanahan
b7885d2693 server: trivial cleanups in SV_ReadClientMove
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-18 08:39:27 +10:30
Kevin Shanahan
14dc162adf server: pass the clientcmd_t into SV_AirMove and SV_WaterMove
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-18 08:30:25 +10:30
Kevin Shanahan
57b9af8750 server: pass onground explicitely to SV_AirMove
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-18 08:26:11 +10:30
Kevin Shanahan
29c47cf82e server: get rid of some global state in NQ/sv_user.c
The angle vectors were always updated before use, so just keep those on
the stack and pass wishdir, wishspeed, velocity, etc. between functions as
needed.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-18 08:20:59 +10:30
Kevin Shanahan
356d1d3f97 server: remove c_yes/c_no debugging vars
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-17 20:33:05 +10:30
Kevin Shanahan
1c99bbbfd4 server: make local functions/variables static in sv_user.c
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-17 20:28:56 +10:30
Kevin Shanahan
68d06c9d2a trivial: whitespace/comments changes in SV_FindTouchedLeafs
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-17 18:59:46 +10:30
Kevin Shanahan
abf5b37552 server: add SV_TraceLine wrapper for point sized traces
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-17 14:50:28 +10:30
Kevin Shanahan
ee7fefd3bf server: rename SV_Move to SV_TraceMove
Since the function doesn't actually move anything, just traces the path
for the move and returns the results, use trace as the verb and move as
the noun.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-17 14:39:15 +10:30
Kevin Shanahan
6bf51cb019 server: create shorthand for tracing entity move
Allows the callers to abbreviate in the common case that mins/maxs come
from the entity being moved and passent is set to ignore the entity
itself.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-17 14:29:01 +10:30
Kevin Shanahan
ea81d72145 server: share some more code in SV_Push
Move the common 'block' test after attempting to push the touched entity
with the pusher outside the #ifdefs. We just wear the cost of re-linking
the edict twice for NQ.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-17 13:58:45 +10:30
Kevin Shanahan
e73bd93df8 server: re-link pushed entity after successful push
This actually duplicates work done in SV_PushEntity, but it makes the code
more QW/NQ code more consistent.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-17 13:48:25 +10:30
Kevin Shanahan
e33cced01a server: some more local variable naming changes
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-17 12:37:41 +10:30
Kevin Shanahan
4610d4cde0 server: pull SV_LinkEdict out of SetMinMaxSize
Constify arguments and clarify local variable names in PF_setmodel and
PF_setsize.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-03-17 12:32:37 +10:30