Skip to content

Commit

Permalink
Added R_GetSectorNumForDegen()
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Jun 24, 2003
1 parent 57d99ff commit 5dad15d
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion doomsday/Src/r_util.c
Expand Up @@ -304,4 +304,23 @@ boolean R_IsPointInSector(fixed_t x, fixed_t y, sector_t *sector)

// The point is inside if the number of crossed nodes is odd.
return isOdd;
}
}

//===========================================================================
// R_GetSectorNumForDegen
// Returns the index of the sector who owns the given degenmobj.
//===========================================================================
int R_GetSectorNumForDegen(void *degenmobj)
{
int i;

// Check all sectors; find where the sound is coming from.
for(i = 0; i < numsectors; i++)
{
if(degenmobj == &SECTOR_PTR(i)->soundorg)
{
return i;
}
}
return -1;
}

0 comments on commit 5dad15d

Please sign in to comment.