19 #ifndef HEADER_CANNON_ANIMATION_HPP 20 #define HEADER_CANNON_ANIMATION_HPP 22 #include "karts/abstract_kart_animation.hpp" 23 #include "utils/vec3.hpp" 25 #include "LinearMath/btQuaternion.h" 49 const Vec3 &end_left,
const Vec3 &end_right,
float skid_rot);
51 void initDeltaHeading(
float skidding_rotation);
101 virtual void update(
int ticks);
103 virtual KartAnimationType getAnimationType()
const {
return KAT_CANNON; }
Implements a simple checkline that will cause a kart or flyable to be shot to a specified point...
Definition: check_cannon.hpp:45
This animation shoots the kart to a specified point on the track.
Definition: cannon_animation.hpp:38
A wrapper around bullets btVector3 to include conventient conversion functions (e.g.
Definition: vec3.hpp:34
virtual void update(int ticks)
Updates the kart animation.
Definition: cannon_animation.cpp:259
float m_start_line_length
Length of the (adjusted, i.e.
Definition: cannon_animation.hpp:78
virtual void restoreState(BareNetworkString *buffer, int count) OVERRIDE
Called when a state needs to be replayed.
Definition: flyable.cpp:694
AnimationBase * m_curve
Stores the curve interpolation for the cannon.
Definition: cannon_animation.hpp:70
void init(Ipo *ipo, const Vec3 &start_left, const Vec3 &start_right, const Vec3 &end_left, const Vec3 &end_right, float skid_rot)
Common initialisation for kart-based and flyable-based animations.
Definition: cannon_animation.cpp:114
CheckCannon * m_check_cannon
The CheckCannon which created this animation.
Definition: cannon_animation.hpp:57
uint32_t m_current_rotation
Current rotation of the object, saved for rewinding usage if needed, it will be compressed by MiniGLM...
Definition: cannon_animation.hpp:94
CannonAnimation(AbstractKart *kart, BareNetworkString *buffer)
The constructor for the cannon animation for kart during rewind.
Definition: cannon_animation.cpp:64
virtual BareNetworkString * saveState(std::vector< std::string > *ru) OVERRIDE
Provides a copy of the state of the object in one memory buffer.
Definition: flyable.cpp:669
Vec3 m_delta
This is the difference between the position of the kart when the cannon line is crossed and the curve...
Definition: cannon_animation.hpp:67
A base class for all animations.
Definition: animation_base.hpp:40
Definition: kart_rewinder.hpp:29
Describes a chain of 8-bit unsigned integers.
Definition: network_string.hpp:52
float m_end_line_length
Length of the (adjusted, i.e.
Definition: cannon_animation.hpp:82
Flyable * m_flyable
If this animation is used for a flyable (e.g.
Definition: cannon_animation.hpp:74
float m_fraction_of_line
Stores the position of the kart relative to the line width at the current location.
Definition: cannon_animation.hpp:86
Definition: flyable.hpp:48
The base class for all kart animation, like rescue, explosion, or cannon.
Definition: abstract_kart_animation.hpp:59
A class to manage a single blender IPO curve.
Definition: ipo.hpp:37
btQuaternion m_delta_heading
The initial heading of the kart when crossing the line.
Definition: cannon_animation.hpp:90
An abstract interface for the actual karts.
Definition: abstract_kart.hpp:61