X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fnetradiant.git;a=blobdiff_plain;f=tools%2Fquake3%2Fcommon%2Fpolylib.c;h=21067ca2e49731f393f1aab87480a425c9d58cad;hp=558242992c3bf0038ad40a74e8827bad91c051e8;hb=77faf8018f91f32b02f2545ed2364dddca4d687b;hpb=1086f5df1d188de1fc99be5a2f5f1d10d1473c70;ds=sidebyside diff --git a/tools/quake3/common/polylib.c b/tools/quake3/common/polylib.c index 55824299..21067ca2 100644 --- a/tools/quake3/common/polylib.c +++ b/tools/quake3/common/polylib.c @@ -249,8 +249,11 @@ winding_t *BaseWindingForPlane (vec3_t normal, vec_t dist) CrossProduct (vup, normal, vright); - VectorScale (vup, MAX_WORLD_COORD, vup); - VectorScale (vright, MAX_WORLD_COORD, vright); + // LordHavoc: this has to use *2 because otherwise some created points may + // be inside the world (think of a diagonal case), and any brush with such + // points should be removed, failure to detect such cases is disasterous + VectorScale (vup, MAX_WORLD_COORD*2, vup); + VectorScale (vright, MAX_WORLD_COORD*2, vright); // project a really big axis aligned box onto the plane w = AllocWinding (4);