From efe70a07995bef2d458e76beae8866f90717953f Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 7 Nov 2010 07:29:23 +0000 Subject: [PATCH] - added THeShooter7's patch to use the PUFFGETSOWNER flag for blood, too. SVN r2985 (trunk) --- src/m_fixed.h | 1 + src/p_mobj.cpp | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/src/m_fixed.h b/src/m_fixed.h index 14db59d63..61080d73d 100644 --- a/src/m_fixed.h +++ b/src/m_fixed.h @@ -139,5 +139,6 @@ inline SDWORD ModDiv (SDWORD num, SDWORD den, SDWORD *dmval) #define FLOAT2FIXED(f) xs_Fix<16>::ToFix(f) #define FIXED2FLOAT(f) ((f) / float(65536)) +#define FIXED2DBL(f) ((f) / double(65536)) #endif diff --git a/src/p_mobj.cpp b/src/p_mobj.cpp index 1d6e8d40a..79c20c1ed 100644 --- a/src/p_mobj.cpp +++ b/src/p_mobj.cpp @@ -4526,6 +4526,8 @@ void P_SpawnBlood (fixed_t x, fixed_t y, fixed_t z, angle_t dir, int damage, AAc th = Spawn (bloodcls, x, y, z, NO_REPLACE); // GetBloodType already performed the replacement th->velz = FRACUNIT*2; th->angle = dir; + // [NG] Applying PUFFGETSOWNER to the blood will make it target the owner + if (th->flags5 & MF5_PUFFGETSOWNER) th->target = originator; if (gameinfo.gametype & GAME_DoomChex) { th->tics -= pr_spawnblood() & 3; @@ -4667,6 +4669,8 @@ void P_RipperBlood (AActor *mo, AActor *bleeder) { AActor *th; th = Spawn (bloodcls, x, y, z, NO_REPLACE); // GetBloodType already performed the replacement + // [NG] Applying PUFFGETSOWNER to the blood will make it target the owner + if (th->flags5 & MF5_PUFFGETSOWNER) th->target = bleeder; if (gameinfo.gametype == GAME_Heretic) th->flags |= MF_NOGRAVITY; th->velx = mo->velx >> 1;