mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-30 07:41:22 +00:00
- fixed: for levels with 0-length lines the allocation size of the lines array was too large because it didn't subtract those deleted lines.
This commit is contained in:
parent
b93c3619e9
commit
ba629379ca
1 changed files with 4 additions and 4 deletions
|
@ -2093,9 +2093,7 @@ void P_LoadLineDefs (MapData * map)
|
||||||
maplinedef_t *mld;
|
maplinedef_t *mld;
|
||||||
|
|
||||||
int numlines = lumplen / sizeof(maplinedef_t);
|
int numlines = lumplen / sizeof(maplinedef_t);
|
||||||
level.lines.Alloc(numlines);
|
|
||||||
linemap.Resize(numlines);
|
linemap.Resize(numlines);
|
||||||
memset (&level.lines[0], 0, numlines*sizeof(line_t));
|
|
||||||
|
|
||||||
mldf = new char[lumplen];
|
mldf = new char[lumplen];
|
||||||
map->Read(ML_LINEDEFS, mldf);
|
map->Read(ML_LINEDEFS, mldf);
|
||||||
|
@ -2140,6 +2138,8 @@ void P_LoadLineDefs (MapData * map)
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
level.lines.Alloc(numlines);
|
||||||
|
memset(&level.lines[0], 0, numlines * sizeof(line_t));
|
||||||
|
|
||||||
P_AllocateSideDefs (map, sidecount);
|
P_AllocateSideDefs (map, sidecount);
|
||||||
|
|
||||||
|
@ -2192,9 +2192,7 @@ void P_LoadLineDefs2 (MapData * map)
|
||||||
maplinedef2_t *mld;
|
maplinedef2_t *mld;
|
||||||
|
|
||||||
int numlines = lumplen / sizeof(maplinedef2_t);
|
int numlines = lumplen / sizeof(maplinedef2_t);
|
||||||
level.lines.Alloc(numlines);
|
|
||||||
linemap.Resize(numlines);
|
linemap.Resize(numlines);
|
||||||
memset (&level.lines[0], 0, numlines*sizeof(line_t));
|
|
||||||
|
|
||||||
mldf = new char[lumplen];
|
mldf = new char[lumplen];
|
||||||
map->Read(ML_LINEDEFS, mldf);
|
map->Read(ML_LINEDEFS, mldf);
|
||||||
|
@ -2233,6 +2231,8 @@ void P_LoadLineDefs2 (MapData * map)
|
||||||
{
|
{
|
||||||
ForceNodeBuild = true;
|
ForceNodeBuild = true;
|
||||||
}
|
}
|
||||||
|
level.lines.Alloc(numlines);
|
||||||
|
memset(&level.lines[0], 0, numlines * sizeof(line_t));
|
||||||
|
|
||||||
P_AllocateSideDefs (map, sidecount);
|
P_AllocateSideDefs (map, sidecount);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue