- added a distance parameter to A_SprayDecal.

This commit is contained in:
Christoph Oelckers 2017-04-14 16:28:54 +02:00
commit 329c168cc2
4 changed files with 6 additions and 5 deletions

View file

@ -704,7 +704,7 @@ CCMD (spray)
Net_WriteString (argv[1]);
}
void SprayDecal(AActor *shooter, const char *name)
void SprayDecal(AActor *shooter, const char *name, double distance)
{
FTraceResults trace;
@ -713,7 +713,7 @@ void SprayDecal(AActor *shooter, const char *name)
double c = pitch.Cos();
DVector3 vec(c * ang.Cos(), c * ang.Sin(), -pitch.Sin());
if (Trace(shooter->PosPlusZ(shooter->Height / 2), shooter->Sector, vec, 172., 0, ML_BLOCKEVERYTHING, shooter, trace, TRACE_NoSky))
if (Trace(shooter->PosPlusZ(shooter->Height / 2), shooter->Sector, vec, distance, 0, ML_BLOCKEVERYTHING, shooter, trace, TRACE_NoSky))
{
if (trace.HitType == TRACE_HitWall)
{