mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
Merge pull request #951 from Neveix/fix-item-picking-up
Move sensors clearing to the top
This commit is contained in:
commit
1433de17d9
1 changed files with 2 additions and 3 deletions
|
|
@ -295,15 +295,14 @@ void Entities::preparePhysics(float delta) {
|
|||
auto& physics = *level.physics;
|
||||
auto& hitboxes = physics.getHitboxesWriteable();
|
||||
auto& solidHitboxes = physics.getSolidHitboxesWriteable();
|
||||
auto& sensors = physics.getSensorsWriteable();
|
||||
sensors.clear();
|
||||
|
||||
if (int parts = sensorsTickClock.update(delta)) {
|
||||
for (int i = 0; i < parts; i++) {
|
||||
auto part = sensorsTickClock.convertPart(i);
|
||||
auto allParts = sensorsTickClock.getParts();
|
||||
|
||||
auto& sensors = physics.getSensorsWriteable();
|
||||
sensors.clear();
|
||||
|
||||
auto view = registry->view<EntityId, Transform, Rigidbody>();
|
||||
for (auto [entity, eid, transform, rigidbody] : view.each()) {
|
||||
if (!rigidbody.enabled) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue