From 64332fb43d3fb17e36eca30cb21c8d9214da5ce4 Mon Sep 17 00:00:00 2001 From: Timothee Besset Date: Sun, 8 Sep 2013 13:28:08 +0100 Subject: [PATCH] misc - having a look at brush primitives stuff --- radiant/bp_dlg.cpp | 1 - radiant/brush.cpp | 7 ++++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/radiant/bp_dlg.cpp b/radiant/bp_dlg.cpp index 9a2bb786..13ef1620 100644 --- a/radiant/bp_dlg.cpp +++ b/radiant/bp_dlg.cpp @@ -53,7 +53,6 @@ gint BP_dialog_delete_callback( GtkWidget *widget, GdkEvent* event, gpointer dat // ret: 0 = abort, 1 = load and convert, 2 = changed project settings, load and don't convert // the user might decide to switch the BP mode in project settings // status: 0 = loading regular, got conflict 1 = loading BP, got conflict -// int WINAPI gtk_MessageBox (GtkWidget *parent, const char* lpText, const char* lpCaption, guint32 uType) int BP_MessageBox( int status ){ GtkWidget *window, *w, *vbox, *hbox; GtkAccelGroup *accel; diff --git a/radiant/brush.cpp b/radiant/brush.cpp index b6fc0344..05ec12fb 100644 --- a/radiant/brush.cpp +++ b/radiant/brush.cpp @@ -97,9 +97,9 @@ vec3_t baseaxis[18] = {0,-1,0}, {1,0,0}, {0,0,-1} // north wall }; -void TextureAxisFromPlane( plane_t *pln, vec3_t xv, vec3_t yv ){ +void TextureAxisFromPlane( plane_t *pln, vec3_t xv, vec3_t yv ) { int bestaxis; - float dot,best; + float dot, best; int i; best = 0; @@ -108,7 +108,8 @@ void TextureAxisFromPlane( plane_t *pln, vec3_t xv, vec3_t yv ){ for ( i = 0 ; i < 6 ; i++ ) { dot = DotProduct( pln->normal, baseaxis[i * 3] ); - if ( g_PrefsDlg.m_bQ3Map2Texturing && dot > best + 0.0001f || dot > best ) { + // see q3map2 source - added () for clarity + if ( ( g_PrefsDlg.m_bQ3Map2Texturing && dot > best + 0.0001f ) || dot > best ) { best = dot; bestaxis = i; }