mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-13 07:47:45 +00:00
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:
parent
637633af80
commit
e529c86c55
2 changed files with 11 additions and 3 deletions
|
@ -248,7 +248,6 @@ int PM_StepSlideMove (qboolean in_air)
|
||||||
vec3_t original, originalvel, down, up, downvel;
|
vec3_t original, originalvel, down, up, downvel;
|
||||||
float downdist, updist;
|
float downdist, updist;
|
||||||
int blocked;
|
int blocked;
|
||||||
float stepsize;
|
|
||||||
|
|
||||||
// try sliding forward both on ground and up 16 pixels
|
// try sliding forward both on ground and up 16 pixels
|
||||||
// take the move that goes farthest
|
// take the move that goes farthest
|
||||||
|
@ -260,6 +259,8 @@ int PM_StepSlideMove (qboolean in_air)
|
||||||
if (!blocked)
|
if (!blocked)
|
||||||
return blocked; // moved the entire distance
|
return blocked; // moved the entire distance
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
// disable this until I clear this up with Tonik or someone
|
||||||
if (in_air)
|
if (in_air)
|
||||||
{
|
{
|
||||||
// don't let us step up unless it's indeed a step we bumped in
|
// 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
|
else
|
||||||
stepsize = pm_stepheight;
|
stepsize = pm_stepheight;
|
||||||
|
#endif
|
||||||
|
|
||||||
VectorCopy (pmove.origin, down);
|
VectorCopy (pmove.origin, down);
|
||||||
VectorCopy (pmove.velocity, downvel);
|
VectorCopy (pmove.velocity, downvel);
|
||||||
|
@ -291,7 +293,7 @@ int PM_StepSlideMove (qboolean in_air)
|
||||||
|
|
||||||
// move up a stair height
|
// move up a stair height
|
||||||
VectorCopy (pmove.origin, dest);
|
VectorCopy (pmove.origin, dest);
|
||||||
dest[2] += stepsize;
|
dest[2] += pm_stepheight;
|
||||||
trace = PM_PlayerTrace (pmove.origin, dest);
|
trace = PM_PlayerTrace (pmove.origin, dest);
|
||||||
if (!trace.startsolid && !trace.allsolid)
|
if (!trace.startsolid && !trace.allsolid)
|
||||||
{
|
{
|
||||||
|
@ -302,7 +304,7 @@ int PM_StepSlideMove (qboolean in_air)
|
||||||
|
|
||||||
// press down the stepheight
|
// press down the stepheight
|
||||||
VectorCopy (pmove.origin, dest);
|
VectorCopy (pmove.origin, dest);
|
||||||
dest[2] -= stepsize;
|
dest[2] -= pm_stepheight;
|
||||||
trace = PM_PlayerTrace (pmove.origin, dest);
|
trace = PM_PlayerTrace (pmove.origin, dest);
|
||||||
if (trace.fraction != 1 && trace.plane.normal[2] < MIN_STEP_NORMAL)
|
if (trace.fraction != 1 && trace.plane.normal[2] < MIN_STEP_NORMAL)
|
||||||
goto usedown;
|
goto usedown;
|
||||||
|
|
|
@ -58,6 +58,8 @@ cvar_t sv_brokenmovetypes = SCVAR("sv_brokenmovetypes", "0");
|
||||||
|
|
||||||
cvar_t sv_chatfilter = SCVAR("sv_chatfilter", "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 votelevel = SCVAR("votelevel", "0");
|
||||||
cvar_t voteminimum = SCVAR("voteminimum", "4");
|
cvar_t voteminimum = SCVAR("voteminimum", "4");
|
||||||
cvar_t votepercent = SCVAR("votepercent", "-1");
|
cvar_t votepercent = SCVAR("votepercent", "-1");
|
||||||
|
@ -1863,6 +1865,8 @@ void SV_SayOne_f (void)
|
||||||
float SV_CheckFloodProt(client_t *client)
|
float SV_CheckFloodProt(client_t *client)
|
||||||
{
|
{
|
||||||
int tmp;
|
int tmp;
|
||||||
|
if (!sv_floodprotect.value)
|
||||||
|
return 0;
|
||||||
if (fp_messages)
|
if (fp_messages)
|
||||||
{
|
{
|
||||||
if (!sv.paused && realtime<client->lockedtill)
|
if (!sv.paused && realtime<client->lockedtill)
|
||||||
|
@ -5066,6 +5070,8 @@ void SV_UserInit (void)
|
||||||
|
|
||||||
Cvar_Register (&sv_pushplayers, cvargroup_servercontrol);
|
Cvar_Register (&sv_pushplayers, cvargroup_servercontrol);
|
||||||
|
|
||||||
|
Cvar_Register (&sv_floodprotect, cvargroup_servercontrol);
|
||||||
|
|
||||||
Cvar_Register (&sv_cmdlikercon, cvargroup_serverpermissions);
|
Cvar_Register (&sv_cmdlikercon, cvargroup_serverpermissions);
|
||||||
Cvar_Register(&cmd_gamecodelevel, "Access controls");
|
Cvar_Register(&cmd_gamecodelevel, "Access controls");
|
||||||
Cvar_Register(&cmd_allowaccess, "Access controls");
|
Cvar_Register(&cmd_allowaccess, "Access controls");
|
||||||
|
|
Loading…
Reference in a new issue