19 #ifndef HEADER_SLIP_STREAM_HPP 20 #define HEADER_SLIP_STREAM_HPP 25 namespace video {
class SMaterial;
class SColor; }
26 namespace scene {
class ISceneNode; }
32 class SPDynamicDrawCall;
36 #include "graphics/moving_texture.hpp" 37 #include "utils/no_copy.hpp" 96 int m_previous_target_id;
97 int m_speed_increase_ticks;
98 int m_speed_increase_duration;
102 enum {SS_NONE, SS_COLLECT} m_slipstream_mode;
119 void setDebugColor(
const video::SColor &color,
bool inner);
121 void updateSlipstreamingTextures(
float f,
const AbstractKart* kart);
122 void updateBonusTexture();
127 void update(
int ticks);
128 bool isSlipstreamReady()
const;
129 void updateSpeedIncrease();
139 bool inUse()
const {
return m_bonus_time>0.0f; }
MovingTexture * m_moving
The moving texture for the normal node.
Definition: slip_stream.hpp:55
Definition: sp_mesh.hpp:39
Definition: b3d_mesh_loader.hpp:18
int m_current_target_id
Used to trigger automatically the slipstreaming bonus.
Definition: slip_stream.hpp:95
bool inUse() const
Returns if slipstream is being used.
Definition: slip_stream.hpp:139
Quad * m_slipstream_outer_quad
This is the outer slipstream area if the kart is at 0,0,0 without rotation.
Definition: slip_stream.hpp:112
std::shared_ptr< SP::SPDynamicDrawCall > m_debug_dc2
For debugging: a simple quad to display where inner slipstream works.
Definition: slip_stream.hpp:78
Definition: three_d_animation.hpp:32
AbstractKart * m_kart
The kart to which this smoke belongs.
Definition: slip_stream.hpp:51
MovingTexture * m_moving_fast
The moving texture for the fast node.
Definition: slip_stream.hpp:59
MovingTexture * m_moving_bonus
The moving texture for the fast node.
Definition: slip_stream.hpp:63
AbstractKart * m_target_kart
The kart from which this kart gets slipstream.
Definition: slip_stream.hpp:116
std::shared_ptr< SP::SPDynamicDrawCall > m_debug_dc
For debugging: a simple quad to display where slipstream works.
Definition: slip_stream.hpp:75
float m_length
The length of the slipstream cylinder.
Definition: slip_stream.hpp:82
Definition: material.hpp:47
Quad * m_slipstream_quad
This is slipstream area if the kart is at 0,0,0 without rotation.
Definition: slip_stream.hpp:105
scene::ISceneNode * m_node
The scene node.
Definition: slip_stream.hpp:66
float m_bonus_time
The remaining active time bonus.
Definition: slip_stream.hpp:88
Handles animated textures (textures that move)
Definition: moving_texture.hpp:33
float m_slipstream_time
The time a kart was in slipstream.
Definition: slip_stream.hpp:85
Quad * m_slipstream_inner_quad
This is the inner slipstream area if the kart is at 0,0,0 without rotation.
Definition: slip_stream.hpp:108
scene::ISceneNode * m_node_fast
The fast scene node.
Definition: slip_stream.hpp:69
scene::ISceneNode * m_bonus_node
The node used when the bonus is active.
Definition: slip_stream.hpp:72
An abstract interface for the actual karts.
Definition: abstract_kart.hpp:61
bool m_bonus_active
This bool is used to know the first time we're going out of the slipstreaming area.
Definition: slip_stream.hpp:91
const Quad & getSlipstreamQuad() const
Returns the quad in which slipstreaming is effective for this kart.
Definition: slip_stream.hpp:133
Definition: slip_stream.hpp:47
const AbstractKart * getSlipstreamTarget() const
Returns the kart from which slipstream is 'collected'.
Definition: slip_stream.hpp:136