shithub: nanobsp

Download patch

ref: 828febdc37b912fd6426ad797c898e6bc3a60944
parent: 0447fd613695773bfc8165edba2de8e28164aa99
author: Andrew Apted <ajapted@gmail.com>
date: Mon Dec 18 18:32:58 EST 2023

fixed a bug in BSP_ComputeIntersection().

--- a/nano_bsp.c
+++ b/nano_bsp.c
@@ -548,8 +548,8 @@
 	fixed_t x1 = seg->v1->x - part->v1->x;
 	fixed_t y1 = seg->v1->y - part->v1->y;
 
-	fixed_t x2 = seg->v2->x - part->v2->x;
-	fixed_t y2 = seg->v2->y - part->v2->y;
+	fixed_t x2 = seg->v2->x - part->v1->x;
+	fixed_t y2 = seg->v2->y - part->v1->y;
 
 	fixed_t a, b;
 
--