- Added GCC headers for intptr_t to tarray.h.

- Added MF5_PAINLESS flag for projectiles that don't make the target go into
  the pain state.


SVN r1446 (trunk)
This commit is contained in:
Christoph Oelckers 2009-02-24 21:19:10 +00:00
parent c2b4522b8f
commit d91f0c4090
5 changed files with 17 additions and 2 deletions

View File

@ -1,4 +1,9 @@
February 23, 2009
February 24, 2009 (Changes by Graf Zahl)
- Added GCC headers for intptr_t to tarray.h.
- Added MF5_PAINLESS flag for projectiles that don't make the target go into
the pain state.
February 23, 2009
- Changed DEM_ADDSLOTDEFAULT, DEM_ADDSLOT, and DEM_SETSLOT to be more space-
efficient.
- Fixed: player->oldbuttons was copied from the current button set at the end

View File

@ -306,6 +306,7 @@ enum
MF5_BRIGHT = 0x08000000, // Actor is always rendered fullbright
MF5_CANTSEEK = 0x10000000, // seeker missiles cannot home in on this actor
MF5_INCONVERSATION = 0x20000000, // Actor is having a conversation
MF5_PAINLESS = 0x40000000, // Actor always inflicts painless damage.
// --- mobj.renderflags ---

View File

@ -1193,7 +1193,8 @@ void P_DamageMobj (AActor *target, AActor *inflictor, AActor *source, int damage
}
}
if (!(target->flags5 & MF5_NOPAIN) && (pr_damagemobj() < painchance) && !(target->flags & MF_SKULLFLY))
if (!(target->flags5 & MF5_NOPAIN) && (inflictor == NULL || !(inflictor->flags5 & MF5_PAINLESS)) &&
(pr_damagemobj() < painchance) && !(target->flags & MF_SKULLFLY))
{
if (mod == NAME_Electric)
{

View File

@ -38,6 +38,13 @@
#include <stdlib.h>
#include <assert.h>
#include <new>
#if !defined(_WIN32)
#include <inttypes.h> // for intptr_t
#elif !defined(_MSC_VER)
#include <stdint.h> // for mingw
#endif
#include "m_alloc.h"
class FArchive;

View File

@ -207,6 +207,7 @@ static FFlagDef ActorFlags[]=
DEFINE_FLAG(MF5, NOVERTICALMELEERANGE, AActor, flags5),
DEFINE_FLAG(MF5, BRIGHT, AActor, flags5),
DEFINE_FLAG(MF5, CANTSEEK, AActor, flags5),
DEFINE_FLAG(MF5, PAINLESS, AActor, flags5),
// Effect flags
DEFINE_FLAG(FX, VISIBILITYPULSE, AActor, effects),