mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
move Chunks from Level to Player
This commit is contained in:
parent
b7664b4188
commit
1c18c02092
40 changed files with 450 additions and 220 deletions
|
|
@ -459,7 +459,7 @@ void Entities::updatePhysics(float delta) {
|
|||
float vel = glm::length(prevVel);
|
||||
int substeps = static_cast<int>(delta * vel * 20);
|
||||
substeps = std::min(100, std::max(2, substeps));
|
||||
physics->step(level->chunks.get(), &hitbox, delta, substeps, eid.uid);
|
||||
physics->step(*level->chunksStorage, &hitbox, delta, substeps, eid.uid);
|
||||
hitbox.linearDamping = hitbox.grounded * 24;
|
||||
transform.setPos(hitbox.position);
|
||||
if (hitbox.grounded && !grounded) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue