printz
CRAZY DUMB ZEALOT
Posts: 10099
Registered: 0606 
This is pretty easy. Assuming you have access to the level data:
 for a given point (x, y), find the closest linedef to it.
 if that linedef is not facing the point, and if it has no second sidedef, then (x, y) is in the void.
Facing the point:
(x y): the point to test
(x1 y1): coordinates of linedef vertex 1
(x2 y2): those of linedef vertex 2
Check if (x  x1)*(y2  y1) < (y  y1) * (x2  x1)
If true, then it's not facing the first side, it's facing the second side, and might be in the void.
If they're equal, then the point is resting on the line.
How to calculate distance to linedef: I think you can just calculate the distance to one of its vertices. Or the minimum between the distance to vertex 1, to vertex 2, or to the projection (x0, y0) of (x, y) on the linedef line.
__________________
Automatic Wolfenstein  Version 1.0.1  also on Android (Updated 28/03/2015)
Last edited by printz on Nov 30 2012 at 17:08
