1
0
Fork 0
forked from fte/fteqw

rjlan wanted mingl to compile again, and moodles reported a demorecording bug.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1862 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2006-01-13 06:27:18 +00:00
parent eeb89caa80
commit f0feb82b90
8 changed files with 55 additions and 7 deletions

View file

@ -194,6 +194,9 @@ void CL_DemoJump_f(void)
char *s = Cmd_Argv(1);
char *colon = strchr(s, ':');
if (!cls.demoplayback)
return;
if (*s == '+')
{
if (colon)
@ -753,16 +756,16 @@ void CL_Record_f (void)
|| c=='<' || c=='>' || c=='"' || c=='.')
*p = '_';
}
strncpy(name, va("%s/%s", com_gamedir, fname), sizeof(name)-1-8);
strncpy(name, fname, sizeof(name)-1-8);
name[sizeof(name)-1-8] = '\0';
//make a unique name (unless the user specified it).
strcat (name, ".qwd"); //we have the space
if (c != 2)
{
FILE *f;
vfsfile_t *f;
f = fopen (name, "rb");
f = FS_OpenVFS (name, "rb", FS_GAME);
if (f)
{
COM_StripExtension(name, name);
@ -772,10 +775,10 @@ void CL_Record_f (void)
i = 0;
do
{
fclose (f);
VFS_CLOSE (f);
p[0] = i%100 + '0';
p[1] = i%10 + '0';
f = fopen (name, "rb");
f = FS_OpenVFS (name, "rb", FS_GAME);
i++;
} while (f && i < 100);
}

View file

@ -929,6 +929,22 @@ void CL_ClearState (void)
if (cl.lerpents)
BZ_Free(cl.lerpents);
{
downloadlist_t *next;
while(cl.downloadlist)
{
next = cl.downloadlist->next;
Z_Free(cl.downloadlist);
cl.downloadlist = next;
}
while(cl.faileddownloads)
{
next = cl.faileddownloads->next;
Z_Free(cl.faileddownloads);
cl.faileddownloads = next;
}
}
// wipe the entire cl structure
memset (&cl, 0, sizeof(cl));
@ -1064,6 +1080,7 @@ void CL_Disconnect (void)
}
if (!cls.downloadmethod)
*cls.downloadname = '\0';
{
downloadlist_t *next;
while(cl.downloadlist)

View file

@ -585,6 +585,7 @@ int CL_LoadModels(int stage)
#define atstage() ((cl.contentstage == stage++)?++cl.contentstage:false)
#define endstage() if (giveuptime<Sys_DoubleTime()) return -1;
#ifdef PEXT_CSQC
if (atstage())
{
if (cls.fteprotocolextensions & PEXT_CSQC)
@ -610,7 +611,7 @@ int CL_LoadModels(int stage)
}
endstage();
}
#endif
if (cl.playernum[0] == -1)
{ //q2 cinematic - don't load the models.
@ -3197,8 +3198,10 @@ char *CL_ParseChat(char *text, player_info_t **player)
Validation_CheckIfResponse(text);
#ifdef PLUGINS
if (!Plug_ChatMessage(text + offset, *player ? (int)(*player - cl.players) : -1, flags))
return NULL;
#endif
if (flags == 2 && !TP_FilterMessage(text + offset))
return NULL;
@ -3212,11 +3215,13 @@ char *CL_ParseChat(char *text, player_info_t **player)
else if (check_flood == NO_IGNORE_ADD)
Ignore_Flood_Add(s);
}
#ifdef PLUGINS
else
{
if (!Plug_ServerMessage(text + offset, PRINT_CHAT))
return NULL;
}
#endif
suppress_talksound = false;
@ -3781,7 +3786,9 @@ void CL_ParseServerMessage (void)
}
else
{
#ifdef PLUGINS
if (Plug_ServerMessage(s, i))
#endif
{
CL_ParsePrint(s, i);
CL_PrintStandardMessage(s);
@ -3792,7 +3799,9 @@ void CL_ParseServerMessage (void)
case svc_centerprint:
s = MSG_ReadString ();
#ifdef PLUGINS
if (Plug_CenterPrintMessage(s, destsplit))
#endif
SCR_CenterPrint (destsplit, s);
break;
@ -4242,7 +4251,9 @@ void CLQ2_ParseServerMessage (void)
}
else
{
#ifdef PLUGINS
if (Plug_ServerMessage(s, i))
#endif
{
CL_ParsePrint(s, i);
CL_PrintStandardMessage(s);
@ -4273,7 +4284,9 @@ void CLQ2_ParseServerMessage (void)
case svcq2_centerprint: //15 // [string] to put in center of the screen
s = MSG_ReadString();
#ifdef PLUGINS
if (Plug_CenterPrintMessage(s, 0))
#endif
SCR_CenterPrint (0, s);
break;
case svcq2_download: //16 // [short] size [size bytes]
@ -4473,7 +4486,9 @@ void CLNQ_ParseServerMessage (void)
}
else
{
#ifdef PLUGINS
if (Plug_ServerMessage(s, PRINT_HIGH))
#endif
{
CL_ParsePrint(s, PRINT_HIGH);
CL_PrintStandardMessage(s);
@ -4489,7 +4504,9 @@ void CLNQ_ParseServerMessage (void)
case svc_centerprint:
s = MSG_ReadString ();
#ifdef PLUGINS
if (Plug_CenterPrintMessage(s, 0))
#endif
SCR_CenterPrint (0, s);
break;

View file

@ -267,6 +267,9 @@ static void Stats_StatMessage(fragfilemsgtypes_t type, int wid, char *token1, ch
}
ms->type = type;
ms->wid = wid;
ms->next = fragstats.message;
fragstats.message = ms;
}
static void Stats_Clear(void)

View file

@ -1411,11 +1411,13 @@ static void ProcessMouse(mouse_t *mouse, usercmd_t *cmd, int pnum)
#endif
}
#ifdef PEXT_CSQC
if (CSQC_MouseMove(mx, my))
{
mx = 0;
my = 0;
}
#endif
if (m_filter.value)
{

View file

@ -3286,9 +3286,11 @@ void CL_Say (qboolean team, char *extra)
void CL_Say_f (void)
{
#ifndef CLIENTONLY
if (isDedicated)
SV_ConSay_f();
else
#endif
CL_Say (false, NULL);
}

View file

@ -204,6 +204,7 @@ void VFSOS_Close(vfsfile_t *file)
{
vfsosfile_t *intfile = (vfsosfile_t*)file;
fclose(intfile->handle);
Z_Free(file);
}
vfsfile_t *VFSOS_Open(char *osname, char *mode)
{

View file

@ -1942,7 +1942,7 @@ void R_DrawGAliasModel (entity_t *e)
GL_DrawAliasMesh(&mesh, skin->fullbright);
qglBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
}
#ifdef Q3BSPS
if (fog)
{
meshbuffer_t mb;
@ -1964,6 +1964,7 @@ void R_DrawGAliasModel (entity_t *e)
R_ClearArrays();
}
#endif
}
}
@ -2824,7 +2825,9 @@ void GL_LoadSkinFile(galiastexnum_t *texnum, char *surfacename, int skinnumber,
GL_ParseQ3SkinFile(shadername, surfacename, loadmodel->name, skinnumber, NULL);
#ifdef Q3SHADERS
texnum->shader = R_RegisterSkin(shadername);
#endif
texnum->base = Mod_LoadHiResTexture(shadername, "models", true, true, true);
}