mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-04-20 09:11:01 +00:00
Moved some map loading functions to more convenient places.
This commit is contained in:
parent
c96778c4a5
commit
35feaa8e90
1 changed files with 14 additions and 16 deletions
|
@ -2842,6 +2842,7 @@ static boolean LoadMapData (const virtres_t* virt)
|
|||
TextmapParse(sidesPos, numsides, TextmapSide);
|
||||
TextmapParse(linesPos, numlines, TextmapLine);
|
||||
SetupLines();
|
||||
TextmapParse(mapthingsPos,nummapthings,TextmapThing);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -2851,7 +2852,9 @@ static boolean LoadMapData (const virtres_t* virt)
|
|||
P_LoadRawLineDefs(virtlinedefs->data);
|
||||
SetupLines();
|
||||
P_LoadRawSideDefs2(virtsidedefs->data);
|
||||
P_PrepareRawThings(virtthings->data);
|
||||
}
|
||||
|
||||
R_ClearTextureNumCache(true);
|
||||
|
||||
// set the sky flat num
|
||||
|
@ -2864,22 +2867,6 @@ static boolean LoadMapData (const virtres_t* virt)
|
|||
// search for animated flats and set up
|
||||
P_SetupLevelFlatAnims();
|
||||
|
||||
if (!LoadMapBSP(virt))
|
||||
{
|
||||
CONS_Alert(CONS_WARNING, "Failed to load map BSP!\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
LoadMapLUT(virt);
|
||||
|
||||
if (textmap)
|
||||
TextmapParse(mapthingsPos,nummapthings,TextmapThing);
|
||||
else
|
||||
P_PrepareRawThings(virtthings->data);
|
||||
|
||||
P_LoadLineDefs2();
|
||||
P_GroupLines();
|
||||
|
||||
// Copy relevant map data for NetArchive purposes.
|
||||
spawnsectors = Z_Calloc(numsectors * sizeof (*sectors), PU_LEVEL, NULL);
|
||||
spawnlines = Z_Calloc(numlines * sizeof (*lines), PU_LEVEL, NULL);
|
||||
|
@ -3619,6 +3606,17 @@ boolean P_SetupLevel(boolean skipprecip)
|
|||
return false;
|
||||
}
|
||||
|
||||
if (!LoadMapBSP(virt))
|
||||
{
|
||||
CONS_Alert(CONS_ERROR, "Failed to load map BSP.\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
LoadMapLUT(virt);
|
||||
|
||||
P_LoadLineDefs2();
|
||||
P_GroupLines();
|
||||
|
||||
P_MakeMapMD5(virt, &mapmd5);
|
||||
|
||||
vres_Free(virt);
|
||||
|
|
Loading…
Reference in a new issue