Skip to content

Commit da60c98

Browse files
authored
Merge pull request #999 from Kitsune44/hotfix
Tweak vertical alien blood decal coloration
2 parents f541b5f + 77bb58b commit da60c98

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

src/game/shared/swarm/asw_alien_shared.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ void CASW_Alien::DoBloodDecal( float flDamage, const Vector &vecPos, const Vecto
110110
return;
111111

112112
// make blood decal on the wall!
113-
trace_t Bloodtr;
113+
trace_t Bloodtr, Bloodtr2;
114114
Vector vecTraceDir;
115115
float flNoise;
116116
int cCount;
@@ -157,13 +157,18 @@ void CASW_Alien::DoBloodDecal( float flDamage, const Vector &vecPos, const Vecto
157157
vecTraceDir.y += random->RandomFloat( -flNoise, flNoise );
158158
vecTraceDir.z += random->RandomFloat( -flNoise, flNoise );
159159

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

163164
if ( Bloodtr.fraction != 1.0 )
164165
{
165166
UTIL_BloodDecalTrace( &Bloodtr, BloodColor() );
166167
}
168+
if ( Bloodtr2.fraction != 1.0 && Bloodtr.endpos != Bloodtr2.endpos )
169+
{
170+
UTIL_BloodDecalTrace( &Bloodtr2, BloodColor() );
171+
}
167172
}
168173
}
169174

src/game/shared/util_shared.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -891,7 +891,7 @@ void UTIL_BloodDecalTrace( trace_t *pTrace, int bloodColor )
891891
return;
892892
}
893893
#endif
894-
else if (bloodColor == BLOOD_COLOR_BRIGHTGREEN)
894+
else if (bloodColor == BLOOD_COLOR_BRIGHTGREEN || bloodColor == BLOOD_COLOR_GREEN )
895895
{
896896
UTIL_DecalTrace( pTrace, "GreenBlood" );
897897
}

0 commit comments

Comments
 (0)