Hopefully fixed aiming for cakes - please test.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@5208 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
d7956618ef
commit
59f82079fb
@ -247,7 +247,7 @@ void Flyable::getLinearKartItemIntersection (const Vec3 &origin,
|
|||||||
|
|
||||||
float target_kart_heading = target_kart->getHeading();
|
float target_kart_heading = target_kart->getHeading();
|
||||||
|
|
||||||
float dist = -(target_kart_speed / item_XZ_speed) * (dx * cosf(target_kart_heading) +
|
float dist = -(target_kart_speed / item_XZ_speed) * (dx * cosf(target_kart_heading) -
|
||||||
dz * sinf(target_kart_heading));
|
dz * sinf(target_kart_heading));
|
||||||
|
|
||||||
float fire_th = (dx*dist - dz * sqrtf(dx*dx + dz*dz - dist*dist)) / (dx*dx + dz*dz);
|
float fire_th = (dx*dist - dz * sqrtf(dx*dx + dz*dz - dist*dist)) / (dx*dx + dz*dz);
|
||||||
|
Loading…
Reference in New Issue
Block a user