Fix wrong behaviour and lack of animation in ogl sky background

This commit is contained in:
Hannu Hanhi 2020-04-21 23:24:32 +03:00
parent 4309908999
commit 2fdb7627b7
1 changed files with 4 additions and 4 deletions

View File

@ -4524,7 +4524,7 @@ void HWR_DrawSkyBackground(void)
if (drewsky) if (drewsky)
return; return;
HWR_GetTexture(skytexture); HWR_GetTexture(texturetranslation[skytexture]);
aspectratio = (float)vid.width/(float)vid.height; aspectratio = (float)vid.width/(float)vid.height;
//Hurdler: the sky is the only texture who need 4.0f instead of 1.0 //Hurdler: the sky is the only texture who need 4.0f instead of 1.0
@ -4549,8 +4549,8 @@ void HWR_DrawSkyBackground(void)
// software doesn't draw any further than 1024 for skies anyway, but this doesn't overlap properly // software doesn't draw any further than 1024 for skies anyway, but this doesn't overlap properly
// The only time this will probably be an issue is when a sky wider than 1024 is used as a sky AND a regular wall texture // The only time this will probably be an issue is when a sky wider than 1024 is used as a sky AND a regular wall texture
angle = (viewangle/2 + xtoviewangle[0]); angle = (viewangle + xtoviewangle[0]);
dimensionmultiply = ((float)textures[skytexture]->width/256.0f); dimensionmultiply = ((float)textures[texturetranslation[skytexture]]->width/256.0f);
if (atransform.mirror) if (atransform.mirror)
{ {
@ -4563,7 +4563,7 @@ void HWR_DrawSkyBackground(void)
// Y // Y
angle = aimingangle; angle = aimingangle;
dimensionmultiply = ((float)textures[skytexture]->height/(128.0f*aspectratio)); dimensionmultiply = ((float)textures[texturetranslation[skytexture]]->height/(128.0f*aspectratio));
if (splitscreen == 1) if (splitscreen == 1)
{ {