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)
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();
// if we got here...
// curl is done, so let's start with the business
if(!cl.loadbegun)
- SCR_PushLoadingScreen(false, "Loading precaches", 1);
+ SCR_PushLoadingScreen("Loading precaches", 1);
cl.loadbegun = true;
// if already downloading something from the previous level, don't stop it
if(cl.loadmodel_current == 1)
{
// worldmodel counts as 16 models (15 + world model setup), for better progress bar
- SCR_PushLoadingScreen(false, "Loading precached models",
+ SCR_PushLoadingScreen("Loading precached models",
(
(cl.loadmodel_total - 1) * LOADPROGRESSWEIGHT_MODEL
+ LOADPROGRESSWEIGHT_WORLDMODEL
+ cl.loadsound_total * LOADPROGRESSWEIGHT_SOUND
)
);
- SCR_BeginLoadingPlaque(false);
}
for (;cl.loadmodel_current < cl.loadmodel_total;cl.loadmodel_current++)
{
- SCR_PushLoadingScreen(false, cl.model_name[cl.loadmodel_current],
+ SCR_PushLoadingScreen(cl.model_name[cl.loadmodel_current],
(
(cl.loadmodel_current == 1) ? LOADPROGRESSWEIGHT_WORLDMODEL : LOADPROGRESSWEIGHT_MODEL
) / (
SCR_PopLoadingScreen(false);
if(cl.loadmodel_current == 1)
{
- SCR_PushLoadingScreen(false, cl.model_name[cl.loadmodel_current], 1.0 / cl.loadmodel_total);
+ SCR_PushLoadingScreen(cl.model_name[cl.loadmodel_current], 1.0 / cl.loadmodel_total);
SCR_PopLoadingScreen(false);
}
continue;
if (cl.model_precache[cl.loadmodel_current] && cl.model_precache[cl.loadmodel_current]->Draw && cl.loadmodel_current == 1)
{
// we now have the worldmodel so we can set up the game world
- SCR_PushLoadingScreen(true, "world model setup",
+ SCR_PushLoadingScreen("world model setup",
(
LOADPROGRESSWEIGHT_WORLDMODEL_INIT
) / (
{
// loading sounds
if(cl.loadsound_current == 1)
- SCR_PushLoadingScreen(false, "Loading precached sounds",
+ SCR_PushLoadingScreen("Loading precached sounds",
(
cl.loadsound_total * LOADPROGRESSWEIGHT_SOUND
) / (
);
for (;cl.loadsound_current < cl.loadsound_total;cl.loadsound_current++)
{
- SCR_PushLoadingScreen(false, cl.sound_name[cl.loadsound_current], 1.0 / cl.loadsound_total);
+ SCR_PushLoadingScreen(cl.sound_name[cl.loadsound_current], 1.0 / cl.loadsound_total);
if (cl.sound_precache[cl.loadsound_current] && S_IsSoundPrecached(cl.sound_precache[cl.loadsound_current]))
{
SCR_PopLoadingScreen(false);
CL_KeepaliveMessage(true);
if (cl.model_name[cl.downloadmodel_current][0] != '*' && strcmp(cl.model_name[cl.downloadmodel_current], "null") && !FS_FileExists(cl.model_name[cl.downloadmodel_current]))
{
- if (cl.downloadmodel_current == 1) {
- // No way any game is playable without the map.
+ if (cl.downloadmodel_current == 1)
Con_Printf("Map %s not found\n", cl.model_name[cl.downloadmodel_current]);
- CL_Disconnect();
- return;
- }
else
Con_Printf("Model %s not found\n", cl.model_name[cl.downloadmodel_current]);
// regarding the * check: don't try to download submodels
if (cl.downloadmodel_current == 1)
{
// we now have the worldmodel so we can set up the game world
+ // or maybe we do not have it (cl_serverextension_download 0)
+ // then we need to continue loading ANYWAY!
CL_SetupWorldModel();
if (!cl.loadfinished && cl_joinbeforedownloadsfinish.integer)
{
cls.demo_lastcsprogscrc = -1;
}
else
- Con_Print ("ERROR: couldn't open.\n");
+ Con_Error ("ERROR: couldn't open.\n");
}
}
cl.islocalgame = NetConn_IsLocalGame();
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;
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;
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:
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;
return true;
}
-extern cvar_t slowmo;
+extern cvar_t host_timescale;
extern cvar_t cl_lerpexcess;
static void CL_NetworkTimeReceived(double newtime)
{
//if (cls.demorecording)
// CL_WriteDemoMessage (&cl_message);
- cl.last_received_message = realtime;
+ cl.last_received_message = host.realtime;
CL_KeepaliveMessage(false);
// 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");
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;
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)