ref: cb8a297e68e2aeb1ba28d5087b17be493d812739
parent: a9177fe09821cb151f6a9b73012ff18ef9896f38
author: MHS <gek@katherine>
date: Wed Mar 17 09:55:06 EDT 2021
Automatic commit.
--- a/src/light.c
+++ b/src/light.c
@@ -204,11 +204,13 @@
GLContext* c = gl_get_context();
GLLight* l = &c->lights[light];
if (v && !l->enabled) {
+ //Push this light onto the front of the linked list.
l->enabled = 1;
l->next = c->first_light;
c->first_light = l;
l->prev = NULL;
} else if (!v && l->enabled) {
+ //Pop this light out of the linked list.
l->enabled = 0;
if (l->prev == NULL)
c->first_light = l->next;