#ifndef JFK_BULLET_S_H #define JFK_BULLET_S_H #include #include "bullet.h" #include "object_s.h" #include "objhandle.h" #include "person_s.h" #include "weapon_s.h" namespace JFK { namespace server { struct bulletdata { double ttl; double r; double v; int damage; double reload_time; int ammo_cost; }; extern const struct bulletdata bulletdata[MAX_WEAPON]; class bullet : public virtual JFK::server::object, public virtual JFK::bullet { public: bullet(int itype, objhandle ioriginator); object* clone() const { return new bullet(*this); } void assign(const object* obj); std::string diffstring(const object* oldobj) const; void move(double t); object* action(double t); void delegate_collision(object* obj) const; void collide_with_bullet(const bullet*); void collide_with_person(const person*); void collide_with_obstacle(const obstacle*); double ttl; int damage; /* When a rocket hits something, explode is set to true, and in * action() an explosion will be created */ bool explode; objhandle originator; /* who fired this bullet */ }; } } #endif