Skip to content

Commit

Permalink
FIX benchmarks & tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MeikelLP committed Oct 20, 2023
1 parent ea7c573 commit 5e2915f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Game.Benchmarks/Benchmarks/WorldUpdateBenchmark.cs
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,11 @@ public void GlobalSetup()
var entity = ActivatorUtilities.CreateInstance<PlayerEntity>(services, _world, player, conn);
_world.SpawnEntity(entity);
}
foreach (var e in _world.GetMapAt(0, 0).GetEntities())
foreach (var e in _world.GetMapAt(0, 0).Entities)
{
e.Goto(0, 0);
e?.Goto(0, 0);
}
_world.Update(0.2); // spawn entities
}

[Benchmark]
Expand Down
1 change: 1 addition & 0 deletions Game.Tests/World.cs → Game.Tests/WorldTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ public WorldTests()
};
_playerEntity = ActivatorUtilities.CreateInstance<PlayerEntity>(services, _world, playerData, conn);
_world.SpawnEntity(_playerEntity);
_world.Update(0.2); // spawn all entities
}

[Fact]
Expand Down

0 comments on commit 5e2915f

Please sign in to comment.