Team chat sounds, a download bugfix, and a correction to the standard nq entity limits

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1704 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2005-12-13 02:31:57 +00:00
parent 57bb74c88d
commit f01489b7f4
3 changed files with 58 additions and 39 deletions

View file

@ -99,6 +99,8 @@ cvar_t noaim = {"noaim", "", NULL, CVAR_ARCHIVE | CVAR_USERINFO};
cvar_t msg = {"msg", "1", NULL, CVAR_ARCHIVE | CVAR_USERINFO};
cvar_t cl_nofake = {"cl_nofake", "2"};
cvar_t cl_chatsound = {"cl_chatsound", "1"};
cvar_t cl_enemychatsound = {"cl_enemychatsound", "misc/talk.wav"};
cvar_t cl_teamchatsound = {"cl_teamchatsound", "misc/talk.wav"};
cvar_t r_rocketlight = {"r_rocketlight", "1"};
cvar_t r_lightflicker = {"r_lightflicker", "1"};
@ -2594,6 +2596,8 @@ void CL_Init (void)
Cvar_Register (&cl_nofake, cl_controlgroup);
Cvar_Register (&cl_chatsound, cl_controlgroup);
Cvar_Register (&cl_enemychatsound, cl_controlgroup);
Cvar_Register (&cl_teamchatsound, cl_controlgroup);
Cvar_Register (&requiredownloads, cl_controlgroup);
Cvar_Register (&cl_standardchat, cl_controlgroup);

View file

@ -918,6 +918,9 @@ void CL_ParseChunkedDownload(void)
if (cls.downloadmethod == DL_QWCHUNKS)
Host_EndGame("Received second download - \"%s\"\n", svname);
if (!strcmp(cls.downloadname, svname))
Host_EndGame("Server sent the wrong download - \"%s\" instead of \"%s\"\n", svname, cls.downloadname);
//start the new download
cls.downloadmethod = DL_QWCHUNKS;
cls.downloadpercent = 0;
@ -936,6 +939,12 @@ void CL_ParseChunkedDownload(void)
COM_CreatePath (osname);
cls.downloadqw = fopen (osname, "wb");
if (!cls.downloadqw)
{
CL_DownloadFailed(svname);
return;
}
firstblock = 0;
receivedbytes = 0;
blockcycle = -1; //so it requests 0 first. :)
@ -1103,6 +1112,7 @@ void CL_ParseDownload (void)
{
msg_readcount += size;
Con_TPrintf (TL_FAILEDTOOPEN, cls.downloadtempname);
CL_DownloadFailed(cls.downloadname);
CL_RequestNextDownload ();
return;
}
@ -3042,7 +3052,7 @@ void CLQ2_ParseInventory (void)
//return if we want to print the message.
char *CL_ParseChat(char *text, player_info_t **player)
{
extern cvar_t cl_chatsound, cl_nofake;
extern cvar_t cl_chatsound, cl_nofake, cl_teamchatsound, cl_enemychatsound;
int flags;
int offset=0;
qboolean suppress_talksound;
@ -3116,7 +3126,12 @@ char *CL_ParseChat(char *text, player_info_t **player)
suppress_talksound = true;
if (!suppress_talksound)
S_LocalSound ("misc/talk.wav");
{
if (flags == 2 && cl.teamplay)
S_LocalSound (cl_teamchatsound.value);
else
S_LocalSound (cl_enemychatsound.value);
}
if (cl_nofake.value == 1 || (cl_nofake.value == 2 && flags != 2)) {
for (p = s; *p; p++)

View file

@ -1852,7 +1852,7 @@ int glowsize, glowcolor;
bits |= NQU_LONGENTITY;
if (1)
if (0)
{
if (ent->baseline.trans != ent->v->alpha)
if (!(ent->baseline.trans == 1 && !ent->v->alpha))
@ -1887,7 +1887,7 @@ int glowsize, glowcolor;
{
if (ent->v->modelindex >= 256) //as much as protocols can handle
return;
if (entnum >= 768) //too many for a conventional nq client.
if (entnum >= 600) //too many for a conventional nq client.
return;
}