IsPointInMap - Void Testing Solution

Moderator: GZDoom Developers

Post Reply
User avatar
Major Cooke
Posts: 8170
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

IsPointInMap - Void Testing Solution

Post by Major Cooke »

Pull Request

Big thanks to dpJudas and Gutawer for helping me with this.

Finally, now you can test and see if a vector is inside the map or in the void. See the example below.
Attachments
test.pk3
Prints a message every second: "in map" or "in void" based on if inside level geometry. Noclip outside the map to test.
(470 Bytes) Downloaded 57 times
User avatar
Rachael
Posts: 13530
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: IsPointInMap - Void Testing Solution

Post by Rachael »

Saved me the trouble of (eventually) getting around to it.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: IsPointInMap - Void Testing Solution

Post by Graf Zahl »

Why is this using an internal function of the node builder?
User avatar
Major Cooke
Posts: 8170
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: IsPointInMap - Void Testing Solution

Post by Major Cooke »

I didn't know how to use the other versions of the function properly since they involved nodes.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: IsPointInMap - Void Testing Solution

Post by Graf Zahl »

The main issue here is that the semantics of this function are not the same as of P_PointOnSide or P_PointOnDivLineside because it has to consider the special needs of the node builder. Please rewrite this to use P_PointOnDivLineSide. It may need a bit more setup but is the better choice here.
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”