mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-03-20 18:01:16 +00:00
Store a copy of sectors, lines and sides in memory so that P_NetArchiveWorld() can soon use them instead of relying on re-opening the original lumps.
Fix print type issue.
This commit is contained in:
parent
7e0152f37b
commit
eadf953957
2 changed files with 15 additions and 0 deletions
|
@ -103,6 +103,9 @@ node_t *nodes;
|
|||
line_t *lines;
|
||||
side_t *sides;
|
||||
mapthing_t *mapthings;
|
||||
sector_t *spawnsectors;
|
||||
line_t *spawnlines;
|
||||
side_t *spawnsides;
|
||||
INT32 numstarposts;
|
||||
UINT16 bossdisabled;
|
||||
boolean stoppedclock;
|
||||
|
@ -2775,6 +2778,15 @@ boolean P_SetupLevel(boolean skipprecip)
|
|||
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);
|
||||
spawnsides = Z_Calloc(numsides * sizeof (*sides), PU_LEVEL, NULL);
|
||||
|
||||
memcpy(spawnsectors, sectors, numsectors * sizeof (*sectors));
|
||||
memcpy(spawnlines, lines, numlines * sizeof (*lines));
|
||||
memcpy(spawnsides, sides, numsides * sizeof (*sides));
|
||||
|
||||
P_PrepareRawThings(vres_Find(virt, "THINGS")->data);
|
||||
|
||||
P_MakeMapMD5(virt, &mapmd5);
|
||||
|
|
|
@ -63,6 +63,7 @@ extern seg_t *segs;
|
|||
|
||||
extern size_t numsectors;
|
||||
extern sector_t *sectors;
|
||||
extern sector_t *spawnsectors;
|
||||
|
||||
extern size_t numsubsectors;
|
||||
extern subsector_t *subsectors;
|
||||
|
@ -72,9 +73,11 @@ extern node_t *nodes;
|
|||
|
||||
extern size_t numlines;
|
||||
extern line_t *lines;
|
||||
extern line_t *spawnlines;
|
||||
|
||||
extern size_t numsides;
|
||||
extern side_t *sides;
|
||||
extern side_t *spawnsides;
|
||||
|
||||
//
|
||||
// POV data.
|
||||
|
|
Loading…
Reference in a new issue