mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-03-30 22:50:51 +00:00
P_WriteTextmap: Don't try to write invalid textures
This commit is contained in:
parent
90cd009b23
commit
8615e86a0b
1 changed files with 3 additions and 3 deletions
|
@ -2173,11 +2173,11 @@ static void P_WriteTextmap(void)
|
|||
fprintf(f, "offsetx = %d;\n", sides[i].textureoffset >> FRACBITS);
|
||||
if (sides[i].rowoffset != 0)
|
||||
fprintf(f, "offsety = %d;\n", sides[i].rowoffset >> FRACBITS);
|
||||
if (sides[i].toptexture != 0)
|
||||
if (sides[i].toptexture > 0 && sides[i].toptexture < numtextures)
|
||||
fprintf(f, "texturetop = \"%.*s\";\n", 8, textures[sides[i].toptexture]->name);
|
||||
if (sides[i].bottomtexture != 0)
|
||||
if (sides[i].bottomtexture > 0 && sides[i].bottomtexture < numtextures)
|
||||
fprintf(f, "texturebottom = \"%.*s\";\n", 8, textures[sides[i].bottomtexture]->name);
|
||||
if (sides[i].midtexture != 0)
|
||||
if (sides[i].midtexture > 0 && sides[i].midtexture < numtextures)
|
||||
fprintf(f, "texturemiddle = \"%.*s\";\n", 8, textures[sides[i].midtexture]->name);
|
||||
if (sides[i].repeatcnt != 0)
|
||||
fprintf(f, "repeatcnt = %d;\n", sides[i].repeatcnt);
|
||||
|
|
Loading…
Reference in a new issue