sin-2015/assaultrifle.cpp

51 lines
1.1 KiB
C++
Raw Normal View History

1999-04-22 00:00:00 +00:00
// 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:
// Assault rifle
//
#include "g_local.h"
#include "assaultrifle.h"
CLASS_DECLARATION( BulletWeapon, AssaultRifle, "weapon_assaultrifle" );
ResponseDef AssaultRifle::Responses[] =
{
{ &EV_Weapon_Shoot, ( Response )AssaultRifle::Shoot },
{ NULL, NULL }
};
AssaultRifle::AssaultRifle()
{
SetModels( "asrifle.def", "view_asrifle.def" );
SetAmmo( "Bullet10mm", 1, 30 );
SetRank( 40, 40 );
SetType( WEAPON_2HANDED_LO );
modelIndex( "10mm.def" );
modelIndex( "sprites/gunblast.spr" );
modelIndex( "shell.def" );
silenced = true;
}
void AssaultRifle::Shoot
(
Event *ev
)
{
FireBullets( 1, "120 120 120", 8, 14, DAMAGE_BULLET, MOD_ASSRIFLE, false );
NextAttack( 0 );
}
//###
void AssaultRifle::SecondaryUse (Event *ev)
{
// switch to the flamethrower
owner->useWeapon("Flamethrower");
}
//###