minor trailstate fixes
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1064 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
997fa0d532
commit
90725afe20
2 changed files with 7 additions and 5 deletions
|
@ -2315,7 +2315,7 @@ void CLQ2_RailTrail (vec3_t start, vec3_t end)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Trailstate functions
|
// Trailstate functions
|
||||||
void P_CleanTrailstate(trailstate_t *ts)
|
static void P_CleanTrailstate(trailstate_t *ts)
|
||||||
{
|
{
|
||||||
// clear LASTSEG flag from lastbeam so it can be reused
|
// clear LASTSEG flag from lastbeam so it can be reused
|
||||||
if (ts->lastbeam)
|
if (ts->lastbeam)
|
||||||
|
@ -2336,7 +2336,8 @@ void P_DelinkTrailstate(trailstate_t **tsk)
|
||||||
if (*tsk == NULL)
|
if (*tsk == NULL)
|
||||||
return; // not linked to a trailstate
|
return; // not linked to a trailstate
|
||||||
|
|
||||||
ts = *tsk;
|
ts = *tsk; // store old pointer
|
||||||
|
*tsk = NULL; // clear pointer
|
||||||
|
|
||||||
if (ts->key != tsk)
|
if (ts->key != tsk)
|
||||||
return; // prevent overwrite
|
return; // prevent overwrite
|
||||||
|
@ -2351,11 +2352,9 @@ void P_DelinkTrailstate(trailstate_t **tsk)
|
||||||
P_CleanTrailstate(assoc);
|
P_CleanTrailstate(assoc);
|
||||||
assoc = ts;
|
assoc = ts;
|
||||||
}
|
}
|
||||||
|
|
||||||
*tsk = NULL; // erase pointer
|
|
||||||
}
|
}
|
||||||
|
|
||||||
trailstate_t *P_NewTrailstate(trailstate_t **key)
|
static trailstate_t *P_NewTrailstate(trailstate_t **key)
|
||||||
{
|
{
|
||||||
trailstate_t *ts;
|
trailstate_t *ts;
|
||||||
|
|
||||||
|
|
|
@ -172,4 +172,7 @@ int P_RunParticleEffectTypeString (vec3_t org, vec3_t dir, float count, char *na
|
||||||
|
|
||||||
void P_EmitSkyEffectTris(struct model_s *mod, struct msurface_s *fa);
|
void P_EmitSkyEffectTris(struct model_s *mod, struct msurface_s *fa);
|
||||||
|
|
||||||
|
// trailstate functions
|
||||||
|
void P_DelinkTrailstate(trailstate_t **tsk);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue