Skip to content

Commit d8b39ac

Browse files
committed
mathlib: Backport TF2 lighting enum dispatching
1 parent 6542e9c commit d8b39ac

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

mathlib/lightdesc.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ void LightDesc_t::ComputeLightAtPoints( const FourVectors &pos, const FourVector
7474
Assert((m_Type==MATERIAL_LIGHT_POINT) || (m_Type==MATERIAL_LIGHT_SPOT) || (m_Type==MATERIAL_LIGHT_DIRECTIONAL));
7575
switch (m_Type)
7676
{
77+
// dimhotepus: default - TF2 backport.
78+
default:
7779
case MATERIAL_LIGHT_POINT:
7880
case MATERIAL_LIGHT_SPOT:
7981
delta.DuplicateVector(m_Position);
@@ -177,6 +179,8 @@ void LightDesc_t::ComputeNonincidenceLightAtPoints( const FourVectors &pos, Four
177179
Assert((m_Type==MATERIAL_LIGHT_POINT) || (m_Type==MATERIAL_LIGHT_SPOT) || (m_Type==MATERIAL_LIGHT_DIRECTIONAL));
178180
switch (m_Type)
179181
{
182+
// dimhotepus: default - TF2 backport.
183+
default:
180184
case MATERIAL_LIGHT_POINT:
181185
case MATERIAL_LIGHT_SPOT:
182186
delta.DuplicateVector(m_Position);

0 commit comments

Comments
 (0)