From 318bba469ffed9b14ae6ce066f00c3d4a973bdc7 Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Thu, 29 Dec 2022 20:32:58 +1100 Subject: [PATCH] - SW: Fix clipmove call within `DoPlayerMoveVehicle()`. * Originating from 05ad1e38e9dba70a352b9591d1f7dcd9d44890a6. * Fixes #829. --- source/games/sw/src/player.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/games/sw/src/player.cpp b/source/games/sw/src/player.cpp index 3a6758438..f778a2ffd 100644 --- a/source/games/sw/src/player.cpp +++ b/source/games/sw/src/player.cpp @@ -2784,7 +2784,9 @@ void DoPlayerMoveVehicle(PLAYER* pp) if (pp->sop->clipdist) { Collision coll; - clipmove(pp->pos, &pp->cursector, pp->vect, pp->sop->clipdist, 4., floordist, CLIPMASK_PLAYER, actor->user.coll); + auto temppos = DVector3(pp->pos.XY(), zz); + clipmove(temppos, &pp->cursector, pp->vect, pp->sop->clipdist, 4., floordist, CLIPMASK_PLAYER, actor->user.coll); + pp->pos.XY() = temppos.XY(); } else {