apply steps at the end
This commit is contained in:
@@ -3,8 +3,6 @@
|
|||||||
#include <td/simulation/system/EntityMove.h>
|
#include <td/simulation/system/EntityMove.h>
|
||||||
#include <td/simulation/CommandApply.h>
|
#include <td/simulation/CommandApply.h>
|
||||||
|
|
||||||
#define ADD_SYSTEM(class) std::move(std::make_unique<class>())
|
|
||||||
|
|
||||||
namespace td {
|
namespace td {
|
||||||
namespace sim {
|
namespace sim {
|
||||||
|
|
||||||
@@ -15,8 +13,8 @@ WorldTicker::WorldTicker() {
|
|||||||
WorldSnapshot WorldTicker::NextStep(
|
WorldSnapshot WorldTicker::NextStep(
|
||||||
const game::World& a_World, WorldSnapshot& a_PreviousState, const protocol::LockStep& a_LockStep, FpFloat a_Delta) {
|
const game::World& a_World, WorldSnapshot& a_PreviousState, const protocol::LockStep& a_LockStep, FpFloat a_Delta) {
|
||||||
WorldSnapshot next = CreateNext(a_PreviousState);
|
WorldSnapshot next = CreateNext(a_PreviousState);
|
||||||
ApplySteps(a_World, next, a_LockStep); // maybe swap with tick ?
|
|
||||||
Tick(a_World, next, a_Delta);
|
Tick(a_World, next, a_Delta);
|
||||||
|
ApplySteps(a_World, next, a_LockStep);
|
||||||
return next;
|
return next;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user