File: weapon_rocket.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 (23 lines) | stat: -rw-r--r-- 447 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
#include "weaponobj.h"
#include "weapon_rocket.h"
#include "hull.h"

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

#define ROCKETSPEED 0.02
void Rocket::MoveReal() {

	/*
	virtualx += dx*speed;
	virtualy += dy*speed;
	actualx = (int)virtualx;
	actualy = (int)virtualy;
	*/
	SpaceObject::MoveReal();
	
	speed += ROCKETSPEED;
	if ( speed > 3.2 )
		speed = 3.2;
}