From 9f08abc90e44cd0f89dba026b61b447bbe96150b Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 1 Sep 2022 01:01:48 +0200 Subject: [PATCH] - eliminate the only use of zvel in tspritetype. Since this never gets manipulated on the tsprite size, better get it directly from the actor so that the final velocity vector does not need to be in spritetype et.al. --- source/core/maptypes.h | 2 +- source/games/sw/src/draw.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/core/maptypes.h b/source/core/maptypes.h index 15edac309..b9526de4c 100644 --- a/source/core/maptypes.h +++ b/source/core/maptypes.h @@ -466,7 +466,7 @@ struct spritetypebase int16_t intangle; // needs to be kept for SW's SP_TAG4 int16_t xvel; int16_t yvel; - union { int16_t zvel, inittype; }; // inittype, type and flags are for Blood. + int16_t inittype; // was zvel. All accesses for that have been wrapped. inittype, type and flags are for Blood. union { int16_t lotag, type; }; union { int16_t hitag, flags; }; int16_t extra; diff --git a/source/games/sw/src/draw.cpp b/source/games/sw/src/draw.cpp index 779781267..2c3951476 100644 --- a/source/games/sw/src/draw.cpp +++ b/source/games/sw/src/draw.cpp @@ -368,7 +368,7 @@ void DoMotionBlur(tspriteArray& tsprites, tspritetype const * const tsp) } else { - z_amt_per_pixel = IntToFixed((int)-tsp->zvel)/tsp->xvel; + z_amt_per_pixel = IntToFixed((int)-ownerActor->int_zvel())/tsp->xvel; } switch (ownerActor->user.motion_blur_dist)