Fixed the boss::UI::damage so it says who hit who.

This commit is contained in:
Zed A. Shaw 2025-12-30 01:11:08 -05:00
parent 5676382fbb
commit 6dc9d564c6
4 changed files with 11 additions and 7 deletions

View file

@ -2,6 +2,8 @@
#include "animation.hpp"
#include <ranges>
#include "shaders.hpp"
#include <fmt/core.h>
#include "dbc.hpp"
const bool DEBUG=false;
@ -109,6 +111,7 @@ namespace scene {
}
Element& Engine::actor_config(const std::string& actor) {
dbc::check($actor_name_ids.contains(actor), fmt::format("scene does not contain actor {}", actor));
return $actors.at($actor_name_ids.at(actor));
}
@ -119,7 +122,7 @@ namespace scene {
}
void Engine::animate_actor(const std::string& actor) {
auto& config = $actors.at($actor_name_ids.at(actor));
auto& config = actor_config(actor);
config.anim.play();
}