From 83620fca1f1ffaf22a085d10ae5850fb63bb01a8 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 7 Apr 2012 12:40:50 +0000 Subject: [PATCH] - added Gez's NOTAUTOAIMED patch but did not set it for Heretic's pod. SVN r3527 (trunk) --- src/actor.h | 1 + src/p_map.cpp | 7 +++++++ src/thingdef/thingdef_data.cpp | 1 + 3 files changed, 9 insertions(+) diff --git a/src/actor.h b/src/actor.h index 939160ee0..1fd0bce16 100644 --- a/src/actor.h +++ b/src/actor.h @@ -331,6 +331,7 @@ enum MF6_POISONALWAYS = 0x04000000, // Always apply poison, even when target can't take the damage. MF6_DOHARMSPECIES = 0x08000000, // Do hurt one's own species with projectiles. MF6_INTRYMOVE = 0x10000000, // Executing P_TryMove + MF6_NOTAUTOAIMED = 0x20000000, // Do not subject actor to player autoaim. // --- mobj.renderflags --- diff --git a/src/p_map.cpp b/src/p_map.cpp index a178b5aab..8cbe145e2 100644 --- a/src/p_map.cpp +++ b/src/p_map.cpp @@ -60,6 +60,7 @@ CVAR (Bool, cl_bloodsplats, true, CVAR_ARCHIVE) CVAR (Int, sv_smartaim, 0, CVAR_ARCHIVE|CVAR_SERVERINFO) +CVAR (Bool, cl_doautoaim, false, CVAR_ARCHIVE) static void CheckForPushSpecial (line_t *line, int side, AActor *mobj, bool windowcheck); static void SpawnShootDecal (AActor *t1, const FTraceResults &trace); @@ -3088,6 +3089,12 @@ void aim_t::AimTraverse (fixed_t startx, fixed_t starty, fixed_t endx, fixed_t e } dist = FixedMul (attackrange, in->frac); + // Don't autoaim certain special actors + if (!cl_doautoaim && th->flags6 & MF6_NOTAUTOAIMED) + { + continue; + } + #ifdef _3DFLOORS // we must do one last check whether the trace has crossed a 3D floor if (lastsector==th->Sector && th->Sector->e->XFloor.ffloors.Size()) diff --git a/src/thingdef/thingdef_data.cpp b/src/thingdef/thingdef_data.cpp index f82b45374..bafa0fa8b 100644 --- a/src/thingdef/thingdef_data.cpp +++ b/src/thingdef/thingdef_data.cpp @@ -233,6 +233,7 @@ static FFlagDef ActorFlags[]= DEFINE_FLAG(MF6, DONTCORPSE, AActor, flags6), DEFINE_FLAG(MF6, DOHARMSPECIES, AActor, flags6), DEFINE_FLAG(MF6, POISONALWAYS, AActor, flags6), + DEFINE_FLAG(MF6, NOTAUTOAIMED, AActor, flags6), // Effect flags DEFINE_FLAG(FX, VISIBILITYPULSE, AActor, effects),