From 2fa7606774f649e11e8ae92f87ea0b01f0a2f4be Mon Sep 17 00:00:00 2001 From: Spoike Date: Mon, 3 Nov 2014 09:38:17 +0000 Subject: [PATCH] fix .maxspeed and .gravity with ssqc's runstandardplayerphysics git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4784 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/server/pr_cmds.c | 10 ++++++++++ engine/server/sv_user.c | 5 +++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/engine/server/pr_cmds.c b/engine/server/pr_cmds.c index f1d813a31..a625409e3 100644 --- a/engine/server/pr_cmds.c +++ b/engine/server/pr_cmds.c @@ -8709,6 +8709,16 @@ static void QCBUILTIN PF_runclientphys(pubprogfuncs_t *prinst, struct globalvars VectorCopy(ent->v->mins, pmove.player_mins); VectorCopy(ent->xv->gravitydir, pmove.gravitydir); + //update entity-specific stuff + movevars.entgravity = sv_gravity.value/movevars.gravity; + if (ent->xv->gravity) + movevars.entgravity *= ent->xv->gravity; + movevars.maxspeed = ent->xv->maxspeed?ent->xv->maxspeed:sv_maxspeed.value; +#ifdef HEXEN2 + if (ent->xv->hasted) + movevars.maxspeed *= ent->xv->hasted; +#endif + pmove.numtouch = 0; pmove.world = &sv.world; pmove.skipent = -1; diff --git a/engine/server/sv_user.c b/engine/server/sv_user.c index afbefcefe..ff8b503c6 100644 --- a/engine/server/sv_user.c +++ b/engine/server/sv_user.c @@ -6162,8 +6162,9 @@ void SV_RunCmd (usercmd_t *ucmd, qboolean recurse) movevars.watersinkspeed = *pm_watersinkspeed.string?pm_watersinkspeed.value:60; movevars.flyfriction = *pm_flyfriction.string?pm_flyfriction.value:4; - if (sv_player->xv->hasted) - movevars.maxspeed*=sv_player->xv->hasted; +// should already be folded into host_client->maxspeed +// if (sv_player->xv->hasted) +// movevars.maxspeed*=sv_player->xv->hasted; for (i=0 ; i<3 ; i++) {