- fixed: The sky baseline position needs to take texture scaling into account.

SVN r1982 (trunk)
This commit is contained in:
Christoph Oelckers 2009-11-15 08:11:14 +00:00
parent 6310f32843
commit 6161702703
4 changed files with 6 additions and 2 deletions

View file

@ -1,3 +1,6 @@
November 15, 2009 (Changes by Graf Zahl)
- fixed: The sky baseline position needs to take texture scaling into account.
November 14, 2009 November 14, 2009
- Do not squash skies taller than 200 into square pixels. - Do not squash skies taller than 200 into square pixels.

View file

@ -1313,7 +1313,7 @@ void R_DrawSkyPlane (visplane_t *pl)
} }
frontskytex = TexMan(s->GetTexture(pos)); frontskytex = TexMan(s->GetTexture(pos));
if (frontskytex->UseType == FTexture::TEX_Null) if (frontskytex == NULL || frontskytex->UseType == FTexture::TEX_Null)
{ // [RH] The blank texture: Use normal sky instead. { // [RH] The blank texture: Use normal sky instead.
goto sky1; goto sky1;
} }

View file

@ -110,6 +110,7 @@ void R_InitSkyMap ()
{ {
skytexturemid = (200 - skyheight) << FRACBITS; skytexturemid = (200 - skyheight) << FRACBITS;
} }
skytexturemid = FixedMul(skytexturemid, skytex1->yScale);
if (viewwidth != 0 && viewheight != 0) if (viewwidth != 0 && viewheight != 0)
{ {

View file

@ -144,7 +144,7 @@ FTexture::FTexture (const char *name, int lumpnum)
WidthBits(0), HeightBits(0), xScale(FRACUNIT), yScale(FRACUNIT), SourceLump(lumpnum), WidthBits(0), HeightBits(0), xScale(FRACUNIT), yScale(FRACUNIT), SourceLump(lumpnum),
UseType(TEX_Any), bNoDecals(false), bNoRemap0(false), bWorldPanning(false), UseType(TEX_Any), bNoDecals(false), bNoRemap0(false), bWorldPanning(false),
bMasked(true), bAlphaTexture(false), bHasCanvas(false), bWarped(0), bComplex(false), bMasked(true), bAlphaTexture(false), bHasCanvas(false), bWarped(0), bComplex(false),
Rotations(0xFFFF), Width(0), Height(0), WidthMask(0), Native(NULL) Rotations(0xFFFF), SkyOffset(0), Width(0), Height(0), WidthMask(0), Native(NULL)
{ {
id.SetInvalid(); id.SetInvalid();
if (name != NULL) if (name != NULL)