19 #ifndef HEADER_EXPLOSION_ANIMATION_HPP 20 #define HEADER_EXPLOSION_ANIMATION_HPP 22 #include "karts/abstract_kart_animation.hpp" 23 #include "utils/vec3.hpp" 62 int m_reset_trans_compressed[4];
69 void init(
bool direct_hit,
const Vec3& normal,
70 const btTransform& reset_trans);
84 virtual void update(
int ticks);
88 virtual KartAnimationType getAnimationType()
const 89 {
return KAT_EXPLOSION; }
95 bool hasResetAlready()
const;
virtual void restoreState(BareNetworkString *p, int count) OVERRIDE
Actually rewind to the specified state.
Definition: kart_rewinder.cpp:275
Vec3 m_normal
The normal of kart when it started to explode.
Definition: explosion_animation.hpp:42
btTransform m_reset_trans
Used for reset kart back to flag base in CTF.
Definition: explosion_animation.hpp:59
A wrapper around bullets btVector3 to include conventient conversion functions (e.g.
Definition: vec3.hpp:34
static ExplosionAnimation * create(AbstractKart *kart, const Vec3 &pos, bool direct_hit)
A static create function that does only create an explosion if the explosion happens to be close enou...
Definition: explosion_animation.cpp:44
virtual void update(int ticks)
Updates the kart animation.
Definition: explosion_animation.cpp:246
virtual void updateGraphics(float dt) OVERRIDE
Updates the graphics model.
Definition: kart_rewinder.hpp:60
virtual void init(RaceManager::KartType type) OVERRIDE
This is a second initialisation phase, necessary since in the constructor virtual functions are not c...
Definition: kart.cpp:194
int m_reset_ticks
If not -1, when > world count up ticks it will use m_reset_trans below for animation.
Definition: explosion_animation.hpp:56
Definition: kart_rewinder.hpp:29
Vec3 m_add_rotation
The artificial rotation to toss the kart around.
Definition: explosion_animation.hpp:49
Describes a chain of 8-bit unsigned integers.
Definition: network_string.hpp:52
Vec3 m_curr_rotation
The kart's current rotation.
Definition: explosion_animation.hpp:45
virtual BareNetworkString * saveState(std::vector< std::string > *ru) OVERRIDE
Saves all state information for a kart in a memory buffer.
Definition: kart_rewinder.cpp:165
The base class for all kart animation, like rescue, explosion, or cannon.
Definition: abstract_kart_animation.hpp:59
An abstract interface for the actual karts.
Definition: abstract_kart.hpp:61
This class is a 'mixin' for kart, and handles the animated explosion.
Definition: explosion_animation.hpp:37
float m_velocity
The velocity with which the kart is moved.
Definition: explosion_animation.hpp:52