fix particles spawned from csqc issue.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4834 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2015-02-02 20:18:14 +00:00
parent 13c2261c60
commit 670a5d5992
2 changed files with 5 additions and 4 deletions

View file

@ -2238,7 +2238,7 @@ static void P_PartInfo_f (void)
if (j) if (j)
{ {
Con_Printf("Type %s = %i total\n", part_type[i].name, j); Con_Printf("Type %s.%s = %i total\n", part_type[i].config, part_type[i].name, j);
if (!(part_type[i].state & PS_INRUNLIST)) if (!(part_type[i].state & PS_INRUNLIST))
Con_Printf(" NOT RUNNING\n"); Con_Printf(" NOT RUNNING\n");
} }
@ -2254,7 +2254,7 @@ static void P_PartInfo_f (void)
j++; j++;
Con_Printf("Type %s = %i total\n", ptype->name, j); Con_Printf("Type %s.%s = %i total\n", ptype->config, ptype->name, j);
r += j; r += j;
e++; e++;
} }
@ -3751,7 +3751,7 @@ static int PScript_RunParticleEffectState (vec3_t org, vec3_t dir, float count,
goto skip; goto skip;
} }
if (dir) if (dir && (dir[0] || dir[1] || dir[2]))
{ {
void PerpendicularVector( vec3_t dst, const vec3_t src ); void PerpendicularVector( vec3_t dst, const vec3_t src );
VectorCopy(dir, axis[2]); VectorCopy(dir, axis[2]);

View file

@ -2466,12 +2466,13 @@ static void QCBUILTIN PF_cs_particleeffectnum (pubprogfuncs_t *prinst, struct gl
free(cl.particle_csname[i]); free(cl.particle_csname[i]);
cl.particle_csname[i] = NULL; cl.particle_csname[i] = NULL;
cl.particle_csprecache[i] = P_FindParticleType(effectname); cl.particle_csprecache[i] = P_FindParticleType(effectname);
if (cl.particle_csprecache[i] != P_INVALID) //if (cl.particle_csprecache[i] != P_INVALID)
{ {
//it exists, allow it. //it exists, allow it.
cl.particle_csname[i] = strdup(effectname); cl.particle_csname[i] = strdup(effectname);
G_FLOAT(OFS_RETURN) = -i; G_FLOAT(OFS_RETURN) = -i;
} }
cl.particle_csprecaches = true;
} }
//if we're using dp network protocols, we should use the effectinfo.txt file as a lookup table instead. //if we're using dp network protocols, we should use the effectinfo.txt file as a lookup table instead.