From eef025dd4e6b5c8db7cfb4ed8649ef58dee22450 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Wed, 28 Feb 2007 17:38:56 +0000 Subject: [PATCH] - 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) --- docs/rh-log.txt | 3 +++ src/p_things.cpp | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 856e33273..cff8c6dcc 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 f1b75fff2..3070ebda5 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));