From 2673d9d8c3255a154daa9167779f263eb60892d1 Mon Sep 17 00:00:00 2001 From: Eric Wasylishen Date: Wed, 25 Jan 2017 14:59:40 -0700 Subject: [PATCH] qbsp: fix broken clipping hulls on rotating objects --- qbsp/brush.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/qbsp/brush.cc b/qbsp/brush.cc index d53b3574..d1a37cc7 100644 --- a/qbsp/brush.cc +++ b/qbsp/brush.cc @@ -811,7 +811,14 @@ LoadBrush(const mapbrush_t *mapbrush, const vec3_t rotate_offset, for (int i=0; inumfaces; i++) hullbrush.faces[i] = mapbrush->face(i); - facelist = CreateBrushFaces(&hullbrush, rotate_offset, hullnum); + if (hullnum == 0) { + facelist = CreateBrushFaces(&hullbrush, rotate_offset, hullnum); + } else { + // for clipping hulls, don't apply rotation offset yet.. + // it will be applied below + facelist = CreateBrushFaces(&hullbrush, vec3_origin, hullnum); + } + if (!facelist) { Message(msgWarning, warnNoBrushFaces); return NULL;