From 9e1afc89eee47db03df65d541da6f64b69181184 Mon Sep 17 00:00:00 2001 From: samuncle Date: Sun, 22 Jan 2017 23:20:07 -0500 Subject: [PATCH] Add a permanant exhaust to the kart, tweaking needed --- data/gfx/kart_exhaust.xml | 33 +++++++++++++++++++++++++++++++++ src/karts/kart_gfx.cpp | 8 ++++++++ src/karts/kart_gfx.hpp | 2 ++ 3 files changed, 43 insertions(+) create mode 100644 data/gfx/kart_exhaust.xml diff --git a/data/gfx/kart_exhaust.xml b/data/gfx/kart_exhaust.xml new file mode 100644 index 000000000..32dd35fc7 --- /dev/null +++ b/data/gfx/kart_exhaust.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/karts/kart_gfx.cpp b/src/karts/kart_gfx.cpp index 59d5ceffe..00b04d56c 100644 --- a/src/karts/kart_gfx.cpp +++ b/src/karts/kart_gfx.cpp @@ -138,6 +138,10 @@ KartGFX::KartGFX(const AbstractKart *kart, RaceManager::KartType type, bool is_d addEffect(KGFX_NITRO2, "nitro.xml", rear_nitro_left, true ); addEffect(KGFX_NITROSMOKE1, "nitro-smoke.xml", rear_nitro_left, false); addEffect(KGFX_NITROSMOKE2, "nitro-smoke.xml", rear_nitro_right, false); + + addEffect(KGFX_EXHAUST1, "kart_exhaust.xml",rear_nitro_right, false ); + addEffect(KGFX_EXHAUST2, "kart_exhaust.xml",rear_nitro_left, false ); + addEffect(KGFX_ZIPPER, "zipper_fire.xml", rear_center, true ); addEffect(KGFX_TERRAIN, "smoke.xml", Vec3(0, 0, 0), false); addEffect(KGFX_SKID1L, "skid1.xml", rear_left, true ); @@ -436,6 +440,10 @@ void KartGFX::updateNitroGraphics(float nitro_frac) setCreationRateAbsolute(KartGFX::KGFX_NITROSMOKE2, 0); m_nitro_light->setVisible(false); } + + // Exhaust is always emitting + setCreationRateRelative(KartGFX::KGFX_EXHAUST1, 1.0); + setCreationRateRelative(KartGFX::KGFX_EXHAUST2, 1.0); #endif } // updateGraphics diff --git a/src/karts/kart_gfx.hpp b/src/karts/kart_gfx.hpp index efabccac5..68f92d336 100644 --- a/src/karts/kart_gfx.hpp +++ b/src/karts/kart_gfx.hpp @@ -50,6 +50,8 @@ public: KGFX_NITRO2, KGFX_NITROSMOKE1, KGFX_NITROSMOKE2, + KGFX_EXHAUST1, + KGFX_EXHAUST2, KGFX_ZIPPER, KGFX_TERRAIN, KGFX_SKIDL,