and again

This commit is contained in:
2025-07-18 18:56:49 +02:00
parent 6d0e56eb46
commit 090ea962d3
19 changed files with 115 additions and 186 deletions

View File

@@ -5,9 +5,7 @@
namespace td {
namespace game {
World::World() : m_CurrentState{.m_Teams{Team{TeamColor::Red}, Team{TeamColor::Blue}}} {
}
World::World() : m_CurrentState{.m_Teams{Team{TeamColor::Red}, Team{TeamColor::Blue}}}, m_NextState{.m_Teams{Team{TeamColor::Red}, Team{TeamColor::Blue}}} {}
const Color* World::GetTileColor(TilePtr tile) const {
switch (tile->GetType()) {
@@ -58,7 +56,8 @@ bool World::LoadMap(const protocol::pdata::WorldData& a_WorldData) {
}
void World::Tick(const protocol::LockStep& a_LockStep, FpFloat a_Delta) {
m_CurrentState = m_Ticker.NextStep(*this, m_CurrentState, a_LockStep, a_Delta);
m_CurrentState = m_NextState;
m_NextState = m_Ticker.NextStep(*this, m_NextState, a_LockStep, a_Delta);
}
} // namespace game