File: weapon_laser.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 (17 lines) | stat: -rw-r--r-- 509 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include "hull.h"
#include "weaponobj.h"
#include "weapon_laser.h"
#include "defs.h"

LaserBullet::LaserBullet( int qx, int qy, double kx, double ky, HullObject * hnew, int al ):
WeaponNode( qx, qy, kx, ky, hnew, al ){}

bool LaserBullet::Damage( double much ) {
	hull->takeDamage( 2 );
	return false;
}

void LaserBullet::Collided( SpaceObject * who, ExplosionClass ** explr, int M_EX ) {
	addExplode( explr, M_EX, new ExplosionClass(getX(),getY(),0,0,Util::rnd(6) + 3 ) ); 
	if ( hull ) hull->Collided();
}