From b914d67b4e683c2d3e43c1854d6ef48b1878e4b6 Mon Sep 17 00:00:00 2001 From: Paweł Redman Date: Thu, 14 Dec 2017 18:40:11 +0100 Subject: Allow humans to shoot. --- src/game/game.hpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/game/game.hpp') diff --git a/src/game/game.hpp b/src/game/game.hpp index fdb2348..d4aed5d 100644 --- a/src/game/game.hpp +++ b/src/game/game.hpp @@ -25,12 +25,14 @@ namespace game { namespace assets { typedef struct { render::oriented_sprite_4M_t head_idle, body_idle; + render::oriented_sprite_4M_t body_aiming, body_firing; render::oriented_sprite_4M2_t legs_idle, legs_walking; render::animated_texture_t dead; } human_assets_t; typedef struct { render::oriented_sprite_4M_t idle, walking; + render::animated_texture_t dead; } alien_assets_t; extern human_assets_t human; @@ -102,6 +104,11 @@ namespace game { }; class human_t : public unit_t { + double next_targetting = -INFINITY; + double last_target_time = -INFINITY; + v2f_t last_target_x; + double last_attack = -INFINITY; + public: human_t(game::state_t *game); void render_to(render::state_t *render); -- cgit