From 7b2c5f63551d75ad5d982486d8ea8f6d577f9c07 Mon Sep 17 00:00:00 2001 From: skyjake Date: Tue, 16 Apr 2013 18:13:13 +0300 Subject: [PATCH] Fixed|Weapon Info: "Static" psprites (weapon offset scale) When drawing psprites, the weapon offset scale that is used for preventing the lowering of the psprite was not applied as intended: WEAPONTOP cannot be ignored as that is the highest offset that the psprite will reach (non-zero). Todo for later: Make WEAPONTOP a DD_value so that it doesn't have to hardcoded. --- doomsday/client/src/render/sprite.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/doomsday/client/src/render/sprite.cpp b/doomsday/client/src/render/sprite.cpp index c90cef48d2..e74974ad31 100644 --- a/doomsday/client/src/render/sprite.cpp +++ b/doomsday/client/src/render/sprite.cpp @@ -310,8 +310,11 @@ static void setupPSpriteParams(rendpspriteparams_t *params, vispsprite_t *spr) Texture const &tex = ms.texture(MTU_PRIMARY).generalCase(); variantspecification_t const &texSpec = TS_GENERAL(ms.texture(MTU_PRIMARY).spec()); - params->pos[VX] = psp->pos[VX] - -tex.origin().x + pspOffset[VX] + -texSpec.border; - params->pos[VY] = offScaleY * (psp->pos[VY] - -tex.origin().y) + pspOffset[VY] + -texSpec.border; +#define WEAPONTOP 32 /// @todo Currently hardcoded here and in the plugins. + + params->pos[VX] = psp->pos[VX] + tex.origin().x + pspOffset[VX] - texSpec.border; + params->pos[VY] = WEAPONTOP + offScaleY * (psp->pos[VY] - WEAPONTOP) + tex.origin().y + + pspOffset[VY] - texSpec.border; params->width = ms.width() + texSpec.border*2; params->height = ms.height() + texSpec.border*2;