Skip to content

Commit

Permalink
Fix spotlight color setting
Browse files Browse the repository at this point in the history
... that never worked, apparently?
  • Loading branch information
MatusGuy committed Nov 17, 2024
1 parent 7fa0e3d commit 74e88ff
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/object/spotlight.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ Spotlight::update(float dt_sec)
case Direction::COUNTERCLOCKWISE:
m_angle -= dt_sec * m_speed;
break;

case Direction::STOPPED:
break;
}
Expand All @@ -152,6 +152,7 @@ Spotlight::draw(DrawingContext& context)
//m_lightcone->set_angle(angle);
//m_lightcone->draw(context.color(), position, m_layer);

m_lights->set_color(m_color);
m_lights->set_angle(m_angle);
m_lights->draw(context.color(), m_col.m_bbox.p1(), m_layer);
}
Expand All @@ -163,6 +164,7 @@ Spotlight::draw(DrawingContext& context)

if (m_enabled)
{
m_lightcone->set_color(m_color);
m_lightcone->set_angle(m_angle);
m_lightcone->draw(context.color(), m_col.m_bbox.p1(), LAYER_FOREGROUND1 + 10);
}
Expand Down

0 comments on commit 74e88ff

Please sign in to comment.