From e8c7a10f808c0f3e4e7f78d6dd4c857a98e3d811 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 13 Apr 2006 20:33:19 +0000 Subject: [PATCH] SVN r39 (trunk) --- docs/rh-log.txt | 5 +++++ src/decallib.cpp | 11 +++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/docs/rh-log.txt b/docs/rh-log.txt index e05f692a5a..e0a7c42625 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,4 +1,9 @@ April 13, 2006 (Changes by Graf Zahl) +- Fixed: The decal stretcher is supposed to stretch the decal to a specifiable + size but it used that size as a scaling factor instead. The old code allowed + a maximum scaling factor of 4 which masked this bug to a large extent but + with the increased precision the blood smears were stretched to abnormal + proportions. - Fixed: A non-spectral attack set any spectral target to its missile state. This is not supposed to happen. - Fixed: The Prison Key was misspelled in the pickup message. diff --git a/src/decallib.cpp b/src/decallib.cpp index 993d9b766a..bf53705c4e 100644 --- a/src/decallib.cpp +++ b/src/decallib.cpp @@ -1186,18 +1186,21 @@ DThinker *FDecalStretcherAnim::CreateThinker (DBaseDecal *actor, side_t *wall) c thinker->TimeToStart = level.maptime + StretchStart; thinker->TimeToStop = thinker->TimeToStart + StretchTime; - if (GoalX >= 0) + + FTexture * tex = TexMan[actor->PicNum]; + + if (GoalX >= 0 && tex != NULL) { - thinker->GoalX = GoalX; + thinker->GoalX = GoalX / tex->GetWidth(); thinker->bStretchX = true; } else { thinker->bStretchX = false; } - if (GoalY >= 0) + if (GoalY >= 0 && tex != NULL) { - thinker->GoalY = GoalY; + thinker->GoalY = GoalY / tex->GetHeight(); thinker->bStretchY = true; } else