8 int damage; |
8 int damage; |
9 float explosionRadius; |
9 float explosionRadius; |
10 float radius; |
10 float radius; |
11 TickCount reloadTime; |
11 TickCount reloadTime; |
12 float bounce; |
12 float bounce; |
|
13 float mass; |
13 std::string name; |
14 std::string name; |
14 } WEAPON_PARAMS[] = { |
15 } WEAPON_PARAMS[] = { |
15 /* age speed recoil damage expRadius radius reloadTime bounce name */ |
16 /* age speed recoil damage expRadius radius reloadTime bounce mass name */ |
16 { 10000, 5 * 80 + 50, 0 * 5 + 10000, 1, 0 * 6 + 5, 1, 0 * 100 + 50, 0.00, "Weapon 1" }, |
17 { 10000, 5 * 80 + 50, 0 * 5 + 10000, 1, 0 * 6 + 5, 1, 0 * 100 + 50, 0.00, 10.0, "Weapon 1" }, |
17 { 10000, 4 * 80 + 50, 2 * 5 + 5, 2, 1 * 6 + 5, 2, 1 * 100 + 50, 0.00, "Weapon 2" }, |
18 { 10000, 4 * 80 + 50, 2 * 5 + 5, 2, 1 * 6 + 5, 2, 1 * 100 + 50, 0.00, 10.0, "Weapon 2" }, |
18 { 10000, 3 * 80 + 50, 3 * 5 + 5, 3, 2 * 6 + 5, 3, 2 * 100 + 50, 0.00, "Weapon 3" }, |
19 { 10000, 3 * 80 + 50, 3 * 5 + 5, 3, 2 * 6 + 5, 3, 2 * 100 + 50, 0.00, 10.0, "Weapon 3" }, |
19 { 10000, 2 * 80 + 50, 4 * 5 + 5, 5, 3 * 6 + 5, 4, 3 * 100 + 50, 0.00, "Weapon 4" }, |
20 { 10000, 2 * 80 + 50, 4 * 5 + 5, 5, 3 * 6 + 5, 4, 3 * 100 + 50, 0.00, 10.0, "Weapon 4" }, |
20 { 10000, 1 * 80 + 50, 5 * 5 + 5, 8, 4 * 6 + 5, 5, 4 * 100 + 50, 0.00, "Weapon 5" }, |
21 { 10000, 1 * 80 + 50, 5 * 5 + 5, 8, 4 * 6 + 5, 5, 4 * 100 + 50, 0.00, 10.0, "Weapon 5" }, |
21 { 1000, 600, 999000, 13, 100, 10, 1000, 1.05, "BounceBounce" }, |
22 { 1000, 600, 999000, 13, 100, 10, 1000, 1.05, 10.0, "BounceBounce" }, |
22 { 0, 0, 0, 0, 0, 0, 0, 0.00, "" } |
23 { 1000, 400, 100000, 0, 250, 10, 1200, 0.00, 10.0, "DigDig" }, |
|
24 { 0, 0, 0, 0, 0, 0, 0, 0.00, 10.0, "" } |
23 }; |
25 }; |
24 |
26 |
25 std::vector<Weapon*> buildWeaponsList (void) { |
27 std::vector<Weapon*> buildWeaponsList (void) { |
26 std::vector<Weapon*> weapons; |
28 std::vector<Weapon*> weapons; |
27 int idx = 0; |
29 int idx = 0; |
28 |
30 |
29 for (WeaponParams *wp = WEAPON_PARAMS; |
31 for (WeaponParams *wp = WEAPON_PARAMS; |
30 wp->age || wp->speed || wp->recoil || wp->damage || wp->explosionRadius || wp->radius || wp->bounce || wp->reloadTime; |
32 wp->age || wp->speed || wp->recoil || wp->damage || wp->explosionRadius || wp->radius || wp->bounce || wp->reloadTime; |
31 wp++, idx++) { |
33 wp++, idx++ |
32 weapons.push_back(new Weapon(idx, wp->age, wp->speed, wp->recoil, wp->damage, wp->explosionRadius, wp->radius, wp->reloadTime, wp->name, wp->bounce)); |
34 ) { |
|
35 weapons.push_back(new Weapon(idx, |
|
36 wp->age, wp->speed, wp->recoil, wp->damage, wp->explosionRadius, wp->radius, |
|
37 wp->reloadTime, wp->name, wp->bounce, wp->mass |
|
38 )); |
33 } |
39 } |
34 |
40 |
35 return weapons; |
41 return weapons; |
36 } |
42 } |
37 |
43 |