Tracked down the bug that was caused by picking up an item but not removing its Position in the world, so when you go to another level it gets brought back to life causing a dupe.
This commit is contained in:
parent
2c6565c40a
commit
e0588847fa
7 changed files with 62 additions and 5 deletions
|
@ -16,12 +16,15 @@ namespace guecs {
|
|||
}
|
||||
|
||||
DinkyECS::Entity GrabSource::grab() {
|
||||
fmt::println("> Grab entity {}", world_entity);
|
||||
return world_entity;
|
||||
}
|
||||
|
||||
void GrabSource::setSprite(guecs::UI& gui, guecs::Entity gui_id) {
|
||||
dbc::check(gui.has<guecs::Sprite>(gui_id), "GrabSource given sprite gui_id that doesn't exist");
|
||||
|
||||
fmt::println("> Grabsource Set sprite entity {}", world_entity);
|
||||
|
||||
auto& sp = gui.get<guecs::Sprite>(gui_id);
|
||||
sprite = sp.sprite;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue