mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
add entity events: on_spawn, on_despawn
This commit is contained in:
parent
e1eb652ef4
commit
eb2be5e8b6
13 changed files with 116 additions and 22 deletions
|
|
@ -110,9 +110,9 @@ void Player::updateInput(
|
|||
noclip = !noclip;
|
||||
}
|
||||
|
||||
hitbox->linear_damping = PLAYER_GROUND_DAMPING;
|
||||
hitbox->linearDamping = PLAYER_GROUND_DAMPING;
|
||||
if (flight){
|
||||
hitbox->linear_damping = PLAYER_AIR_DAMPING;
|
||||
hitbox->linearDamping = PLAYER_AIR_DAMPING;
|
||||
hitbox->velocity.y *= 1.0f - delta * 9;
|
||||
if (input.jump){
|
||||
hitbox->velocity.y += speed * delta * 9;
|
||||
|
|
@ -122,7 +122,7 @@ void Player::updateInput(
|
|||
}
|
||||
}
|
||||
if (!hitbox->grounded) {
|
||||
hitbox->linear_damping = PLAYER_AIR_DAMPING;
|
||||
hitbox->linearDamping = PLAYER_AIR_DAMPING;
|
||||
}
|
||||
|
||||
input.noclip = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue