| 42 | } |
| 43 | |
| 44 | void DynamicLightObject::Draw() { |
| 45 | if (g_debug_runtime_disable_dynamic_light_object_draw) { |
| 46 | return; |
| 47 | } |
| 48 | |
| 49 | if (!Graphics::Instance()->media_mode() && light_id_ != -1 && scenegraph_ && scenegraph_->map_editor->state_ != MapEditor::kInGame) { |
| 50 | const DynamicLight *light = scenegraph_->dynamic_light_collection.GetLightFromID(light_id_); |
| 51 | if (light) { |
| 52 | mat4 transform; |
| 53 | if (selected_) { |
| 54 | transform.SetScale(vec3(RadiusFromScale(scale_))); |
| 55 | transform.SetTranslationPart(translation_); |
| 56 | DebugDraw::Instance()->AddWireMesh(HardcodedPaths::paths[HardcodedPaths::kPointLight], transform, vec4(light->color, 0.025f), _delete_on_draw); |
| 57 | } |
| 58 | transform.SetScale(vec3(0.1f)); |
| 59 | transform.SetTranslationPart(translation_); |
| 60 | DebugDraw::Instance()->AddWireMesh(HardcodedPaths::paths[HardcodedPaths::kPointLight], transform, vec4(light->color, 0.25f), _delete_on_draw); |
| 61 | } |
| 62 | } |
| 63 | } |
| 64 | |
| 65 | bool DynamicLightObject::Initialize() { |
| 66 | LOG_ASSERT(light_id_ == -1); |
nothing calls this directly
no test coverage detected