Skip to content

Commit

Permalink
Fixed|World: Fatal error attempting to play icarus.wad MAP16
Browse files Browse the repository at this point in the history
This map contains certain mapping constructs which we now interpret
into 'extra' mesh geometries. Recently the way these geometries are
constructed was changed so that segments are generated only for the
edges of map lines. It appears that I mistakenly overlooked the need
to update the line-of-sight algorithm accordingly (the DMU API also
required an update).
  • Loading branch information
danij-deng committed Aug 19, 2013
1 parent 279efe6 commit d0f0350
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 3 additions & 1 deletion doomsday/client/src/world/api_map.cpp
Expand Up @@ -443,7 +443,9 @@ int P_Iteratep(void *elPtr, uint prop, void *context, int (*callback) (void *p,
foreach(Mesh *mesh, bspLeaf->extraMeshes())
foreach(HEdge *hedge, mesh->hedges())
{
DENG_ASSERT(hedge->mapElement() != 0); // sanity check
// Is this on the back of a one-sided line?
if(!hedge->mapElement())
continue;

int result = callback(&hedge->mapElement()->
as<Line::Side::Segment>()->line(), context);
Expand Down
5 changes: 4 additions & 1 deletion doomsday/client/src/world/linesighttest.cpp
Expand Up @@ -267,7 +267,10 @@ DENG2_PIMPL(LineSightTest)
foreach(Mesh *mesh, bspLeaf.extraMeshes())
foreach(HEdge *hedge, mesh->hedges())
{
DENG_ASSERT(hedge->mapElement() != 0); // sanity check
// Is this on the back of a one-sided line?
if(!hedge->mapElement())
continue;

if(!crossLine(hedge->mapElement()->as<Line::Side::Segment>()->lineSide()))
return false;
}
Expand Down

0 comments on commit d0f0350

Please sign in to comment.