diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 856e332734..cff8c6dcce 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,4 +1,7 @@ February 28, 2007 +- 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. - Fixed: When starting a new game from the menu while the fullscreen console was open, the game was frozen before its initial setup tick until the console was closed. The most obvious result of this is that your view was diff --git a/src/p_things.cpp b/src/p_things.cpp index f1b75fff2b..3070ebda52 100644 --- a/src/p_things.cpp +++ b/src/p_things.cpp @@ -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));