mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2024-12-11 21:00:53 +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;
|
||||
|
||||
int numlines = lumplen / sizeof(maplinedef_t);
|
||||
level.lines.Alloc(numlines);
|
||||
linemap.Resize(numlines);
|
||||
memset (&level.lines[0], 0, numlines*sizeof(line_t));
|
||||
|
||||
mldf = new char[lumplen];
|
||||
map->Read(ML_LINEDEFS, mldf);
|
||||
|
@ -2140,6 +2138,8 @@ void P_LoadLineDefs (MapData * map)
|
|||
i++;
|
||||
}
|
||||
}
|
||||
level.lines.Alloc(numlines);
|
||||
memset(&level.lines[0], 0, numlines * sizeof(line_t));
|
||||
|
||||
P_AllocateSideDefs (map, sidecount);
|
||||
|
||||
|
@ -2192,9 +2192,7 @@ void P_LoadLineDefs2 (MapData * map)
|
|||
maplinedef2_t *mld;
|
||||
|
||||
int numlines = lumplen / sizeof(maplinedef2_t);
|
||||
level.lines.Alloc(numlines);
|
||||
linemap.Resize(numlines);
|
||||
memset (&level.lines[0], 0, numlines*sizeof(line_t));
|
||||
|
||||
mldf = new char[lumplen];
|
||||
map->Read(ML_LINEDEFS, mldf);
|
||||
|
@ -2233,6 +2231,8 @@ void P_LoadLineDefs2 (MapData * map)
|
|||
{
|
||||
ForceNodeBuild = true;
|
||||
}
|
||||
level.lines.Alloc(numlines);
|
||||
memset(&level.lines[0], 0, numlines * sizeof(line_t));
|
||||
|
||||
P_AllocateSideDefs (map, sidecount);
|
||||
|
||||
|
|
Loading…
Reference in a new issue