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>
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>
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>
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>
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>
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>
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>
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>
* 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>
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>
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>
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>
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>
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>