From e8b487b0d2c1dc622256b89642ac291632f101fc Mon Sep 17 00:00:00 2001 From: Paweł Redman Date: Fri, 20 Apr 2018 13:08:58 +0200 Subject: More improvements to shooting. --- src/game/game.hpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src/game/game.hpp') diff --git a/src/game/game.hpp b/src/game/game.hpp index 61ea146..1a28413 100644 --- a/src/game/game.hpp +++ b/src/game/game.hpp @@ -86,8 +86,8 @@ namespace game { } repl_assets_t; typedef struct { - render::animated_texture_t blood, flash, explosion, ricochet; - audio::sound_t explosion_sound, ricochet_sound; + render::animated_texture_t blood, flash, explosion, ricochet, water_splash; + audio::sound_t explosion_sound, ricochet_sound, water_splash_sound; } fx_assets_t; typedef struct { @@ -249,7 +249,8 @@ namespace game { bool rocket_fired = false; void check_area(void); - void shoot(v2f_t aim); + void shoot(v2f_t from, v2f_t at, int damage); + void fire_shotgun(v2f_t aim); void target_and_attack(void); unit_soldier_t(game::state_t *game_); @@ -390,12 +391,13 @@ namespace game { void render_to(render::state_t *render); }; - class fx_ricochet_t : public effect_t { + class fx_bullet_miss_t : public effect_t { v2f_t x; + bool water; public: - fx_ricochet_t(game::state_t *game_, v2f_t x_); - ~fx_ricochet_t(void) {}; + fx_bullet_miss_t(game::state_t *game_, v2f_t x_, bool water_); + ~fx_bullet_miss_t(void) {}; void render_to(render::state_t *render); }; -- cgit