mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-10 07:12:07 +00:00
cl_parser aufgeräumt
This commit is contained in:
parent
61b0a4c456
commit
6ca313230f
1 changed files with 24 additions and 33 deletions
|
@ -102,8 +102,6 @@ qboolean CL_CheckOrDownloadFile (char *filename)
|
|||
// open the file if not opened yet
|
||||
CL_DownloadFileName(name, sizeof(name), cls.downloadtempname);
|
||||
|
||||
// FS_CreatePath (name);
|
||||
|
||||
fp = fopen (name, "r+b");
|
||||
if (fp) { // it exists
|
||||
int len;
|
||||
|
@ -249,15 +247,6 @@ void CL_ParseDownload (void)
|
|||
if (percent != 100)
|
||||
{
|
||||
// request next block
|
||||
// change display routines by zoid
|
||||
#if 0
|
||||
Com_Printf (".");
|
||||
if (10*(percent/10) != cls.downloadpercent)
|
||||
{
|
||||
cls.downloadpercent = 10*(percent/10);
|
||||
Com_Printf ("%i%%", cls.downloadpercent);
|
||||
}
|
||||
#endif
|
||||
cls.downloadpercent = percent;
|
||||
|
||||
MSG_WriteByte (&cls.netchan.message, clc_stringcmd);
|
||||
|
@ -268,8 +257,6 @@ void CL_ParseDownload (void)
|
|||
char oldn[MAX_OSPATH];
|
||||
char newn[MAX_OSPATH];
|
||||
|
||||
// Com_Printf ("100%%\n");
|
||||
|
||||
fclose (cls.download);
|
||||
|
||||
// rename the temp file to it's final name
|
||||
|
@ -409,10 +396,10 @@ void CL_LoadClientinfo (clientinfo_t *ci, char *s)
|
|||
|
||||
if (cl_noskins->value || *s == 0)
|
||||
{
|
||||
Com_sprintf (model_filename, sizeof(model_filename), "players/male/tris.md2");
|
||||
Com_sprintf (weapon_filename, sizeof(weapon_filename), "players/male/weapon.md2");
|
||||
Com_sprintf (skin_filename, sizeof(skin_filename), "players/male/grunt.pcx");
|
||||
Com_sprintf (ci->iconname, sizeof(ci->iconname), "/players/male/grunt_i.pcx");
|
||||
strcpy (model_filename, "players/male/tris.md2");
|
||||
strcpy (weapon_filename, "players/male/weapon.md2");
|
||||
strcpy (skin_filename, "players/male/grunt.pcx");
|
||||
strcpy (ci->iconname, "/players/male/grunt_i.pcx");
|
||||
ci->model = re.RegisterModel (model_filename);
|
||||
memset(ci->weaponmodel, 0, sizeof(ci->weaponmodel));
|
||||
ci->weaponmodel[0] = re.RegisterModel (weapon_filename);
|
||||
|
@ -605,17 +592,17 @@ void CL_ParseStartSoundPacket(void)
|
|||
sound_num = MSG_ReadByte (&net_message);
|
||||
|
||||
if (flags & SND_VOLUME)
|
||||
volume = MSG_ReadByte (&net_message) / 255.0;
|
||||
volume = MSG_ReadByte (&net_message) / 255.0f;
|
||||
else
|
||||
volume = DEFAULT_SOUND_PACKET_VOLUME;
|
||||
|
||||
if (flags & SND_ATTENUATION)
|
||||
attenuation = MSG_ReadByte (&net_message) / 64.0;
|
||||
attenuation = MSG_ReadByte (&net_message) / 64.0f;
|
||||
else
|
||||
attenuation = DEFAULT_SOUND_PACKET_ATTENUATION;
|
||||
|
||||
if (flags & SND_OFFSET)
|
||||
ofs = MSG_ReadByte (&net_message) / 1000.0;
|
||||
ofs = MSG_ReadByte (&net_message) / 1000.0f;
|
||||
else
|
||||
ofs = 0;
|
||||
|
||||
|
@ -711,7 +698,6 @@ void CL_ParseServerMessage (void)
|
|||
break;
|
||||
|
||||
case svc_nop:
|
||||
// Com_Printf ("svc_nop\n");
|
||||
break;
|
||||
|
||||
case svc_disconnect:
|
||||
|
@ -748,6 +734,11 @@ void CL_ParseServerMessage (void)
|
|||
s = MSG_ReadString (&net_message);
|
||||
Com_DPrintf ("stufftext: %s\n", s);
|
||||
Cbuf_AddText (s);
|
||||
|
||||
if (!cl.attractloop || !strcmp(s, "precache\n"))
|
||||
Cbuf_AddText (s);
|
||||
else
|
||||
Com_DPrintf ("WARNING: Demo tried to execute command, ignored.\n");
|
||||
break;
|
||||
|
||||
case svc_serverdata:
|
||||
|
|
Loading…
Reference in a new issue