diff options
author | nathansmithsmith <nathansmith7@mailfence.com> | 2023-08-18 00:18:53 -0600 |
---|---|---|
committer | nathansmithsmith <nathansmith7@mailfence.com> | 2023-08-18 00:18:53 -0600 |
commit | f98e6d4ea4ee52b298a7d9a9731da4c020bb4dfe (patch) | |
tree | fdb76e94e4d00cbe2ab652a9f65d6afaad779552 /src/bullets.c | |
parent | 87b86d92c27a6fb83d0d09365a36d8a98ba0b24b (diff) |
Some aim thingy
Diffstat (limited to 'src/bullets.c')
-rw-r--r-- | src/bullets.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/bullets.c b/src/bullets.c index ec5908f..bd7fc81 100644 --- a/src/bullets.c +++ b/src/bullets.c @@ -13,6 +13,19 @@ Bullet createBulletFromEntity(Entity entity, float damage) { }; } + +Bullet createBulletFromDirection(Entity entity, Vector3 direction, float damage) { + return (Bullet){ + .ray = (Ray){ + entity.position, + direction + }, + .fromId = entity.id, + .fromFingerprint = entity.fingerprint, + .damage = damage + }; +} + BulletHitInfo handleBulletHit(Entity * entity, Bullet bullet) { // Handle health. entity->health -= bullet.damage; |