//-----------------------------------------------------------------------------
//
//  $Logfile:: /game/magnum.cpp                                               $
// $Revision:: 2                                                              $
//   $Author:: Burgermac                                                      $
//     $Date:: 12/27/00 7:16 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:
// Magnum.
//

#include "g_local.h"
#include "magnum.h"

CLASS_DECLARATION( BulletWeapon, Magnum, "weapon_magnum" );

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

Magnum::Magnum()
{
	SetModels( "magnum.def", "view_magnum.def" );
	SetAmmo( "Bullet10mm", 1, 100 );
	SetRank( 20, 20 );
	SetType( WEAPON_1HANDED );
	modelIndex( "10mm.def" );
	silenced = true;
}

void Magnum::Shoot( Event* ev )
{
	NextAttack( 0.20 );
	FireBullets( 1, Vector( 10, 10, 10 ), 12, 24, DAMAGE_BULLET, MOD_MAGNUM, false );
}

qboolean Magnum::Drop( void )
{
	// Don't leave magnums around
	if( owner && owner->deadflag && deathmatch->value )
	{
		return false;
	}

	return BulletWeapon::Drop();
}
