19 #ifndef HEADER_CHECK_GOAL_HPP
20 #define HEADER_CHECK_GOAL_HPP
22 #include "tracks/check_structure.hpp"
23 #include "utils/cpp2011.hpp"
65 virtual void update(
float dt) OVERRIDE;
66 virtual void trigger(
unsigned int kart_index) OVERRIDE;
67 virtual bool isTriggered(
const Vec3 &old_pos,
const Vec3 &new_pos,
69 virtual void reset(
const Track &track) OVERRIDE;
72 bool getTeam()
const {
return m_first_goal; }
74 const Vec3& getPoint(PointLocation point)
const
76 return (point == POINT_LAST ? m_p3 :
77 (point == POINT_CENTER ? m_p2 : m_p1));
Implements a simple checkline that will score a point when the soccer ball crosses it.
Definition: check_goal.hpp:38
Vec3 m_previous_ball_position
Previois ball position.
Definition: check_goal.hpp:49
bool m_first_goal
Which team is this goal for?
Definition: check_goal.hpp:52
Vec3 m_p1
Used by AIs to test whether the ball is likely to goal.
Definition: check_goal.hpp:58
PointLocation
Used by AIs to test whether the ball is likely to goal.
Definition: check_goal.hpp:42
virtual CheckStructure * clone() OVERRIDE
Clone to child process for server usage (atm no sound or scripting).
Definition: check_goal.hpp:80
core::line2df m_line
The line that is tested for being crossed.
Definition: check_goal.hpp:55
Virtual base class for a check structure.
Definition: check_structure.hpp:52
Definition: track.hpp:115
A wrapper around bullets btVector3 to include conventient conversion functions (e....
Definition: vec3.hpp:35
utility class used to parse XML files
Definition: xml_node.hpp:48