bullet_has_hit
This commit is contained in:
parent
0c1d6a58de
commit
5d6835ece3
@ -229,6 +229,7 @@ struct entity {
|
||||
struct v2 bullet_src_pos;
|
||||
struct v2 bullet_src_dir;
|
||||
f32 bullet_impulse;
|
||||
b32 bullet_has_hit; /* Has the bullet hit a target this tick */
|
||||
|
||||
/* ====================================================================== */
|
||||
/* Testing */
|
||||
|
||||
@ -960,7 +960,8 @@ INTERNAL void game_update(struct game_cmd_array game_cmds)
|
||||
if (entity_has_prop(e0, ENTITY_PROP_BULLET) || entity_has_prop(e1, ENTITY_PROP_BULLET)) {
|
||||
struct entity *bullet = entity_has_prop(e0, ENTITY_PROP_BULLET) ? e0 : e1;
|
||||
struct entity *target = e0 == bullet ? e1 : e0;
|
||||
|
||||
if (!bullet->bullet_has_hit) {
|
||||
bullet->bullet_has_hit = true;
|
||||
(UNUSED)bullet;
|
||||
(UNUSED)target;
|
||||
#if 0
|
||||
@ -991,6 +992,7 @@ INTERNAL void game_update(struct game_cmd_array game_cmds)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* ========================== *
|
||||
* Initialize bullet kinematics from sources
|
||||
|
||||
Loading…
Reference in New Issue
Block a user