[Add] New Outfit. Also implemented dumb missiles.
This commit is contained in:
parent
cc437a51e6
commit
74c0297b02
@ -455,5 +455,38 @@
|
||||
<chance>40</chance>
|
||||
<energy>10</energy>
|
||||
</specific>
|
||||
</outfit>
|
||||
<outfit name="Mace Launcher">
|
||||
<general>
|
||||
<max>2</max>
|
||||
<tech>3</tech>
|
||||
<mass>10</mass>
|
||||
<price>19000</price>
|
||||
<description>A base for launching Draktharr Mace rockets.</description>
|
||||
<gfx_store>mace</gfx_store>
|
||||
</general>
|
||||
<specific type="missile dumb" secondary="1">
|
||||
<ammo>Mace Rocket</ammo>
|
||||
<delay>2000</delay>
|
||||
</specific>
|
||||
</outfit>
|
||||
<outfit name="Mace Rocket">
|
||||
<general>
|
||||
<max>40</max>
|
||||
<tech>2</tech>
|
||||
<mass>2</mass>
|
||||
<price>700</price>
|
||||
<description>The Mace rocket is a very heavy fast accelerating rocket designed for high speed collisions. The rockets doesn't have too much explosive, instead it has a lot of fuel for the acceleration it uses to combust. Most of the damage it does is from the impact and not the explosion though.</description>
|
||||
<gfx_store>mace</gfx_store>
|
||||
</general>
|
||||
<specific type="missile dumb ammo">
|
||||
<gfx>mace</gfx>
|
||||
<sound>missile</sound>
|
||||
<spfx>ExpM</spfx>
|
||||
<duration>5</duration>
|
||||
<thrust>600</thrust>
|
||||
<speed>1000</speed>
|
||||
<damage type="kinetic">35</damage>
|
||||
</specific>
|
||||
</outfit>
|
||||
</Outfits>
|
||||
|
@ -304,8 +304,7 @@
|
||||
<description>Constructed by many captured and then enslaved DLF armsmen. The design is pretty sturdy but you can't help to think there must be a hidden bomb somewhere, just waiting to go off and kill the Draktharr opressors.</description>
|
||||
<services>11</services>
|
||||
<tech>
|
||||
<main>0</main>
|
||||
<special>0</special>
|
||||
<main>6</main>
|
||||
</tech>
|
||||
<class>0</class>
|
||||
<faction>Draktharr</faction>
|
||||
|
BIN
gfx/outfit/space/mace.png
Normal file
BIN
gfx/outfit/space/mace.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 18 KiB |
BIN
gfx/outfit/store/mace.png
Normal file
BIN
gfx/outfit/store/mace.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 9.1 KiB |
@ -469,10 +469,13 @@ static void outfit_parseSAmmo(Outfit* tmp, const xmlNodePtr parent) {
|
||||
MELEMENT(tmp->u.amm.gfx_space == NULL, "gfx");
|
||||
MELEMENT((sound_disabled != NULL) && (tmp->u.amm.sound == 0), "sound");
|
||||
MELEMENT(tmp->u.amm.thrust==0, "thrust");
|
||||
/* Dumb missiles don't need everything. */
|
||||
if(tmp->type != OUTFIT_TYPE_MISSILE_DUMB_AMMO) {
|
||||
MELEMENT(tmp->u.amm.turn==0, "turn");
|
||||
MELEMENT(tmp->u.amm.lockon==0, "lockon");
|
||||
}
|
||||
MELEMENT(tmp->u.amm.speed==0, "speed");
|
||||
MELEMENT(tmp->u.amm.duration==0, "duration");
|
||||
MELEMENT(tmp->u.amm.lockon==0, "lockon");
|
||||
MELEMENT(tmp->u.amm.damage==0, "damage");
|
||||
#undef MELEMENT
|
||||
}
|
||||
|
18
src/weapon.c
18
src/weapon.c
@ -258,6 +258,7 @@ static void weapons_updateLayer(const double dt, const WeaponLayer layer) {
|
||||
/* Bolts too. */
|
||||
case OUTFIT_TYPE_BOLT:
|
||||
case OUTFIT_TYPE_TURRET_BOLT:
|
||||
case OUTFIT_TYPE_MISSILE_DUMB_AMMO: /* Dumb missiles are like bolts. */
|
||||
wlayer[i]->timer -= dt;
|
||||
if(wlayer[i]->timer < 0.) {
|
||||
weapon_destroy(wlayer[i],layer);
|
||||
@ -265,6 +266,8 @@ static void weapons_updateLayer(const double dt, const WeaponLayer layer) {
|
||||
}
|
||||
break;
|
||||
default:
|
||||
WARN("Weapon of type '%s' has no update implemented yet!",
|
||||
w->outfit->name);
|
||||
break;
|
||||
}
|
||||
weapon_update(wlayer[i], dt, layer);
|
||||
@ -457,8 +460,23 @@ static Weapon* weapon_create(const Outfit* outfit, const double dir, const Vec2*
|
||||
w->solid->pos.y + w->solid->vel.y);
|
||||
break;
|
||||
|
||||
/* Dumb missiles are a mix of missile and bolt. */
|
||||
case OUTFIT_TYPE_MISSILE_DUMB_AMMO:
|
||||
mass = w->outfit->mass;
|
||||
w->timer = outfit->u.amm.duration;
|
||||
w->solid = solid_create(mass, dir, pos, vel);
|
||||
vect_pset(&w->solid->force, w->outfit->u.amm.thrust, dir);
|
||||
w->think = NULL; /* No AI. */
|
||||
|
||||
sound_playPos(w->outfit->u.amm.sound,
|
||||
w->solid->pos.x + w->solid->vel.x,
|
||||
w->solid->pos.y + w->solid->vel.y);
|
||||
break;
|
||||
|
||||
/* Just dump it where the player is. */
|
||||
default:
|
||||
WARN("Weapon of type '%s' has no create implemented yet!",
|
||||
w->outfit->name);
|
||||
w->solid = solid_create(mass, dir, pos, vel);
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user