From f45e6317ab7aff22c0aca344beb9927a71b620ce Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 23 Aug 2022 22:43:25 +0200 Subject: [PATCH] - SpriteWarpToSurface --- source/games/sw/src/weapon.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/source/games/sw/src/weapon.cpp b/source/games/sw/src/weapon.cpp index ebd4c873b..a676b823a 100644 --- a/source/games/sw/src/weapon.cpp +++ b/source/games/sw/src/weapon.cpp @@ -16826,11 +16826,8 @@ bool SpriteWarpToSurface(DSWActor* actor) if (!Found) return false; // get the offset from the under sprite - sx = underActor->int_pos().X - actor->int_pos().X; - sy = underActor->int_pos().Y - actor->int_pos().Y; - // update to the new x y position - actor->set_int_xy(overActor->int_pos().X - sx, overActor->int_pos().Y - sy); + actor->spr.pos += overActor->spr.pos.XY() - underActor->spr.pos.XY(); auto over = overActor->sector(); auto under = underActor->sector();