Allow decals to adhere to random s bias stuff too.

This commit is contained in:
Shpoike 2020-06-19 22:40:24 +01:00
parent a1641b6be3
commit 1c750b3f5f
1 changed files with 3 additions and 0 deletions

View File

@ -4954,6 +4954,9 @@ int PScript_RunParticleEffectState (vec3_t org, vec3_t dir, float count, int typ
ctx.scale1 /= m; ctx.scale1 /= m;
ctx.scale2 /= m; ctx.scale2 /= m;
if (ptype->randsmax!=1)
ctx.bias1 += ptype->texsstride * (rand()%ptype->randsmax);
//inserts decals through a callback. //inserts decals through a callback.
Mod_ClipDecal(ctx.model, ctx.center, ctx.normal, ctx.tangent2, ctx.tangent1, m, ptype->surfflagmask, ptype->surfflagmatch, PScript_AddDecals, &ctx); Mod_ClipDecal(ctx.model, ctx.center, ctx.normal, ctx.tangent2, ctx.tangent1, m, ptype->surfflagmask, ptype->surfflagmatch, PScript_AddDecals, &ctx);
#endif #endif