]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cl_main.c
494
[xonotic/darkplaces.git] / cl_main.c
index d2058952019015b2585c15e6f8ce399561935ae8..363bdcee364d50fa4cbdc1be88229450666c5965 100644 (file)
--- a/cl_main.c
+++ b/cl_main.c
@@ -25,6 +25,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 #include "image.h"
 #include "csprogs.h"
 #include "r_shadow.h"
+#include "libcurl.h"
 
 // we need to declare some mouse variables here, because the menu system
 // references them even when on a unix system.
@@ -49,8 +50,10 @@ cvar_t m_side = {CVAR_SAVE, "m_side","0.8","mouse side speed multiplier"};
 
 cvar_t freelook = {CVAR_SAVE, "freelook", "1","mouse controls pitch instead of forward/back"};
 
+#ifdef AUTODEMO_BROKEN
 cvar_t cl_autodemo = {0, "cl_autodemo", "0", "records every game played, using the date/time and map name to name the demo file" };
 cvar_t cl_autodemo_nameformat = {0, "cl_autodemo_nameformat", "%Y-%m-%d_%H-%M", "The format of the cl_autodemo filename, followed by the map name" };
+#endif
 
 cvar_t r_draweffects = {0, "r_draweffects", "1","renders temporary sprite effects"};
 
@@ -395,6 +398,9 @@ void CL_EstablishConnection(const char *host)
        // stop demo loop in case this fails
        CL_Disconnect();
 
+       // if downloads are running, cancel their finishing action
+       Curl_Clear_forthismap();
+
        // make sure the client ports are open before attempting to connect
        NetConn_UpdateSockets();
 
@@ -436,13 +442,16 @@ static void CL_PrintEntities_f(void)
 
        for (i = 0, ent = cl.entities;i < cl.num_entities;i++, ent++)
        {
+               const char* modelname;
+
                if (!ent->state_current.active)
                        continue;
 
                if (ent->render.model)
-                       strlcpy (name, ent->render.model->name, 25);
+                       modelname = ent->render.model->name;
                else
-                       strcpy(name, "--no model--");
+                       modelname = "--no model--";
+               strlcpy(name, modelname, 25);
                for (j = (int)strlen(name);j < 25;j++)
                        name[j] = ' ';
                Con_Printf("%3i: %s:%4i (%5i %5i %5i) [%3i %3i %3i] %4.2f %5.3f\n", i, name, ent->render.frame, (int) ent->render.matrix.m[0][3], (int) ent->render.matrix.m[1][3], (int) ent->render.matrix.m[2][3], (int) ent->render.angles[0] % 360, (int) ent->render.angles[1] % 360, (int) ent->render.angles[2] % 360, ent->render.scale, ent->render.alpha);
@@ -913,7 +922,7 @@ void CL_LinkNetworkEntity(entity_t *e)
 
                // movement lerp
                // if it's the player entity, update according to client movement
-               if (e == cl.entities + cl.playerentity && cl.movement)// && !e->csqc)
+               if (e == cl.entities + cl.playerentity && cl.movement_predicted)// && !e->csqc)
                {
                        lerp = (cl.time - cl.movement_time[1]) / (cl.movement_time[0] - cl.movement_time[1]);
                        lerp = bound(0, lerp, 1);
@@ -1749,8 +1758,10 @@ void CL_Init (void)
        Cmd_AddCommand ("playdemo", CL_PlayDemo_f, "watch a demo file");
        Cmd_AddCommand ("timedemo", CL_TimeDemo_f, "play back a demo as fast as possible and save statistics to benchmark.log");
 
+#ifdef AUTODEMO_BROKEN
        Cvar_RegisterVariable (&cl_autodemo);
        Cvar_RegisterVariable (&cl_autodemo_nameformat);
+#endif
 
        Cmd_AddCommand ("fog", CL_Fog_f, "set global fog parameters (density red green blue)");