Fixed bugs in the computation of the rotation angle for the referee

so that it faces the kart.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@9900 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hikerstk 2011-09-27 03:03:43 +00:00
parent d3276d0adf
commit 0a043b57b8

View File

@ -92,10 +92,10 @@ void Referee::init()
node->get("scale", &m_st_scale );
node->get("start-rotation", &m_st_start_rotation );
float angle_to_kart = atan2(m_st_start_offset.getY(),
float angle_to_kart = atan2(m_st_start_offset.getX(),
m_st_start_offset.getZ())
* RAD_TO_DEGREE;
m_st_start_rotation.setY(m_st_start_rotation.getY()-angle_to_kart);
m_st_start_rotation.setY(m_st_start_rotation.getY()+angle_to_kart);
std::vector<std::string> colors;
node->get("colors", &colors);