[Change] Moved from damage_armour and co, to just damage and damagetype.
This commit is contained in:
parent
493f67691e
commit
65e25f6ce0
@ -18,10 +18,7 @@
|
|||||||
<range>300</range>
|
<range>300</range>
|
||||||
<accuracy>1</accuracy>
|
<accuracy>1</accuracy>
|
||||||
<energy>8</energy>
|
<energy>8</energy>
|
||||||
<damage>
|
<damage type="energy">10</damage>
|
||||||
<armour>10</armour>
|
|
||||||
<shield>13</shield>
|
|
||||||
</damage>
|
|
||||||
</specific>
|
</specific>
|
||||||
</outfit>
|
</outfit>
|
||||||
<outfit name="Laser Turret">
|
<outfit name="Laser Turret">
|
||||||
@ -42,10 +39,7 @@
|
|||||||
<range>300</range>
|
<range>300</range>
|
||||||
<accuracy>30</accuracy>
|
<accuracy>30</accuracy>
|
||||||
<energy>10</energy>
|
<energy>10</energy>
|
||||||
<damage>
|
<damage type="energy">10</damage>
|
||||||
<armour>13</armour>
|
|
||||||
<shield>10</shield>
|
|
||||||
</damage>
|
|
||||||
</specific>
|
</specific>
|
||||||
</outfit>
|
</outfit>
|
||||||
<outfit name="Railgun">
|
<outfit name="Railgun">
|
||||||
@ -66,10 +60,7 @@
|
|||||||
<range>500</range>
|
<range>500</range>
|
||||||
<accuracy>10</accuracy>
|
<accuracy>10</accuracy>
|
||||||
<energy>30</energy>
|
<energy>30</energy>
|
||||||
<damage>
|
<damage type="kinetic">30</damage>
|
||||||
<armour>35</armour>
|
|
||||||
<shield>30</shield>
|
|
||||||
</damage>
|
|
||||||
</specific>
|
</specific>
|
||||||
</outfit>
|
</outfit>
|
||||||
<outfit name="Missile Launcher">
|
<outfit name="Missile Launcher">
|
||||||
@ -104,10 +95,7 @@
|
|||||||
<thrust>1600</thrust>
|
<thrust>1600</thrust>
|
||||||
<turn>200</turn>
|
<turn>200</turn>
|
||||||
<speed>800</speed>
|
<speed>800</speed>
|
||||||
<damage>
|
<damage type="kinetic">20</damage>
|
||||||
<armour>25</armour>
|
|
||||||
<shield>20</shield>
|
|
||||||
</damage>
|
|
||||||
</specific>
|
</specific>
|
||||||
</outfit>
|
</outfit>
|
||||||
<outfit name="Headhunter Launcher">
|
<outfit name="Headhunter Launcher">
|
||||||
@ -142,10 +130,7 @@
|
|||||||
<thrust>1300</thrust>
|
<thrust>1300</thrust>
|
||||||
<turn>200</turn>
|
<turn>200</turn>
|
||||||
<speed>650</speed>
|
<speed>650</speed>
|
||||||
<damage>
|
<damage type="kinetic">20</damage>
|
||||||
<armour>23</armour>
|
|
||||||
<shield>18</shield>
|
|
||||||
</damage>
|
|
||||||
</specific>
|
</specific>
|
||||||
</outfit>
|
</outfit>
|
||||||
<outfit name="Neutron Disruptor">
|
<outfit name="Neutron Disruptor">
|
||||||
@ -166,10 +151,7 @@
|
|||||||
<range>200</range>
|
<range>200</range>
|
||||||
<accuracy>15</accuracy>
|
<accuracy>15</accuracy>
|
||||||
<energy>5</energy>
|
<energy>5</energy>
|
||||||
<damage>
|
<damage type="energy">7</damage>
|
||||||
<armour>7</armour>
|
|
||||||
<shield>7</shield>
|
|
||||||
</damage>
|
|
||||||
</specific>
|
</specific>
|
||||||
</outfit>
|
</outfit>
|
||||||
<outfit name="Battery">
|
<outfit name="Battery">
|
||||||
|
100
src/outfit.c
100
src/outfit.c
@ -24,6 +24,10 @@ extern SDL_mutex* sound_lock; // Sound.c
|
|||||||
static Outfit* outfit_stack = NULL;
|
static Outfit* outfit_stack = NULL;
|
||||||
static int outfits = 0;
|
static int outfits = 0;
|
||||||
|
|
||||||
|
// Misc.
|
||||||
|
static DamageType outfit_strToDamageType(char* buf);
|
||||||
|
// Parsing.
|
||||||
|
static int outfit_parseDamage(DamageType* dtype, double* dmg, xmlNodePtr node);
|
||||||
static Outfit* outfit_parse(const xmlNodePtr parent);
|
static Outfit* outfit_parse(const xmlNodePtr parent);
|
||||||
static void outfit_parseSWeapon(Outfit* tmp, const xmlNodePtr parent);
|
static void outfit_parseSWeapon(Outfit* tmp, const xmlNodePtr parent);
|
||||||
static void outfit_parseSLauncher(Outfit* tmp, const xmlNodePtr parent);
|
static void outfit_parseSLauncher(Outfit* tmp, const xmlNodePtr parent);
|
||||||
@ -62,6 +66,24 @@ char** outfit_getTech(int* n, const int* tech, const int techmax) {
|
|||||||
return outfitnames;
|
return outfitnames;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void outfit_calcDamage(double* dshield, double* darmour,
|
||||||
|
DamageType dtype, double dmg) {
|
||||||
|
|
||||||
|
switch(dtype) {
|
||||||
|
case DAMAGE_TYPE_ENERGY:
|
||||||
|
(*dshield) = dmg*1.1;
|
||||||
|
(*darmour) = dmg*0.7;
|
||||||
|
break;
|
||||||
|
case DAMAGE_TYPE_KINETIC:
|
||||||
|
(*dshield) = dmg*0.8;
|
||||||
|
(*darmour) = dmg*1.2;
|
||||||
|
break;
|
||||||
|
defualt:
|
||||||
|
(*dshield) = (*darmour) = 0.;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Return 1 if outfit is a weapon (beam/bolt).
|
// Return 1 if outfit is a weapon (beam/bolt).
|
||||||
int outfit_isWeapon(const Outfit* o) {
|
int outfit_isWeapon(const Outfit* o) {
|
||||||
return ((o->type == OUTFIT_TYPE_BOLT) || (o->type == OUTFIT_TYPE_BEAM));
|
return ((o->type == OUTFIT_TYPE_BOLT) || (o->type == OUTFIT_TYPE_BEAM));
|
||||||
@ -117,18 +139,18 @@ int outfit_spfx(const Outfit* o) {
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
double outfit_dmgShield(const Outfit* o) {
|
double outfit_damage(const Outfit* o) {
|
||||||
if(outfit_isWeapon(o)) return o->u.blt.damage_armour;
|
if(outfit_isWeapon(o)) return o->u.blt.damage;
|
||||||
else if(outfit_isAmmo(o)) return o->u.amm.damage_armour;
|
else if(outfit_isAmmo(o)) return o->u.amm.damage;
|
||||||
else if(outfit_isTurret(o)) return o->u.blt.damage_armour;
|
else if(outfit_isTurret(o)) return o->u.blt.damage;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
double outfit_dmgArmour(const Outfit* o) {
|
DamageType outfit_damageType(const Outfit* o) {
|
||||||
if(outfit_isWeapon(o)) return o->u.blt.damage_shield;
|
if(outfit_isWeapon(o)) return o->u.blt.dtype;
|
||||||
else if(outfit_isAmmo(o)) return o->u.amm.damage_shield;
|
else if(outfit_isAmmo(o)) return o->u.amm.dtype;
|
||||||
else if(outfit_isTurret(o)) return o->u.blt.damage_shield;
|
else if(outfit_isTurret(o)) return o->u.blt.dtype;
|
||||||
return -1;
|
return DAMAGE_TYPE_NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
int outfit_delay(const Outfit* o) {
|
int outfit_delay(const Outfit* o) {
|
||||||
@ -192,13 +214,39 @@ const char* outfit_getTypeBroad(const Outfit* o) {
|
|||||||
return outfit_typenamebroad[i];
|
return outfit_typenamebroad[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Return the damage type from a str.
|
||||||
|
static DamageType outfit_strToDamageType(char* buf) {
|
||||||
|
if(strcmp(buf, "energy")==0) return DAMAGE_TYPE_ENERGY;
|
||||||
|
else if(strcmp(buf, "kinetic")==0) return DAMAGE_TYPE_KINETIC;
|
||||||
|
|
||||||
|
WARN("Invalid damage type: '%s'", buf);
|
||||||
|
return DAMAGE_TYPE_NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int outfit_parseDamage(DamageType* dtype, double* dmg, xmlNodePtr node) {
|
||||||
|
char* buf;
|
||||||
|
|
||||||
|
if(xml_isNode(node, "damage")) {
|
||||||
|
xmlr_attr(node, "type", buf);
|
||||||
|
(*dtype) = outfit_strToDamageType(buf);
|
||||||
|
if(buf) free(buf);
|
||||||
|
(*dmg) = xml_getFloat(node);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
(*dtype) = DAMAGE_TYPE_NULL;
|
||||||
|
(*dmg) = 0;
|
||||||
|
WARN("Trying to parse non-damage node as damage node!");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
// Parses the specific area for a weapon and loads it into outfit.
|
// Parses the specific area for a weapon and loads it into outfit.
|
||||||
static void outfit_parseSWeapon(Outfit* tmp, const xmlNodePtr parent) {
|
static void outfit_parseSWeapon(Outfit* tmp, const xmlNodePtr parent) {
|
||||||
xmlNodePtr cur, node;
|
xmlNodePtr node;
|
||||||
node = parent->xmlChildrenNode;
|
|
||||||
|
|
||||||
char str[PATH_MAX] = "\0";
|
char str[PATH_MAX] = "\0";
|
||||||
|
|
||||||
|
node = parent->xmlChildrenNode;
|
||||||
do {
|
do {
|
||||||
// Load all the things.
|
// Load all the things.
|
||||||
xmlr_float(node, "speed", tmp->u.blt.speed);
|
xmlr_float(node, "speed", tmp->u.blt.speed);
|
||||||
@ -216,25 +264,19 @@ static void outfit_parseSWeapon(Outfit* tmp, const xmlNodePtr parent) {
|
|||||||
tmp->u.blt.spfx = spfx_get(xml_get(node));
|
tmp->u.blt.spfx = spfx_get(xml_get(node));
|
||||||
else if(xml_isNode(node, "sound"))
|
else if(xml_isNode(node, "sound"))
|
||||||
tmp->u.blt.sound = sound_get(xml_get(node));
|
tmp->u.blt.sound = sound_get(xml_get(node));
|
||||||
else if(xml_isNode(node, "damage")) {
|
else if(xml_isNode(node, "damage"))
|
||||||
cur = node->children;
|
outfit_parseDamage(&tmp->u.blt.dtype, &tmp->u.blt.damage, node);
|
||||||
do {
|
|
||||||
xmlr_float(cur, "armour", tmp->u.blt.damage_armour);
|
|
||||||
xmlr_float(cur, "shield", tmp->u.blt.damage_shield);
|
|
||||||
} while((cur = cur->next));
|
|
||||||
}
|
|
||||||
} while((node = node->next));
|
} while((node = node->next));
|
||||||
#define MELEMENT(o,s) if((o) == 0) \
|
#define MELEMENT(o,s) if((o) == 0) \
|
||||||
WARN("Outfit '%s' missing '"s"' element", tmp->name)
|
WARN("Outfit '%s' missing '"s"' element", tmp->name)
|
||||||
if(tmp->u.blt.gfx_space == NULL)
|
if(tmp->u.blt.gfx_space == NULL)
|
||||||
WARN("Outfit '%s' missing 'gfx' element", tmp->name);
|
WARN("Outfit '%s' missing 'gfx' element", tmp->name);
|
||||||
MELEMENT(tmp->u.blt.sound, "sound");
|
MELEMENT(tmp->u.blt.sound, "sound");
|
||||||
MELEMENT(tmp->u.blt.delay, "delay");
|
MELEMENT(tmp->u.blt.delay, "delay");
|
||||||
MELEMENT(tmp->u.blt.speed, "speed");
|
MELEMENT(tmp->u.blt.speed, "speed");
|
||||||
MELEMENT(tmp->u.blt.range, "range");
|
MELEMENT(tmp->u.blt.range, "range");
|
||||||
MELEMENT(tmp->u.blt.accuracy, "accuracy");
|
MELEMENT(tmp->u.blt.accuracy, "accuracy");
|
||||||
MELEMENT(tmp->u.blt.damage_armour, "armour' from element 'damage");
|
MELEMENT(tmp->u.blt.damage==0, "damage");
|
||||||
MELEMENT(tmp->u.blt.damage_shield, "shield' from element 'damage");
|
|
||||||
#undef MELEMENT
|
#undef MELEMENT
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -257,7 +299,7 @@ static void outfit_parseSLauncher(Outfit* tmp, const xmlNodePtr parent) {
|
|||||||
|
|
||||||
// Parse the specific area for a weapon and load it into Outfit.
|
// Parse the specific area for a weapon and load it into Outfit.
|
||||||
static void outfit_parseSAmmo(Outfit* tmp, const xmlNodePtr parent) {
|
static void outfit_parseSAmmo(Outfit* tmp, const xmlNodePtr parent) {
|
||||||
xmlNodePtr cur, node;
|
xmlNodePtr node;
|
||||||
node = parent->xmlChildrenNode;
|
node = parent->xmlChildrenNode;
|
||||||
|
|
||||||
char str[PATH_MAX] = "\0";
|
char str[PATH_MAX] = "\0";
|
||||||
@ -280,13 +322,8 @@ static void outfit_parseSAmmo(Outfit* tmp, const xmlNodePtr parent) {
|
|||||||
tmp->u.amm.spfx = spfx_get(xml_get(node));
|
tmp->u.amm.spfx = spfx_get(xml_get(node));
|
||||||
else if(xml_isNode(node, "sound"))
|
else if(xml_isNode(node, "sound"))
|
||||||
tmp->u.amm.sound = sound_get(xml_get(node));
|
tmp->u.amm.sound = sound_get(xml_get(node));
|
||||||
else if(xml_isNode(node, "damage")) {
|
else if(xml_isNode(node, "damage"))
|
||||||
cur = node->children;
|
outfit_parseDamage(&tmp->u.amm.dtype, &tmp->u.amm.damage, node);
|
||||||
do {
|
|
||||||
xmlr_float(cur, "armour", tmp->u.amm.damage_armour);
|
|
||||||
xmlr_float(cur, "shield", tmp->u.amm.damage_shield);
|
|
||||||
} while((cur = cur->next));
|
|
||||||
}
|
|
||||||
} while((node = node->next));
|
} while((node = node->next));
|
||||||
#define MELEMENT(o,s) if(o) WARN("Outfit '%s' missing '"s"' element", tmp->name)
|
#define MELEMENT(o,s) if(o) WARN("Outfit '%s' missing '"s"' element", tmp->name)
|
||||||
MELEMENT(tmp->u.amm.gfx_space == NULL, "gfx");
|
MELEMENT(tmp->u.amm.gfx_space == NULL, "gfx");
|
||||||
@ -296,8 +333,7 @@ static void outfit_parseSAmmo(Outfit* tmp, const xmlNodePtr parent) {
|
|||||||
MELEMENT(tmp->u.amm.speed==0, "speed");
|
MELEMENT(tmp->u.amm.speed==0, "speed");
|
||||||
MELEMENT(tmp->u.amm.duration==0, "duration");
|
MELEMENT(tmp->u.amm.duration==0, "duration");
|
||||||
MELEMENT(tmp->u.amm.lockon==0, "lockon");
|
MELEMENT(tmp->u.amm.lockon==0, "lockon");
|
||||||
MELEMENT(tmp->u.amm.damage_armour==0, "armour' from element 'damage");
|
MELEMENT(tmp->u.amm.damage==0, "damage");
|
||||||
MELEMENT(tmp->u.amm.damage_shield==0, "shield' from element 'damage");
|
|
||||||
#undef MELEMENT
|
#undef MELEMENT
|
||||||
}
|
}
|
||||||
|
|
||||||
|
51
src/outfit.h
51
src/outfit.h
@ -27,6 +27,13 @@ typedef enum OutfitType_ {
|
|||||||
OUTFIT_TYPE_AFTERBURNER = 16
|
OUTFIT_TYPE_AFTERBURNER = 16
|
||||||
} OutfitType;
|
} OutfitType;
|
||||||
|
|
||||||
|
typedef enum DamageType_ {
|
||||||
|
DAMAGE_TYPE_NULL = 0,
|
||||||
|
DAMAGE_TYPE_ENERGY = 1,
|
||||||
|
DAMAGE_TYPE_KINETIC = 2
|
||||||
|
|
||||||
|
} DamageType;
|
||||||
|
|
||||||
// An outfit depends a lot on the type.
|
// An outfit depends a lot on the type.
|
||||||
typedef struct Outfit_ {
|
typedef struct Outfit_ {
|
||||||
char* name;
|
char* name;
|
||||||
@ -49,20 +56,21 @@ typedef struct Outfit_ {
|
|||||||
union {
|
union {
|
||||||
struct { // Bolt.
|
struct { // Bolt.
|
||||||
unsigned int delay; // Delay between shots.
|
unsigned int delay; // Delay between shots.
|
||||||
double speed; // Speed of shot. (not applicable to beam.
|
double speed; // Speed of shot. (not applicable to beam.
|
||||||
double range;
|
double range;
|
||||||
double accuracy; // Desviation accuracy.
|
double accuracy; // Desviation accuracy.
|
||||||
double energy; // Energy usage.
|
double energy; // Energy usage.
|
||||||
double damage_armour, damage_shield; // Damage.
|
DamageType dtype; // Damage type.
|
||||||
|
double damage; // Damage.
|
||||||
|
|
||||||
glTexture* gfx_space;
|
glTexture* gfx_space;
|
||||||
ALuint sound; // Sound to play.
|
ALuint sound; // Sound to play.
|
||||||
int spfx; // Special effect on hit.
|
int spfx; // Special effect on hit.
|
||||||
} blt;
|
} blt;
|
||||||
struct { // Beam.
|
struct { // Beam.
|
||||||
double range; // Distance it travels.
|
double range; // Distance it travels.
|
||||||
glColour colour; // Beam colour.
|
glColour colour; // Beam colour.
|
||||||
double energy; // Energy drained.
|
double energy; // Energy drained.
|
||||||
double damage_armour, damage_shield; // Damage.
|
double damage_armour, damage_shield; // Damage.
|
||||||
} bem;
|
} bem;
|
||||||
struct { // Launcher.
|
struct { // Launcher.
|
||||||
@ -70,17 +78,18 @@ typedef struct Outfit_ {
|
|||||||
char* ammo;
|
char* ammo;
|
||||||
} lau;
|
} lau;
|
||||||
struct { // Ammo.
|
struct { // Ammo.
|
||||||
unsigned int duration; // Duration.
|
unsigned int duration; // Duration.
|
||||||
double speed; // Max speed.
|
double speed; // Max speed.
|
||||||
double turn; // Turn vel.
|
double turn; // Turn vel.
|
||||||
double thrust; // Acceleration.
|
double thrust; // Acceleration.
|
||||||
double energy; // Energy usage.
|
double energy; // Energy usage.
|
||||||
double damage_armour, damage_shield; // Damage.
|
DamageType dtype; // Damage type.
|
||||||
|
double damage; // Damage.
|
||||||
|
|
||||||
glTexture* gfx_space;
|
glTexture* gfx_space;
|
||||||
ALuint sound; // Sound to play.
|
ALuint sound; // Sound to play.
|
||||||
int spfx; // Special effect on hit.
|
int spfx; // Special effect on hit.
|
||||||
unsigned int lockon; // Time taken to lock on the target.
|
unsigned int lockon; // Time taken to lock on the target.
|
||||||
} amm;
|
} amm;
|
||||||
struct { // Modification.
|
struct { // Modification.
|
||||||
// Movement.
|
// Movement.
|
||||||
@ -104,6 +113,10 @@ typedef struct Outfit_ {
|
|||||||
} u;
|
} u;
|
||||||
} Outfit;
|
} Outfit;
|
||||||
|
|
||||||
|
// Misc.
|
||||||
|
void outfit_calcDamage(double* dshield, double* darmour,
|
||||||
|
DamageType dtype, double dmg);
|
||||||
|
|
||||||
// Get.
|
// Get.
|
||||||
Outfit* outfit_get(const char* name);
|
Outfit* outfit_get(const char* name);
|
||||||
char** outfit_getTech(int* n, const int* tech, const int techmax);
|
char** outfit_getTech(int* n, const int* tech, const int techmax);
|
||||||
@ -120,8 +133,8 @@ const char* outfit_getTypeBroad(const Outfit* o);
|
|||||||
// Get data from outfit.
|
// Get data from outfit.
|
||||||
glTexture* outfit_gfx(const Outfit* o);
|
glTexture* outfit_gfx(const Outfit* o);
|
||||||
int outfit_spfx(const Outfit* o);
|
int outfit_spfx(const Outfit* o);
|
||||||
double outfit_dmgShield(const Outfit* o);
|
double outfit_damage(const Outfit* o);
|
||||||
double outfit_dmgArmour(const Outfit* o);
|
DamageType outfit_damageType(const Outfit* o);
|
||||||
int outfit_delay(const Outfit* o);
|
int outfit_delay(const Outfit* o);
|
||||||
double outfit_energy(const Outfit* o);
|
double outfit_energy(const Outfit* o);
|
||||||
|
|
||||||
|
@ -242,9 +242,12 @@ static void pilot_shootWeapon(Pilot* p, PilotOutfit* w, const unsigned int t) {
|
|||||||
|
|
||||||
// Damage the pilot.
|
// Damage the pilot.
|
||||||
void pilot_hit(Pilot* p, const Solid* w, const unsigned int shooter,
|
void pilot_hit(Pilot* p, const Solid* w, const unsigned int shooter,
|
||||||
const double damage_shield, const double damage_armour) {
|
const DamageType dtype, const double damage) {
|
||||||
|
|
||||||
double dam_mod;
|
double damage_shield, damage_armour, dam_mod;
|
||||||
|
|
||||||
|
// Calculate the damage.
|
||||||
|
outfit_calcDamage(&damage_shield, &damage_armour, dtype, damage);
|
||||||
|
|
||||||
if(p->shield - damage_shield > 0.) {
|
if(p->shield - damage_shield > 0.) {
|
||||||
p->shield -= damage_shield;
|
p->shield -= damage_shield;
|
||||||
|
@ -145,7 +145,7 @@ int pilot_getJumps(const Pilot* p);
|
|||||||
// MISC.
|
// MISC.
|
||||||
void pilot_shoot(Pilot* p, const unsigned int target, const int secondary);
|
void pilot_shoot(Pilot* p, const unsigned int target, const int secondary);
|
||||||
void pilot_hit(Pilot* p, const Solid* w, const unsigned int shooter,
|
void pilot_hit(Pilot* p, const Solid* w, const unsigned int shooter,
|
||||||
const double damage_shield, const double damage_armour);
|
const DamageType dtype, const double damage);
|
||||||
void pilot_setSecondary(Pilot* p, const char* secondary);
|
void pilot_setSecondary(Pilot* p, const char* secondary);
|
||||||
void pilot_setAmmo(Pilot* p);
|
void pilot_setAmmo(Pilot* p);
|
||||||
double pilot_face(Pilot* p, const float dir);
|
double pilot_face(Pilot* p, const float dir);
|
||||||
|
@ -338,7 +338,8 @@ static void weapon_hit(Weapon* w, Pilot* p, WeaponLayer layer) {
|
|||||||
VX(p->solid->vel), VY(p->solid->vel), SPFX_LAYER_FRONT);
|
VX(p->solid->vel), VY(p->solid->vel), SPFX_LAYER_FRONT);
|
||||||
|
|
||||||
// Let the ship know that is should take some kind of damage.
|
// Let the ship know that is should take some kind of damage.
|
||||||
pilot_hit(p, w->solid, w->parent, outfit_dmgShield(w->outfit), outfit_dmgShield(w->outfit));
|
pilot_hit(p, w->solid, w->parent,
|
||||||
|
outfit_damageType(w->outfit), outfit_damage(w->outfit));
|
||||||
// We don't need the weapon particle any longer.
|
// We don't need the weapon particle any longer.
|
||||||
weapon_destroy(w, layer);
|
weapon_destroy(w, layer);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user