- some improvements to compatibility scripts:

* use names, not strings, to allow use of switch/case.
* avoid creating the checksum a second time per level.
* do an early-out check for maps that do not have scripted compatibility.
This commit is contained in:
Christoph Oelckers 2018-04-09 22:09:28 +02:00
commit 9daad477c3
4 changed files with 44 additions and 32 deletions

View file

@ -3756,7 +3756,7 @@ void P_SetupLevel (const char *lumpname, int position)
{
level.maptype = MAPTYPE_UDMF;
}
CheckCompatibility(map);
FName checksum = CheckCompatibility(map);
if (ib_compatflags & BCOMPATF_REBUILDNODES)
{
ForceNodeBuild = true;
@ -3834,7 +3834,7 @@ void P_SetupLevel (const char *lumpname, int position)
times[0].Unclock();
}
SetCompatibilityParams();
SetCompatibilityParams(checksum);
times[6].Clock();
P_LoopSidedefs (true);