]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cl_parse.c
Add missing video capture ifdefs
[xonotic/darkplaces.git] / cl_parse.c
index a29f0fea1f330d35b1144ca0af105864ab7d735d..d7c97f7e0d827036bbc6a172309a65562b0d3a06 100644 (file)
@@ -468,6 +468,7 @@ void CL_ParseEntityLump(char *entdata)
                R_SetSkyBox("unit1_");
 }
 
+extern cvar_t con_chatsound_team_file;
 static const vec3_t defaultmins = {-4096, -4096, -4096};
 static const vec3_t defaultmaxs = {4096, 4096, 4096};
 static void CL_SetupWorldModel(void)
@@ -512,7 +513,7 @@ static void CL_SetupWorldModel(void)
        CL_KeepaliveMessage(false);
 
        // load the team chat beep if possible
-       cl.foundtalk2wav = FS_FileExists("sound/misc/talk2.wav");
+       cl.foundteamchatsound = FS_FileExists(con_chatsound_team_file.string);
 
        // check memory integrity
        Mem_CheckSentinelsGlobal();
@@ -2797,7 +2798,7 @@ static void CL_ParseTempEntity(void)
                        color[2] = MSG_ReadCoord(&cl_message, cls.protocol) * (2.0f / 1.0f);
                        CL_ParticleExplosion(pos);
                        Matrix4x4_CreateTranslate(&tempmatrix, pos[0], pos[1], pos[2]);
-                       CL_AllocLightFlash(NULL, &tempmatrix, 350, color[0], color[1], color[2], 700, 0.5, 0, -1, true, 1, 0.25, 0.25, 1, 1, LIGHTFLAG_NORMALMODE | LIGHTFLAG_REALTIMEMODE);
+                       CL_AllocLightFlash(NULL, &tempmatrix, 350, color[0], color[1], color[2], 700, 0.5, NULL, -1, true, 1, 0.25, 0.25, 1, 1, LIGHTFLAG_NORMALMODE | LIGHTFLAG_REALTIMEMODE);
                        S_StartSound(-1, 0, cl.sfx_r_exp3, pos, 1, 1);
                        break;
 
@@ -2810,7 +2811,7 @@ static void CL_ParseTempEntity(void)
                        color[1] = MSG_ReadByte(&cl_message) * (2.0f / 255.0f);
                        color[2] = MSG_ReadByte(&cl_message) * (2.0f / 255.0f);
                        Matrix4x4_CreateTranslate(&tempmatrix, pos[0], pos[1], pos[2]);
-                       CL_AllocLightFlash(NULL, &tempmatrix, 350, color[0], color[1], color[2], 700, 0.5, 0, -1, true, 1, 0.25, 0.25, 1, 1, LIGHTFLAG_NORMALMODE | LIGHTFLAG_REALTIMEMODE);
+                       CL_AllocLightFlash(NULL, &tempmatrix, 350, color[0], color[1], color[2], 700, 0.5, NULL, -1, true, 1, 0.25, 0.25, 1, 1, LIGHTFLAG_NORMALMODE | LIGHTFLAG_REALTIMEMODE);
                        S_StartSound(-1, 0, cl.sfx_r_exp3, pos, 1, 1);
                        break;
 
@@ -2837,7 +2838,7 @@ static void CL_ParseTempEntity(void)
                        color[1] = MSG_ReadByte(&cl_message) * (2.0f / 255.0f);
                        color[2] = MSG_ReadByte(&cl_message) * (2.0f / 255.0f);
                        Matrix4x4_CreateTranslate(&tempmatrix, pos[0], pos[1], pos[2]);
-                       CL_AllocLightFlash(NULL, &tempmatrix, radius, color[0], color[1], color[2], radius / velspeed, velspeed, 0, -1, true, 1, 0.25, 1, 1, 1, LIGHTFLAG_NORMALMODE | LIGHTFLAG_REALTIMEMODE);
+                       CL_AllocLightFlash(NULL, &tempmatrix, radius, color[0], color[1], color[2], radius / velspeed, velspeed, NULL, -1, true, 1, 0.25, 1, 1, 1, LIGHTFLAG_NORMALMODE | LIGHTFLAG_REALTIMEMODE);
                        break;
 
                case TE_FLAMEJET:
@@ -2898,7 +2899,7 @@ static void CL_ParseTempEntity(void)
                        color[1] = tempcolor[1] * (2.0f / 255.0f);
                        color[2] = tempcolor[2] * (2.0f / 255.0f);
                        Matrix4x4_CreateTranslate(&tempmatrix, pos[0], pos[1], pos[2]);
-                       CL_AllocLightFlash(NULL, &tempmatrix, 350, color[0], color[1], color[2], 700, 0.5, 0, -1, true, 1, 0.25, 0.25, 1, 1, LIGHTFLAG_NORMALMODE | LIGHTFLAG_REALTIMEMODE);
+                       CL_AllocLightFlash(NULL, &tempmatrix, 350, color[0], color[1], color[2], 700, 0.5, NULL, -1, true, 1, 0.25, 0.25, 1, 1, LIGHTFLAG_NORMALMODE | LIGHTFLAG_REALTIMEMODE);
                        S_StartSound(-1, 0, cl.sfx_r_exp3, pos, 1, 1);
                        break;
 
@@ -3278,7 +3279,7 @@ static qboolean CL_ExaminePrintString(const char *text)
        return true;
 }
 
-extern cvar_t slowmo;
+extern cvar_t host_timescale;
 extern cvar_t cl_lerpexcess;
 static void CL_NetworkTimeReceived(double newtime)
 {
@@ -3404,7 +3405,7 @@ void CL_ParseServerMessage(void)
        //if (cls.demorecording)
        //      CL_WriteDemoMessage (&cl_message);
 
-       cl.last_received_message = realtime;
+       cl.last_received_message = host.realtime;
 
        CL_KeepaliveMessage(false);
 
@@ -3412,7 +3413,7 @@ void CL_ParseServerMessage(void)
 // if recording demos, copy the message out
 //
        if (cl_shownet.integer == 1)
-               Con_Printf("%f %i\n", realtime, cl_message.cursize);
+               Con_Printf("%f %i\n", host.realtime, cl_message.cursize);
        else if (cl_shownet.integer == 2)
                Con_Print("------------------\n");
 
@@ -3425,7 +3426,7 @@ void CL_ParseServerMessage(void)
 
        if (cls.protocol == PROTOCOL_QUAKEWORLD)
        {
-               CL_NetworkTimeReceived(realtime); // qw has no clock
+               CL_NetworkTimeReceived(host.realtime); // qw has no clock
 
                // kill all qw nails
                cl.qw_num_nails = 0;
@@ -4305,16 +4306,15 @@ void CL_Parse_Init(void)
        Cvar_RegisterVariable(&cl_iplog_name);
        Cvar_RegisterVariable(&cl_readpicture_force);
 
-       Cmd_AddCommand(&cmd_client, "nextul", QW_CL_NextUpload_f, "sends next fragment of current upload buffer (screenshot for example)");
-       Cmd_AddCommand(&cmd_client, "stopul", QW_CL_StopUpload_f, "aborts current upload (screenshot for example)");
-       Cmd_AddCommand(&cmd_client, "skins", QW_CL_Skins_f, "downloads missing qw skins from server");
-       Cmd_AddCommand(&cmd_clientfromserver, "skins", QW_CL_Skins_f, "downloads missing qw skins from server");
-       Cmd_AddCommand(&cmd_client, "changing", QW_CL_Changing_f, "sent by qw servers to tell client to wait for level change");
-       Cmd_AddCommand(&cmd_client, "cl_begindownloads", CL_BeginDownloads_f, "used internally by darkplaces client while connecting (causes loading of models and sounds or triggers downloads for missing ones)");
-       Cmd_AddCommand(&cmd_client, "cl_downloadbegin", CL_DownloadBegin_f, "(networking) informs client of download file information, client replies with sv_startsoundload to begin the transfer");
-       Cmd_AddCommand(&cmd_client, "stopdownload", CL_StopDownload_f, "terminates a download");
-       Cmd_AddCommand(&cmd_client, "cl_downloadfinished", CL_DownloadFinished_f, "signals that a download has finished and provides the client with file size and crc to check its integrity");
-       Cmd_AddCommand(&cmd_client, "iplog_list", CL_IPLog_List_f, "lists names of players whose IP address begins with the supplied text (example: iplog_list 123.456.789)");
+       Cmd_AddCommand(CMD_CLIENT, "nextul", QW_CL_NextUpload_f, "sends next fragment of current upload buffer (screenshot for example)");
+       Cmd_AddCommand(CMD_CLIENT, "stopul", QW_CL_StopUpload_f, "aborts current upload (screenshot for example)");
+       Cmd_AddCommand(CMD_CLIENT | CMD_CLIENT_FROM_SERVER, "skins", QW_CL_Skins_f, "downloads missing qw skins from server");
+       Cmd_AddCommand(CMD_CLIENT, "changing", QW_CL_Changing_f, "sent by qw servers to tell client to wait for level change");
+       Cmd_AddCommand(CMD_CLIENT, "cl_begindownloads", CL_BeginDownloads_f, "used internally by darkplaces client while connecting (causes loading of models and sounds or triggers downloads for missing ones)");
+       Cmd_AddCommand(CMD_CLIENT | CMD_CLIENT_FROM_SERVER, "cl_downloadbegin", CL_DownloadBegin_f, "(networking) informs client of download file information, client replies with sv_startsoundload to begin the transfer");
+       Cmd_AddCommand(CMD_CLIENT | CMD_CLIENT_FROM_SERVER, "stopdownload", CL_StopDownload_f, "terminates a download");
+       Cmd_AddCommand(CMD_CLIENT | CMD_CLIENT_FROM_SERVER, "cl_downloadfinished", CL_DownloadFinished_f, "signals that a download has finished and provides the client with file size and crc to check its integrity");
+       Cmd_AddCommand(CMD_CLIENT, "iplog_list", CL_IPLog_List_f, "lists names of players whose IP address begins with the supplied text (example: iplog_list 123.456.789)");
 }
 
 void CL_Parse_Shutdown(void)