diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/game/assets.cpp | 5 | ||||
-rw-r--r-- | src/game/game.cpp | 13 | ||||
-rw-r--r-- | src/game/units.cpp | 2 |
3 files changed, 13 insertions, 7 deletions
diff --git a/src/game/assets.cpp b/src/game/assets.cpp index a020bf6..8ca0592 100644 --- a/src/game/assets.cpp +++ b/src/game/assets.cpp @@ -86,10 +86,11 @@ void load(void) ambients[AMBIENT_NEXUS].load("assets/ambience/nexus.ogg"); ambients[AMBIENT_CHASM].load("assets/ambience/chasm.ogg"); - ambients[AMBIENT_CHASM].volume = 4.0f; + ambients[AMBIENT_CHASM].volume = 12.0f; ambients[AMBIENT_WIND].load("assets/ambience/wind.ogg"); + ambients[AMBIENT_WIND].volume = 3.0f; ambients[AMBIENT_WATER].load("assets/ambience/water.ogg"); - ambients[AMBIENT_WATER].volume = 0.2f; + ambients[AMBIENT_WATER].volume = 0.1f; } } // namespace game::assets diff --git a/src/game/game.cpp b/src/game/game.cpp index 2818c0b..f21bccd 100644 --- a/src/game/game.cpp +++ b/src/game/game.cpp @@ -283,9 +283,12 @@ void state_t::tick(ntime_t time_) } } +#define XRES 9 +#define YRES 9 + void state_t::compute_ambience(render::state_t *render) { - const size_t samples = 25; + const size_t samples = XRES * YRES; rectf_t area; v2f_t origins[AMBIENT_COUNT]; size_t hits[AMBIENT_COUNT]; @@ -298,14 +301,14 @@ void state_t::compute_ambience(render::state_t *render) } // resolution chosen arbitrarily - for (size_t y = 0; y < 5; y++) - for (size_t x = 0; x < 5; x++) { + for (size_t y = 0; y < YRES; y++) + for (size_t x = 0; x < XRES; x++) { v2f_t point; world::tile_t *tile; int type; - point[0] = lerp(area[0][0], area[1][0], y / 4.0f); - point[1] = lerp(area[0][1], area[1][1], x / 4.0f); + point[0] = lerp(area[0][0], area[1][0], y / (YRES - 1.0f)); + point[1] = lerp(area[0][1], area[1][1], x / (XRES - 1.0f)); tile = world.get_tile(world::tile_index_t(point), world::SECTOR_FULL); diff --git a/src/game/units.cpp b/src/game/units.cpp index 47e729c..63c16db 100644 --- a/src/game/units.cpp +++ b/src/game/units.cpp @@ -583,6 +583,8 @@ void unit_spider_t::target_and_attack(void) void unit_spider_t::on_think(void) { + return; + target_and_attack(); keep_moving(4.0); |