From c620cea34b543ff721a4abe605d5498feae4df2e Mon Sep 17 00:00:00 2001 From: Yamagi Burmeister Date: Sun, 7 Oct 2018 11:58:46 +0200 Subject: [PATCH] Don't accelerate upper entities, let them be pushed by the lower ent. A long time ago in 2b4f223 I introduced a small logic change to the handling of stacked entities. If two entities were standing on each other the original code set the movement speed of the upper entity to 0. It would be pushed or dragged by the lower entity. I changed that in way that the upper entity got the same speed as the lower entity. With that change it wasn't pushed or dragged but moving on it's own. I hoped to fix some of the 'elevator hurts player or monster' bugs. That hope was wrong, at a later time we quirked all elevators that hurt the player. Additionally the change lead to physics bugs if entities are standing on high speed elevators (more than 200 units per seconds). So revert it --- src/g_monster.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/g_monster.c b/src/g_monster.c index 0436a94..420a6f2 100644 --- a/src/g_monster.c +++ b/src/g_monster.c @@ -300,7 +300,7 @@ M_CheckGround(edict_t *ent) VectorCopy(trace.endpos, ent->s.origin); ent->groundentity = trace.ent; ent->groundentity_linkcount = trace.ent->linkcount; - ent->velocity[2] = trace.ent->velocity[2]; + ent->velocity[2] = 0; } }