mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-22 05:27:19 +00:00
Merge pull request #1558 from DarkflameUniverse/swap-update-order
fix: out of order physics updates
This commit is contained in:
commit
ab7f6f0b57
@ -388,14 +388,14 @@ int main(int argc, char** argv) {
|
|||||||
//In world we'd update our other systems here.
|
//In world we'd update our other systems here.
|
||||||
|
|
||||||
if (zoneID != 0 && deltaTime > 0.0f) {
|
if (zoneID != 0 && deltaTime > 0.0f) {
|
||||||
Metrics::StartMeasurement(MetricVariable::Physics);
|
|
||||||
dpWorld::StepWorld(deltaTime);
|
|
||||||
Metrics::EndMeasurement(MetricVariable::Physics);
|
|
||||||
|
|
||||||
Metrics::StartMeasurement(MetricVariable::UpdateEntities);
|
Metrics::StartMeasurement(MetricVariable::UpdateEntities);
|
||||||
Game::entityManager->UpdateEntities(deltaTime);
|
Game::entityManager->UpdateEntities(deltaTime);
|
||||||
Metrics::EndMeasurement(MetricVariable::UpdateEntities);
|
Metrics::EndMeasurement(MetricVariable::UpdateEntities);
|
||||||
|
|
||||||
|
Metrics::StartMeasurement(MetricVariable::Physics);
|
||||||
|
dpWorld::StepWorld(deltaTime);
|
||||||
|
Metrics::EndMeasurement(MetricVariable::Physics);
|
||||||
|
|
||||||
Metrics::StartMeasurement(MetricVariable::Ghosting);
|
Metrics::StartMeasurement(MetricVariable::Ghosting);
|
||||||
if (std::chrono::duration<float>(currentTime - ghostingLastTime).count() >= 1.0f) {
|
if (std::chrono::duration<float>(currentTime - ghostingLastTime).count() >= 1.0f) {
|
||||||
Game::entityManager->UpdateGhosting();
|
Game::entityManager->UpdateGhosting();
|
||||||
|
Loading…
Reference in New Issue
Block a user