Made slipstream area wider (at the side that furthest
away from the kart), so that it's hopefully a bit easier to get slipstream. git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11765 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
@@ -321,6 +321,7 @@
|
||||
/>
|
||||
</ai>
|
||||
<!-- Slipstream: length: How far behind a kart slipstream works
|
||||
width: how wide slipstream works furthest away from the kart.
|
||||
collect-time: How many seconds of sstream give maximum benefit
|
||||
use-time: How long the benefit will last.
|
||||
add-power: Additional power due to sstreaming. 1 = +100%
|
||||
@@ -331,7 +332,7 @@
|
||||
working.
|
||||
fade-out-time: How long the slip stream speed increase will
|
||||
gradually be reduced. -->
|
||||
<slipstream length="10" collect-time="2" use-time="5"
|
||||
<slipstream length="10" width="5" collect-time="2" use-time="5"
|
||||
add-power="3" min-speed="10"
|
||||
max-speed-increase="5" duration="1" fade-out-time="2"/>
|
||||
|
||||
|
||||
@@ -70,12 +70,13 @@ SlipStream::SlipStream(AbstractKart* kart) : MovingTexture(0, 0), m_kart(kart)
|
||||
|
||||
float length = m_kart->getKartProperties()->getSlipstreamLength();
|
||||
float kw = m_kart->getKartWidth();
|
||||
float ew = m_kart->getKartProperties()->getSlipstreamWidth();
|
||||
float kl = m_kart->getKartLength();
|
||||
|
||||
Vec3 p[4];
|
||||
p[0]=Vec3(-kw*0.5f, 0, -kl*0.5f );
|
||||
p[1]=Vec3(-kw*0.5f, 0, -kl*0.5f-length);
|
||||
p[2]=Vec3( kw*0.5f, 0, -kl*0.5f-length);
|
||||
p[1]=Vec3(-ew*0.5f, 0, -kl*0.5f-length);
|
||||
p[2]=Vec3( ew*0.5f, 0, -kl*0.5f-length);
|
||||
p[3]=Vec3( kw*0.5f, 0, -kl*0.5f );
|
||||
m_slipstream_original_quad = new Quad(p[0], p[1], p[2], p[3]);
|
||||
m_slipstream_quad = new Quad(p[0], p[1], p[2], p[3]);
|
||||
|
||||
@@ -82,7 +82,7 @@ KartProperties::KartProperties(const std::string &filename)
|
||||
m_plunger_in_face_duration[1] = m_plunger_in_face_duration[2] =
|
||||
m_zipper_time = m_zipper_force = m_zipper_speed_gain =
|
||||
m_zipper_max_speed_increase = m_zipper_fade_out_time =
|
||||
m_slipstream_length = m_slipstream_collect_time =
|
||||
m_slipstream_length = m_slipstream_width = m_slipstream_collect_time =
|
||||
m_slipstream_use_time = m_slipstream_add_power =
|
||||
m_slipstream_min_speed = m_slipstream_max_speed_increase =
|
||||
m_slipstream_duration = m_slipstream_fade_out_time =
|
||||
@@ -335,6 +335,7 @@ void KartProperties::getAllData(const XMLNode * root)
|
||||
if(const XMLNode *slipstream_node = root->getNode("slipstream"))
|
||||
{
|
||||
slipstream_node->get("length", &m_slipstream_length );
|
||||
slipstream_node->get("width", &m_slipstream_width );
|
||||
slipstream_node->get("collect-time", &m_slipstream_collect_time );
|
||||
slipstream_node->get("use-time", &m_slipstream_use_time );
|
||||
slipstream_node->get("add-power", &m_slipstream_add_power );
|
||||
@@ -628,6 +629,7 @@ void KartProperties::checkAllSet(const std::string &filename)
|
||||
CHECK_NEG(m_zipper_speed_gain, "zipper-speed-gain" );
|
||||
CHECK_NEG(m_zipper_max_speed_increase, "zipper-max-speed-increase" );
|
||||
CHECK_NEG(m_slipstream_length, "slipstream length" );
|
||||
CHECK_NEG(m_slipstream_width, "slipstream width" );
|
||||
CHECK_NEG(m_slipstream_collect_time, "slipstream collect-time" );
|
||||
CHECK_NEG(m_slipstream_use_time, "slipstream use-time" );
|
||||
CHECK_NEG(m_slipstream_add_power, "slipstream add-power" );
|
||||
|
||||
@@ -278,6 +278,8 @@ private:
|
||||
|
||||
/** How far behind a kart slipstreaming is effective. */
|
||||
float m_slipstream_length;
|
||||
/** How wide the slipstream area is at the end. */
|
||||
float m_slipstream_width;
|
||||
/** Time after which sstream gives a bonus. */
|
||||
float m_slipstream_collect_time;
|
||||
/** Time slip-stream bonus is effective. */
|
||||
@@ -590,6 +592,9 @@ public:
|
||||
/** Returns how far behind a kart slipstreaming works. */
|
||||
float getSlipstreamLength () const {return m_slipstream_length; }
|
||||
|
||||
/** Returns how wide the slipstream area is at the end. */
|
||||
float getSlipstreamWidth () const {return m_slipstream_width; }
|
||||
|
||||
/** Returns time after which slipstream has maximum effect. */
|
||||
float getSlipstreamCollectTime () const
|
||||
{return m_slipstream_collect_time; }
|
||||
|
||||
Reference in New Issue
Block a user