We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a687981 commit a0e160cCopy full SHA for a0e160c
Source/RunActivity/Viewer3D/Lights.cs
@@ -891,6 +891,12 @@ public override void Draw(GraphicsDevice graphicsDevice)
891
892
protected override void UpdateStates(int stateIndex1, int stateIndex2)
893
{
894
+ // Cycling light: state index will be set above actual number of states
895
+ if (stateIndex1 >= Light.States.Count)
896
+ stateIndex1 = StateCount - stateIndex1;
897
+ if (stateIndex2 >= Light.States.Count)
898
+ stateIndex2 = StateCount - stateIndex2;
899
+
900
var state1 = Light.States[stateIndex1];
901
var state2 = Light.States[stateIndex2];
902
0 commit comments