File: gun_shatter.cpp

package info (click to toggle)
rafkill 1.2.2-4
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 13,268 kB
  • ctags: 5,074
  • sloc: cpp: 13,508; makefile: 64; sh: 14
file content (31 lines) | stat: -rw-r--r-- 731 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include "gunobj.h"
#include "gun_shatter.h"
#include "weaponobj.h"
#include "hulls/hull_weapon_shatter.h"
#include "weapons/weapon_shatter.h"
#include "defs.h"
#include <vector>

using namespace std;

WeaponShatter::WeaponShatter( int z, int d, int _smp, int al ):
WeaponObject( d, "Shatter Gun", 38000, al, z, 4 ) {
	smp = _smp;
}


WeaponObject * WeaponShatter::copy() {
	return new WeaponShatter( strength, dir, smp, alignment );
}


void WeaponShatter::MakeShot(int x, int y, vector< SpaceObject * > * Ammo, const vector< SpaceObject * > * fight ) {
	if ( smp != -1 ){
		Util::playSound( smp, 255 );
	}

	shot_counter = 10;

	Ammo->push_back( new Shatter(x,y,0,-2.1*8, new Shatter_WHull(6+strength*2), alignment, Ammo ) );

}