1
0
Fork 0
forked from fte/fteqw

revert to old pmove for the time being, add sv_floodprotect to control flood protection, defaults to 1

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2305 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
TimeServ 2006-05-29 05:35:07 +00:00
parent 637633af80
commit e529c86c55
2 changed files with 11 additions and 3 deletions

View file

@ -248,7 +248,6 @@ int PM_StepSlideMove (qboolean in_air)
vec3_t original, originalvel, down, up, downvel;
float downdist, updist;
int blocked;
float stepsize;
// try sliding forward both on ground and up 16 pixels
// take the move that goes farthest
@ -260,6 +259,8 @@ int PM_StepSlideMove (qboolean in_air)
if (!blocked)
return blocked; // moved the entire distance
#if 0
// disable this until I clear this up with Tonik or someone
if (in_air)
{
// don't let us step up unless it's indeed a step we bumped in
@ -282,6 +283,7 @@ int PM_StepSlideMove (qboolean in_air)
}
else
stepsize = pm_stepheight;
#endif
VectorCopy (pmove.origin, down);
VectorCopy (pmove.velocity, downvel);
@ -291,7 +293,7 @@ int PM_StepSlideMove (qboolean in_air)
// move up a stair height
VectorCopy (pmove.origin, dest);
dest[2] += stepsize;
dest[2] += pm_stepheight;
trace = PM_PlayerTrace (pmove.origin, dest);
if (!trace.startsolid && !trace.allsolid)
{
@ -302,7 +304,7 @@ int PM_StepSlideMove (qboolean in_air)
// press down the stepheight
VectorCopy (pmove.origin, dest);
dest[2] -= stepsize;
dest[2] -= pm_stepheight;
trace = PM_PlayerTrace (pmove.origin, dest);
if (trace.fraction != 1 && trace.plane.normal[2] < MIN_STEP_NORMAL)
goto usedown;

View file

@ -58,6 +58,8 @@ cvar_t sv_brokenmovetypes = SCVAR("sv_brokenmovetypes", "0");
cvar_t sv_chatfilter = SCVAR("sv_chatfilter", "0");
cvar_t sv_floodprotect = SCVAR("sv_floodprotect", "1");
cvar_t votelevel = SCVAR("votelevel", "0");
cvar_t voteminimum = SCVAR("voteminimum", "4");
cvar_t votepercent = SCVAR("votepercent", "-1");
@ -1863,6 +1865,8 @@ void SV_SayOne_f (void)
float SV_CheckFloodProt(client_t *client)
{
int tmp;
if (!sv_floodprotect.value)
return 0;
if (fp_messages)
{
if (!sv.paused && realtime<client->lockedtill)
@ -5066,6 +5070,8 @@ void SV_UserInit (void)
Cvar_Register (&sv_pushplayers, cvargroup_servercontrol);
Cvar_Register (&sv_floodprotect, cvargroup_servercontrol);
Cvar_Register (&sv_cmdlikercon, cvargroup_serverpermissions);
Cvar_Register(&cmd_gamecodelevel, "Access controls");
Cvar_Register(&cmd_allowaccess, "Access controls");