diff --git a/docs/rh-log.txt b/docs/rh-log.txt
index 3be212558..79f4bea10 100644
--- a/docs/rh-log.txt
+++ b/docs/rh-log.txt
@@ -1,4 +1,6 @@
December 16, 2006 (Changes by Graf Zahl)
+- Fixed: The smartaim logic was incorrect. Also added another mode: Autoaim only
+ at monsters.
- Merged FActorInfo::FindStateExact and FActorInfo::FindState into one function
because the differences are only minimal.
- Removed all the varargs FindState functions because they aren't really needed.
diff --git a/src/m_options.cpp b/src/m_options.cpp
index 097f68672..a8a52b478 100644
--- a/src/m_options.cpp
+++ b/src/m_options.cpp
@@ -925,10 +925,11 @@ CUSTOM_CVAR (Bool, vid_tft, false, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
* Gameplay Options (dmflags) Menu
*
*=======================================*/
-value_t SmartAim[3] = {
+value_t SmartAim[4] = {
{ 0.0, "Off" },
{ 1.0, "On" },
- { 2.0, "Never friends" }
+ { 2.0, "Never friends" },
+ { 3.0, "Only monsters" }
};
value_t FallingDM[4] = {
diff --git a/src/p_map.cpp b/src/p_map.cpp
index d893217dd..28276cffd 100644
--- a/src/p_map.cpp
+++ b/src/p_map.cpp
@@ -2608,17 +2608,23 @@ bool PTR_AimTraverse (intercept_t* in)
{
// try to be a little smarter about what to aim at!
// In particular avoid autoaiming at friends amd barrels.
- if (th->IsFriend(shootthing) && sv_smartaim != 2)
+ if (th->IsFriend(shootthing))
{
- // friends don't aim at friends (except players), at least not first
- aim.thing_friend=th;
- aim.pitch_friend=thingpitch;
+ if (sv_smartaim < 2)
+ {
+ // friends don't aim at friends (except players), at least not first
+ aim.thing_friend=th;
+ aim.pitch_friend=thingpitch;
+ }
}
else if (!(th->flags3&MF3_ISMONSTER) )
{
- // don't autoaim at barrels and other shootable stuff unless no monsters have been found
- aim.thing_other=th;
- aim.pitch_other=thingpitch;
+ if (sv_smartaim < 3)
+ {
+ // don't autoaim at barrels and other shootable stuff unless no monsters have been found
+ aim.thing_other=th;
+ aim.pitch_other=thingpitch;
+ }
}
else
{
diff --git a/tools/updaterevision/updaterevision.vcproj b/tools/updaterevision/updaterevision.vcproj
index 202c9d042..f39914dca 100644
--- a/tools/updaterevision/updaterevision.vcproj
+++ b/tools/updaterevision/updaterevision.vcproj
@@ -1,7 +1,7 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+