Example #1
0
int WissumTripod::activate_special()
{
	STACKTRACE;

	// this is handled implicitly in activate_weapon, this must return true
	// so that fire_special is set; this must consume very little fuel,
	// for "normal use".

	if ( Nactive < 3 ) {

		fire_guns(2);

		if (weapon_sample >= 0)
			play_sound2(data->sampleWeapon[weapon_sample]);

		return TRUE;			 // ok, the special was used
	}

	// a special case for the special is, when all 3 thrusters have been
	// activated, do something like the hotspot special. This consumes
	// extra fuel.

	if ( Nactive == 3 && batt >= specialDrainFuelDump ) {
		int i;
		for ( i = 0; i < 3; ++i ) {
			double a;
			a = angle;
			angle = moveangles[i];

			game->add( new FuelDump(this, Vector2(0,-25),
				angle+PI, specialVelocity,
				specialDamage, specialRange, specialArmour,
				this, this->data->spriteExtra, 1.0, 0) );

			angle = a;
		}

		// extra fuel (note that special_drain is also subtracted, later on):
		batt -= specialDrainFuelDump - special_drain;
		if ( batt < 0 )
			batt = 0;

		play_sound(data->sampleExtra[0]);

		return TRUE;			 // ok, the 3 things were launched
	}

	return FALSE;
}
Example #2
0
void all(gamedata &g){

  rotate_radars(g.radar);
  animate_smoke(g.smoke);
  animate_flames(g.flame, g.smoke);
  animate_explosions(g.explosion);
  decay_lasers(g.laser);
  clone_planes(g.p, g.dp, g.mission, g.winner);
  plane_collisions(g);
  move_falls(g);
  move_shots(g.shot,g.gamemap.ground,g.images[114],g.images[318],g.drakms);
  fire_guns(g.gun, g.p, g.sound, g.gamemap.b, g.shot, g.xmove, g.ymove);
  if (g.drak) drak_main(g);

}
Example #3
0
int WissumTripod::activate_weapon()
{
	STACKTRACE;
	return fire_guns(1);
}