diff --git a/demo/src/states/game/enemy/enemy.cpp b/demo/src/states/game/enemy/enemy.cpp index 2acf169..1e79cec 100644 --- a/demo/src/states/game/enemy/enemy.cpp +++ b/demo/src/states/game/enemy/enemy.cpp @@ -50,7 +50,8 @@ Enemy::Enemy(Engine* engine, const EnemyInfo& t_info) { mesh->translation.translateY(-5.0F); audio = &engine->audio; - audio->adpcm.setVolume(30, info.adpcmChannel); + audio->adpcm.setVolume(5, info.adpcmChannel); + // audio->adpcm.setVolume(30, info.adpcmChannel); // TEMP allocateOptions(); @@ -87,9 +88,9 @@ void Enemy::update(const Heightmap& heightmap, const Vec4& playerPosition, } void Enemy::handlePlayerShoot(const PlayerShootAction& shootAction) { - // if (!shootAction.isShooting) { - // return; - // } + if (!shootAction.isShooting) { + return; + } const auto& ray = shootAction.ray.value(); diff --git a/demo/src/states/game/enemy/enemy_manager.cpp b/demo/src/states/game/enemy/enemy_manager.cpp index 94b882b..731f744 100644 --- a/demo/src/states/game/enemy/enemy_manager.cpp +++ b/demo/src/states/game/enemy/enemy_manager.cpp @@ -43,7 +43,7 @@ EnemyManager::EnemyManager(Engine* engine, const Heightmap& heightmap) { auto* sample = engine->audio.adpcm.load( FileUtils::fromCwd("game/models/zombie/punch.adpcm")); - const int enemyCount = 1; + const int enemyCount = 5; for (int i = 0; i < enemyCount; i++) { EnemyInfo info; info.adpcmChannel = 9 + i; diff --git a/demo/src/states/game/game_state.cpp b/demo/src/states/game/game_state.cpp index 7d29555..519544a 100644 --- a/demo/src/states/game/game_state.cpp +++ b/demo/src/states/game/game_state.cpp @@ -86,12 +86,12 @@ void GameState::update() { renderer.render(); // Debug - auto& utility = engine->renderer.renderer3D.utility; - utility.drawBox(*player->getCameraInfo().looksAt, 0.3F); + // auto& utility = engine->renderer.renderer3D.utility; + // utility.drawBox(*player->getCameraInfo().looksAt, 0.3F); - auto* firstEnemy = enemyManager->getPairs().front()->mesh; - utility.drawBBox(firstEnemy->getCurrentBoundingBox().getTransformed( - firstEnemy->getModelMatrix())); + // auto* firstEnemy = enemyManager->getPairs().front()->mesh; + // utility.drawBBox(firstEnemy->getCurrentBoundingBox().getTransformed( + // firstEnemy->getModelMatrix())); // End frame engine->renderer.endFrame(); diff --git a/demo/src/states/game/player/player.cpp b/demo/src/states/game/player/player.cpp index 49afe98..80db7e8 100644 --- a/demo/src/states/game/player/player.cpp +++ b/demo/src/states/game/player/player.cpp @@ -35,9 +35,9 @@ PlayerShootAction Player::getShootAction() const { PlayerShootAction action; action.isShooting = weapon.isShooting; - // if (action.isShooting) { - action.ray = Ray(camera.position, camera.lookAt.getNormalized()); - // } + if (action.isShooting) { + action.ray = Ray(camera.position, camera.lookAt.getNormalized()); + } return action; }