[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>
|
||||
</general>
|
||||
<specific type="16">
|
||||
<rumble>30</rumble>
|
||||
<thrust_perc>100</thrust_perc>
|
||||
<thrust_abs>50</thrust_abs>
|
||||
<speed_perc>50</speed_perc>
|
||||
@ -272,6 +273,7 @@
|
||||
<gfx_store>afterburner</gfx_store>
|
||||
</general>
|
||||
<specific type="16">
|
||||
<rumble>50</rumble>
|
||||
<thrust_perc>185</thrust_perc>
|
||||
<thrust_abs>100</thrust_abs>
|
||||
<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.;
|
||||
|
||||
do {
|
||||
xmlr_float(node, "rumble", tmp->u.afb.rumble);
|
||||
if(xml_isNode(node, "thrust_perc"))
|
||||
tmp->u.afb.thrust_perc = 1. + xml_getFloat(node)/100.;
|
||||
else if(xml_isNode(node, "thrust_abs"))
|
||||
tmp->u.afb.thrust_abs = xml_getFloat(node);
|
||||
else if(xml_isNode(node, "speed_perc"))
|
||||
xmlr_float(node, "thrust_abs", tmp->u.afb.thrust_abs);
|
||||
if(xml_isNode(node, "speed_perc"))
|
||||
tmp->u.afb.speed_perc = 1. + xml_getFloat(node)/100.;
|
||||
else if(xml_isNode(node, "speed_abs"))
|
||||
tmp->u.afb.speed_abs = xml_getFloat(node);
|
||||
else if(xml_isNode(node, "energy"))
|
||||
tmp->u.afb.energy = xml_getFloat(node);
|
||||
xmlr_float(node, "speed_abs", tmp->u.afb.speed_abs);
|
||||
xmlr_float(node, "energy", tmp->u.afb.energy);
|
||||
} while((node = node->next));
|
||||
}
|
||||
|
||||
|
@ -96,6 +96,7 @@ typedef struct Outfit_ {
|
||||
int cargo; // Cargo space to add.
|
||||
} mod;
|
||||
struct { // Afterburner.
|
||||
double rumble; // Percent of rumble.
|
||||
double thrust_perc, thrust_abs; // Percent and absolute thrust bonus.
|
||||
double speed_perc, speed_abs; // Percent and absolute speed bonus.
|
||||
double energy; // Energy used while active.
|
||||
|
@ -1305,7 +1305,7 @@ void player_afterburn(void) {
|
||||
if(player->afterburner != NULL) {
|
||||
player_setFlag(PLAYER_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