- added A_SprayDecal function.

This commit is contained in:
Christoph Oelckers 2017-02-26 18:37:12 +01:00
commit 5fe04dfd20
5 changed files with 30 additions and 19 deletions

View file

@ -2376,25 +2376,8 @@ void Net_DoCommand (int type, BYTE **stream, int player)
break;
case DEM_SPRAY:
{
FTraceResults trace;
DAngle ang = players[player].mo->Angles.Yaw;
DAngle pitch = players[player].mo->Angles.Pitch;
double c = pitch.Cos();
DVector3 vec(c * ang.Cos(), c * ang.Sin(), -pitch.Sin());
s = ReadString (stream);
if (Trace (players[player].mo->PosPlusZ(players[player].mo->Height/2), players[player].mo->Sector,
vec, 172., 0, ML_BLOCKEVERYTHING, players[player].mo, trace, TRACE_NoSky))
{
if (trace.HitType == TRACE_HitWall)
{
DImpactDecal::StaticCreate (s, trace.HitPos, trace.Line->sidedef[trace.Side], NULL);
}
}
}
s = ReadString(stream);
SprayDecal(players[player].mo, s);
break;
case DEM_PAUSE: