added FIXMEs in cake (reasons why it sometimes doesn't aim well)

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/trunk/supertuxkart@2814 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria
2008-12-30 00:36:38 +00:00
parent 8955a2dcdc
commit a8132ae245

View File

@@ -59,6 +59,8 @@ Cake::Cake (Kart *kart) : Flyable(kart, POWERUP_CAKE)
// calculate appropriate initial up velocity so that the
// projectile lands on the aimed kart (9.8 is the gravity)
// FIXME - this approximation will be wrong if both karts' directions are not colinear
// FIXME - this approximation will be wrong if both karts' directions are not at the same height
const float time = sqrt(kartDistSquared) / (m_speed - closest_kart->getSpeed()/1.2f); // division is an empirical estimation
up_velocity = time*9.8f;