Only used by QWSV, so exclude it from the client completely and rename
it to something more indicative of its purpose.
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
This change of rounding method seems to have caused some 'sticky'
movement across surfaces in certain orientations. Don't understand why
as yet, but revert for now.
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
There is still a reference to the global physent stack hidden in
Cam_DoTrace, but at least we can get rid of all references to pmove.
Renamed some local variables for better clarity and replaced the
re-implementation of vector length vlen() with Length() from mathlib.
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
Eliminates direct references to the global pestack from pmove.c. As a
bonus, all passed in references are const.
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
The information about physents is kind of separate from the rest of
the player move information - it is also set up before doing
movement/prediction and should be read-only during those calculations.
Most places now get a pointer to the "pestack" (kind of a stack due to
adding player entities to the top and popping them off again) passed
in rather than referring to the global data directly.
Still kind of a mess, but should be able to clean up further from
here.
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
To quick to put in the VectorMA where it doesn't belong.
Still, this makes me curious why the nudge is necessary so often...
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
On each invocation of CL_SetSolidEntities, the previous state gets
overwritten, so only the last call matters. So it should be safe to
lift out from CL_ParseServerMessage, then out of the loop in
CL_ReadPackets and finally up into Host_Frame in cl_main.c.
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
Slightly modified the behaviour of this function. Previously it would
always round to the nearest 1/8th coordinate towards zero, whereas now
I round to the nearest coordinate. Also, there would previously always
be at least one nudge, but I test the position once before starting
that process.
Hopefully, haven't broken any weird behaviour that depends on
this. Got to be careful when dealing with the physics of Quake!
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
Now cl_cam.c does not refer to the global pmove, and Cam_Track is the
single point of entry. Now to see what other dependencies might be
hiding around the palce - maybe it can be localised further...
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
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>
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>
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>