//-----------------------------------------------------------------------------
//
//  $Logfile:: /game/shotrocketlauncher.h                                     $
// $Revision:: 2                                                              $
//   $Author:: Burgermac                                                      $
//     $Date:: 12/27/00 7:33 PM                                               $
//
// Copyright (C) 1998 by Ritual Entertainment, Inc.
// All rights reserved.
//
// This source is may not be distributed and/or modified without
// expressly written permission by Ritual Entertainment, Inc.
//
// DESCRIPTION:
// Shootable rockets and a launcher

#ifndef __SHOTROCKETLAUNCHER_H__
#define __SHOTROCKETLAUNCHER_H__

#include "g_local.h"
#include "item.h"
#include "weapon.h"
#include "specialfx.h"

class ShotRocket : public Projectile
{
private:
	float speed;

public:
	CLASS_PROTOTYPE( ShotRocket );

	void              DamageEvent( Event* ev );
	void                    Explode( Event* ev );
	void                    Setup( Entity* owner, Vector pos, Vector dir );
	void              HeatSeek( Event* ev );
	float             Distance( Entity* targ );
	qboolean          CanSee( Entity* ent );
	virtual void      Archive( Archiver& arc );
	virtual void      Unarchive( Archiver& arc );
};

inline void ShotRocket::Archive( Archiver& arc )
{
	Projectile::Archive( arc );
	arc.WriteFloat( speed );
}

inline void ShotRocket::Unarchive( Archiver& arc )
{
	Projectile::Unarchive( arc );
	speed = arc.ReadFloat();
}

class ShotRocketLauncher : public Weapon
{
public:
	CLASS_PROTOTYPE( ShotRocketLauncher );

	ShotRocketLauncher();
	virtual void        Shoot( Event* ev );
};

#endif // shotrocketlauncher.h
