mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-29 07:41:47 +00:00
free for real
This commit is contained in:
parent
823998d87f
commit
d5c26f28d6
1 changed files with 6 additions and 11 deletions
|
@ -597,11 +597,8 @@ R_ReallocateMapBuffers (void)
|
|||
}
|
||||
|
||||
if (!r_numallocatedlights || r_outoflights)
|
||||
{
|
||||
if (!blocklights)
|
||||
{
|
||||
free(blocklights);
|
||||
}
|
||||
|
||||
if (r_outoflights)
|
||||
{
|
||||
|
@ -627,11 +624,8 @@ R_ReallocateMapBuffers (void)
|
|||
}
|
||||
|
||||
if (!r_numallocatededges || r_outofedges)
|
||||
{
|
||||
if (!r_edges)
|
||||
{
|
||||
free(r_edges);
|
||||
}
|
||||
|
||||
if (r_outofedges)
|
||||
{
|
||||
|
@ -700,8 +694,9 @@ R_ReallocateMapBuffers (void)
|
|||
r_outoftriangles = false;
|
||||
}
|
||||
|
||||
if (r_numallocatedtriangles < vid.height)
|
||||
r_numallocatedtriangles = vid.height;
|
||||
// one more for the terminator
|
||||
if (r_numallocatedtriangles < vid.height+1)
|
||||
r_numallocatedtriangles = vid.height+1;
|
||||
|
||||
triangle_spans = malloc(r_numallocatedtriangles * sizeof(spanpackage_t));
|
||||
if (!triangle_spans)
|
||||
|
@ -712,7 +707,7 @@ R_ReallocateMapBuffers (void)
|
|||
}
|
||||
triangles_max = &triangle_spans[r_numallocatedtriangles];
|
||||
|
||||
R_Printf(PRINT_ALL, "Allocated %d triangles.\n", r_numallocatedtriangles);
|
||||
R_Printf(PRINT_ALL, "Allocated %d triangle spans.\n", r_numallocatedtriangles);
|
||||
}
|
||||
|
||||
if (!r_numallocatededgebasespans || r_outedgebasespans)
|
||||
|
|
Loading…
Reference in a new issue