fix aiming of defense boom attack

alut-include-path
Maikel de Vries 2017-01-14 21:38:28 +01:00
parent 6dc9850ebd
commit e00f1e9672
1 changed files with 1 additions and 1 deletions

View File

@ -63,7 +63,7 @@ local FxFlight = new Effect
if (!(time % 10))
{
var dx = this.target->GetX() - Target->GetX();
var dy = this.target->GetY() + 50 - Target->GetY();
var dy = this.target->GetY() + this.target->GetBottom() - Target->GetY();
// At this distance, fly horizontally. When getting closer, gradually turn to direct flight into target.
var aim_dist = 600;
var aim_dy = dy * (aim_dist - Abs(dx)) / aim_dist;