Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions src/game/shared/swarm/asw_alien_shared.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ void CASW_Alien::DoBloodDecal( float flDamage, const Vector &vecPos, const Vecto
return;

// make blood decal on the wall!
trace_t Bloodtr;
trace_t Bloodtr, Bloodtr2;
Vector vecTraceDir;
float flNoise;
int cCount;
Expand Down Expand Up @@ -157,13 +157,18 @@ void CASW_Alien::DoBloodDecal( float flDamage, const Vector &vecPos, const Vecto
vecTraceDir.y += random->RandomFloat( -flNoise, flNoise );
vecTraceDir.z += random->RandomFloat( -flNoise, flNoise );

// Don't bleed on grates.
// Bleed on and behind the grates.
UTIL_TraceLine( vecPos, vecPos + vecTraceDir * -flTraceDist, MASK_SHOT_HULL & ~CONTENTS_GRATE, this, COLLISION_GROUP_NONE, &Bloodtr);
UTIL_TraceLine( vecPos, vecPos + vecTraceDir * -flTraceDist, MASK_SHOT_HULL, this, COLLISION_GROUP_NONE, &Bloodtr2 );

if ( Bloodtr.fraction != 1.0 )
{
UTIL_BloodDecalTrace( &Bloodtr, BloodColor() );
}
if ( Bloodtr2.fraction != 1.0 && Bloodtr.endpos != Bloodtr2.endpos )
{
UTIL_BloodDecalTrace( &Bloodtr2, BloodColor() );
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/game/shared/util_shared.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -891,7 +891,7 @@ void UTIL_BloodDecalTrace( trace_t *pTrace, int bloodColor )
return;
}
#endif
else if (bloodColor == BLOOD_COLOR_BRIGHTGREEN)
else if (bloodColor == BLOOD_COLOR_BRIGHTGREEN || bloodColor == BLOOD_COLOR_GREEN )
{
UTIL_DecalTrace( pTrace, "GreenBlood" );
}
Expand Down