Skip to content

Commit

Permalink
Update flecs to v4.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
maximegmd committed Nov 24, 2024
1 parent a8442df commit e7e638f
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions code/client/App/World/NetworkWorldSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ bool NetworkWorldSystem::Spawn(uint64_t aServerId, const Red::Vector4& aPosition
if (!id.IsDynamic())
return false;

ensure(aServerId).emplace<SpawningComponent>(id);
make_alive(aServerId).emplace<SpawningComponent>(id);

return true;
}
Expand Down Expand Up @@ -408,7 +408,7 @@ void NetworkWorldSystem::OnConnected()
m_updatePlayerLocation = system("Update player location")
.kind(flecs::OnUpdate)
.interval(1.f / pNetworkService->GetServerSettings().get_update_rate())
.iter([this](flecs::iter& it)
.run([this](flecs::iter& it)
{
UpdatePlayerLocation();
});
Expand Down
2 changes: 1 addition & 1 deletion code/client/App/World/VehicleSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ bool VehicleSystem::HandleVehicleLoadMessage(const PacketEvent<server::NotifyVeh

// spdlog::info("[VehicleSystem] * Spawned: {}, {}", aMessage.get_id(), id.hash);
const auto worldSystem = Red::GetGameSystem<NetworkWorldSystem>();
worldSystem->ensure(aMessage.get_id()).emplace<SpawningComponent>(id);
worldSystem->make_alive(aMessage.get_id()).emplace<SpawningComponent>(id);

return true;
}
Expand Down
2 changes: 1 addition & 1 deletion code/server/Game/World.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ World::World()
set<flecs::Rest>({});

this->import<flecs::units>();
this->import<flecs::monitor>();
this->import<flecs::stats>();

component<std::string>()
.opaque(flecs::String)
Expand Down
2 changes: 1 addition & 1 deletion code/server/Scripting/WorldScriptInstance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ void WorldScriptInstance::Initialize()

m_updateSystem = GServer->GetWorld()->system("Script Update")
.kind(flecs::OnUpdate)
.iter([this](flecs::iter& iter)
.run([this](flecs::iter& iter)
{
float delta = iter.delta_time();
if (m_callback != nullptr)
Expand Down
2 changes: 1 addition & 1 deletion code/server/Systems/ServerListSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ServerListSystem::ServerListSystem(gsl::not_null<World*> apWorld)
: m_pWorld(apWorld)
, m_nextAnnounce{}
{
m_updateSystem = apWorld->system("Server list Update").kind(flecs::OnUpdate).iter([this](flecs::iter& iter) { Tick(); });
m_updateSystem = apWorld->system("Server list Update").kind(flecs::OnUpdate).run([this](flecs::iter& iter) { Tick(); });

m_serverListObserver = apWorld->observer<PlayerComponent>("Server list player Observer")
.event(flecs::OnSet)
Expand Down
2 changes: 1 addition & 1 deletion xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ add_requires(
"zlib",
"nlohmann_json",
"dotnet",
"flecs 3.2.11",
"flecs v4.0.3",
"protobuf-cpp",
"entt",
"microsoft-gsl")
Expand Down

0 comments on commit e7e638f

Please sign in to comment.