[Add] Beam weapons now use delay and duration.
This commit is contained in:
parent
7030d97402
commit
06ea30d96e
10
src/outfit.c
10
src/outfit.c
@ -564,9 +564,11 @@ static void outfit_parseSBeam(Outfit* tmp, const xmlNodePtr parent) {
|
||||
|
||||
node = parent->xmlChildrenNode;
|
||||
do { /* Load all the data. */
|
||||
xmlr_float(node, "range", tmp->u.bem.range);
|
||||
xmlr_float(node, "turn", tmp->u.bem.turn);
|
||||
xmlr_float(node, "energy", tmp->u.bem.energy);
|
||||
xmlr_float(node, "range", tmp->u.bem.range);
|
||||
xmlr_float(node, "turn", tmp->u.bem.turn);
|
||||
xmlr_float(node, "energy", tmp->u.bem.energy);
|
||||
xmlr_long(node, "delay", tmp->u.bem.delay);
|
||||
xmlr_long(node, "duration", tmp->u.bem.duration);
|
||||
|
||||
if(xml_isNode(node, "damage"))
|
||||
outfit_parseDamage(&tmp->u.bem.dtype, &tmp->u.bem.damage, node);
|
||||
@ -575,6 +577,8 @@ static void outfit_parseSBeam(Outfit* tmp, const xmlNodePtr parent) {
|
||||
tmp->u.bem.colour = &cWhite; /** @todo Make it loadable. */
|
||||
|
||||
#define MELEMENT(o,s) if(0) WARN("Outfit '%s' missing/invalid '"s"' element", tmp->name)
|
||||
MELEMENT(tmp->u.bem.delay==0, "range");
|
||||
MELEMENT(tmp->u.bem.duration==0, "duration");
|
||||
MELEMENT(tmp->u.bem.range==0, "range");
|
||||
MELEMENT(tmp->u.bem.turn==0, "turn");
|
||||
MELEMENT(tmp->u.bem.energy==0, "energy");
|
||||
|
15
src/outfit.h
15
src/outfit.h
@ -63,13 +63,14 @@ typedef struct OutfitBoltData_ {
|
||||
* @brief Represents the particular properties of a beam weapon.
|
||||
*/
|
||||
typedef struct OutfitBeamData_ {
|
||||
unsigned int delay; /**< Delay between usage. */
|
||||
double range; /**< How far it goes. */
|
||||
double turn; /**< How fast it can turn. Only for turrets. */
|
||||
glColour* colour; /**< Beam colour. */
|
||||
double energy; /**< Amount of energy it drains (per second). */
|
||||
DamageType dtype; /**< Damage type. */
|
||||
double damage; /**< Damage amount. */
|
||||
unsigned int delay; /**< Delay between usage. */
|
||||
unsigned int duration; /**< How long the beam lasts active. */
|
||||
double range; /**< How far it goes. */
|
||||
double turn; /**< How fast it can turn. Only for turrets. */
|
||||
glColour* colour; /**< Beam colour. */
|
||||
double energy; /**< Amount of energy it drains (per second). */
|
||||
DamageType dtype; /**< Damage type. */
|
||||
double damage; /**< Damage amount. */
|
||||
} OutfitBeamData;
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user