Don't set the ground entity in Entity::droptofloor

This commit is contained in:
smallmodel 2023-12-28 18:22:10 +01:00
parent 9fce2575ab
commit cde13177a4
No known key found for this signature in database
GPG key ID: A96F163ED4891440

View file

@ -2619,14 +2619,11 @@ qboolean Entity::droptofloor(float maxfall)
trace = G_Trace(start, mins, maxs, end, this, edict->clipmask, false, "Entity::droptofloor");
if (trace.fraction == 1 || trace.startsolid || trace.allsolid || !trace.ent) {
groundentity = world->edict;
return false;
}
setOrigin(trace.endpos);
groundentity = trace.ent;
return true;
}