-static void CL_Particles_LoadEffectInfo(void)
+static void CL_Particles_LoadEffectInfo(const char *customfile)
for (filepass = 0;;filepass++)
{
if (filepass == 0)
for (filepass = 0;;filepass++)
{
if (filepass == 0)
- dpsnprintf(filename, sizeof(filename), "effectinfo.txt");
+ {
+ if (customfile)
+ dpsnprintf(filename, sizeof(filename), customfile);
+ else
+ dpsnprintf(filename, sizeof(filename), "effectinfo.txt");
+ }
else if (filepass == 1)
{
else if (filepass == 1)
{
- if (!cl.worldbasename[0])
+ if (!cl.worldbasename[0] || customfile)
continue;
dpsnprintf(filename, sizeof(filename), "%s_effectinfo.txt", cl.worldnamenoextension);
}
continue;
dpsnprintf(filename, sizeof(filename), "%s_effectinfo.txt", cl.worldnamenoextension);
}
+void CL_Particles_LoadEffectInfo_f(void)
+{
+ CL_Particles_LoadEffectInfo(Cmd_Argc() > 1 ? Cmd_Argv(1) : NULL);
+}
+
/*
===============
CL_InitParticles
/*
===============
CL_InitParticles
void CL_Particles_Init (void)
{
Cmd_AddCommand ("pointfile", CL_ReadPointFile_f, "display point file produced by qbsp when a leak was detected in the map (a line leading through the leak hole, to an entity inside the level)");
void CL_Particles_Init (void)
{
Cmd_AddCommand ("pointfile", CL_ReadPointFile_f, "display point file produced by qbsp when a leak was detected in the map (a line leading through the leak hole, to an entity inside the level)");
- Cmd_AddCommand ("cl_particles_reloadeffects", CL_Particles_LoadEffectInfo, "reloads effectinfo.txt and maps/levelname_effectinfo.txt (where levelname is the current map)");
+ Cmd_AddCommand ("cl_particles_reloadeffects", CL_Particles_LoadEffectInfo_f, "reloads effectinfo.txt and maps/levelname_effectinfo.txt (where levelname is the current map) if parameter is given, loads from custom file (no levelname_effectinfo are loaded in this case)");
Cvar_RegisterVariable (&cl_particles);
Cvar_RegisterVariable (&cl_particles_quality);
Cvar_RegisterVariable (&cl_particles);
Cvar_RegisterVariable (&cl_particles_quality);
particlepalette[i] = palette_rgb[i][0] * 65536 + palette_rgb[i][1] * 256 + palette_rgb[i][2];
particletexturepool = R_AllocTexturePool();
R_InitParticleTexture ();
particlepalette[i] = palette_rgb[i][0] * 65536 + palette_rgb[i][1] * 256 + palette_rgb[i][2];
particletexturepool = R_AllocTexturePool();
R_InitParticleTexture ();
- CL_Particles_LoadEffectInfo();
+ CL_Particles_LoadEffectInfo(NULL);
}
static void r_part_shutdown(void)
}
static void r_part_shutdown(void)
{
if (decalskinframe)
R_SkinFrame_MarkUsed(decalskinframe);
{
if (decalskinframe)
R_SkinFrame_MarkUsed(decalskinframe);
- CL_Particles_LoadEffectInfo();
+ CL_Particles_LoadEffectInfo(NULL);
}
unsigned short particle_elements[MESHQUEUE_TRANSPARENT_BATCHSIZE*6];
}
unsigned short particle_elements[MESHQUEUE_TRANSPARENT_BATCHSIZE*6];