extern cvar_t sv_stepheight;
extern cvar_t sv_jumpstep;
+extern cvar_t sv_gameplayfix_grenadebouncedownslopes;
+extern cvar_t sv_gameplayfix_noairborncorpse;
+extern cvar_t sv_gameplayfix_stepwhilejumping;
+extern cvar_t sv_gameplayfix_swiminbmodels;
+
extern mempool_t *sv_clients_mempool;
extern mempool_t *sv_edicts_mempool;
static cvar_t sv_cullentities_stats = {0, "sv_cullentities_stats", "0"};
static cvar_t sv_entpatch = {0, "sv_entpatch", "1"};
+cvar_t sv_gameplayfix_grenadebouncedownslopes = {0, "sv_gameplayfix_grenadebouncedownslopes", "1"};
+cvar_t sv_gameplayfix_noairborncorpse = {0, "sv_gameplayfix_noairborncorpse", "1"};
+cvar_t sv_gameplayfix_stepwhilejumping = {0, "sv_gameplayfix_stepwhilejumping", "1"};
+cvar_t sv_gameplayfix_swiminbmodels = {0, "sv_gameplayfix_swiminbmodels", "1"};
+
server_t sv;
server_static_t svs;
Cvar_RegisterVariable (&sv_cullentities_trace);
Cvar_RegisterVariable (&sv_cullentities_stats);
Cvar_RegisterVariable (&sv_entpatch);
+ Cvar_RegisterVariable (&sv_gameplayfix_grenadebouncedownslopes);
+ Cvar_RegisterVariable (&sv_gameplayfix_noairborncorpse);
+ Cvar_RegisterVariable (&sv_gameplayfix_stepwhilejumping);
+ Cvar_RegisterVariable (&sv_gameplayfix_swiminbmodels);
SV_Phys_Init();
SV_World_Init();
if (ent->v->movetype != MOVETYPE_FLY)
{
- if (!oldonground && ent->v->waterlevel == 0 && !sv_jumpstep.integer)
+ if (!oldonground && ent->v->waterlevel == 0 && (!sv_jumpstep.integer || !sv_gameplayfix_stepwhilejumping.integer))
// don't stair up while jumping
return;
// if onground, return without moving
if ((int)ent->v->flags & FL_ONGROUND)
{
+ if (!sv_gameplayfix_noairborncorpse.integer)
+ return;
if (ent->v->groundentity == 0)
return;
// if ent was supported by a brush model on previous frame,
float d;
ClipVelocity (ent->v->velocity, trace.plane.normal, ent->v->velocity, 1.5);
// LordHavoc: fixed grenades not bouncing when fired down a slope
- d = DotProduct(trace.plane.normal, ent->v->velocity);
- if (trace.plane.normal[2] > 0.7 && fabs(d) < 60)
+ if (sv_gameplayfix_grenadebouncedownslopes.integer)
{
- ent->v->flags = (int)ent->v->flags | FL_ONGROUND;
- ent->v->groundentity = EDICT_TO_PROG(trace.ent);
- VectorClear (ent->v->velocity);
- VectorClear (ent->v->avelocity);
+ d = DotProduct(trace.plane.normal, ent->v->velocity);
+ if (trace.plane.normal[2] > 0.7 && fabs(d) < 60)
+ {
+ ent->v->flags = (int)ent->v->flags | FL_ONGROUND;
+ ent->v->groundentity = EDICT_TO_PROG(trace.ent);
+ VectorClear (ent->v->velocity);
+ VectorClear (ent->v->avelocity);
+ }
+ else
+ ent->v->flags = (int)ent->v->flags & ~FL_ONGROUND;
}
else
- ent->v->flags = (int)ent->v->flags & ~FL_ONGROUND;
+ {
+ if (trace.plane.normal[2] > 0.7 && ent->v->velocity[2] < 60)
+ {
+ ent->v->flags = (int)ent->v->flags | FL_ONGROUND;
+ ent->v->groundentity = EDICT_TO_PROG(trace.ent);
+ VectorClear (ent->v->velocity);
+ VectorClear (ent->v->avelocity);
+ }
+ else
+ ent->v->flags = (int)ent->v->flags & ~FL_ONGROUND;
+ }
}
else
{
int SV_PointSuperContents(const vec3_t point)
{
- return SV_Move(point, vec3_origin, vec3_origin, point, MOVE_NOMONSTERS, NULL).startsupercontents;
+ return SV_Move(point, vec3_origin, vec3_origin, point, sv_gameplayfix_swiminbmodels.integer ? MOVE_NOMONSTERS : MOVE_WORLDONLY, NULL).startsupercontents;
}
int SV_PointQ1Contents(const vec3_t point)