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