New skidding particle effect (and a small fix for the SFX)

The textures are here:

https://jacobspctuneup.tk/STK/skid-particle1.png
https://jacobspctuneup.tk/STK/skid-particle2.png
This commit is contained in:
Qwerty Chouskie 2018-01-26 14:41:41 -08:00
parent 0532a41ab3
commit d4aa7b69ad
3 changed files with 23 additions and 20 deletions

View File

@ -1,27 +1,27 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<particles emitter="box" box_x="0.023" box_y="0.023" box_z="-0.5"> <particles emitter="point">
<spreading angle="5" /> <spreading angle="180" />
<velocity x="0.0" <velocity x="0.0"
y="0.0" y="0.002"
z="-0.003" /> z="0.0" />
<material file="skid-particle1.png" /> <material file="skid-particle1.png" />
<!-- Amount of particles emitted per second. The minimum rate <!-- Amount of particles emitted per second. The minimum rate
is used to show that the skidding bonus is now available, is used to show that the skidding bonus is now available,
the maximum is used when the skid bonus is applied to the kart --> the maximum is used when the skid bonus is applied to the kart -->
<rate min="1400" <rate min="1250"
max="1500" /> max="2500" />
<!-- Minimal and maximal lifetime of a particle, in milliseconds. --> <!-- Minimal and maximal lifetime of a particle, in milliseconds. -->
<lifetime min="15" <lifetime min="55"
max="25" /> max="70" />
<!-- Size of the particles --> <!-- Size of the particles -->
<size min="0.35" <size min="0.2"
max="0.45" /> max="0.2" />
<color min="255 255 255" <color min="255 255 255"
max="255 255 255" /> max="255 255 255" />

View File

@ -1,27 +1,27 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<particles emitter="box" box_x="0.023" box_y="0.023" box_z="-0.5"> <particles emitter="point">
<spreading angle="5" /> <spreading angle="180" />
<velocity x="0.0" <velocity x="0.0"
y="0.0" y="0.002"
z="-0.003" /> z="0.0" />
<material file="skid-particle2.png" /> <material file="skid-particle2.png" />
<!-- Amount of particles emitted per second. The minimum rate <!-- Amount of particles emitted per second. The minimum rate
is used to show that the skidding bonus is now available, is used to show that the skidding bonus is now available,
the maximum is used when the skid bonus is applied to the kart --> the maximum is used when the skid bonus is applied to the kart -->
<rate min="1400" <rate min="1250"
max="1500" /> max="2500" />
<!-- Minimal and maximal lifetime of a particle, in milliseconds. --> <!-- Minimal and maximal lifetime of a particle, in milliseconds. -->
<lifetime min="15" <lifetime min="60"
max="25" /> max="75" />
<!-- Size of the particles --> <!-- Size of the particles -->
<size min="0.35" <size min="0.2"
max="0.45" /> max="0.2" />
<color min="255 255 255" <color min="255 255 255"
max="255 255 255" /> max="255 255 255" />

View File

@ -349,6 +349,9 @@ void Skidding::update(float dt, bool is_on_ground,
* 0.5f * kp->getSkidGraphicalJumpTime(); * 0.5f * kp->getSkidGraphicalJumpTime();
m_remaining_jump_time = kp->getSkidGraphicalJumpTime(); m_remaining_jump_time = kp->getSkidGraphicalJumpTime();
// Don't "play-sound-than-pause-sound-when-jumping-then-play-sound-when-jump-done"
m_gfx_jump_offset = 0.001f;
#ifdef SKID_DEBUG #ifdef SKID_DEBUG
#define SPEED 20.0f #define SPEED 20.0f
m_real_steering = updateSteering(steering, dt); m_real_steering = updateSteering(steering, dt);