]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
changed several Con_Printf calls to Con_DPrintf
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 27 Dec 2009 12:02:58 +0000 (12:02 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 27 Dec 2009 12:02:58 +0000 (12:02 +0000)
added q3bsp stats printing (like q1bsp stats) and added mesh info

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9705 d7cf8633-e32d-0410-b094-e92efae38249

cd_shared.c
cl_parse.c
csprogs.c
fs.c
gl_draw.c
menu.c
model_brush.c
model_shared.c
netconn.c
snd_main.c
sv_main.c

index e86653fdb561e9eb5f1ab576b6d7b49bdac848c9..33a5dcc627a52bcede4369fc0791fde6f3e3d161 100644 (file)
@@ -129,7 +129,7 @@ qboolean CDAudio_Play_real (int track, qboolean looping, qboolean complain)
        if (track > maxTrack)
        {
                if(complain)
-                       Con_Printf("CDAudio: Bad track number %u.\n", track);
+                       Con_DPrintf("CDAudio: Bad track number %u.\n", track);
                return false;
        }
 
@@ -192,7 +192,7 @@ void CDAudio_Play_byName (const char *trackname, qboolean looping)
                track = (unsigned char) atoi(trackname);
                if (track < 1)
                {
-                       Con_Printf("CDAudio: Bad track number %u.\n", track);
+                       Con_DPrintf("CDAudio: Bad track number %u.\n", track);
                        return;
                }
        }
index 72b1cbf81d3ff64345164a271cd5cb3565628bb9..81e08aaefe86bc5bc53e9c0678ccbeb9ac58f384 100644 (file)
@@ -1668,7 +1668,7 @@ void CL_ParseServerInfo (void)
                cl.movevars_airaccel_sideways_friction = 0;
 
                // seperate the printfs so the server message can have a color
-               Con_Printf("\n\n\35\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\37\n\n\2%s\n", str);
+               Con_Printf("\n\n<===================================>\n\n\2%s\n", str);
 
                // check memory integrity
                Mem_CheckSentinelsGlobal();
@@ -1713,7 +1713,7 @@ void CL_ParseServerInfo (void)
 
        // seperate the printfs so the server message can have a color
                if (cls.protocol != PROTOCOL_NEHAHRAMOVIE) // no messages when playing the Nehahra movie
-                       Con_Printf("\n\n\35\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\37\n\n\2%s\n", str);
+                       Con_Printf("\n<===================================>\n\n\2%s\n", str);
 
                // check memory integrity
                Mem_CheckSentinelsGlobal();
index 0492d10c574f80383ec32ff3d6d3a53db9cd6eb9..42ee15559885f8494b9cd73e6ca3c3299cc671d2 100644 (file)
--- a/csprogs.c
+++ b/csprogs.c
@@ -939,7 +939,7 @@ void CL_VM_Init (void)
                return;
        }
 
-       Con_Printf("CSQC %s ^5loaded (crc=%i, size=%i)\n", csprogsfn, csprogsdatacrc, (int)csprogsdatasize);
+       Con_DPrintf("CSQC %s ^5loaded (crc=%i, size=%i)\n", csprogsfn, csprogsdatacrc, (int)csprogsdatasize);
 
        if(cls.demorecording)
        {
@@ -1010,7 +1010,7 @@ void CL_VM_ShutDown (void)
                        PRVM_ExecuteProgram(prog->funcoffsets.CSQC_Shutdown, "QC function CSQC_Shutdown is missing");
                PRVM_ResetProg();
        CSQC_END
-       Con_Print("CSQC ^1unloaded\n");
+       Con_DPrint("CSQC ^1unloaded\n");
        cl.csqc_loaded = false;
 }
 
diff --git a/fs.c b/fs.c
index d05da06427d5145f7a1c3c44be8c99f7d8a6666b..7a145187aa5bd7eeb67a85228fc9eb17e48097b4 100644 (file)
--- a/fs.c
+++ b/fs.c
@@ -718,7 +718,7 @@ pack_t *FS_LoadPackPK3 (const char *packfile)
                return NULL;
        }
 
-       Con_Printf("Added packfile %s (%i files)\n", packfile, real_nb_files);
+       Con_DPrintf("Added packfile %s (%i files)\n", packfile, real_nb_files);
        return pack;
 }
 
@@ -947,7 +947,7 @@ pack_t *FS_LoadPackPAK (const char *packfile)
 
        Mem_Free(info);
 
-       Con_Printf("Added packfile %s (%i files)\n", packfile, numpackfiles);
+       Con_DPrintf("Added packfile %s (%i files)\n", packfile, numpackfiles);
        return pack;
 }
 
index dd13d5e60210ef67e5473bc600811f28c51348ee..67e17f634ef4a10cee16eaeaf6298b20ee3f33b8 100644 (file)
--- a/gl_draw.c
+++ b/gl_draw.c
@@ -289,7 +289,7 @@ static rtexture_t *draw_generatepic(const char *name, qboolean quiet)
        if (!strcmp(name, "gfx/colorcontrol/ditherpattern"))
                return draw_generateditherpattern();
        if (!quiet)
-               Con_Printf("Draw_CachePic: failed to load %s\n", name);
+               Con_DPrintf("Draw_CachePic: failed to load %s\n", name);
        return r_texture_notexture;
 }
 
diff --git a/menu.c b/menu.c
index 062526508663c8c3871610fd0f4b0d1756f9ab56..263e06bdbc12e73139d3e867b4c9187e1b9c3aa1 100644 (file)
--- a/menu.c
+++ b/menu.c
@@ -111,7 +111,7 @@ void M_Update_Return_Reason(char *s)
 {
        strlcpy(m_return_reason, s, sizeof(m_return_reason));
        if (s)
-               Con_Printf("%s\n", s);
+               Con_DPrintf("%s\n", s);
 }
 
 #define StartingGame   (m_multiplayer_cursor == 1)
index c488b32e98bc7c26e68de1f13225c4ee27288649..b164254860002a72c340a129184ba6de5d36ddf0 100644 (file)
@@ -3725,7 +3725,7 @@ void Mod_Q1BSP_Load(dp_model_t *mod, void *buffer, void *bufferend)
 
        //Mod_Q1BSP_ProcessLightList();
 
-       Con_DPrintf("Some stats for q1bsp model \"%s\": %i faces, %i nodes, %i leafs, %i visleafs, %i visleafportals\n", loadmodel->name, loadmodel->num_surfaces, loadmodel->brush.num_nodes, loadmodel->brush.num_leafs, mod->brush.num_pvsclusters, loadmodel->brush.num_portals);
+       Con_DPrintf("Stats for q1bsp model \"%s\": %i faces, %i nodes, %i leafs, %i visleafs, %i visleafportals, mesh: %i vertices, %i triangles, %i surfaces\n", loadmodel->name, loadmodel->num_surfaces, loadmodel->brush.num_nodes, loadmodel->brush.num_leafs, mod->brush.num_pvsclusters, loadmodel->brush.num_portals, loadmodel->surfmesh.num_vertices, loadmodel->surfmesh.num_triangles, loadmodel->num_surfaces);
 }
 
 static void Mod_Q2BSP_LoadEntities(lump_t *l)
@@ -6280,6 +6280,8 @@ void Mod_Q3BSP_Load(dp_model_t *mod, void *buffer, void *bufferend)
                if (j < mod->nummodelsurfaces)
                        mod->DrawAddWaterPlanes = R_Q1BSP_DrawAddWaterPlanes;
        }
+
+       Con_DPrintf("Stats for q3bsp model \"%s\": %i faces, %i nodes, %i leafs, %i clusters, %i clusterportals, mesh: %i vertices, %i triangles, %i surfaces\n", loadmodel->name, loadmodel->num_surfaces, loadmodel->brush.num_nodes, loadmodel->brush.num_leafs, mod->brush.num_pvsclusters, loadmodel->brush.num_portals, loadmodel->surfmesh.num_vertices, loadmodel->surfmesh.num_triangles, loadmodel->num_surfaces);
 }
 
 void Mod_IBSP_Load(dp_model_t *mod, void *buffer, void *bufferend)
index 8aec8ba87daaee4fbfc3347ef9681a612ba0c8d6..7f7dba0f12941b298cb65a431fe2b9d2bbdba211 100644 (file)
@@ -1482,7 +1482,7 @@ static void Q3Shader_AddToHash (q3shaderinfo_t* shader)
                        end = ((unsigned char *) (&shader->Q3SHADERINFO_COMPARE_END)) + sizeof(shader->Q3SHADERINFO_COMPARE_END);
                        start2 = (unsigned char *) (&entry->shader.Q3SHADERINFO_COMPARE_START);
                        if(memcmp(start, start2, end - start))
-                               Con_Printf("Shader '%s' already defined, ignoring mismatching redeclaration\n", shader->name);
+                               Con_DPrintf("Shader '%s' already defined, ignoring mismatching redeclaration\n", shader->name);
                        else
                                Con_DPrintf("Shader '%s' already defined\n", shader->name);
                        return;
@@ -1556,7 +1556,7 @@ void Mod_LoadQ3Shaders(void)
                        strlcpy(shader.name, com_token, sizeof(shader.name));
                        if (!COM_ParseToken_QuakeC(&text, false) || strcasecmp(com_token, "{"))
                        {
-                               Con_Printf("%s parsing error - expected \"{\", found \"%s\"\n", search->filenames[fileindex], com_token);
+                               Con_DPrintf("%s parsing error - expected \"{\", found \"%s\"\n", search->filenames[fileindex], com_token);
                                break;
                        }
                        while (COM_ParseToken_QuakeC(&text, false))
index f36dec1ff85984ad26afdb23823cc4623d4743be..595a671452179e7131b7b23a26fef58f292d5714 100755 (executable)
--- a/netconn.c
+++ b/netconn.c
@@ -1636,7 +1636,7 @@ static int NetConn_ClientParsePacket(lhnetsocket_t *mysocket, unsigned char *dat
                        // darkplaces or quake3
                        char protocolnames[1400];
                        Protocol_Names(protocolnames, sizeof(protocolnames));
-                       Con_Printf("\"%s\" received, sending connect request back to %s\n", string, addressstring2);
+                       Con_DPrintf("\"%s\" received, sending connect request back to %s\n", string, addressstring2);
                        M_Update_Return_Reason("Got challenge response");
                        // update the server IP in the userinfo (QW servers expect this, and it is used by the reconnect command)
                        InfoString_SetValue(cls.userinfo, sizeof(cls.userinfo), "*ip", addressstring2);
index 40a8c187f60ff330a5dfbdf58277aceef22901eb..d627dc512973d88370faca901551ecc7dc7e2b3e 100644 (file)
@@ -1428,7 +1428,7 @@ void S_PlaySfxOnChannel (sfx_t *sfx, channel_t *target_chan, unsigned int flags,
        // If it's a static sound
        if (isstatic)
        {
-               if (sfx->loopstart >= sfx->total_length)
+               if (sfx->loopstart >= sfx->total_length && (cls.protocol == PROTOCOL_QUAKE || cls.protocol == PROTOCOL_QUAKEWORLD))
                        Con_DPrintf("Quake compatibility warning: Static sound \"%s\" is not looped\n", sfx->name);
                target_chan->dist_mult = attenuation / (64.0f * snd_soundradius.value);
        }
index 21d559040df08b990581df6340f7759412a28cb1..6def900a2e31a7b7ba9d43a475865c8b48fc2dad 100644 (file)
--- a/sv_main.c
+++ b/sv_main.c
@@ -823,7 +823,7 @@ void SV_SendServerinfo (client_t *client)
 
        SZ_Clear (&client->netconnection->message);
        MSG_WriteByte (&client->netconnection->message, svc_print);
-       dpsnprintf (message, sizeof (message), "\nServer: %s build %s (progs %i crc)", gamename, buildstring, prog->filecrc);
+       dpsnprintf (message, sizeof (message), "\nServer: %s build %s (progs %i crc)\n", gamename, buildstring, prog->filecrc);
        MSG_WriteString (&client->netconnection->message,message);
 
        SV_StopDemoRecording(client); // to split up demos into different files