Browse Source

pgraph: Fix LightAttrib::replace_{on|off}_light()

Fixes #1153
rdb 4 years ago
parent
commit
11d5a49d6f
1 changed files with 2 additions and 0 deletions
  1. 2 0
      panda/src/pgraph/lightAttrib.cxx

+ 2 - 0
panda/src/pgraph/lightAttrib.cxx

@@ -469,6 +469,7 @@ replace_on_light(const NodePath &source, const NodePath &dest) const {
     slobj->attrib_unref();
     slobj->attrib_unref();
 
 
     *it = dest;
     *it = dest;
+    attrib->_on_lights.sort();
   }
   }
   return return_new(attrib);
   return return_new(attrib);
 }
 }
@@ -531,6 +532,7 @@ replace_off_light(const NodePath &source, const NodePath &dest) const {
     slobj->attrib_unref();
     slobj->attrib_unref();
 
 
     *it = dest;
     *it = dest;
+    attrib->_off_lights.sort();
   }
   }
   return return_new(attrib);
   return return_new(attrib);
 }
 }