The first weapon now has a recoil so that you can fly. There is a bug with facing when you are flying with recoil.
#include "Weapons.hh"
static struct WeaponParams {
TickCount age;
float speed;
float recoil;
float explosionRadius;
TickCount reloadTime;
std::string name;
} WEAPON_PARAMS[] = {
/* age speed recoil expRadius reloadTime name */
{ 10000, 5 * 80 + 50, 0 * 5 + 4000, 0 * 6 + 5, 0 * 100 + 50, "Weapon 1" },
{ 10000, 4 * 80 + 50, 2 * 5 + 5, 1 * 6 + 5, 1 * 100 + 50, "Weapon 2" },
{ 10000, 3 * 80 + 50, 3 * 5 + 5, 2 * 6 + 5, 2 * 100 + 50, "Weapon 3" },
{ 10000, 2 * 80 + 50, 4 * 5 + 5, 3 * 6 + 5, 3 * 100 + 50, "Weapon 4" },
{ 10000, 1 * 80 + 50, 5 * 5 + 5, 4 * 6 + 5, 4 * 100 + 50, "Weapon 5" },
{ 0, 0, 0, 0, 0, "" }
};
std::vector<Weapon*> buildWeaponsList (void) {
std::vector<Weapon*> weapons;
for (WeaponParams *wp = WEAPON_PARAMS;
wp->age || wp->speed || wp->recoil || wp->explosionRadius || wp->reloadTime;
wp++) {
weapons.push_back(new Weapon(wp->age, wp->speed, wp->recoil, wp->explosionRadius, wp->reloadTime, wp->name));
}
return weapons;
}