diff --git a/dat/outfit.xml b/dat/outfit.xml index cb0a603..2aa1455 100644 --- a/dat/outfit.xml +++ b/dat/outfit.xml @@ -255,6 +255,7 @@ afterburner + 30 100 50 50 @@ -272,6 +273,7 @@ afterburner + 50 185 100 85 diff --git a/src/outfit.c b/src/outfit.c index d0c9d71..0965313 100644 --- a/src/outfit.c +++ b/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)); } diff --git a/src/outfit.h b/src/outfit.h index 3a9a8a6..d9d2c88 100644 --- a/src/outfit.h +++ b/src/outfit.h @@ -96,9 +96,10 @@ typedef struct Outfit_ { int cargo; // Cargo space to add. } mod; struct { // Afterburner. - 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. + 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. } afb; } u; } Outfit; diff --git a/src/player.c b/src/player.c index fcf3710..2838823 100644 --- a/src/player.c +++ b/src/player.c @@ -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); } }