- do not try to load empty BEHAVIOR lumps.

These would otherwise print an error message but there's a lot of maps out there which only have an empty entry to mark the map as Hexen format.
This commit is contained in:
Christoph Oelckers 2016-06-12 11:43:40 +02:00
parent 373c59f924
commit b8e392eaa5

View file

@ -3330,9 +3330,12 @@ void P_LoadReject (MapData * map, bool junk)
// [RH] P_LoadBehavior
//
void P_LoadBehavior(MapData * map)
{
if (map->Size(ML_BEHAVIOR) > 0)
{
map->Seek(ML_BEHAVIOR);
FBehavior::StaticLoadModule(-1, map->file, map->Size(ML_BEHAVIOR));
}
if (!FBehavior::StaticCheckAllGood())
{
Printf("ACS scripts unloaded.\n");