- fixed incomplete commit for bounce flags

- fixed flag clearing in new function.
This commit is contained in:
Christoph Oelckers 2016-10-25 13:29:58 +02:00
parent e39bf9eaeb
commit 142278a818
2 changed files with 10 additions and 9 deletions

View file

@ -4867,13 +4867,13 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_ChangeLinkFlags)
if (blockmap != -1) if (blockmap != -1)
{ {
if (blockmap == 0) self->flags &= MF_NOBLOCKMAP; if (blockmap == 0) self->flags &= *MF_NOBLOCKMAP;
else self->flags |= MF_NOBLOCKMAP; else self->flags |= MF_NOBLOCKMAP;
} }
if (sector != -1) if (sector != -1)
{ {
if (sector == 0) self->flags &= MF_NOSECTOR; if (sector == 0) self->flags &= *MF_NOSECTOR;
else self->flags |= MF_NOSECTOR; else self->flags |= MF_NOSECTOR;
} }
@ -4899,19 +4899,19 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_ChangeCountFlags)
if (kill != -1) if (kill != -1)
{ {
if (kill == 0) self->flags &= MF_COUNTKILL; if (kill == 0) self->flags &= ~MF_COUNTKILL;
else self->flags |= MF_COUNTKILL; else self->flags |= MF_COUNTKILL;
} }
if (item != -1) if (item != -1)
{ {
if (item == 0) self->flags &= MF_COUNTITEM; if (item == 0) self->flags &= ~MF_COUNTITEM;
else self->flags |= MF_COUNTITEM; else self->flags |= MF_COUNTITEM;
} }
if (secret != -1) if (secret != -1)
{ {
if (secret == 0) self->flags5 &= MF5_COUNTSECRET; if (secret == 0) self->flags5 &= ~MF5_COUNTSECRET;
else self->flags5 |= MF5_COUNTSECRET; else self->flags5 |= MF5_COUNTSECRET;
} }
if (self->CountsAsKill() && self->health > 0) ++level.total_monsters; if (self->CountsAsKill() && self->health > 0) ++level.total_monsters;

View file

@ -279,11 +279,7 @@ static FFlagDef ActorFlagDefs[]=
DEFINE_FLAG(RF, MASKROTATION, AActor, renderflags), DEFINE_FLAG(RF, MASKROTATION, AActor, renderflags),
DEFINE_FLAG(RF, ABSMASKANGLE, AActor, renderflags), DEFINE_FLAG(RF, ABSMASKANGLE, AActor, renderflags),
DEFINE_FLAG(RF, ABSMASKPITCH, AActor, renderflags), DEFINE_FLAG(RF, ABSMASKPITCH, AActor, renderflags),
};
// These won't be accessible through bitfield variables
static FFlagDef MoreFlagDefs[] =
{
// Bounce flags // Bounce flags
DEFINE_FLAG2(BOUNCE_Walls, BOUNCEONWALLS, AActor, BounceFlags), DEFINE_FLAG2(BOUNCE_Walls, BOUNCEONWALLS, AActor, BounceFlags),
DEFINE_FLAG2(BOUNCE_Floors, BOUNCEONFLOORS, AActor, BounceFlags), DEFINE_FLAG2(BOUNCE_Floors, BOUNCEONFLOORS, AActor, BounceFlags),
@ -299,6 +295,11 @@ static FFlagDef MoreFlagDefs[] =
DEFINE_FLAG2(BOUNCE_MBF, MBFBOUNCER, AActor, BounceFlags), DEFINE_FLAG2(BOUNCE_MBF, MBFBOUNCER, AActor, BounceFlags),
DEFINE_FLAG2(BOUNCE_AutoOffFloorOnly, BOUNCEAUTOOFFFLOORONLY, AActor, BounceFlags), DEFINE_FLAG2(BOUNCE_AutoOffFloorOnly, BOUNCEAUTOOFFFLOORONLY, AActor, BounceFlags),
DEFINE_FLAG2(BOUNCE_UseBounceState, USEBOUNCESTATE, AActor, BounceFlags), DEFINE_FLAG2(BOUNCE_UseBounceState, USEBOUNCESTATE, AActor, BounceFlags),
};
// These won't be accessible through bitfield variables
static FFlagDef MoreFlagDefs[] =
{
// Deprecated flags. Handling must be performed in HandleDeprecatedFlags // Deprecated flags. Handling must be performed in HandleDeprecatedFlags
DEFINE_DEPRECATED_FLAG(FIREDAMAGE), DEFINE_DEPRECATED_FLAG(FIREDAMAGE),