summaryrefslogtreecommitdiff
path: root/src/game/game.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/game.hpp')
-rw-r--r--src/game/game.hpp28
1 files changed, 18 insertions, 10 deletions
diff --git a/src/game/game.hpp b/src/game/game.hpp
index 6d6a80b..61ea146 100644
--- a/src/game/game.hpp
+++ b/src/game/game.hpp
@@ -43,7 +43,7 @@ namespace game {
CF_WATER = 16,
CF_DECOS = 32
};
-
+
enum {
AMBIENT_NEXUS,
AMBIENT_CHASM,
@@ -86,8 +86,8 @@ namespace game {
} repl_assets_t;
typedef struct {
- render::animated_texture_t blood, flash, explosion;
- audio::sound_t explosion_sound;
+ render::animated_texture_t blood, flash, explosion, ricochet;
+ audio::sound_t explosion_sound, ricochet_sound;
} fx_assets_t;
typedef struct {
@@ -198,15 +198,12 @@ namespace game {
world::cflags_t cflags;
bool moving = false;
+ bool blocked;
v2f_t dst;
float angle = 0.0f;
std::list<v2f_t> path;
- bool blocked;
- size_t attempts_left;
- float next_attempt;
-
v2f_t last_step;
ntime_t random_walk_time = 0;
@@ -393,6 +390,16 @@ namespace game {
void render_to(render::state_t *render);
};
+ class fx_ricochet_t : public effect_t {
+ v2f_t x;
+
+ public:
+ fx_ricochet_t(game::state_t *game_, v2f_t x_);
+ ~fx_ricochet_t(void) {};
+
+ void render_to(render::state_t *render);
+ };
+
typedef enum {
DECO_STONE,
DECO_STONE_CRACKED,
@@ -423,15 +430,16 @@ namespace game {
class rocket_t : public game::entity_t {
unit_t *shooter;
- v2f_t v;
+ v2f_t target, v;
+ std::unique_ptr<fx_aim_marker_t> aim_marker;
public:
- rocket_t(game::state_t *game, v2f_t x_, v2f_t v_, unit_t *shooter_);
+ rocket_t(game::state_t *game, v2f_t x_, v2f_t target_, unit_t *shooter_);
void render_to(render::state_t *render);
void render_late_to(render::state_t *render) {};
void on_think(void);
- void on_spawn(void) {};
+ void on_spawn(void);
void on_wake(void) {};
void damage(int points, unit_t *attacker) {};
};