From d0640618fd1e92ef686d5275e72b02afb7a21d6d Mon Sep 17 00:00:00 2001 From: terminx Date: Wed, 29 Jan 2020 11:36:13 +0000 Subject: [PATCH] Don't push sprites away from other clip objects when their clip areas overlap if the velocity passed to clipmove() is 0 This workaround should fix issues with stationary sprites moving around at map load when their clip area is overlapping solid walls. git-svn-id: https://svn.eduke32.com/eduke32@8543 1a8010ca-5511-0410-912e-c29ae57300e0 # Conflicts: # source/build/src/clip.cpp --- source/build/src/clip.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/build/src/clip.cpp b/source/build/src/clip.cpp index 45ae15fe4..6a858ccb1 100644 --- a/source/build/src/clip.cpp +++ b/source/build/src/clip.cpp @@ -1417,7 +1417,8 @@ int32_t clipmove(vec3_t * const pos, int16_t * const sectnum, int32_t xvect, int do { - if (enginecompatibility_mode == ENGINECOMPATIBILITY_NONE) + if (enginecompatibility_mode == ENGINECOMPATIBILITY_NONE && (xvect|yvect)) + { for (native_t i=clipnum-1;i>=0;--i) { if (!bitmap_test(clipignore, i) && clipinsideboxline(pos->x, pos->y, clipit[i].x1, clipit[i].y1, clipit[i].x2, clipit[i].y2, walldist)) @@ -1429,6 +1430,7 @@ int32_t clipmove(vec3_t * const pos, int16_t * const sectnum, int32_t xvect, int break; } } + } vec2_t vec = goal;