- Fixed: When I converted the P_Thing_Projectile() code for target leading

to use the new vector routines, I had made dist calculate the squared
  length of the aim vector instead of the correct length.


SVN r494 (trunk)
This commit is contained in:
Randy Heit 2007-02-28 17:38:56 +00:00
commit eef025dd4e
2 changed files with 4 additions and 1 deletions

View file

@ -281,7 +281,7 @@ bool P_Thing_Projectile (int tid, AActor *source, int type, const char * type_na
goto nolead;
}
}
double dist = aim | aim;
double dist = aim.Length();
double targspeed = tvel.Length();
double ydotx = -aim | tvel;
double a = acos (clamp (ydotx / targspeed / dist, -1.0, 1.0));