19 #ifndef HEADER_SLIP_STREAM_HPP
20 #define HEADER_SLIP_STREAM_HPP
25 namespace video {
class SMaterial;
class SColor; }
26 namespace scene {
class ISceneNode;
class IAnimatedMesh; }
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;
118 SP::SPMesh* createMeshSP(
unsigned material_id,
bool bonus_mesh);
119 scene::IAnimatedMesh* createMesh(
unsigned material_id,
bool bonus_mesh);
121 void setDebugColor(
const video::SColor &color,
bool inner);
123 void updateSlipstreamingTextures(
float f,
const AbstractKart* kart);
124 void updateBonusTexture();
130 void update(
int ticks);
131 bool isSlipstreamReady()
const;
132 void updateSpeedIncrease();
142 bool inUse()
const {
return m_bonus_time>0.0f; }
An abstract interface for the actual karts.
Definition: abstract_kart.hpp:62
Definition: material.hpp:48
Handles animated textures (textures that move)
Definition: moving_texture.hpp:34
Definition: sp_mesh.hpp:44
Definition: slip_stream.hpp:48
MovingTexture * m_moving
The moving texture for the normal node.
Definition: slip_stream.hpp:55
const Quad & getSlipstreamQuad() const
Returns the quad in which slipstreaming is effective for this kart.
Definition: slip_stream.hpp:136
int m_current_target_id
Used to trigger automatically the slipstreaming bonus.
Definition: slip_stream.hpp:95
AbstractKart * m_target_kart
The kart from which this kart gets slipstream.
Definition: slip_stream.hpp:116
scene::ISceneNode * m_node
The scene node.
Definition: slip_stream.hpp:66
std::shared_ptr< SP::SPDynamicDrawCall > m_debug_dc2
For debugging: a simple quad to display where inner slipstream works.
Definition: slip_stream.hpp:78
std::shared_ptr< SP::SPDynamicDrawCall > m_debug_dc
For debugging: a simple quad to display where slipstream works.
Definition: slip_stream.hpp:75
Quad * m_slipstream_quad
This is slipstream area if the kart is at 0,0,0 without rotation.
Definition: slip_stream.hpp:105
MovingTexture * m_moving_fast
The moving texture for the fast node.
Definition: slip_stream.hpp:59
float m_bonus_time
The remaining active time bonus.
Definition: slip_stream.hpp:88
scene::ISceneNode * m_node_fast
The fast scene node.
Definition: slip_stream.hpp:69
AbstractKart * m_kart
The kart to which this smoke belongs.
Definition: slip_stream.hpp:51
scene::ISceneNode * m_bonus_node
The node used when the bonus is active.
Definition: slip_stream.hpp:72
float m_length
The length of the slipstream cylinder.
Definition: slip_stream.hpp:82
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
MovingTexture * m_moving_bonus
The moving texture for the fast node.
Definition: slip_stream.hpp:63
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
bool inUse() const
Returns if slipstream is being used.
Definition: slip_stream.hpp:142
float m_slipstream_time
The time a kart was in slipstream.
Definition: slip_stream.hpp:85
const AbstractKart * getSlipstreamTarget() const
Returns the kart from which slipstream is 'collected'.
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