]> git.xonotic.org Git - xonotic/netradiant.git/blobdiff - contrib/bobtoolz/DEntity.cpp
Merge branch 'NateEag-master-patch-12920' into 'master'
[xonotic/netradiant.git] / contrib / bobtoolz / DEntity.cpp
index 38ab47f43c240269785cb019b46b3898b98df803..5a4d8e57501c8b7461eb6fdf8830f0579f432467 100644 (file)
@@ -22,8 +22,9 @@
 //////////////////////////////////////////////////////////////////////
 
 #include "DEntity.h"
+#include "globaldefs.h"
 
-#ifdef WIN32
+#if GDEF_COMPILER_MSVC
 #pragma warning(disable : 4786)
 #endif
 
@@ -161,7 +162,7 @@ bool DEntity::LoadFromPrt( char *filename ){
                {
                        for ( unsigned int k = 0; k < portals.node[i].portal[j].point_count - 2; k++ )
                        {
-                               vec3_t v1, v2, normal, n;
+                               vec3_t v1{}, v2{}, normal{}, n{};
                                VectorSubtract( portals.node[i].portal[j].point[k + 2].p, portals.node[i].portal[j].point[k + 1].p, v1 );
                                VectorSubtract( portals.node[i].portal[j].point[k].p, portals.node[i].portal[j].point[k + 1].p, v2 );
                                CrossProduct( v1, v2, n );
@@ -243,7 +244,8 @@ void DEntity_loadBrush( DEntity& entity, scene::Instance& brush ){
        DBrush* loadBrush = entity.NewBrush( static_cast<int>( entity.brushList.size() ) );
        loadBrush->LoadFromBrush( brush, true );
 }
-typedef ReferenceCaller1<DEntity, scene::Instance&, DEntity_loadBrush> DEntityLoadBrushCaller;
+
+typedef ReferenceCaller<DEntity, void ( scene::Instance & ), DEntity_loadBrush> DEntityLoadBrushCaller;
 
 void DEntity::LoadSelectedBrushes(){
        ClearBrushes();
@@ -276,7 +278,8 @@ void DEntity_loadPatch( DEntity& entity, scene::Instance& patch ){
        DPatch* loadPatch = entity.NewPatch();
        loadPatch->LoadFromPatch( patch );
 }
-typedef ReferenceCaller1<DEntity, scene::Instance&, DEntity_loadPatch> DEntityLoadPatchCaller;
+
+typedef ReferenceCaller<DEntity, void ( scene::Instance & ), DEntity_loadPatch> DEntityLoadPatchCaller;
 
 void DEntity::LoadSelectedPatches(){
        ClearPatches();
@@ -385,6 +388,7 @@ public:
                load_brushes_t( DEntity* entity )
                        : m_entity( entity ), m_count( 0 ){
                }
+
                bool pre( scene::Node& node ) const {
                        scene::Path path( NodeReference( GlobalSceneGraph().root() ) );
                        path.push( NodeReference( *m_entity->QER_Entity ) );
@@ -489,8 +493,6 @@ void DEntity::BuildInRadiant( bool allowDestruction ){
        }
 }
 
-
-
 int DEntity::GetIDMax( void ) {
        int max = -1;
        for ( std::list<DBrush *>::const_iterator cntBrush = brushList.begin(); cntBrush != brushList.end(); cntBrush++ ) {