mirror of
https://github.com/ZDoom/gzdoom-last-svn.git
synced 2025-05-30 17:00:48 +00:00
- Improvements to sky positioning.
- added a few NULL pointer checks to level deinit code. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@564 b0f79afe-0144-0410-b225-9a4edf0717df
This commit is contained in:
parent
61172c803e
commit
2c5d33aa6d
2 changed files with 16 additions and 5 deletions
|
@ -769,7 +769,7 @@ void gl_PreprocessLevel()
|
|||
//==========================================================================
|
||||
void gl_CleanLevelData()
|
||||
{
|
||||
// Dynamic lights must be destroyed before the sector information here is deleted!
|
||||
// Dynamic lights must be destroyed before the sector information here is deleted.
|
||||
TThinkerIterator<ADynamicLight> it(STAT_DLIGHT);
|
||||
AActor * mo=it.Next();
|
||||
while (mo)
|
||||
|
@ -781,8 +781,16 @@ void gl_CleanLevelData()
|
|||
|
||||
for(int i = 0; i < numvertexes; i++) if (vertexes[i].numsectors > 0)
|
||||
{
|
||||
delete [] vertexes[i].sectors;
|
||||
delete [] vertexes[i].heightlist;
|
||||
if (vertexes[i].sectors != NULL)
|
||||
{
|
||||
delete [] vertexes[i].sectors;
|
||||
vertexes[i].sectors = NULL;
|
||||
}
|
||||
if (vertexes[i].heightlist != NULL)
|
||||
{
|
||||
delete [] vertexes[i].heightlist;
|
||||
vertexes[i].heightlist = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
if (sides && sides[0].segs)
|
||||
|
|
|
@ -126,6 +126,7 @@ static void SkyVertex(int r, int c)
|
|||
|
||||
gl.TexCoord2f(u, v);
|
||||
}
|
||||
if (r != 4) y+=FRACUNIT*300;
|
||||
// And finally the vertex.
|
||||
fx =-TO_GL(x); // Doom mirrors the sky vertically!
|
||||
fy = TO_GL(y);
|
||||
|
@ -263,11 +264,13 @@ static void RenderDome(FTextureID texno, FMaterial * tex, float x_offset, float
|
|||
{
|
||||
yMult=1.0f;
|
||||
if (!skystretch)
|
||||
gl.Scalef(1.f, texh/180.f, 1.f);
|
||||
gl.Scalef(1.f, texh/230.f, 1.f);
|
||||
}
|
||||
else
|
||||
{
|
||||
yMult= 180.0f/texh;
|
||||
if (!skystretch && texh > 190)
|
||||
gl.Scalef(1.f, 230.f/240.f, 1.f);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -567,7 +570,7 @@ void GLSkyPortal::DrawContents()
|
|||
{
|
||||
if (origin->texture[0]==origin->texture[1] && origin->doublesky) origin->doublesky=false;
|
||||
|
||||
gl.Translatef(0.f, -1000.f, 0.f);
|
||||
gl.Translatef(0.f, -1250.f, 0.f);
|
||||
|
||||
if (origin->texture[0])
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue