//-----------------------------------------------------------------------------
//
//  $Logfile:: /game/pulserifle.h                                             $
// $Revision:: 2                                                              $
//   $Author:: Burgermac                                                      $
//     $Date:: 12/27/00 7:11 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:
// Pulse rifle
//

#ifndef __PULSERIFLE_H__
#define __PULSERIFLE_H__

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

class PulseRifle : public BulletWeapon
{
	int beam_modelindex;

public:
	CLASS_PROTOTYPE( PulseRifle );

	PulseRifle();
	virtual void Shoot( Event* ev );
	void TraceAttack( const Vector& start, const Vector& end, int damage, trace_t* trace, int numricochets, int kick, int dflags );
	void PulseExplosion( trace_t* trace );
	virtual void Archive( Archiver& arc );
	virtual void Unarchive( Archiver& arc );
};

inline void PulseRifle::Archive( Archiver& arc )
{
	BulletWeapon::Archive( arc );

	arc.WriteInteger( beam_modelindex );
}

inline void PulseRifle::Unarchive( Archiver& arc )
{
	BulletWeapon::Unarchive( arc );

	beam_modelindex = arc.ReadInteger();
}

class GenericPulseRifle : public PulseRifle
{
public:
	CLASS_PROTOTYPE( GenericPulseRifle );

	GenericPulseRifle();
};



#endif /* pulserifle.h */
