Make lines and sides use the mapload copies in P_NetArchiveWorld() too; do no longer use vres stuff there.
This commit is contained in:
parent
bb54597552
commit
1221c108c6
|
@ -777,13 +777,11 @@ static void P_NetArchiveWorld(void)
|
||||||
size_t i;
|
size_t i;
|
||||||
INT32 statsec = 0, statline = 0;
|
INT32 statsec = 0, statline = 0;
|
||||||
const line_t *li = lines;
|
const line_t *li = lines;
|
||||||
|
const line_t *spawnli = spawnlines;
|
||||||
const side_t *si;
|
const side_t *si;
|
||||||
|
const side_t *spawnsi;
|
||||||
UINT8 *put;
|
UINT8 *put;
|
||||||
|
|
||||||
// reload the map just to see difference
|
|
||||||
virtres_t* virt = vres_GetMap(lastloadedmaplumpnum);
|
|
||||||
mapsidedef_t *msd = (mapsidedef_t*) vres_Find(virt, "SIDEDEFS")->data;
|
|
||||||
maplinedef_t *mld = (maplinedef_t*) vres_Find(virt, "LINEDEFS")->data;
|
|
||||||
const sector_t *ss = sectors;
|
const sector_t *ss = sectors;
|
||||||
const sector_t *spawnss = spawnsectors;
|
const sector_t *spawnss = spawnsectors;
|
||||||
UINT8 diff, diff2, diff3;
|
UINT8 diff, diff2, diff3;
|
||||||
|
@ -936,45 +934,41 @@ static void P_NetArchiveWorld(void)
|
||||||
WRITEUINT16(put, 0xffff);
|
WRITEUINT16(put, 0xffff);
|
||||||
|
|
||||||
// do lines
|
// do lines
|
||||||
for (i = 0; i < numlines; i++, mld++, li++)
|
for (i = 0; i < numlines; i++, spawnli++, li++)
|
||||||
{
|
{
|
||||||
diff = diff2 = diff3 = 0;
|
diff = diff2 = diff3 = 0;
|
||||||
|
|
||||||
if (li->special != SHORT(mld->special))
|
if (li->special != spawnli->special)
|
||||||
diff |= LD_SPECIAL;
|
diff |= LD_SPECIAL;
|
||||||
|
|
||||||
if (SHORT(mld->special) == 321 || SHORT(mld->special) == 322) // only reason li->callcount would be non-zero is if either of these are involved
|
if (spawnli->special == 321 || spawnli->special == 322) // only reason li->callcount would be non-zero is if either of these are involved
|
||||||
diff |= LD_CLLCOUNT;
|
diff |= LD_CLLCOUNT;
|
||||||
|
|
||||||
if (li->sidenum[0] != 0xffff)
|
if (li->sidenum[0] != 0xffff)
|
||||||
{
|
{
|
||||||
si = &sides[li->sidenum[0]];
|
si = &sides[li->sidenum[0]];
|
||||||
if (si->textureoffset != SHORT(msd[li->sidenum[0]].textureoffset)<<FRACBITS)
|
spawnsi = &spawnsides[li->sidenum[0]];
|
||||||
|
if (si->textureoffset != spawnsi->textureoffset)
|
||||||
diff |= LD_S1TEXOFF;
|
diff |= LD_S1TEXOFF;
|
||||||
//SoM: 4/1/2000: Some textures are colormaps. Don't worry about invalid textures.
|
//SoM: 4/1/2000: Some textures are colormaps. Don't worry about invalid textures.
|
||||||
if (R_CheckTextureNumForName(msd[li->sidenum[0]].toptexture) != -1
|
if (si->toptexture != spawnsi->toptexture)
|
||||||
&& si->toptexture != R_TextureNumForName(msd[li->sidenum[0]].toptexture))
|
|
||||||
diff |= LD_S1TOPTEX;
|
diff |= LD_S1TOPTEX;
|
||||||
if (R_CheckTextureNumForName(msd[li->sidenum[0]].bottomtexture) != -1
|
if (si->bottomtexture != spawnsi->bottomtexture)
|
||||||
&& si->bottomtexture != R_TextureNumForName(msd[li->sidenum[0]].bottomtexture))
|
|
||||||
diff |= LD_S1BOTTEX;
|
diff |= LD_S1BOTTEX;
|
||||||
if (R_CheckTextureNumForName(msd[li->sidenum[0]].midtexture) != -1
|
if (si->midtexture != spawnsi->midtexture)
|
||||||
&& si->midtexture != R_TextureNumForName(msd[li->sidenum[0]].midtexture))
|
|
||||||
diff |= LD_S1MIDTEX;
|
diff |= LD_S1MIDTEX;
|
||||||
}
|
}
|
||||||
if (li->sidenum[1] != 0xffff)
|
if (li->sidenum[1] != 0xffff)
|
||||||
{
|
{
|
||||||
si = &sides[li->sidenum[1]];
|
si = &sides[li->sidenum[1]];
|
||||||
if (si->textureoffset != SHORT(msd[li->sidenum[1]].textureoffset)<<FRACBITS)
|
spawnsi = &spawnsides[li->sidenum[1]];
|
||||||
|
if (si->textureoffset != spawnsi->textureoffset)
|
||||||
diff2 |= LD_S2TEXOFF;
|
diff2 |= LD_S2TEXOFF;
|
||||||
if (R_CheckTextureNumForName(msd[li->sidenum[1]].toptexture) != -1
|
if (si->toptexture != spawnsi->toptexture)
|
||||||
&& si->toptexture != R_TextureNumForName(msd[li->sidenum[1]].toptexture))
|
|
||||||
diff2 |= LD_S2TOPTEX;
|
diff2 |= LD_S2TOPTEX;
|
||||||
if (R_CheckTextureNumForName(msd[li->sidenum[1]].bottomtexture) != -1
|
if (si->bottomtexture != spawnsi->bottomtexture)
|
||||||
&& si->bottomtexture != R_TextureNumForName(msd[li->sidenum[1]].bottomtexture))
|
|
||||||
diff2 |= LD_S2BOTTEX;
|
diff2 |= LD_S2BOTTEX;
|
||||||
if (R_CheckTextureNumForName(msd[li->sidenum[1]].midtexture) != -1
|
if (si->midtexture != spawnsi->midtexture)
|
||||||
&& si->midtexture != R_TextureNumForName(msd[li->sidenum[1]].midtexture))
|
|
||||||
diff2 |= LD_S2MIDTEX;
|
diff2 |= LD_S2MIDTEX;
|
||||||
if (diff2)
|
if (diff2)
|
||||||
diff |= LD_DIFF2;
|
diff |= LD_DIFF2;
|
||||||
|
@ -1018,7 +1012,6 @@ static void P_NetArchiveWorld(void)
|
||||||
WRITEUINT16(put, 0xffff);
|
WRITEUINT16(put, 0xffff);
|
||||||
R_ClearTextureNumCache(false);
|
R_ClearTextureNumCache(false);
|
||||||
|
|
||||||
vres_Free(virt);
|
|
||||||
save_p = put;
|
save_p = put;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue