//-----------------------------------------------------------------------------
//
//  $Logfile:: /game/shotgun.cpp                                              $
// $Revision:: 2                                                              $
//   $Author:: Burgermac                                                      $
//     $Date:: 12/27/00 7:39 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:
// Shotgun
//

#include "g_local.h"
#include "bullet.h"
#include "shotgun.h"


CLASS_DECLARATION( BulletWeapon, Shotgun, "weapon_shotgun" );

ResponseDef Shotgun::Responses[] =
{
	{ &EV_Weapon_Shoot, ( Response )& Shotgun::Shoot },
	{ NULL, NULL }
};

Shotgun::Shotgun()
{
	SetModels( "shotgun.def", "view_shotgun.def" );
	SetAmmo( "ShotgunClip", 1, 10 );
	SetRank( 30, 30 );
	SetType( WEAPON_2HANDED_HI );
	modelIndex( "shotgunclip.def" );
}

void Shotgun::Shoot( Event* ev )
{
	// Non clients use a toned down version of the shotgun
	if( owner->isClient() )
		FireBullets( 10, Vector( 375, 375, 375 ), 8, 16, DAMAGE_BULLET, MOD_SHOTGUN, false );
	else
		FireBullets( 5, Vector( 100, 100, 100 ), 5, 10, DAMAGE_BULLET, MOD_SHOTGUN, false );

	NextAttack( 0.95f );
}

//###
void Shotgun::SecondaryUse( Event* ev )
{
	// switch to the plasma bow
	owner->useWeapon( "PlasmaBow" );
}
//###

