Merged p_setup conflict

This commit is contained in:
ZZYZX 2017-02-03 13:02:44 +02:00
commit 6a0103a746
54 changed files with 191 additions and 779 deletions

View file

@ -2541,7 +2541,7 @@ void P_ProcessSideTextures(bool checktranmap, side_t *sd, sector_t *sec, intmaps
case Sector_Set3DFloor:
if (msd->toptexture[0]=='#')
{
sd->SetTexture(side_t::top, FNullTextureID() +(-strtol(&msd->toptexture[1], NULL, 10))); // store the alpha as a negative texture index
sd->SetTexture(side_t::top, FNullTextureID() +(int)(-strtoll(&msd->toptexture[1], NULL, 10))); // store the alpha as a negative texture index
// This will be sorted out by the 3D-floor code later.
}
else
@ -2979,6 +2979,15 @@ static bool P_VerifyBlockMap(int count)
break;
}
// there's some node builder which carelessly removed the initial 0-entry.
// Rather than second-guessing the intent, let's just discard such blockmaps entirely
// to be on the safe side.
if (*list != 0)
{
Printf(PRINT_HIGH, "P_VerifyBlockMap: first entry is not 0.\n");
return false;
}
// scan the list for out-of-range linedef indicies in list
for(tmplist = list; *tmplist != -1; tmplist++)
{
@ -3426,6 +3435,17 @@ void P_FreeLevelData ()
{
// [ZZ] delete per-map event handlers
E_Shutdown(true);
MapThingsConverted.Clear();
MapThingsUserDataIndex.Clear();
MapThingsUserData.Clear();
linemap.Clear();
FCanvasTextureInfo::EmptyList();
R_FreePastViewers();
P_ClearUDMFKeys();
// [RH] Clear all ThingID hash chains.
AActor::ClearTIDHashes();
P_FreeMapDataBackup();
interpolator.ClearInterpolations(); // [RH] Nothing to interpolate on a fresh level.
Renderer->CleanLevelData();
@ -3578,14 +3598,6 @@ void P_SetupLevel (const char *lumpname, int position)
level.maptype = MAPTYPE_UNKNOWN;
wminfo.partime = 180;
MapThingsConverted.Clear();
MapThingsUserDataIndex.Clear();
MapThingsUserData.Clear();
linemap.Clear();
FCanvasTextureInfo::EmptyList ();
R_FreePastViewers ();
P_ClearUDMFKeys();
if (!savegamerestore)
{
for (i = 0; i < MAXPLAYERS; ++i)
@ -3615,8 +3627,6 @@ void P_SetupLevel (const char *lumpname, int position)
// Make sure all sounds are stopped before Z_FreeTags.
S_Start ();
// [RH] Clear all ThingID hash chains.
AActor::ClearTIDHashes ();
// [RH] clear out the mid-screen message
C_MidPrint (NULL, NULL);