diff --git a/sources/System/IAControllable/IAControllableSystem.cpp b/sources/System/IAControllable/IAControllableSystem.cpp index 51342a09..9110ee7c 100644 --- a/sources/System/IAControllable/IAControllableSystem.cpp +++ b/sources/System/IAControllable/IAControllableSystem.cpp @@ -41,7 +41,7 @@ namespace BBM return res; }*/ - void IAControllableSystem::UpdateMapInfos(WAL::Entity entity) + void IAControllableSystem::UpdateMapInfos(WAL::ViewEntity &entity) { if (_cached) return; @@ -56,7 +56,7 @@ namespace BBM for (auto &[other, pos, _] : _wal.scene->view>()) _map.push_back(MapInfo(pos.position, MapGenerator::HOLE)); for (auto &[other, pos, _] : _wal.scene->view>()) { - if (entity.getUid() == other.getUid()) + if (static_cast(entity).getUid() == other.getUid()) continue; _players.push_back(MapInfo(pos.position, MapGenerator::NOTHING)); } @@ -73,7 +73,7 @@ namespace BBM auto &pos = entity.get(); MapInfo player(pos.position, MapGenerator::NOTHING); - //UpdateMapInfos(static_cast(entity)); + UpdateMapInfos(entity); luabridge::LuaRef updateFunc = luabridge::getGlobal(ia.state, "Update"); if (!updateFunc.isFunction()) return; diff --git a/sources/System/IAControllable/IAControllableSystem.hpp b/sources/System/IAControllable/IAControllableSystem.hpp index 06c8c0d7..56fe0336 100644 --- a/sources/System/IAControllable/IAControllableSystem.hpp +++ b/sources/System/IAControllable/IAControllableSystem.hpp @@ -29,7 +29,7 @@ namespace BBM std::vector> _bombs; //! @brief - void UpdateMapInfos(WAL::Entity entity); + void UpdateMapInfos(WAL::ViewEntity &entity); public: //! @inherit void onFixedUpdate(WAL::ViewEntity &entity) override;