#include "gameCommon.h"
#include "entity.h"
#include "world.h"

#ifndef BULLET_H
#define BULLET_H

// Just a simple, deadly, bullet.
typedef struct Bullet {
	Ray ray;
	EntityId fromId;
	EntityFingerprint fromFingerprint;
	float damage;
} Bullet;

typedef struct BulletHitInfo {
	bool hit;
	bool killed;
	EntityId hitId;
	EntityFingerprint hitFingerprint;
} BulletHitInfo;

// Uses entity postion and direction to create bullet ray.
Bullet createBulletFromEntity(Entity entity, float damage);

// Shoot this fucker.
BulletHitInfo shootBullet(World * world, Bullet bullet);

#endif