Add serverside pm_autobunny support. Will result in prediction misses for older clients.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5833 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
190070d277
commit
692fe2c211
7 changed files with 12 additions and 0 deletions
|
@ -2362,6 +2362,7 @@ void CL_CheckServerInfo(void)
|
|||
movevars.stepdown = (Q_atof(InfoBuf_ValueForKey(&cl.serverinfo, "pm_stepdown")) != 0);
|
||||
movevars.walljump = (Q_atof(InfoBuf_ValueForKey(&cl.serverinfo, "pm_walljump")));
|
||||
movevars.ktjump = Q_atof(InfoBuf_ValueForKey(&cl.serverinfo, "pm_ktjump"));
|
||||
movevars.autobunny = (Q_atof(InfoBuf_ValueForKey(&cl.serverinfo, "pm_autobunny")) != 0);
|
||||
s = InfoBuf_ValueForKey(&cl.serverinfo, "pm_stepheight");
|
||||
movevars.stepheight = *s?Q_atof(s):PM_DEFAULTSTEPHEIGHT;
|
||||
s = InfoBuf_ValueForKey(&cl.serverinfo, "pm_watersinkspeed");
|
||||
|
|
|
@ -8097,6 +8097,7 @@ qboolean CSQC_Init (qboolean anycsqc, const char *csprogsname, unsigned int chec
|
|||
movevars.stepdown = true;
|
||||
movevars.walljump = false;//(pm_walljump.value);
|
||||
movevars.slidyslopes = false;//(pm_slidyslopes.value!=0);
|
||||
movevars.autobunny = false; //pm_autobunny.value!=0
|
||||
movevars.watersinkspeed = 60;//*pm_watersinkspeed.string?pm_watersinkspeed.value:60;
|
||||
movevars.flyfriction = 4;//*pm_flyfriction.string?pm_flyfriction.value:4;
|
||||
movevars.edgefriction = 2;//*pm_edgefriction.string?pm_edgefriction.value:2;
|
||||
|
|
|
@ -1448,6 +1448,9 @@ void PM_PlayerMove (float gamespeed)
|
|||
// set onground, watertype, and waterlevel
|
||||
PM_CategorizePosition ();
|
||||
|
||||
if (movevars.autobunny && !pmove.onground)
|
||||
pmove.jump_held = false;
|
||||
|
||||
if (pmove.waterlevel == 2 && pmove.pm_type != PM_FLY)
|
||||
PM_CheckWaterJump ();
|
||||
|
||||
|
|
|
@ -120,6 +120,7 @@ typedef struct {
|
|||
qboolean pground;
|
||||
qboolean stepdown;
|
||||
qboolean slidyslopes;
|
||||
qboolean autobunny;
|
||||
int stepheight;
|
||||
|
||||
qbyte coordtype; //FIXME: EZPEXT1_FLOATENTCOORDS should mean 4, but the result does not match ezquake/mvdsv which would result in inconsistencies. so player coords are rounded inconsistently.
|
||||
|
|
|
@ -5400,6 +5400,7 @@ void SV_InitLocal (void)
|
|||
extern cvar_t pm_stepdown;
|
||||
extern cvar_t pm_walljump;
|
||||
extern cvar_t pm_slidyslopes;
|
||||
extern cvar_t pm_autobunny;
|
||||
extern cvar_t pm_watersinkspeed;
|
||||
extern cvar_t pm_flyfriction;
|
||||
extern cvar_t pm_edgefriction;
|
||||
|
@ -5456,6 +5457,7 @@ void SV_InitLocal (void)
|
|||
Cvar_Register (&pm_ktjump, cvargroup_serverphysics);
|
||||
Cvar_Register (&pm_slidefix, cvargroup_serverphysics);
|
||||
Cvar_Register (&pm_slidyslopes, cvargroup_serverphysics);
|
||||
Cvar_Register (&pm_autobunny, cvargroup_serverphysics);
|
||||
Cvar_Register (&pm_airstep, cvargroup_serverphysics);
|
||||
Cvar_Register (&pm_pground, cvargroup_serverphysics);
|
||||
Cvar_Register (&pm_stepdown, cvargroup_serverphysics);
|
||||
|
|
|
@ -74,6 +74,7 @@ cvar_t pm_watersinkspeed = CVARFD("pm_watersinkspeed", "", CVAR_SERVERINFO, "Th
|
|||
cvar_t pm_flyfriction = CVARFD("pm_flyfriction", "", CVAR_SERVERINFO, "Amount of friction that applies in fly or 6dof mode. Empty means 4.");
|
||||
cvar_t pm_slidefix = CVARFD("pm_slidefix", "", CVAR_SERVERINFO, "Fixes an issue when walking down slopes (ie: so they act more like slopes and not a series of steps)");
|
||||
cvar_t pm_slidyslopes = CVARFD("pm_slidyslopes", "", CVAR_SERVERINFO, "Replicates NQ behaviour, where players will slowly slide down ramps");
|
||||
cvar_t pm_autobunny = CVARFD("pm_autobunny", "", CVAR_SERVERINFO, "Players will continue jumping without needing to release the jump button.");
|
||||
cvar_t pm_airstep = CVARAFD("pm_airstep", "", /*dp*/"sv_jumpstep", CVAR_SERVERINFO, "Allows players to step up while jumping. This makes stairs more graceful but also increases potential jump heights.");
|
||||
cvar_t pm_pground = CVARFD("pm_pground", "", CVAR_SERVERINFO, "Use persisten onground state instead of recalculating every frame."CON_WARNING"Do NOT use with nq mods, as most nq mods will interfere with onground state, resulting in glitches.");
|
||||
cvar_t pm_stepdown = CVARFD("pm_stepdown", "", CVAR_SERVERINFO, "Causes physics to stick to the ground, instead of constantly losing traction whiloe going down steps.");
|
||||
|
|
|
@ -112,6 +112,7 @@ extern cvar_t pm_bunnyspeedcap;
|
|||
extern cvar_t pm_ktjump;
|
||||
extern cvar_t pm_slidefix;
|
||||
extern cvar_t pm_slidyslopes;
|
||||
extern cvar_t pm_autobunny;
|
||||
extern cvar_t pm_airstep;
|
||||
extern cvar_t pm_pground;
|
||||
extern cvar_t pm_stepdown;
|
||||
|
@ -7189,6 +7190,7 @@ void SV_RunCmd (usercmd_t *ucmd, qboolean recurse)
|
|||
movevars.stepdown = (pm_stepdown.value != 0);
|
||||
movevars.walljump = (pm_walljump.value);
|
||||
movevars.slidyslopes = (pm_slidyslopes.value!=0);
|
||||
movevars.autobunny = (pm_autobunny.value!=0);
|
||||
movevars.watersinkspeed = *pm_watersinkspeed.string?pm_watersinkspeed.value:60;
|
||||
movevars.flyfriction = *pm_flyfriction.string?pm_flyfriction.value:4;
|
||||
movevars.edgefriction = *pm_edgefriction.string?pm_edgefriction.value:2;
|
||||
|
@ -7426,6 +7428,7 @@ void SV_RunCmd (usercmd_t *ucmd, qboolean recurse)
|
|||
movevars.stepdown = (pm_stepdown.value != 0);
|
||||
movevars.walljump = (pm_walljump.value);
|
||||
movevars.slidyslopes = (pm_slidyslopes.value!=0);
|
||||
movevars.autobunny = (pm_autobunny.value!=0);
|
||||
movevars.watersinkspeed = *pm_watersinkspeed.string?pm_watersinkspeed.value:60;
|
||||
movevars.flyfriction = *pm_flyfriction.string?pm_flyfriction.value:4;
|
||||
movevars.edgefriction = *pm_edgefriction.string?pm_edgefriction.value:2;
|
||||
|
|
Loading…
Reference in a new issue