#ifndef _RIPGUN_H
#define _RIPGUN_H

typedef struct
{
	// first seven fields must be the same
	char    *name;
	void    (*use)(struct userInventory_s *ptr, userEntity_t *user);
	void	*(*command)(struct userInventory_s *ptr, char *commandStr, void *data);
	void   *precache;
	void   *dummy3;
	void   *dummy4;

	ammo_t  *ammo;

	int		mode;
}weaponPulse_t;


typedef struct
{
	float	remove_time;
	float	last_touch_time;

	Vector	last_pos;

	frictionHook_t	*fhook;
} corditeHook_t;

extern weaponInfo_t ripgunWeaponInfo;

static userInventory_t *ripgun_give (userEntity_t *self);
static	void	ripgun_select (userEntity_t *self);
static	void	ripgun_select_finish (userEntity_t *self);
static	void	ripgun_use (struct userInventory_s *ptr, userEntity_t *self);
static	void *weapon_command (struct userInventory_s *ptr, char *commandStr, void *data);
static void shootLaser(userEntity_t *self);
static void laser_think(userEntity_t *self);
static void laser_touch(userEntity_t *self, userEntity_t *other,cplane_t *plane, csurface_t *surf);

#endif