Skip to content

Commit

Permalink
Fixed bug in MPE_End which attempted to send benign sector reports to…
Browse files Browse the repository at this point in the history
… the game before the game's map data setup routines had been called.
  • Loading branch information
danij committed Jun 25, 2008
1 parent 2b0aaec commit ba1c468
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions doomsday/engine/portable/src/edit_map.c
Expand Up @@ -867,17 +867,7 @@ static void finishSectors(gamemap_t *map)

findSectorSSecGroups(sec);

if(!(sec->lineDefCount > 0))
{ // Its a "benign" sector.
// Send the game a status report (we don't need to do anything).
if(gx.HandleMapObjectStatusReport)
gx.HandleMapObjectStatusReport(DMUSC_SECTOR_ISBENIGN,
sec - map->sectors,
DMU_SECTOR, NULL);
}

updateSectorBounds(sec);

P_GetSectorBounds(sec, min, max);

// Set the degenmobj_t to the middle of the bounding box.
Expand Down Expand Up @@ -1622,6 +1612,20 @@ boolean MPE_End(void)
gx.SetupForMapData(DMU_SECTOR, gamemap->numSectors);
}

for(i = 0; i < gamemap->numSectors; ++i)
{
sector_t *sec = &gamemap->sectors[i];

if(!(sec->lineDefCount > 0))
{ // Its a "benign" sector.
// Send the game a status report (we don't need to do anything).
if(gx.HandleMapObjectStatusReport)
gx.HandleMapObjectStatusReport(DMUSC_SECTOR_ISBENIGN,
sec - gamemap->sectors,
DMU_SECTOR, NULL);
}
}

/**
* Are we caching this map?
*/
Expand Down

0 comments on commit ba1c468

Please sign in to comment.