1
0
Fork 0
forked from fte/fteqw

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
This commit is contained in:
Spoike 2014-11-03 09:38:17 +00:00
parent 2a65ebee65
commit 2fa7606774
2 changed files with 13 additions and 2 deletions

View file

@ -8709,6 +8709,16 @@ static void QCBUILTIN PF_runclientphys(pubprogfuncs_t *prinst, struct globalvars
VectorCopy(ent->v->mins, pmove.player_mins); VectorCopy(ent->v->mins, pmove.player_mins);
VectorCopy(ent->xv->gravitydir, pmove.gravitydir); 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.numtouch = 0;
pmove.world = &sv.world; pmove.world = &sv.world;
pmove.skipent = -1; pmove.skipent = -1;

View file

@ -6162,8 +6162,9 @@ void SV_RunCmd (usercmd_t *ucmd, qboolean recurse)
movevars.watersinkspeed = *pm_watersinkspeed.string?pm_watersinkspeed.value:60; movevars.watersinkspeed = *pm_watersinkspeed.string?pm_watersinkspeed.value:60;
movevars.flyfriction = *pm_flyfriction.string?pm_flyfriction.value:4; movevars.flyfriction = *pm_flyfriction.string?pm_flyfriction.value:4;
if (sv_player->xv->hasted) // should already be folded into host_client->maxspeed
movevars.maxspeed*=sv_player->xv->hasted; // if (sv_player->xv->hasted)
// movevars.maxspeed*=sv_player->xv->hasted;
for (i=0 ; i<3 ; i++) for (i=0 ; i<3 ; i++)
{ {