Playing with valgrind and hexen2.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/branches/wip@3730 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
386424a8e6
commit
ab865b7e25
15 changed files with 74 additions and 31 deletions
|
@ -1846,9 +1846,9 @@ void CL_InitInput (void)
|
|||
|
||||
for (sp = 0; sp < MAX_SPLITS; sp++)
|
||||
{
|
||||
Cmd_AddRemCommand (vahunk("p%i", sp+1), CL_Split_f);
|
||||
Cmd_AddRemCommand (vahunk("+p%i", sp+1), CL_Split_f);
|
||||
Cmd_AddRemCommand (vahunk("-p%i", sp+1), CL_Split_f);
|
||||
Cmd_AddCommand (vahunk("p%i", sp+1), CL_Split_f);
|
||||
Cmd_AddCommand (vahunk("+p%i", sp+1), CL_Split_f);
|
||||
Cmd_AddCommand (vahunk("-p%i", sp+1), CL_Split_f);
|
||||
in_mlook.state[sp] = 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -3650,6 +3650,9 @@ void Host_Init (quakeparms_t *parms)
|
|||
#ifdef PLUGINS
|
||||
Plug_Init();
|
||||
#endif
|
||||
#ifdef VM_UI
|
||||
UI_Init();
|
||||
#endif
|
||||
|
||||
#ifdef CL_MASTER
|
||||
Master_SetupSockets();
|
||||
|
@ -3748,7 +3751,7 @@ void Host_FinishInit(void)
|
|||
Renderer_Start();
|
||||
|
||||
#ifdef VM_UI
|
||||
UI_Init();
|
||||
UI_Start();
|
||||
#endif
|
||||
|
||||
#ifndef NOMEDIA
|
||||
|
|
|
@ -327,8 +327,8 @@ void CL_InitTEnts (void)
|
|||
*tentsfx[i].sfx = NULL;
|
||||
}
|
||||
|
||||
Cmd_AddRemCommand("r_effect", CL_AssociateEffect_f);
|
||||
Cmd_AddRemCommand("r_trail", CL_AssociateEffect_f);
|
||||
Cmd_AddCommand("r_effect", CL_AssociateEffect_f);
|
||||
Cmd_AddCommand("r_trail", CL_AssociateEffect_f);
|
||||
|
||||
Cvar_Register (&cl_expsprite, "Temporary entity control");
|
||||
Cvar_Register (&cl_truelightning, "Temporary entity control");
|
||||
|
@ -801,6 +801,10 @@ void CL_ParseStream (int type)
|
|||
b->model = Mod_ForName("models/stclrbm.mdl", true);
|
||||
b->particleeffect = P_FindParticleType("te_stream_colorbeam");
|
||||
break;
|
||||
case TEH2_STREAM_GAZE:
|
||||
b->model = Mod_ForName("stmedgaz.mdl", true);
|
||||
b->particleeffect = P_FindParticleType("te_stream_gaze");
|
||||
break;
|
||||
default:
|
||||
Con_Printf("CL_ParseStream: type %i\n", type);
|
||||
break;
|
||||
|
@ -1614,8 +1618,6 @@ void CL_ParseCustomTEnt(void)
|
|||
}
|
||||
|
||||
t = &customtenttype[type];
|
||||
if (t->particleeffecttype < 0)
|
||||
Host_EndGame("Custom Temporary entity %i was not registered\n", type);
|
||||
|
||||
if (t->netstyle & CTE_ISBEAM)
|
||||
{
|
||||
|
@ -1649,7 +1651,7 @@ void CL_ParseCustomTEnt(void)
|
|||
}
|
||||
|
||||
if (failed)
|
||||
Con_Printf("Failed to create effect %s\n", t->name);
|
||||
Con_DPrintf("Failed to create effect %s\n", t->name);
|
||||
|
||||
if (t->netstyle & CTE_STAINS)
|
||||
{ //added at pos2 - end of trail
|
||||
|
|
|
@ -1614,8 +1614,7 @@ qboolean UI_Command(void)
|
|||
|
||||
void UI_Init (void)
|
||||
{
|
||||
Cmd_AddRemCommand("ui_restart", UI_Restart_f);
|
||||
UI_Start();
|
||||
Cmd_AddCommand("ui_restart", UI_Restart_f);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -910,7 +910,7 @@ void M_DeInit_Internal (void)
|
|||
|
||||
#ifdef CL_MASTER
|
||||
Cmd_RemoveCommand ("menu_servers");
|
||||
Cmd_RemoveCommand ("menu_servers2");
|
||||
Cmd_RemoveCommand ("menu_serversold");
|
||||
Cmd_RemoveCommand ("menu_slist");
|
||||
#endif
|
||||
Cmd_RemoveCommand ("menu_setup");
|
||||
|
|
|
@ -144,9 +144,6 @@ void P_InitParticleSystem(void)
|
|||
|
||||
Cvar_Register(&r_particlesystem, "Particles");
|
||||
|
||||
|
||||
|
||||
|
||||
//particles
|
||||
Cvar_Register(&r_particledesc, particlecvargroupname);
|
||||
Cvar_Register(&r_bouncysparks, particlecvargroupname);
|
||||
|
@ -165,6 +162,15 @@ void P_InitParticleSystem(void)
|
|||
Cvar_Register (&gl_part_flame, particlecvargroupname);
|
||||
}
|
||||
|
||||
void P_Shutdown(void)
|
||||
{
|
||||
if (pe)
|
||||
{
|
||||
pe->ShutdownParticles();
|
||||
}
|
||||
pe = NULL;
|
||||
}
|
||||
|
||||
#ifdef Q2BSPS
|
||||
qboolean Q2TraceLineN (vec3_t start, vec3_t end, vec3_t impact, vec3_t normal)
|
||||
{
|
||||
|
|
|
@ -1400,6 +1400,9 @@ void R_ShutdownRenderer(void)
|
|||
|
||||
CL_AllowIndependantSendCmd(false); //FIXME: figure out exactly which parts are going to affect the model loading.
|
||||
|
||||
P_Shutdown();
|
||||
RMod_Shutdown();
|
||||
|
||||
IN_Shutdown();
|
||||
|
||||
if (R_DeInit)
|
||||
|
|
|
@ -165,6 +165,9 @@ static void ALSA_RW_Submit (soundcardinfo_t *sc, int start, int end)
|
|||
static void ALSA_Shutdown (soundcardinfo_t *sc)
|
||||
{
|
||||
psnd_pcm_close (sc->handle);
|
||||
|
||||
if (sc->Submit == ALSA_RW_Submit);
|
||||
free(sc->sn.buffer);
|
||||
}
|
||||
|
||||
static void *ALSA_LockBuffer(soundcardinfo_t *sc)
|
||||
|
|
|
@ -310,7 +310,7 @@ start:
|
|||
{
|
||||
i++;
|
||||
cmd_text[level].buf.cursize -= i;
|
||||
Q_memcpy (text, text+i, cmd_text[level].buf.cursize);
|
||||
memmove (text, text+i, cmd_text[level].buf.cursize);
|
||||
}
|
||||
|
||||
// Con_Printf("Found \"%s\"\n", line);
|
||||
|
@ -2851,13 +2851,20 @@ void Cmd_Condump_f(void)
|
|||
|
||||
void Cmd_Shutdown(void)
|
||||
{
|
||||
cmdalias_t *a;
|
||||
//make sure we get no other execution
|
||||
int level;
|
||||
for (level = 0; level < sizeof(cmd_text)/sizeof(cmd_text[0]); level++)
|
||||
SZ_Clear (&cmd_text[level].buf);
|
||||
|
||||
cmd_functions = NULL;
|
||||
cmd_alias = NULL;
|
||||
while(cmd_alias)
|
||||
{
|
||||
a = cmd_alias;
|
||||
cmd_alias = a->next;
|
||||
Z_Free(a->value);
|
||||
Z_Free(a);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -95,6 +95,7 @@ struct model_s;
|
|||
struct msurface_s;
|
||||
|
||||
void P_InitParticleSystem(void);
|
||||
void P_Shutdown(void);
|
||||
void P_LoadedModel(struct model_s *mod); /*checks a model's various effects*/
|
||||
void P_DefaultTrail (struct model_s *model);
|
||||
void P_EmitEffect (vec3_t pos, int type, trailstate_t **tsk);//this is just a wrapper
|
||||
|
|
|
@ -318,14 +318,10 @@ void GLDraw_ReInit (void)
|
|||
|
||||
int maxtexsize;
|
||||
|
||||
gltexture_t *glt;
|
||||
|
||||
TRACE(("dbg: GLDraw_ReInit: Closing old\n"));
|
||||
while(gltextures)
|
||||
if (gltextures)
|
||||
{
|
||||
glt = gltextures;
|
||||
gltextures = gltextures->next;
|
||||
BZ_Free(glt);
|
||||
Con_Printf("gl_draw didn't shut down cleanly\n");
|
||||
gltextures = NULL;
|
||||
}
|
||||
|
||||
memset(gltexturetablebuckets, 0, sizeof(gltexturetablebuckets));
|
||||
|
@ -448,6 +444,15 @@ void GLDraw_DeInit (void)
|
|||
Sh_Shutdown();
|
||||
#endif
|
||||
Shader_Shutdown();
|
||||
|
||||
while(gltextures)
|
||||
{
|
||||
gltexture_t *glt;
|
||||
glt = gltextures;
|
||||
gltextures = gltextures->next;
|
||||
BZ_Free(glt);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#include "crosshairs.dat"
|
||||
|
|
|
@ -464,9 +464,8 @@ void GL_Font_Callback(struct cvar_s *var, char *oldvalue);
|
|||
void GLR_DeInit (void)
|
||||
{
|
||||
Cmd_RemoveCommand ("timerefresh");
|
||||
Cmd_RemoveCommand ("envmap");
|
||||
Cmd_RemoveCommand ("r_editlights_reload");
|
||||
Cmd_RemoveCommand ("pointfile");
|
||||
Cmd_RemoveCommand ("r_editlights_save");
|
||||
|
||||
Cmd_RemoveCommand ("makewad");
|
||||
|
||||
|
|
|
@ -608,6 +608,11 @@ void GLVID_Shutdown(void)
|
|||
if (vidmode_active)
|
||||
XF86VidModeSwitchToMode(vid_dpy, scrnum, vidmodes[0]);
|
||||
vidmode_active = false;
|
||||
|
||||
if (vidmodes)
|
||||
XFree(vidmodes);
|
||||
vidmodes = NULL;
|
||||
num_vidmodes = 0;
|
||||
}
|
||||
#endif
|
||||
XCloseDisplay(vid_dpy);
|
||||
|
@ -906,6 +911,8 @@ qboolean GLVID_Init (rendererstate_t *info, unsigned char *palette)
|
|||
XMapWindow(vid_dpy, vid_window);
|
||||
/*put it somewhere*/
|
||||
XMoveWindow(vid_dpy, vid_window, 0, 0);
|
||||
|
||||
//XFree(visinfo);
|
||||
|
||||
#ifdef WITH_VMODE
|
||||
if (vidmode_active) {
|
||||
|
|
|
@ -1099,9 +1099,17 @@ pbool ED_ParseEpair (progfuncs_t *progfuncs, void *base, ddefXX_t *key, char *s,
|
|||
{
|
||||
while (*v && *v != ' ')
|
||||
v++;
|
||||
*v = 0;
|
||||
((float *)d)[i] = (float)atof (w);
|
||||
w = v = v+1;
|
||||
if (!*v)
|
||||
{
|
||||
((float *)d)[i] = (float)atof (w);
|
||||
w = v;
|
||||
}
|
||||
else
|
||||
{
|
||||
*v = 0;
|
||||
((float *)d)[i] = (float)atof (w);
|
||||
w = v = v+1;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
|
@ -3767,7 +3767,7 @@ static void QCBUILTIN PF_lightstylevalue (progfuncs_t *prinst, struct globalvars
|
|||
static void QCBUILTIN PF_lightstylestatic (progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
||||
{
|
||||
int style;
|
||||
float num;
|
||||
int num;
|
||||
char *val;
|
||||
|
||||
static char *styleDefs[] =
|
||||
|
@ -3795,7 +3795,7 @@ static void QCBUILTIN PF_lightstylestatic (progfuncs_t *prinst, struct globalvar
|
|||
num = 0;
|
||||
else if (num >= 'z'-'a')
|
||||
num = 'z'-'a'-1;
|
||||
val = styleDefs[(int)num];
|
||||
val = styleDefs[num];
|
||||
|
||||
PF_applylightstyle(style, val, col);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue