From e529c86c55cc679bfe5444930003de32afe69e3c Mon Sep 17 00:00:00 2001 From: TimeServ Date: Mon, 29 May 2006 05:35:07 +0000 Subject: [PATCH] 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 --- engine/common/pmove.c | 8 +++++--- engine/server/sv_user.c | 6 ++++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/engine/common/pmove.c b/engine/common/pmove.c index b525c5d60..7940830a0 100644 --- a/engine/common/pmove.c +++ b/engine/common/pmove.c @@ -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; diff --git a/engine/server/sv_user.c b/engine/server/sv_user.c index ffde72e30..8028782ed 100644 --- a/engine/server/sv_user.c +++ b/engine/server/sv_user.c @@ -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 && realtimelockedtill) @@ -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");