[Change] Rumble of the afterburners are now stored in outift.xml
This commit is contained in:
parent
c7deebc62c
commit
9eae9cf71c
@ -255,6 +255,7 @@
|
|||||||
<gfx_store>afterburner</gfx_store>
|
<gfx_store>afterburner</gfx_store>
|
||||||
</general>
|
</general>
|
||||||
<specific type="16">
|
<specific type="16">
|
||||||
|
<rumble>30</rumble>
|
||||||
<thrust_perc>100</thrust_perc>
|
<thrust_perc>100</thrust_perc>
|
||||||
<thrust_abs>50</thrust_abs>
|
<thrust_abs>50</thrust_abs>
|
||||||
<speed_perc>50</speed_perc>
|
<speed_perc>50</speed_perc>
|
||||||
@ -272,6 +273,7 @@
|
|||||||
<gfx_store>afterburner</gfx_store>
|
<gfx_store>afterburner</gfx_store>
|
||||||
</general>
|
</general>
|
||||||
<specific type="16">
|
<specific type="16">
|
||||||
|
<rumble>50</rumble>
|
||||||
<thrust_perc>185</thrust_perc>
|
<thrust_perc>185</thrust_perc>
|
||||||
<thrust_abs>100</thrust_abs>
|
<thrust_abs>100</thrust_abs>
|
||||||
<speed_perc>85</speed_perc>
|
<speed_perc>85</speed_perc>
|
||||||
|
12
src/outfit.c
12
src/outfit.c
@ -339,16 +339,14 @@ static void outfit_parseSAfterburner(Outfit* tmp, const xmlNodePtr parent) {
|
|||||||
tmp->u.afb.speed_perc = 1.;
|
tmp->u.afb.speed_perc = 1.;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
|
xmlr_float(node, "rumble", tmp->u.afb.rumble);
|
||||||
if(xml_isNode(node, "thrust_perc"))
|
if(xml_isNode(node, "thrust_perc"))
|
||||||
tmp->u.afb.thrust_perc = 1. + xml_getFloat(node)/100.;
|
tmp->u.afb.thrust_perc = 1. + xml_getFloat(node)/100.;
|
||||||
else if(xml_isNode(node, "thrust_abs"))
|
xmlr_float(node, "thrust_abs", tmp->u.afb.thrust_abs);
|
||||||
tmp->u.afb.thrust_abs = xml_getFloat(node);
|
if(xml_isNode(node, "speed_perc"))
|
||||||
else if(xml_isNode(node, "speed_perc"))
|
|
||||||
tmp->u.afb.speed_perc = 1. + xml_getFloat(node)/100.;
|
tmp->u.afb.speed_perc = 1. + xml_getFloat(node)/100.;
|
||||||
else if(xml_isNode(node, "speed_abs"))
|
xmlr_float(node, "speed_abs", tmp->u.afb.speed_abs);
|
||||||
tmp->u.afb.speed_abs = xml_getFloat(node);
|
xmlr_float(node, "energy", tmp->u.afb.energy);
|
||||||
else if(xml_isNode(node, "energy"))
|
|
||||||
tmp->u.afb.energy = xml_getFloat(node);
|
|
||||||
} while((node = node->next));
|
} while((node = node->next));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -96,9 +96,10 @@ typedef struct Outfit_ {
|
|||||||
int cargo; // Cargo space to add.
|
int cargo; // Cargo space to add.
|
||||||
} mod;
|
} mod;
|
||||||
struct { // Afterburner.
|
struct { // Afterburner.
|
||||||
double thrust_perc, thrust_abs; // Percent and absolute thrust bonus.
|
double rumble; // Percent of rumble.
|
||||||
double speed_perc, speed_abs; // Percent and absolute speed bonus.
|
double thrust_perc, thrust_abs; // Percent and absolute thrust bonus.
|
||||||
double energy; // Energy used while active.
|
double speed_perc, speed_abs; // Percent and absolute speed bonus.
|
||||||
|
double energy; // Energy used while active.
|
||||||
} afb;
|
} afb;
|
||||||
} u;
|
} u;
|
||||||
} Outfit;
|
} Outfit;
|
||||||
|
@ -1305,7 +1305,7 @@ void player_afterburn(void) {
|
|||||||
if(player->afterburner != NULL) {
|
if(player->afterburner != NULL) {
|
||||||
player_setFlag(PLAYER_AFTERBURNER);
|
player_setFlag(PLAYER_AFTERBURNER);
|
||||||
pilot_setFlag(player, PILOT_AFTERBURNER);
|
pilot_setFlag(player, PILOT_AFTERBURNER);
|
||||||
spfx_shake(50.);
|
spfx_shake(player->afterburner->outfit->u.afb.rumble * SHAKE_MAX);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user