Fixed the boss::UI::damage so it says who hit who.
This commit is contained in:
parent
5676382fbb
commit
6dc9d564c6
4 changed files with 11 additions and 7 deletions
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue