File: gun_follow.cpp

package info (click to toggle)
rafkill 1.2.2-3.3
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 13,268 kB
  • sloc: cpp: 13,508; makefile: 64; sh: 14
file content (26 lines) | stat: -rw-r--r-- 621 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
#include "gunobj.h"
#include "gun_follow.h"
#include "weapons/weapon_follow.h"
#include "defs.h"
#include "spaceobj.h"
#include <vector>

WeaponFollow::WeaponFollow( int z, int d, int al ):
WeaponObject( d, "Tracker", 40000, al, z, 4 ) {
}


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


void WeaponFollow::MakeShot(int x, int y, vector< SpaceObject * > * Ammo, const vector< SpaceObject * > * fight ) {

	shot_counter = 12;

	if ( fight == NULL ) return;
	for ( int q = 0; q <= strength; q++ )
		Ammo->push_back( new Follow(x,y,90,fight,alignment, 10+strength*8 ) );

}