Right now, servers can’t display custom particles to clients. The client downloads the particle file but never precaches it. There’s a hacky workaround that involves serving a mapname_manifest.txt file, but it’s pretty spammy and conflicts with other servers’ custom content. Plus, it doesn’t even work if the map packs its own manifest file. Perhaps clients could simply cache particles in download?
Repro code:
public void OnPluginStart()
{
RegConsoleCmd("sm_particle", Cmd_Particle);
}
public void OnMapStart()
{
AddFileToDownloadsTable("particles/custom.pcf");
AddFileToDownloadsTable("maps/nmo_dev_world_particles.txt");
PrecacheGeneric("particles/custom.pcf", true);
}
Action Cmd_Particle(int client, int args)
{
client = 1;
float origin[3];
GetClientEyePosition(client, origin);
int entity = CreateEntityByName("info_particle_system");
DispatchKeyValue(entity, "start_active", "1");
DispatchKeyValue(entity, "effect_name", "my_custom_effect");
DispatchSpawn(entity);
TeleportEntity(entity , origin);
ActivateEntity(entity);
// Prints "Attempted to precache unknown particle system" or something
return Plugin_Handled;
}
Right now, servers can’t display custom particles to clients. The client downloads the particle file but never precaches it. There’s a hacky workaround that involves serving a mapname_manifest.txt file, but it’s pretty spammy and conflicts with other servers’ custom content. Plus, it doesn’t even work if the map packs its own manifest file. Perhaps clients could simply cache particles in
download
?Repro code: