From bbda318ce9b77ab6a0f900d3f3a6f9588ef00087 Mon Sep 17 00:00:00 2001 From: Andrei Drexler Date: Sun, 6 Oct 2024 09:54:26 +0200 Subject: [PATCH] SV_PushMove: preserve pusher solid field (#342) instead of overwriting with SOLID_BSP. Fix by LadyHavoc/Maddes (see https://www.quake-info-pool.net/q1/qfix.htm#movetype_push) --- Quake/sv_phys.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/Quake/sv_phys.c b/Quake/sv_phys.c index 44aab65f8..953ce4866 100644 --- a/Quake/sv_phys.c +++ b/Quake/sv_phys.c @@ -437,6 +437,7 @@ void SV_PushMove (edict_t *pusher, float movetime) edict_t *check, *block; vec3_t mins, maxs, move; vec3_t entorig, pushorig; + float solid_backup; int num_moved; edict_t **moved_edict; //johnfitz -- dynamically allocate vec3_t *moved_from; //johnfitz -- dynamically allocate @@ -513,9 +514,16 @@ void SV_PushMove (edict_t *pusher, float movetime) num_moved++; // try moving the contacted entity - pusher->v.solid = SOLID_NOT; - SV_PushEntity (check, move); - pusher->v.solid = SOLID_BSP; + // https://www.quake-info-pool.net/q1/qfix.htm#movetype_push + solid_backup = pusher->v.solid; + if (solid_backup == SOLID_BSP || + solid_backup == SOLID_BBOX || + solid_backup == SOLID_SLIDEBOX) + { + pusher->v.solid = SOLID_NOT; + SV_PushEntity (check, move); + pusher->v.solid = solid_backup; + } // if it is still inside the pusher, block block = SV_TestEntityPosition (check);