]> de.git.xonotic.org Git - xonotic/netradiant.git/commitdiff
Merge branch 'master' into Mario/winfix
authorMario <mario@smbclan.net>
Sun, 29 Apr 2018 14:01:55 +0000 (00:01 +1000)
committerMario <mario@smbclan.net>
Sun, 29 Apr 2018 14:01:55 +0000 (00:01 +1000)
libs/l_net/l_net_wins.c
radiant/multimon.cpp
radiant/patch.cpp

index 937e7abb9cb52dc772a3f15a3f7ec4d93a160302..a4a337868c938d4479130baf7b3ea5d4785cfb97 100644 (file)
@@ -46,7 +46,7 @@ typedef struct tag_error_struct
        LPSTR errstr;
 } ERROR_STRUCT;
 
-const int NET_NAMELEN = 64;
+#define NET_NAMELEN 64
 
 char my_tcpip_address[NET_NAMELEN];
 
index 917821d285c7948e0c9ecc103a5df1f3fa3dfada..99d632040df89862fea6a12ee02c2d6262e2b3b7 100644 (file)
@@ -37,7 +37,7 @@ void MultiMonitor_constructPreferences(PreferencesPage &page)
                                                           g_multimon_globals.m_bStartOnPrimMon);
     ui::CheckButton popup = page.appendCheckBox(
             "", "Disable system menu on popup windows",
-            mkImportExportCallback(g_Multimon_enableSysMenuPopups)
+            make_property(g_Multimon_enableSysMenuPopups)
     );
     Widget_connectToggleDependency(popup, primary_monitor);
 }
index c48cb44a4fa522929e9a53921d2deaa324c227ea..7a99fd2f6fbe3fb0c5a92e51e67ee2df5395300b 100644 (file)
@@ -1311,9 +1311,9 @@ void Patch::ConstructPrefab(const AABB &aabb, EPatchPrefab eType, int axis, std:
         // vPos[1] = aabb.origin;
         // vPos[2] = vector3_added(aabb.origin, aabb.extents);
 
-        float f = 1 / cos(M_PI / n);
+        float f = 1 / cos(G_PI / n);
         for (std::size_t i = 0; i < width; ++i) {
-            float angle = (M_PI * i) / n; // 0 to 2pi
+            float angle = (G_PI * i) / n; // 0 to 2pi
             float x = vPos[1][0] + (vPos[2][0] - vPos[1][0]) * cos(angle) * ((i & 1) ? f : 1.0f);
             float y = vPos[1][1] + (vPos[2][1] - vPos[1][1]) * sin(angle) * ((i & 1) ? f : 1.0f);
             for (std::size_t j = 0; j < height; ++j) {
@@ -1333,9 +1333,9 @@ void Patch::ConstructPrefab(const AABB &aabb, EPatchPrefab eType, int axis, std:
         // vPos[1] = aabb.origin;
         // vPos[2] = vector3_added(aabb.origin, aabb.extents);
 
-        float f = 1 / cos(M_PI / n);
+        float f = 1 / cos(G_PI / n);
         for (std::size_t i = 0; i < width; ++i) {
-            float angle = (M_PI * i) / n;
+            float angle = (G_PI * i) / n;
             for (std::size_t j = 0; j < height; ++j) {
                 float x = vPos[1][0] + (1.0f - (j / (float) (height - 1))) * (vPos[2][0] - vPos[1][0]) * cos(angle) *
                                        ((i & 1) ? f : 1.0f);
@@ -1358,12 +1358,12 @@ void Patch::ConstructPrefab(const AABB &aabb, EPatchPrefab eType, int axis, std:
         // vPos[1] = aabb.origin;
         // vPos[2] = vector3_added(aabb.origin, aabb.extents);
 
-        float f = 1 / cos(M_PI / n);
-        float g = 1 / cos(M_PI / (2 * m));
+        float f = 1 / cos(G_PI / n);
+        float g = 1 / cos(G_PI / (2 * m));
         for (std::size_t i = 0; i < width; ++i) {
-            float angle = (M_PI * i) / n;
+            float angle = (G_PI * i) / n;
             for (std::size_t j = 0; j < height; ++j) {
-                float angle2 = (M_PI * j) / (2 * m);
+                float angle2 = (G_PI * j) / (2 * m);
                 float x = vPos[1][0] + (vPos[2][0] - vPos[1][0]) * sin(angle2) * ((j & 1) ? g : 1.0f) * cos(angle) *
                                        ((i & 1) ? f : 1.0f);
                 float y = vPos[1][1] + (vPos[2][1] - vPos[1][1]) * sin(angle2) * ((j & 1) ? g : 1.0f) * sin(angle) *