// check for stuckness, possibly due to the limited precision of floats
// in the clipping hulls
- /*
if (clip
&& fabs(oldorg[1] - ent->v.origin[1]) < 0.03125
&& fabs(oldorg[0] - ent->v.origin[0]) < 0.03125)
// stepping up didn't make any progress
clip = SV_TryUnstick (ent, oldvel);
- */
// extra friction based on view angle
if (clip & 2 && sv_wallfriction.integer)
if (downtrace.plane.normal[2] > 0.7)
{
- if (ent->v.solid == SOLID_BSP)
+ //if (ent->v.solid == SOLID_BSP)
{
ent->v.flags = (int)ent->v.flags | FL_ONGROUND;
ent->v.groundentity = EDICT_TO_PROG(downtrace.ent);
if (cont <= CONTENTS_WATER)
{
- if (ent->v.watertype == CONTENTS_EMPTY)
+ if (ent->v.watertype == CONTENTS_EMPTY && cont != CONTENTS_LAVA)
// just crossed into water
SV_StartSound (ent, 0, "misc/h2ohit1.wav", 255, 1);
}
else
{
- if (ent->v.watertype != CONTENTS_EMPTY)
+ if (ent->v.watertype != CONTENTS_EMPTY && ent->v.watertype != CONTENTS_LAVA)
// just crossed into water
SV_StartSound (ent, 0, "misc/h2ohit1.wav", 255, 1);
// and groundentity is now freed, set groundentity to 0 (floating)
groundentity = PROG_TO_EDICT(ent->v.groundentity);
if (groundentity->v.solid == SOLID_BSP)
+ {
ent->suspendedinairflag = true;
+ return;
+ }
else if (ent->suspendedinairflag && groundentity->free)
{
// leave it suspended in the air