| 174 | } |
| 175 | |
| 176 | void DynamicLightObject::SetEnabled(bool val) { |
| 177 | if (!enabled_ && val) { |
| 178 | light_id_ = scenegraph_->dynamic_light_collection.AddLight(GetTranslation(), color * (1.0f + overbright * 0.3f), RadiusFromScale(scale_)); |
| 179 | } else if (enabled_ && !val) { |
| 180 | scenegraph_->dynamic_light_collection.DeleteLight(light_id_); |
| 181 | light_id_ = -1; |
| 182 | } |
| 183 | Object::SetEnabled(val); |
| 184 | } |
nothing calls this directly
no test coverage detected