Fixed spelling problem.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11076 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
86a90658dc
commit
2f92fefffd
@ -94,7 +94,7 @@ src/items/rubber_band.cpp
|
||||
src/items/swatter.cpp
|
||||
src/karts/abstract_kart_animation.cpp
|
||||
src/karts/abstract_kart.cpp
|
||||
src/karts/canon_animation.cpp
|
||||
src/karts/cannon_animation.cpp
|
||||
src/karts/controller/ai_base_controller.cpp
|
||||
src/karts/controller/controller.cpp
|
||||
src/karts/controller/default_ai_controller.cpp
|
||||
@ -205,7 +205,7 @@ src/tinygettext/stk_file_system.cpp
|
||||
src/tinygettext/tinygettext.cpp
|
||||
src/tracks/ambient_light_sphere.cpp
|
||||
src/tracks/bezier_curve.cpp
|
||||
src/tracks/check_canon.cpp
|
||||
src/tracks/check_cannon.cpp
|
||||
src/tracks/check_lap.cpp
|
||||
src/tracks/check_line.cpp
|
||||
src/tracks/check_manager.cpp
|
||||
@ -336,7 +336,7 @@ src/items/rubber_band.hpp
|
||||
src/items/swatter.hpp
|
||||
src/karts/abstract_kart_animation.hpp
|
||||
src/karts/abstract_kart.hpp
|
||||
src/karts/canon_animation.hpp
|
||||
src/karts/cannon_animation.hpp
|
||||
src/karts/controller/ai_base_controller.hpp
|
||||
src/karts/controller/controller.hpp
|
||||
src/karts/controller/default_ai_controller.hpp
|
||||
@ -462,7 +462,7 @@ src/tinygettext/stk_file_system.hpp
|
||||
src/tinygettext/tinygettext.hpp
|
||||
src/tracks/ambient_light_sphere.hpp
|
||||
src/tracks/bezier_curve.hpp
|
||||
src/tracks/check_canon.hpp
|
||||
src/tracks/check_cannon.hpp
|
||||
src/tracks/check_lap.hpp
|
||||
src/tracks/check_line.hpp
|
||||
src/tracks/check_manager.hpp
|
||||
|
@ -26,7 +26,7 @@
|
||||
|
||||
class AbstractKart;
|
||||
|
||||
/** The base class for all kart animation, like rescue, explosion, or canon.
|
||||
/** The base class for all kart animation, like rescue, explosion, or cannon.
|
||||
* Kart animations are done by removing the physics body from the physics
|
||||
* world, and instead modifying the rotation and position of the kart
|
||||
* directly. They are registered with the kart, and only one can be
|
||||
|
@ -16,14 +16,14 @@
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
#include "karts/canon_animation.hpp"
|
||||
#include "karts/cannon_animation.hpp"
|
||||
|
||||
#include "karts/abstract_kart.hpp"
|
||||
#include "modes/world.hpp"
|
||||
|
||||
#include "LinearMath/btTransform.h"
|
||||
|
||||
CanonAnimation::CanonAnimation(AbstractKart *kart, const Vec3 &target,
|
||||
CannonAnimation::CannonAnimation(AbstractKart *kart, const Vec3 &target,
|
||||
float speed)
|
||||
: AbstractKartAnimation(kart)
|
||||
{
|
||||
@ -42,24 +42,24 @@ CanonAnimation::CanonAnimation(AbstractKart *kart, const Vec3 &target,
|
||||
m_add_rotation.setHeading(0);
|
||||
m_add_rotation.setPitch( 0);
|
||||
m_add_rotation.setRoll( 0);
|
||||
} // CanonAnimation
|
||||
} // CannonAnimation
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
CanonAnimation::~CanonAnimation()
|
||||
CannonAnimation::~CannonAnimation()
|
||||
{
|
||||
btTransform trans = m_kart->getTrans();
|
||||
trans.setOrigin(m_xyz);
|
||||
m_kart->setTrans(trans);
|
||||
m_kart->getBody()->setCenterOfMassTransform(trans);
|
||||
World::getWorld()->getPhysics()->addKart(m_kart);
|
||||
} // ~CanonAnimation
|
||||
} // ~CannonAnimation
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
/** Updates the kart animation.
|
||||
* \param dt Time step size.
|
||||
* \return True if the explosion is still shown, false if it has finished.
|
||||
*/
|
||||
void CanonAnimation::update(float dt)
|
||||
void CannonAnimation::update(float dt)
|
||||
{
|
||||
m_xyz += dt*m_velocity;
|
||||
m_kart->setXYZ(m_xyz);
|
@ -16,8 +16,8 @@
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
#ifndef HEADER_CANON_ANIMATION_HPP
|
||||
#define HEADER_CANON_ANIMATION_HPP
|
||||
#ifndef HEADER_CANNON_ANIMATION_HPP
|
||||
#define HEADER_CANNON_ANIMATION_HPP
|
||||
|
||||
#include "karts/abstract_kart_animation.hpp"
|
||||
#include "utils/vec3.hpp"
|
||||
@ -29,7 +29,7 @@
|
||||
|
||||
class AbstractKart;
|
||||
|
||||
class CanonAnimation: public AbstractKartAnimation
|
||||
class CannonAnimation: public AbstractKartAnimation
|
||||
{
|
||||
protected:
|
||||
/** The coordinates where the kart was hit originally. */
|
||||
@ -51,11 +51,11 @@ protected:
|
||||
float m_duration;
|
||||
|
||||
public:
|
||||
CanonAnimation(AbstractKart *kart, const Vec3 &target,
|
||||
CannonAnimation(AbstractKart *kart, const Vec3 &target,
|
||||
float speed);
|
||||
virtual ~CanonAnimation();
|
||||
virtual ~CannonAnimation();
|
||||
virtual void update(float dt);
|
||||
virtual const std::string getName() const {return "Canon";}
|
||||
virtual const std::string getName() const {return "Cannon";}
|
||||
|
||||
}; // CanonAnimation
|
||||
}; // CannonAnimation
|
||||
#endif
|
@ -41,7 +41,6 @@
|
||||
#include "items/powerup.hpp"
|
||||
#include "karts/abstract_kart.hpp"
|
||||
#include "karts/abstract_kart_animation.hpp"
|
||||
#include "karts/canon_animation.hpp"
|
||||
#include "karts/controller/controller.hpp"
|
||||
#include "karts/explosion_animation.hpp"
|
||||
#include "karts/kart_properties.hpp"
|
||||
|
@ -16,36 +16,36 @@
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
#include "tracks/check_canon.hpp"
|
||||
#include "tracks/check_cannon.hpp"
|
||||
|
||||
#include "io/xml_node.hpp"
|
||||
#include "karts/abstract_kart.hpp"
|
||||
#include "karts/canon_animation.hpp"
|
||||
#include "karts/cannon_animation.hpp"
|
||||
#include "modes/world.hpp"
|
||||
|
||||
/** Constructor for a check canon.
|
||||
/** Constructor for a check cannon.
|
||||
* \param node XML node containing the parameters for this checkline.
|
||||
* \param index Index of this check structure in the check manager.
|
||||
*/
|
||||
CheckCanon::CheckCanon(const XMLNode &node, unsigned int index)
|
||||
CheckCannon::CheckCannon(const XMLNode &node, unsigned int index)
|
||||
: CheckLine(node, index)
|
||||
{
|
||||
core::vector3df p1, p2;
|
||||
if(!node.get("target-p1", &p1) ||
|
||||
!node.get("target-p2", &p2) )
|
||||
{
|
||||
printf("CheckCanon has no target line specified.\n");
|
||||
printf("CheckCannon has no target line specified.\n");
|
||||
exit(-1);
|
||||
}
|
||||
m_target.setLine(p1, p2);
|
||||
m_speed = -1;
|
||||
node.get("speed", &m_speed);
|
||||
} // CheckCanon
|
||||
} // CheckCannon
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
void CheckCanon::trigger(unsigned int kart_index)
|
||||
void CheckCannon::trigger(unsigned int kart_index)
|
||||
{
|
||||
Vec3 target(m_target.getMiddle());
|
||||
AbstractKart *kart = World::getWorld()->getKart(kart_index);
|
||||
new CanonAnimation(kart, target, m_speed);
|
||||
} // CheckCanon
|
||||
new CannonAnimation(kart, target, m_speed);
|
||||
} // CheckCannon
|
@ -16,8 +16,8 @@
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
#ifndef HEADER_CHECK_CANON_HPP
|
||||
#define HEADER_CHECK_CANON_HPP
|
||||
#ifndef HEADER_CHECK_CANNON_HPP
|
||||
#define HEADER_CHECK_CANNON_HPP
|
||||
|
||||
#include "tracks/check_line.hpp"
|
||||
|
||||
@ -30,7 +30,7 @@ class CheckManager;
|
||||
*
|
||||
* \ingroup tracks
|
||||
*/
|
||||
class CheckCanon : public CheckLine
|
||||
class CheckCannon : public CheckLine
|
||||
{
|
||||
private:
|
||||
/** The target point the kart will fly to. */
|
||||
@ -40,7 +40,7 @@ private:
|
||||
float m_speed;
|
||||
|
||||
public:
|
||||
CheckCanon(const XMLNode &node, unsigned int index);
|
||||
CheckCannon(const XMLNode &node, unsigned int index);
|
||||
virtual void trigger(unsigned int kart_index);
|
||||
}; // CheckLine
|
||||
|
@ -23,7 +23,7 @@
|
||||
|
||||
#include "io/xml_node.hpp"
|
||||
#include "tracks/ambient_light_sphere.hpp"
|
||||
#include "tracks/check_canon.hpp"
|
||||
#include "tracks/check_cannon.hpp"
|
||||
#include "tracks/check_lap.hpp"
|
||||
#include "tracks/check_line.hpp"
|
||||
#include "tracks/check_structure.hpp"
|
||||
@ -48,9 +48,9 @@ void CheckManager::load(const XMLNode &node)
|
||||
{
|
||||
m_all_checks.push_back(new CheckLap(*check_node, i));
|
||||
}
|
||||
else if(type=="canon")
|
||||
else if(type=="cannon")
|
||||
{
|
||||
m_all_checks.push_back(new CheckCanon(*check_node, i));
|
||||
m_all_checks.push_back(new CheckCannon(*check_node, i));
|
||||
}
|
||||
else if(type=="check-sphere")
|
||||
{
|
||||
|
@ -48,8 +48,8 @@ CheckStructure::CheckStructure(const XMLNode &node, unsigned int index)
|
||||
m_check_type = CT_TOGGLE;
|
||||
else if(kind=="ambient-light")
|
||||
m_check_type = CT_AMBIENT_SPHERE;
|
||||
else if(kind=="canon")
|
||||
m_check_type = CT_CANON;
|
||||
else if(kind=="cannon")
|
||||
m_check_type = CT_CANNON;
|
||||
else
|
||||
{
|
||||
printf("Unknown check structure '%s' - ignored.\n", kind.c_str());
|
||||
@ -64,8 +64,8 @@ CheckStructure::CheckStructure(const XMLNode &node, unsigned int index)
|
||||
== m_same_group.end())
|
||||
m_same_group.push_back(m_index);
|
||||
|
||||
// As a default, only lap lines and canons are activated
|
||||
m_active_at_reset= m_check_type==CT_NEW_LAP || m_check_type==CT_CANON;
|
||||
// As a default, only lap lines and cannons are activated
|
||||
m_active_at_reset= m_check_type==CT_NEW_LAP || m_check_type==CT_CANNON;
|
||||
node.get("active", &m_active_at_reset);
|
||||
} // CheckStructure
|
||||
|
||||
|
@ -40,7 +40,7 @@ class CheckManager;
|
||||
* CT_ACTIVATE: Activates the specified other check structures.
|
||||
* CT_TOGGLE: Toggles the specified other check structures (active to
|
||||
* inactive and vice versa.
|
||||
* CT_CANON: A check line that 'shoots' the kart to a specified location.
|
||||
* CT_CANNON: A check line that 'shoots' the kart to a specified location.
|
||||
* Each check structure can be active or inactive. Only lap counters are
|
||||
* initialised to be active, all other check structures are inactive.
|
||||
*
|
||||
@ -54,14 +54,14 @@ public:
|
||||
* the state that check structure is in)
|
||||
* TOGGLE: Switches (inverts) the state of another check structure.
|
||||
* NEW_LAP: On crossing a new lap is counted.
|
||||
* CANON: Causes the kart to be shot to a specified point.
|
||||
* CANNON: Causes the kart to be shot to a specified point.
|
||||
* AMBIENT_SPHERE: Modifies the ambient color.
|
||||
* A combination of an activate and new_lap line are used to
|
||||
* avoid shortcuts: a new_lap line is deactivated after crossing it, and
|
||||
* you have to cross a corresponding activate structure to re-activate it,
|
||||
* enabling you to count the lap again.
|
||||
*/
|
||||
enum CheckType {CT_NEW_LAP, CT_ACTIVATE, CT_TOGGLE, CT_CANON,
|
||||
enum CheckType {CT_NEW_LAP, CT_ACTIVATE, CT_TOGGLE, CT_CANNON,
|
||||
CT_AMBIENT_SPHERE};
|
||||
|
||||
protected:
|
||||
|
Loading…
Reference in New Issue
Block a user