MCPcopy Create free account
hub / github.com/WolfireGames/overgrowth / SetEnabled

Method SetEnabled

Source/Objects/dynamiclightobject.cpp:176–184  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

174}
175
176void 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}

Callers

nothing calls this directly

Calls 4

GetTranslationFunction · 0.85
RadiusFromScaleFunction · 0.85
AddLightMethod · 0.80
DeleteLightMethod · 0.80

Tested by

no test coverage detected