remove Player.hitbox (WIP)

This commit is contained in:
MihailRis
2024-07-08 03:51:46 +03:00
parent 2c7b5de50a
commit 7dfda981a8
11 changed files with 108 additions and 94 deletions
+5 -1
View File
@@ -136,9 +136,13 @@ void LevelScreen::update(float delta) {
bool paused = hud->isPause();
audio::get_channel("regular")->setPaused(paused);
audio::get_channel("ambient")->setPaused(paused);
glm::vec3 velocity {};
if (auto hitbox = player->getHitbox()) {
velocity = hitbox->velocity;
}
audio::set_listener(
camera->position-camera->dir,
player->hitbox->velocity,
velocity,
camera->dir,
glm::vec3(0, 1, 0)
);