From 1b948be85885b78b879cc2dac86eab7d244ebf8c Mon Sep 17 00:00:00 2001 From: plagman Date: Sun, 10 May 2009 19:19:25 +0000 Subject: [PATCH] Corrects polymost rotation offset scale (didn't match build units before) and a bug in the polymer offset code (bug 2783065). git-svn-id: https://svn.eduke32.com/eduke32@1376 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/build/src/mdsprite.c | 6 +++--- polymer/eduke32/build/src/polymer.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/polymer/eduke32/build/src/mdsprite.c b/polymer/eduke32/build/src/mdsprite.c index 5bd6765c8..113ccd3ce 100644 --- a/polymer/eduke32/build/src/mdsprite.c +++ b/polymer/eduke32/build/src/mdsprite.c @@ -1733,15 +1733,15 @@ static int32_t md3draw(md3model_t *m, spritetype *tspr) if (spriteext[tspr->owner].pitch || spriteext[tspr->owner].roll || m->head.flags == 1337) { if (spriteext[tspr->owner].xoff) - a0.x = (int32_t)(spriteext[tspr->owner].xoff / (2048 * (m0.x+m1.x))); + a0.x = (int32_t)(spriteext[tspr->owner].xoff / (2560 * (m0.x+m1.x))); else a0.x = 0; if (spriteext[tspr->owner].yoff) - a0.y = (int32_t)(spriteext[tspr->owner].yoff / (2048 * (m0.x+m1.x))); + a0.y = (int32_t)(spriteext[tspr->owner].yoff / (2560 * (m0.x+m1.x))); else a0.y = 0; if ((spriteext[tspr->owner].zoff) && !(tspr->cstat&1024)) - a0.z = (int32_t)(spriteext[tspr->owner].zoff / (524288 * (m0.z+m1.z))); + a0.z = (int32_t)(spriteext[tspr->owner].zoff / (655360 * (m0.z+m1.z))); else a0.z = 0; k0 = (float)sintable[(spriteext[tspr->owner].pitch+512)&2047] / 16384.0; diff --git a/polymer/eduke32/build/src/polymer.c b/polymer/eduke32/build/src/polymer.c index 4bc68e744..05544b57a 100644 --- a/polymer/eduke32/build/src/polymer.c +++ b/polymer/eduke32/build/src/polymer.c @@ -3036,8 +3036,8 @@ static void polymer_drawmdsprite(spritetype *tspr) pitchang = (float)(spriteext[tspr->owner].pitch) / (2048.0f / 360.0f); rollang = (float)(spriteext[tspr->owner].roll) / (2048.0f / 360.0f); - offsets[0] = spriteext[tspr->owner].xoff / (scale * tspr->xrepeat); - offsets[1] = spriteext[tspr->owner].yoff / (scale * tspr->xrepeat); + offsets[0] = -spriteext[tspr->owner].xoff / (scale * tspr->xrepeat); + offsets[1] = -spriteext[tspr->owner].yoff / (scale * tspr->xrepeat); offsets[2] = (float)(spriteext[tspr->owner].zoff) / 16.0f / (scale * tspr->yrepeat); bglTranslatef(-offsets[0], -offsets[1], -offsets[2]);