- more TEST() replacements.

This covers roughly half of the original use.
This commit is contained in:
Christoph Oelckers 2021-12-27 20:22:21 +01:00
parent 61564ab96a
commit 96396385e7
24 changed files with 218 additions and 218 deletions

View file

@ -726,7 +726,7 @@ int SetupBunny(DSWActor* actor)
{
ANIMATOR DoActorDecide;
if (!TEST(actor->spr.cstat, CSTAT_SPRITE_RESTORE))
if (!(actor->spr.cstat & CSTAT_SPRITE_RESTORE))
{
SpawnUser(actor, BUNNY_RUN_R0, s_BunnyRun[0]);
actor->user.Health = 10;
@ -751,7 +751,7 @@ int SetupBunny(DSWActor* actor)
actor->spr.clipdist = 200>>2;
if (!TEST(actor->spr.cstat, CSTAT_SPRITE_RESTORE))
if (!(actor->spr.cstat & CSTAT_SPRITE_RESTORE))
actor->user.Health = 60;
}
else if (actor->spr.pal == PALETTE_PLAYER8) // Male Rabbit
@ -762,7 +762,7 @@ int SetupBunny(DSWActor* actor)
//actor->spr.yrepeat = 70;
//actor->spr.shade = 0; // darker
if (!TEST(actor->spr.cstat, CSTAT_SPRITE_RESTORE))
if (!(actor->spr.cstat & CSTAT_SPRITE_RESTORE))
actor->user.Health = 20;
actor->user.Flag1 = 0;
}
@ -881,7 +881,7 @@ int DoBunnyMoveJump(DSWActor* actor)
DoActorZrange(actor);
if (!TEST(actor->user.Flags, SPR_JUMPING | SPR_FALLING))
if (!(actor->user.Flags & (SPR_JUMPING | SPR_FALLING)))
{
InitActorDecide(actor);
}
@ -1056,7 +1056,7 @@ int NullBunny(DSWActor* actor)
}
// stay on floor unless doing certain things
if (!TEST(actor->user.Flags, SPR_JUMPING | SPR_FALLING))
if (!(actor->user.Flags & (SPR_JUMPING | SPR_FALLING)))
KeepActorOnFloor(actor);
if (actor->user.Flags & (SPR_SLIDING))
@ -1251,7 +1251,7 @@ int DoBunnyMove(DSWActor* actor)
}
// if on a player/enemy sprite jump quickly
if (!TEST(actor->user.Flags, SPR_JUMPING | SPR_FALLING))
if (!(actor->user.Flags & (SPR_JUMPING | SPR_FALLING)))
{
DoBunnyQuickJump(actor);
}
@ -1265,7 +1265,7 @@ int DoBunnyMove(DSWActor* actor)
(*actor->user.ActorActionFunc)(actor);
// stay on floor unless doing certain things
if (!TEST(actor->user.Flags, SPR_JUMPING | SPR_FALLING))
if (!(actor->user.Flags & (SPR_JUMPING | SPR_FALLING)))
KeepActorOnFloor(actor);
DoActorSectorDamage(actor);
@ -1315,7 +1315,7 @@ int DoBunnyEat(DSWActor* actor)
}
// if on a player/enemy sprite jump quickly
if (!TEST(actor->user.Flags, SPR_JUMPING | SPR_FALLING))
if (!(actor->user.Flags & (SPR_JUMPING | SPR_FALLING)))
{
DoBunnyQuickJump(actor);
}
@ -1324,7 +1324,7 @@ int DoBunnyEat(DSWActor* actor)
DoActorSlide(actor);
// stay on floor unless doing certain things
if (!TEST(actor->user.Flags, SPR_JUMPING | SPR_FALLING))
if (!(actor->user.Flags & (SPR_JUMPING | SPR_FALLING)))
KeepActorOnFloor(actor);
DoActorSectorDamage(actor);
@ -1365,7 +1365,7 @@ int DoBunnyScrew(DSWActor* actor)
DoActorSlide(actor);
// stay on floor unless doing certain things
if (!TEST(actor->user.Flags, SPR_JUMPING | SPR_FALLING))
if (!(actor->user.Flags & (SPR_JUMPING | SPR_FALLING)))
KeepActorOnFloor(actor);
DoActorSectorDamage(actor);

View file

@ -516,7 +516,7 @@ int SetupCoolg(DSWActor* actor)
{
ANIMATOR DoActorDecide;
if (!TEST(actor->spr.cstat, CSTAT_SPRITE_RESTORE))
if (!(actor->spr.cstat & CSTAT_SPRITE_RESTORE))
{
SpawnUser(actor,COOLG_RUN_R0,s_CoolgRun[0]);
actor->user.Health = HEALTH_COOLIE_GHOST;

View file

@ -485,7 +485,7 @@ int SetupCoolie(DSWActor* actor)
{
ANIMATOR DoActorDecide;
if (!TEST(actor->spr.cstat, CSTAT_SPRITE_RESTORE))
if (!(actor->spr.cstat & CSTAT_SPRITE_RESTORE))
{
SpawnUser(actor,COOLIE_RUN_R0,s_CoolieRun[0]);
actor->user.Health = HEALTH_COOLIE;
@ -528,7 +528,7 @@ int CooliePain(DSWActor* actor)
if (actor->user.Flags & (SPR_SLIDING))
DoActorSlide(actor);
if (!TEST(actor->user.Flags,SPR_CLIMBING))
if (!(actor->user.Flags & SPR_CLIMBING))
KeepActorOnFloor(actor);
DoActorSectorDamage(actor);
@ -544,7 +544,7 @@ int NullCoolie(DSWActor* actor)
if (actor->user.Flags & (SPR_SLIDING))
DoActorSlide(actor);
if (!TEST(actor->user.Flags,SPR_CLIMBING))
if (!(actor->user.Flags & SPR_CLIMBING))
KeepActorOnFloor(actor);
DoActorSectorDamage(actor);

View file

@ -375,7 +375,7 @@ int SetupEel(DSWActor* actor)
{
ANIMATOR DoActorDecide;
if (!TEST(actor->spr.cstat, CSTAT_SPRITE_RESTORE))
if (!(actor->spr.cstat & CSTAT_SPRITE_RESTORE))
{
SpawnUser(actor,EEL_RUN_R0,s_EelRun[0]);
actor->user.Health = 40;

View file

@ -714,7 +714,7 @@ int SetupGirlNinja(DSWActor* actor)
{
ANIMATOR DoActorDecide;
if (!TEST(actor->spr.cstat, CSTAT_SPRITE_RESTORE))
if (!(actor->spr.cstat & CSTAT_SPRITE_RESTORE))
{
SpawnUser(actor, GIRLNINJA_RUN_R0, s_GirlNinjaRun[0]);
actor->user.Health = (Skill < MinEnemySkill - 1) ? 50 : 100;
@ -742,7 +742,7 @@ int SetupGirlNinja(DSWActor* actor)
int DoGirlNinjaMove(DSWActor* actor)
{
// jumping and falling
if (actor->user.Flags & (SPR_JUMPING | SPR_FALLING) && !TEST(actor->user.Flags, SPR_CLIMBING))
if (actor->user.Flags & (SPR_JUMPING | SPR_FALLING) && !(actor->user.Flags & SPR_CLIMBING))
{
if (actor->user.Flags & (SPR_JUMPING))
DoActorJump(actor);
@ -751,7 +751,7 @@ int DoGirlNinjaMove(DSWActor* actor)
}
// sliding
if (actor->user.Flags & (SPR_SLIDING) && !TEST(actor->user.Flags, SPR_CLIMBING))
if (actor->user.Flags & (SPR_SLIDING) && !(actor->user.Flags & SPR_CLIMBING))
DoActorSlide(actor);
// !AIC - do track or call current action function - such as DoActorMoveCloser()
@ -763,7 +763,7 @@ int DoGirlNinjaMove(DSWActor* actor)
}
// stay on floor unless doing certain things
if (!TEST(actor->user.Flags, SPR_JUMPING | SPR_FALLING | SPR_CLIMBING))
if (!(actor->user.Flags & (SPR_JUMPING | SPR_FALLING | SPR_CLIMBING)))
{
KeepActorOnFloor(actor);
}
@ -800,10 +800,10 @@ int NullGirlNinja(DSWActor* actor)
{
if (actor->user.WaitTics > 0) actor->user.WaitTics -= ACTORMOVETICS;
if (actor->user.Flags & (SPR_SLIDING) && !TEST(actor->user.Flags, SPR_CLIMBING) && !TEST(actor->user.Flags, SPR_JUMPING|SPR_FALLING))
if (actor->user.Flags & (SPR_SLIDING) && !(actor->user.Flags & SPR_CLIMBING) && !TEST(actor->user.Flags, SPR_JUMPING|SPR_FALLING))
DoActorSlide(actor);
if (!TEST(actor->user.Flags, SPR_CLIMBING) && !TEST(actor->user.Flags, SPR_JUMPING|SPR_FALLING))
if (!(actor->user.Flags & SPR_CLIMBING) && !TEST(actor->user.Flags, SPR_JUMPING|SPR_FALLING))
KeepActorOnFloor(actor);
DoActorSectorDamage(actor);

View file

@ -485,7 +485,7 @@ int SetupGoro(DSWActor* actor)
{
ANIMATOR DoActorDecide;
if (!TEST(actor->spr.cstat, CSTAT_SPRITE_RESTORE))
if (!(actor->spr.cstat & CSTAT_SPRITE_RESTORE))
{
SpawnUser(actor, GORO_RUN_R0,s_GoroRun[0]);
actor->user.Health = HEALTH_GORO;

View file

@ -291,7 +291,7 @@ int SetupHornet(DSWActor* actor)
{
ANIMATOR DoActorDecide;
if (!TEST(actor->spr.cstat, CSTAT_SPRITE_RESTORE))
if (!(actor->spr.cstat & CSTAT_SPRITE_RESTORE))
{
SpawnUser(actor,HORNET_RUN_R0,s_HornetRun[0]);
actor->user.Health = HEALTH_HORNET;

View file

@ -84,7 +84,7 @@ INVENTORY_DATA InventoryData[MAX_INVENTORY+1] =
void PanelInvTestSuicide(PANEL_SPRITEp psp)
{
if (TEST(psp->flags, PANF_SUICIDE))
if (psp->flags & (PANF_SUICIDE))
{
pKillSprite(psp);
}

View file

@ -480,7 +480,7 @@ int DoBloodSpray(DSWActor* actor)
// shallow water
#if 0
if (!TEST(actor->user.Flags, SPR_BOUNCE))
if (!(actor->user.Flags & SPR_BOUNCE))
{
SpawnFloorSplash(actor);
actor->user.Flags |= (SPR_BOUNCE);
@ -647,7 +647,7 @@ int DoPhosphorus(DSWActor* actor)
if (actor->spr.pos.Z > ((actor->user.hiz + actor->user.loz) >> 1))
{
// hit a floor
if (!TEST(actor->user.Flags, SPR_BOUNCE))
if (!(actor->user.Flags & SPR_BOUNCE))
{
actor->user.Flags |= (SPR_BOUNCE);
ScaleSpriteVector(actor, 32000); // was 18000
@ -683,7 +683,7 @@ int DoPhosphorus(DSWActor* actor)
actor->user.Flags |= (SPR_BOUNCE); // no bouncing on
// shallow water
if (!TEST(actor->user.Flags, SPR_BOUNCE))
if (!(actor->user.Flags & SPR_BOUNCE))
{
actor->user.Flags |= (SPR_BOUNCE);
actor->user.coll.setNone();
@ -853,7 +853,7 @@ int DoChemBomb(DSWActor* actor)
if (actor->spr.pos.Z > ((actor->user.hiz + actor->user.loz) >> 1))
{
// hit a floor
if (!TEST(actor->user.Flags, SPR_BOUNCE))
if (!(actor->user.Flags & SPR_BOUNCE))
{
if (!TEST(actor->spr.cstat, CSTAT_SPRITE_INVISIBLE))
PlaySound(DIGI_CHEMBOUNCE, actor, v3df_dontpan);
@ -899,7 +899,7 @@ int DoChemBomb(DSWActor* actor)
actor->user.Flags |= (SPR_BOUNCE); // no bouncing on
// shallow water
if (!TEST(actor->user.Flags, SPR_BOUNCE))
if (!(actor->user.Flags & SPR_BOUNCE))
{
if (!TEST(actor->spr.cstat, CSTAT_SPRITE_INVISIBLE))
PlaySound(DIGI_CHEMBOUNCE, actor, v3df_dontpan);
@ -1068,7 +1068,7 @@ int DoCaltrops(DSWActor* actor)
if (actor->spr.pos.Z > ((actor->user.hiz + actor->user.loz) >> 1))
{
// hit a floor
if (!TEST(actor->user.Flags, SPR_BOUNCE))
if (!(actor->user.Flags & SPR_BOUNCE))
{
PlaySound(DIGI_CALTROPS, actor, v3df_dontpan);
actor->user.Flags |= (SPR_BOUNCE);
@ -1105,7 +1105,7 @@ int DoCaltrops(DSWActor* actor)
actor->user.Flags |= (SPR_BOUNCE); // no bouncing on
// shallow water
if (!TEST(actor->user.Flags, SPR_BOUNCE))
if (!(actor->user.Flags & SPR_BOUNCE))
{
PlaySound(DIGI_CALTROPS, actor, v3df_dontpan);
actor->user.Flags |= (SPR_BOUNCE);

View file

@ -455,7 +455,7 @@ int SetupLava(DSWActor* actor)
{
ANIMATOR DoActorDecide;
if (!TEST(actor->spr.cstat, CSTAT_SPRITE_RESTORE))
if (!(actor->spr.cstat & CSTAT_SPRITE_RESTORE))
{
SpawnUser(actor, LAVA_RUN_R0, s_LavaRun[0]);
actor->user.Health = 100;

View file

@ -114,7 +114,7 @@ int SetupToiletGirl(DSWActor* actor)
{
ANIMATOR DoActorDecide;
if (!TEST(actor->spr.cstat, CSTAT_SPRITE_RESTORE))
if (!(actor->spr.cstat & CSTAT_SPRITE_RESTORE))
{
SpawnUser(actor, TOILETGIRL_R0, s_ToiletGirlStand);
actor->user.Health = 60;
@ -182,7 +182,7 @@ int DoToiletGirl(DSWActor* actor)
}
// stay on floor unless doing certain things
if (!TEST(actor->user.Flags, SPR_JUMPING | SPR_FALLING | SPR_CLIMBING))
if (!(actor->user.Flags & (SPR_JUMPING | SPR_FALLING | SPR_CLIMBING)))
{
KeepActorOnFloor(actor);
}
@ -201,7 +201,7 @@ int NullToiletGirl(DSWActor* actor)
DoActorPickClosePlayer(actor);
ICanSee = FAFcansee(actor, ActorZOfMiddle(actor), actor->user.targetActor, ActorZOfMiddle(actor->user.targetActor));
if (!TEST(actor->user.Flags,SPR_CLIMBING))
if (!(actor->user.Flags & SPR_CLIMBING))
KeepActorOnFloor(actor);
if (actor->user.FlagOwner != 1)
@ -226,7 +226,7 @@ int NullToiletGirl(DSWActor* actor)
int ToiletGirlUzi(DSWActor* actor)
{
if (!TEST(actor->user.Flags,SPR_CLIMBING))
if (!(actor->user.Flags & SPR_CLIMBING))
KeepActorOnFloor(actor);
if ((actor->user.WaitTics -= ACTORMOVETICS) <= 0)
@ -335,7 +335,7 @@ int SetupWashGirl(DSWActor* actor)
{
ANIMATOR DoActorDecide;
if (!TEST(actor->spr.cstat, CSTAT_SPRITE_RESTORE))
if (!(actor->spr.cstat & CSTAT_SPRITE_RESTORE))
{
SpawnUser(actor, WASHGIRL_R0,s_WashGirlStand);
actor->user.Health = 60;
@ -411,7 +411,7 @@ int DoWashGirl(DSWActor* actor)
}
// stay on floor unless doing certain things
if (!TEST(actor->user.Flags, SPR_JUMPING | SPR_FALLING | SPR_CLIMBING))
if (!(actor->user.Flags & (SPR_JUMPING | SPR_FALLING | SPR_CLIMBING)))
{
KeepActorOnFloor(actor);
}
@ -430,7 +430,7 @@ int NullWashGirl(DSWActor* actor)
DoActorPickClosePlayer(actor);
ICanSee = FAFcansee(actor, ActorZOfMiddle(actor), actor->user.targetActor, ActorZOfMiddle(actor->user.targetActor));
if (!TEST(actor->user.Flags,SPR_CLIMBING))
if (!(actor->user.Flags & SPR_CLIMBING))
KeepActorOnFloor(actor);
if (actor->user.FlagOwner != 1)
@ -455,7 +455,7 @@ int NullWashGirl(DSWActor* actor)
int WashGirlUzi(DSWActor* actor)
{
if (!TEST(actor->user.Flags,SPR_CLIMBING))
if (!(actor->user.Flags & SPR_CLIMBING))
KeepActorOnFloor(actor);
if ((actor->user.WaitTics -= ACTORMOVETICS) <= 0)
@ -528,7 +528,7 @@ int SetupTrashCan(DSWActor* actor)
{
ANIMATOR DoActorDecide;
if (!TEST(actor->spr.cstat, CSTAT_SPRITE_RESTORE))
if (!(actor->spr.cstat & CSTAT_SPRITE_RESTORE))
{
SpawnUser(actor, TRASHCAN,s_TrashCanStand);
actor->user.Health = 60;
@ -560,7 +560,7 @@ int DoTrashCan(DSWActor* actor)
if (actor->user.Flags & (SPR_SLIDING))
DoActorSlide(actor);
if (!TEST(actor->user.Flags, SPR_JUMPING | SPR_FALLING | SPR_CLIMBING))
if (!(actor->user.Flags & (SPR_JUMPING | SPR_FALLING | SPR_CLIMBING)))
{
KeepActorOnFloor(actor);
}
@ -575,7 +575,7 @@ int TrashCanPain(DSWActor* actor)
if (actor->user.Flags & (SPR_SLIDING))
DoActorSlide(actor);
if (!TEST(actor->user.Flags,SPR_CLIMBING))
if (!(actor->user.Flags & SPR_CLIMBING))
KeepActorOnFloor(actor);
if ((actor->user.WaitTics -= ACTORMOVETICS) <= 0)
@ -621,7 +621,7 @@ int SetupPachinkoLight(DSWActor* actor)
{
ANIMATOR DoActorDecide;
if (!TEST(actor->spr.cstat, CSTAT_SPRITE_RESTORE))
if (!(actor->spr.cstat & CSTAT_SPRITE_RESTORE))
{
SpawnUser(actor, PACHINKOLIGHT_R0,s_PachinkoLightStand);
actor->user.Health = 1;
@ -711,7 +711,7 @@ int SetupPachinko1(DSWActor* actor)
{
ANIMATOR DoActorDecide;
if (!TEST(actor->spr.cstat, CSTAT_SPRITE_RESTORE))
if (!(actor->spr.cstat & CSTAT_SPRITE_RESTORE))
{
SpawnUser(actor, PACHINKO1,s_Pachinko1Stand);
actor->user.Health = 1;
@ -863,7 +863,7 @@ int SetupPachinko2(DSWActor* actor)
{
ANIMATOR DoActorDecide;
if (!TEST(actor->spr.cstat, CSTAT_SPRITE_RESTORE))
if (!(actor->spr.cstat & CSTAT_SPRITE_RESTORE))
{
SpawnUser(actor, PACHINKO2,s_Pachinko2Stand);
actor->user.Health = 1;
@ -939,7 +939,7 @@ int SetupPachinko3(DSWActor* actor)
{
ANIMATOR DoActorDecide;
if (!TEST(actor->spr.cstat, CSTAT_SPRITE_RESTORE))
if (!(actor->spr.cstat & CSTAT_SPRITE_RESTORE))
{
SpawnUser(actor, PACHINKO3,s_Pachinko3Stand);
actor->user.Health = 1;
@ -1016,7 +1016,7 @@ int SetupPachinko4(DSWActor* actor)
{
ANIMATOR DoActorDecide;
if (!TEST(actor->spr.cstat, CSTAT_SPRITE_RESTORE))
if (!(actor->spr.cstat & CSTAT_SPRITE_RESTORE))
{
SpawnUser(actor, PACHINKO4,s_Pachinko4Stand);
actor->user.Health = 1;
@ -1121,7 +1121,7 @@ int SetupCarGirl(DSWActor* actor)
{
ANIMATOR DoActorDecide;
if (!TEST(actor->spr.cstat, CSTAT_SPRITE_RESTORE))
if (!(actor->spr.cstat & CSTAT_SPRITE_RESTORE))
{
SpawnUser(actor, CARGIRL_R0,s_CarGirlStand);
actor->user.Health = 60;
@ -1181,7 +1181,7 @@ int DoCarGirl(DSWActor* actor)
}
// stay on floor unless doing certain things
if (!TEST(actor->user.Flags, SPR_JUMPING | SPR_FALLING | SPR_CLIMBING))
if (!(actor->user.Flags & (SPR_JUMPING | SPR_FALLING | SPR_CLIMBING)))
{
KeepActorOnFloor(actor);
}
@ -1200,7 +1200,7 @@ int NullCarGirl(DSWActor* actor)
DoActorPickClosePlayer(actor);
ICanSee = FAFcansee(actor, ActorZOfMiddle(actor), actor->user.targetActor, ActorZOfMiddle(actor->user.targetActor));
if (!TEST(actor->user.Flags,SPR_CLIMBING))
if (!(actor->user.Flags & SPR_CLIMBING))
KeepActorOnFloor(actor);
if (actor->user.FlagOwner != 1)
@ -1232,7 +1232,7 @@ int NullCarGirl(DSWActor* actor)
int CarGirlUzi(DSWActor* actor)
{
if (!TEST(actor->user.Flags,SPR_CLIMBING))
if (!(actor->user.Flags & SPR_CLIMBING))
KeepActorOnFloor(actor);
if ((actor->user.WaitTics -= ACTORMOVETICS) <= 0)
@ -1322,7 +1322,7 @@ int SetupMechanicGirl(DSWActor* actor)
{
ANIMATOR DoActorDecide;
if (!TEST(actor->spr.cstat, CSTAT_SPRITE_RESTORE))
if (!(actor->spr.cstat & CSTAT_SPRITE_RESTORE))
{
SpawnUser(actor, MECHANICGIRL_R0,s_MechanicGirlStand);
actor->user.Health = 60;
@ -1381,7 +1381,7 @@ int DoMechanicGirl(DSWActor* actor)
}
// stay on floor unless doing certain things
if (!TEST(actor->user.Flags, SPR_JUMPING | SPR_FALLING | SPR_CLIMBING))
if (!(actor->user.Flags & (SPR_JUMPING | SPR_FALLING | SPR_CLIMBING)))
{
KeepActorOnFloor(actor);
}
@ -1400,7 +1400,7 @@ int NullMechanicGirl(DSWActor* actor)
DoActorPickClosePlayer(actor);
ICanSee = FAFcansee(actor, ActorZOfMiddle(actor), actor->user.targetActor, ActorZOfMiddle(actor->user.targetActor));
if (!TEST(actor->user.Flags,SPR_CLIMBING))
if (!(actor->user.Flags & SPR_CLIMBING))
KeepActorOnFloor(actor);
if (actor->user.FlagOwner != 1)
@ -1432,7 +1432,7 @@ int NullMechanicGirl(DSWActor* actor)
int MechanicGirlDrill(DSWActor* actor)
{
if (!TEST(actor->user.Flags,SPR_CLIMBING))
if (!(actor->user.Flags & SPR_CLIMBING))
KeepActorOnFloor(actor);
if ((actor->user.WaitTics -= ACTORMOVETICS) <= 0)
@ -1522,7 +1522,7 @@ int SetupSailorGirl(DSWActor* actor)
{
ANIMATOR DoActorDecide;
if (!TEST(actor->spr.cstat, CSTAT_SPRITE_RESTORE))
if (!(actor->spr.cstat & CSTAT_SPRITE_RESTORE))
{
SpawnUser(actor, SAILORGIRL_R0,s_SailorGirlStand);
actor->user.Health = 60;
@ -1586,7 +1586,7 @@ int DoSailorGirl(DSWActor* actor)
}
// stay on floor unless doing certain things
if (!TEST(actor->user.Flags, SPR_JUMPING | SPR_FALLING | SPR_CLIMBING))
if (!(actor->user.Flags & (SPR_JUMPING | SPR_FALLING | SPR_CLIMBING)))
{
KeepActorOnFloor(actor);
}
@ -1606,7 +1606,7 @@ int NullSailorGirl(DSWActor* actor)
DoActorPickClosePlayer(actor);
ICanSee = FAFcansee(actor, ActorZOfMiddle(actor), actor->user.targetActor, ActorZOfMiddle(actor->user.targetActor));
if (!TEST(actor->user.Flags,SPR_CLIMBING))
if (!(actor->user.Flags & SPR_CLIMBING))
KeepActorOnFloor(actor);
if (actor->user.FlagOwner != 1)
@ -1642,7 +1642,7 @@ int NullSailorGirl(DSWActor* actor)
int SailorGirlThrow(DSWActor* actor)
{
if (!TEST(actor->user.Flags,SPR_CLIMBING))
if (!(actor->user.Flags & SPR_CLIMBING))
KeepActorOnFloor(actor);
if ((actor->user.WaitTics -= ACTORMOVETICS) <= 0)
@ -1716,7 +1716,7 @@ int SetupPruneGirl(DSWActor* actor)
{
ANIMATOR DoActorDecide;
if (!TEST(actor->spr.cstat, CSTAT_SPRITE_RESTORE))
if (!(actor->spr.cstat & CSTAT_SPRITE_RESTORE))
{
SpawnUser(actor, PRUNEGIRL_R0,s_PruneGirlStand);
actor->user.Health = 60;
@ -1791,7 +1791,7 @@ int DoPruneGirl(DSWActor* actor)
}
// stay on floor unless doing certain things
if (!TEST(actor->user.Flags, SPR_JUMPING | SPR_FALLING | SPR_CLIMBING))
if (!(actor->user.Flags & (SPR_JUMPING | SPR_FALLING | SPR_CLIMBING)))
{
KeepActorOnFloor(actor);
}
@ -1810,7 +1810,7 @@ int NullPruneGirl(DSWActor* actor)
DoActorPickClosePlayer(actor);
ICanSee = FAFcansee(actor, ActorZOfMiddle(actor), actor->user.targetActor, ActorZOfMiddle(actor->user.targetActor));
if (!TEST(actor->user.Flags,SPR_CLIMBING))
if (!(actor->user.Flags & SPR_CLIMBING))
KeepActorOnFloor(actor);
if (actor->user.FlagOwner != 1)
@ -1841,7 +1841,7 @@ int NullPruneGirl(DSWActor* actor)
int PruneGirlUzi(DSWActor* actor)
{
if (!TEST(actor->user.Flags,SPR_CLIMBING))
if (!(actor->user.Flags & SPR_CLIMBING))
KeepActorOnFloor(actor);
if ((actor->user.WaitTics -= ACTORMOVETICS) <= 0)

View file

@ -1824,7 +1824,7 @@ int SetupNinja(DSWActor* actor)
int RedNinjaHealth = MinEnemySkill <= Skill ? HEALTH_RED_NINJA : HEALTH_NINJA;
if (Skill < MinEnemySkill - 1) actor->spr.pal = 0;
if (!TEST(actor->spr.cstat, CSTAT_SPRITE_RESTORE))
if (!(actor->spr.cstat & CSTAT_SPRITE_RESTORE))
{
SpawnUser(actor, NINJA_RUN_R0, s_NinjaRun[0]);
actor->user.Health = HEALTH_NINJA;
@ -1839,7 +1839,7 @@ int SetupNinja(DSWActor* actor)
{
actor->user.Attrib = &InvisibleNinjaAttrib;
EnemyDefaults(actor, &NinjaGreenActionSet, &NinjaPersonality);
if (!TEST(actor->spr.cstat, CSTAT_SPRITE_RESTORE))
if (!(actor->spr.cstat & CSTAT_SPRITE_RESTORE))
actor->user.Health = RedNinjaHealth;
actor->spr.cstat |= (CSTAT_SPRITE_TRANSLUCENT);
actor->spr.shade = 127;
@ -1867,7 +1867,7 @@ int SetupNinja(DSWActor* actor)
{
actor->user.Attrib = &NinjaAttrib;
EnemyDefaults(actor, &NinjaRedActionSet, &NinjaPersonality);
if (!TEST(actor->spr.cstat, CSTAT_SPRITE_RESTORE))
if (!(actor->spr.cstat & CSTAT_SPRITE_RESTORE))
actor->user.Health = RedNinjaHealth;
actor->spr.pal = actor->user.spal = PALETTE_PLAYER3;
if (pic == NINJA_CRAWL_R0)
@ -1892,7 +1892,7 @@ int SetupNinja(DSWActor* actor)
{
actor->user.Attrib = &NinjaAttrib;
EnemyDefaults(actor, &NinjaSeekerActionSet, &NinjaPersonality);
if (!TEST(actor->spr.cstat, CSTAT_SPRITE_RESTORE))
if (!(actor->spr.cstat & CSTAT_SPRITE_RESTORE))
actor->user.Health = RedNinjaHealth;
actor->spr.pal = actor->user.spal = PAL_XLAT_LT_TAN;
actor->user.Attrib = &NinjaAttrib;
@ -1901,7 +1901,7 @@ int SetupNinja(DSWActor* actor)
{
actor->user.Attrib = &NinjaAttrib;
EnemyDefaults(actor, &NinjaGrenadeActionSet, &NinjaPersonality);
if (!TEST(actor->spr.cstat, CSTAT_SPRITE_RESTORE))
if (!(actor->spr.cstat & CSTAT_SPRITE_RESTORE))
actor->user.Health = RedNinjaHealth;
actor->spr.pal = actor->user.spal = PAL_XLAT_LT_GREY;
actor->user.Attrib = &NinjaAttrib;
@ -2001,7 +2001,7 @@ int DoNinjaMove(DSWActor* actor)
}
// jumping and falling
if (actor->user.Flags & (SPR_JUMPING | SPR_FALLING) && !TEST(actor->user.Flags, SPR_CLIMBING))
if (actor->user.Flags & (SPR_JUMPING | SPR_FALLING) && !(actor->user.Flags & SPR_CLIMBING))
{
if (actor->user.Flags & (SPR_JUMPING))
DoActorJump(actor);
@ -2010,7 +2010,7 @@ int DoNinjaMove(DSWActor* actor)
}
// sliding
if (actor->user.Flags & (SPR_SLIDING) && !TEST(actor->user.Flags, SPR_CLIMBING))
if (actor->user.Flags & (SPR_SLIDING) && !(actor->user.Flags & SPR_CLIMBING))
DoActorSlide(actor);
// !AIC - do track or call current action function - such as DoActorMoveCloser()
@ -2022,7 +2022,7 @@ int DoNinjaMove(DSWActor* actor)
}
// stay on floor unless doing certain things
if (!TEST(actor->user.Flags, SPR_JUMPING | SPR_FALLING | SPR_CLIMBING))
if (!(actor->user.Flags & (SPR_JUMPING | SPR_FALLING | SPR_CLIMBING)))
{
KeepActorOnFloor(actor);
}
@ -2066,10 +2066,10 @@ int NullNinja(DSWActor* actor)
{
if (actor->user.WaitTics > 0) actor->user.WaitTics -= ACTORMOVETICS;
if (actor->user.Flags & (SPR_SLIDING) && !TEST(actor->user.Flags, SPR_CLIMBING) && !TEST(actor->user.Flags, SPR_JUMPING|SPR_FALLING))
if (actor->user.Flags & (SPR_SLIDING) && !(actor->user.Flags & SPR_CLIMBING) && !TEST(actor->user.Flags, SPR_JUMPING|SPR_FALLING))
DoActorSlide(actor);
if (!TEST(actor->user.Flags, SPR_CLIMBING) && !TEST(actor->user.Flags, SPR_JUMPING|SPR_FALLING))
if (!(actor->user.Flags & SPR_CLIMBING) && !TEST(actor->user.Flags, SPR_JUMPING|SPR_FALLING))
KeepActorOnFloor(actor);
DoActorSectorDamage(actor);

View file

@ -941,8 +941,8 @@ void InitWeaponSword(PLAYERp pp)
if (Prediction)
return;
if (!TEST(pp->WpnFlags, BIT(WPN_SWORD)) ||
TEST(pp->Flags, PF_WEAPON_RETRACT))
if (!(pp->WpnFlags &BIT(WPN_SWORD)) ||
(pp->Flags & PF_WEAPON_RETRACT))
return;
// needed for death sequence when the SWORD was your weapon when you died
@ -1002,7 +1002,7 @@ void InitWeaponSword(PLAYERp pp)
void pSwordPresent(PANEL_SPRITEp psp)
{
if (TEST(psp->PlayerP->Flags, PF_WEAPON_RETRACT))
if (psp->PlayerP->Flags & (PF_WEAPON_RETRACT))
return;
psp->backupy();
@ -1134,7 +1134,7 @@ void pSwordSlideDownR(PANEL_SPRITEp psp)
void pSwordBobSetup(PANEL_SPRITEp psp)
{
if (TEST(psp->flags, PANF_BOB))
if (psp->flags & (PANF_BOB))
return;
psp->backupbobcoords();
@ -1162,7 +1162,7 @@ void pSwordHide(PANEL_SPRITEp psp)
void pSwordRest(PANEL_SPRITEp psp)
{
bool force = !!TEST(psp->flags, PANF_UNHIDE_SHOOT);
bool force = !!(psp->flags & PANF_UNHIDE_SHOOT);
if (pWeaponHideKeys(psp, ps_SwordHide))
return;
@ -1177,7 +1177,7 @@ void pSwordRest(PANEL_SPRITEp psp)
pSwordBobSetup(psp);
pWeaponBob(psp, PLAYER_MOVING(psp->PlayerP));
force = !!TEST(psp->flags, PANF_UNHIDE_SHOOT);
force = !!(psp->flags & PANF_UNHIDE_SHOOT);
if ((psp->PlayerP->input.actions & SB_FIRE) || force)
{
@ -1333,9 +1333,9 @@ void InitWeaponStar(PLAYERp pp)
if (Prediction)
return;
if (!TEST(pp->WpnFlags, BIT(WPN_STAR)) ||
if (!(pp->WpnFlags &BIT(WPN_STAR)) ||
pp->WpnAmmo[WPN_STAR] < 3 ||
TEST(pp->Flags, PF_WEAPON_RETRACT))
(pp->Flags & PF_WEAPON_RETRACT))
{
//pp->WpnFirstType = WPN_SWORD;
//InitWeaponSword(pp);
@ -1391,7 +1391,7 @@ void InitWeaponStar(PLAYERp pp)
void pStarPresent(PANEL_SPRITEp psp)
{
if (TEST(psp->PlayerP->Flags, PF_WEAPON_RETRACT))
if (psp->PlayerP->Flags & (PF_WEAPON_RETRACT))
return;
psp->backupy();
@ -1410,7 +1410,7 @@ void pStarPresent(PANEL_SPRITEp psp)
void pStarBobSetup(PANEL_SPRITEp psp)
{
if (TEST(psp->flags, PANF_BOB))
if (psp->flags & (PANF_BOB))
return;
psp->backupbobcoords();
@ -1422,7 +1422,7 @@ void pStarBobSetup(PANEL_SPRITEp psp)
void pLStarBobSetup(PANEL_SPRITEp psp)
{
if (TEST(psp->flags, PANF_BOB))
if (psp->flags & (PANF_BOB))
return;
psp->backupbobcoords();
@ -1449,7 +1449,7 @@ void pStarHide(PANEL_SPRITEp psp)
void pStarRest(PANEL_SPRITEp psp)
{
bool force = !!TEST(psp->flags, PANF_UNHIDE_SHOOT);
bool force = !!(psp->flags & PANF_UNHIDE_SHOOT);
if (pWeaponHideKeys(psp, ps_StarHide))
return;
@ -1865,7 +1865,7 @@ void pUziDoneReload(PANEL_SPRITEp psp)
PLAYERp pp = psp->PlayerP;
if (TEST(psp->flags, PANF_PRIMARY) && pp->WpnUziType == 3)
if (psp->flags & (PANF_PRIMARY) && pp->WpnUziType == 3)
{
// if 2 uzi's and the first one has been reloaded
// kill the first one and make the second one the CurWeapon
@ -1952,9 +1952,9 @@ void InitWeaponUzi(PLAYERp pp)
// make sure you have the uzi, uzi ammo, and not retracting another
// weapon
if (!TEST(pp->WpnFlags, BIT(WPN_UZI)) ||
if (!(pp->WpnFlags &BIT(WPN_UZI)) ||
// pp->WpnAmmo[WPN_UZI] <= 0 ||
TEST(pp->Flags, PF_WEAPON_RETRACT))
(pp->Flags & PF_WEAPON_RETRACT))
return;
// if players uzi is null
@ -2028,7 +2028,7 @@ PANEL_SPRITEp InitWeaponUzi2(PANEL_SPRITEp uzi_orig)
// There is already a second uzi, or it's retracting
if (pp->WpnUziType == 1 || pp->CurWpn->sibling || TEST(pp->Flags, PF_WEAPON_RETRACT)) return nullptr;
if (pp->WpnUziType == 1 || pp->CurWpn->sibling || (pp->Flags & PF_WEAPON_RETRACT)) return nullptr;
// NOTE: PRIMARY is ONLY set when there is a powerup
uzi_orig->flags |= PANF_PRIMARY;
@ -2084,7 +2084,7 @@ PANEL_SPRITEp InitWeaponUziSecondaryReload(PANEL_SPRITEp uzi_orig)
void pUziPresent(PANEL_SPRITEp psp)
{
if (TEST(psp->PlayerP->Flags, PF_WEAPON_RETRACT))
if (psp->PlayerP->Flags & (PF_WEAPON_RETRACT))
return;
psp->backupy();
@ -2109,7 +2109,7 @@ void pUziPresent(PANEL_SPRITEp psp)
// same as pUziPresent only faster for reload sequence
void pUziPresentReload(PANEL_SPRITEp psp)
{
if (TEST(psp->PlayerP->Flags, PF_WEAPON_RETRACT))
if (psp->PlayerP->Flags & (PF_WEAPON_RETRACT))
return;
psp->backupy();
@ -2128,7 +2128,7 @@ void pUziPresentReload(PANEL_SPRITEp psp)
void pUziBobSetup(PANEL_SPRITEp psp)
{
if (TEST(psp->flags, PANF_BOB))
if (psp->flags & (PANF_BOB))
return;
psp->backupbobcoords();
@ -2153,7 +2153,7 @@ void pUziStartReload(PANEL_SPRITEp psp)
psp->flags |= (PANF_RELOAD);
if (TEST(psp->flags, PANF_PRIMARY) && psp->sibling)
if (psp->flags & (PANF_PRIMARY) && psp->sibling)
{
// this is going to KILL Uzi #2 !!!
pSetState(psp->sibling, psp->sibling->RetractState);
@ -2171,7 +2171,7 @@ void pUziHide(PANEL_SPRITEp psp)
{
psp->oy = psp->y = 200 + tileHeight(picnum);
if (TEST(psp->flags, PANF_PRIMARY) && psp->PlayerP->WpnUziType != 1)
if (psp->flags & (PANF_PRIMARY) && psp->PlayerP->WpnUziType != 1)
{
if (pWeaponUnHideKeys(psp, psp->PresentState))
pSetState(psp->sibling, psp->sibling->PresentState);
@ -2186,16 +2186,16 @@ void pUziHide(PANEL_SPRITEp psp)
void pUziRest(PANEL_SPRITEp psp)
{
bool shooting;
bool force = !!TEST(psp->flags, PANF_UNHIDE_SHOOT);
bool force = !!(psp->flags & PANF_UNHIDE_SHOOT);
// If you have two uzi's, but one didn't come up, spawn it
if (TEST(psp->PlayerP->Flags, PF_TWO_UZI) && psp->sibling == nullptr)
if (psp->PlayerP->Flags & (PF_TWO_UZI) && psp->sibling == nullptr)
{
InitWeaponUzi2(psp);
}
if (TEST(psp->flags, PANF_PRIMARY) && psp->sibling)
if (psp->flags & (PANF_PRIMARY) && psp->sibling)
{
if (pWeaponHideKeys(psp, ps_UziHide))
{
@ -2210,7 +2210,7 @@ void pUziRest(PANEL_SPRITEp psp)
return;
}
if (TEST(psp->flags, PANF_SECONDARY))
if (psp->flags & (PANF_SECONDARY))
pUziOverlays(psp, CHAMBER_REST);
SetVisNorm();
@ -2242,7 +2242,7 @@ void pUziAction(PANEL_SPRITEp psp)
if (shooting)
{
if (TEST(psp->flags, PANF_SECONDARY))
if (psp->flags & (PANF_SECONDARY))
{
alternate++;
if (alternate > 6) alternate = 0;
@ -2262,7 +2262,7 @@ void pUziAction(PANEL_SPRITEp psp)
}
else
{
if (TEST(psp->flags, PANF_SECONDARY))
if (psp->flags & (PANF_SECONDARY))
pUziOverlays(psp, CHAMBER_REST);
pUziBobSetup(psp);
pWeaponBob(psp, PLAYER_MOVING(psp->PlayerP) || shooting);
@ -2276,13 +2276,13 @@ void pUziFire(PANEL_SPRITEp psp)
if (!WeaponOK(psp->PlayerP))
return;
if (TEST(psp->flags, PANF_SECONDARY) && pp->WpnUziType > 0) return;
if (psp->flags & (PANF_SECONDARY) && pp->WpnUziType > 0) return;
InitUzi(psp->PlayerP);
SpawnUziShell(psp);
// If its the second Uzi, give the shell back only if it's a reload count to keep #'s even
if (TEST(psp->flags, PANF_SECONDARY))
if (psp->flags & (PANF_SECONDARY))
{
if (pp->Flags & (PF_TWO_UZI) && psp->sibling)
{
@ -2325,7 +2325,7 @@ void pUziRetract(PANEL_SPRITEp psp)
{
// if in the reload phase and its retracting then get rid of uzi
// no matter whether it is PRIMARY/SECONDARY/neither.
if (TEST(psp->flags, PANF_RELOAD))
if (psp->flags & (PANF_RELOAD))
{
psp->PlayerP->Flags &= ~(PF_WEAPON_RETRACT);
psp->PlayerP->Wpn[WPN_UZI] = nullptr;
@ -2333,13 +2333,13 @@ void pUziRetract(PANEL_SPRITEp psp)
else
{
// NOT reloading here
if (TEST(psp->flags, PANF_PRIMARY))
if (psp->flags & (PANF_PRIMARY))
{
// only reset when primary goes off the screen
psp->PlayerP->Flags &= ~(PF_WEAPON_RETRACT);
psp->PlayerP->Wpn[WPN_UZI] = nullptr;
}
else if (TEST(psp->flags, PANF_SECONDARY))
else if (psp->flags & (PANF_SECONDARY))
{
// primarily for beginning of reload sequence where seconary
// is taken off of the screen. Lets the primary know that
@ -2467,11 +2467,11 @@ void SpawnShotgunShell(PANEL_SPRITEp psp)
void pShotgunShell(PANEL_SPRITEp psp)
{
if (TEST(psp->flags, PANF_JUMPING))
if (psp->flags & (PANF_JUMPING))
{
DoPanelJump(psp);
}
else if (TEST(psp->flags, PANF_FALLING))
else if (psp->flags & (PANF_FALLING))
{
DoPanelFall(psp);
}
@ -2611,9 +2611,9 @@ void InitWeaponShotgun(PLAYERp pp)
pp->WeaponType = WPN_SHOTGUN;
if (!TEST(pp->WpnFlags, BIT(pp->WeaponType)) ||
if (!(pp->WpnFlags &BIT(pp->WeaponType)) ||
// pp->WpnAmmo[pp->WeaponType] <= 0 ||
TEST(pp->Flags, PF_WEAPON_RETRACT))
(pp->Flags & PF_WEAPON_RETRACT))
return;
if (!pp->Wpn[pp->WeaponType])
@ -2736,7 +2736,7 @@ void pShotgunReloadUp(PANEL_SPRITEp psp)
void pShotgunPresent(PANEL_SPRITEp psp)
{
if (TEST(psp->PlayerP->Flags, PF_WEAPON_RETRACT))
if (psp->PlayerP->Flags & (PF_WEAPON_RETRACT))
return;
// Needed for recoil
@ -2757,7 +2757,7 @@ void pShotgunPresent(PANEL_SPRITEp psp)
void pShotgunBobSetup(PANEL_SPRITEp psp)
{
if (TEST(psp->flags, PANF_BOB))
if (psp->flags & (PANF_BOB))
return;
psp->backupbobcoords();
@ -2846,7 +2846,7 @@ bool pShotgunReloadTest(PANEL_SPRITEp psp)
void pShotgunRest(PANEL_SPRITEp psp)
{
bool force = !!TEST(psp->flags, PANF_UNHIDE_SHOOT);
bool force = !!(psp->flags & PANF_UNHIDE_SHOOT);
//short ammo = psp->PlayerP->WpnAmmo[psp->PlayerP->WeaponType];
int ammo = psp->PlayerP->WpnAmmo[WPN_SHOTGUN];
int lastammo = psp->PlayerP->WpnShotgunLastShell;
@ -2894,7 +2894,7 @@ void pShotgunRest(PANEL_SPRITEp psp)
void pShotgunRestTest(PANEL_SPRITEp psp)
{
bool force = !!TEST(psp->flags, PANF_UNHIDE_SHOOT);
bool force = !!(psp->flags & PANF_UNHIDE_SHOOT);
if (psp->PlayerP->WpnShotgunType == 1 && !pShotgunReloadTest(psp))
force = true;
@ -3083,9 +3083,9 @@ void InitWeaponRail(PLAYERp pp)
pp->WeaponType = WPN_RAIL;
if (!TEST(pp->WpnFlags, BIT(pp->WeaponType)) ||
if (!(pp->WpnFlags &BIT(pp->WeaponType)) ||
// pp->WpnAmmo[pp->WeaponType] <= 0 ||
TEST(pp->Flags, PF_WEAPON_RETRACT))
(pp->Flags & PF_WEAPON_RETRACT))
return;
if (!pp->Wpn[pp->WeaponType])
@ -3168,7 +3168,7 @@ void pRailRecoilUp(PANEL_SPRITEp psp)
void pRailPresent(PANEL_SPRITEp psp)
{
if (TEST(psp->PlayerP->Flags, PF_WEAPON_RETRACT))
if (psp->PlayerP->Flags & (PF_WEAPON_RETRACT))
return;
// Needed for recoil
@ -3189,7 +3189,7 @@ void pRailPresent(PANEL_SPRITEp psp)
void pRailBobSetup(PANEL_SPRITEp psp)
{
if (TEST(psp->flags, PANF_BOB))
if (psp->flags & (PANF_BOB))
return;
psp->backupbobcoords();
@ -3224,7 +3224,7 @@ void pRailOkTest(PANEL_SPRITEp psp)
void pRailRest(PANEL_SPRITEp psp)
{
bool force = !!TEST(psp->flags, PANF_UNHIDE_SHOOT);
bool force = !!(psp->flags & PANF_UNHIDE_SHOOT);
if (SW_SHAREWARE) return;
@ -3258,7 +3258,7 @@ void pRailRest(PANEL_SPRITEp psp)
void pRailRestTest(PANEL_SPRITEp psp)
{
bool force = !!TEST(psp->flags, PANF_UNHIDE_SHOOT);
bool force = !!(psp->flags & PANF_UNHIDE_SHOOT);
if (pWeaponHideKeys(psp, ps_RailHide))
return;
@ -3504,9 +3504,9 @@ void InitWeaponHothead(PLAYERp pp)
if (Prediction)
return;
if (!TEST(pp->WpnFlags, BIT(WPN_HOTHEAD)) ||
if (!(pp->WpnFlags &BIT(WPN_HOTHEAD)) ||
// pp->WpnAmmo[WPN_HOTHEAD] <= 0 ||
TEST(pp->Flags, PF_WEAPON_RETRACT))
(pp->Flags & PF_WEAPON_RETRACT))
return;
if (!pp->Wpn[WPN_HOTHEAD])
@ -3578,7 +3578,7 @@ void pHotheadRestTest(PANEL_SPRITEp psp)
void pHotheadPresent(PANEL_SPRITEp psp)
{
if (TEST(psp->PlayerP->Flags, PF_WEAPON_RETRACT))
if (psp->PlayerP->Flags & (PF_WEAPON_RETRACT))
return;
psp->backupy();
@ -3595,7 +3595,7 @@ void pHotheadPresent(PANEL_SPRITEp psp)
void pHotheadBobSetup(PANEL_SPRITEp psp)
{
if (TEST(psp->flags, PANF_BOB))
if (psp->flags & (PANF_BOB))
return;
psp->backupbobcoords();
@ -3624,7 +3624,7 @@ void pHotheadHide(PANEL_SPRITEp psp)
void pHotheadRest(PANEL_SPRITEp psp)
{
bool force = !!TEST(psp->flags, PANF_UNHIDE_SHOOT);
bool force = !!(psp->flags & PANF_UNHIDE_SHOOT);
if (SW_SHAREWARE) return;
@ -3912,9 +3912,9 @@ void InitWeaponMicro(PLAYERp pp)
if (Prediction)
return;
if (!TEST(pp->WpnFlags, BIT(WPN_MICRO)) ||
if (!(pp->WpnFlags &BIT(WPN_MICRO)) ||
// pp->WpnAmmo[WPN_MICRO] <= 0 ||
TEST(pp->Flags, PF_WEAPON_RETRACT))
(pp->Flags & PF_WEAPON_RETRACT))
return;
if (!pp->Wpn[WPN_MICRO])
@ -4003,7 +4003,7 @@ void pMicroPresent(PANEL_SPRITEp psp)
{
PLAYERp pp = psp->PlayerP;
if (TEST(psp->PlayerP->Flags, PF_WEAPON_RETRACT))
if (psp->PlayerP->Flags & (PF_WEAPON_RETRACT))
return;
// Needed for recoil
@ -4030,7 +4030,7 @@ void pMicroPresent(PANEL_SPRITEp psp)
void pMicroBobSetup(PANEL_SPRITEp psp)
{
if (TEST(psp->flags, PANF_BOB))
if (psp->flags & (PANF_BOB))
return;
psp->backupbobcoords();
@ -4152,7 +4152,7 @@ PANEL_STATE ps_MicroNukeFlash[] =
void pMicroRest(PANEL_SPRITEp psp)
{
PLAYERp pp = psp->PlayerP;
bool force = !!TEST(psp->flags, PANF_UNHIDE_SHOOT);
bool force = !!(psp->flags & PANF_UNHIDE_SHOOT);
if (pWeaponHideKeys(psp, ps_MicroHide))
return;
@ -4380,9 +4380,9 @@ void InitWeaponHeart(PLAYERp pp)
if (Prediction)
return;
if (!TEST(pp->WpnFlags, BIT(WPN_HEART)) ||
if (!(pp->WpnFlags &BIT(WPN_HEART)) ||
// pp->WpnAmmo[WPN_HEART] <= 0 ||
TEST(pp->Flags, PF_WEAPON_RETRACT))
(pp->Flags & PF_WEAPON_RETRACT))
return;
if (!pp->Wpn[WPN_HEART])
@ -4418,7 +4418,7 @@ void InitWeaponHeart(PLAYERp pp)
void pHeartPresent(PANEL_SPRITEp psp)
{
if (TEST(psp->PlayerP->Flags, PF_WEAPON_RETRACT))
if (psp->PlayerP->Flags & (PF_WEAPON_RETRACT))
return;
psp->backupy();
@ -4434,7 +4434,7 @@ void pHeartPresent(PANEL_SPRITEp psp)
void pHeartBobSetup(PANEL_SPRITEp psp)
{
if (TEST(psp->flags, PANF_BOB))
if (psp->flags & (PANF_BOB))
return;
psp->backupbobcoords();
@ -4461,7 +4461,7 @@ void pHeartHide(PANEL_SPRITEp psp)
void pHeartRest(PANEL_SPRITEp psp)
{
bool force = !!TEST(psp->flags, PANF_UNHIDE_SHOOT);
bool force = !!(psp->flags & PANF_UNHIDE_SHOOT);
if (pWeaponHideKeys(psp, ps_HeartHide))
return;
@ -4668,11 +4668,11 @@ void SpawnSmallHeartBlood(PANEL_SPRITEp psp)
void pHeartBlood(PANEL_SPRITEp psp)
{
if (TEST(psp->flags, PANF_JUMPING))
if (psp->flags & (PANF_JUMPING))
{
DoPanelJump(psp);
}
else if (TEST(psp->flags, PANF_FALLING))
else if (psp->flags & (PANF_FALLING))
{
DoPanelFall(psp);
}
@ -4836,9 +4836,9 @@ void InitWeaponGrenade(PLAYERp pp)
if (Prediction)
return;
if (!TEST(pp->WpnFlags, BIT(WPN_GRENADE)) ||
if (!(pp->WpnFlags &BIT(WPN_GRENADE)) ||
// pp->WpnAmmo[WPN_GRENADE] <= 0 ||
TEST(pp->Flags, PF_WEAPON_RETRACT))
(pp->Flags & PF_WEAPON_RETRACT))
return;
if (!pp->Wpn[WPN_GRENADE])
@ -4921,7 +4921,7 @@ void pGrenadeRecoilUp(PANEL_SPRITEp psp)
void pGrenadePresent(PANEL_SPRITEp psp)
{
if (TEST(psp->PlayerP->Flags, PF_WEAPON_RETRACT))
if (psp->PlayerP->Flags & (PF_WEAPON_RETRACT))
return;
psp->backupcoords();
@ -4947,7 +4947,7 @@ void pGrenadePresent(PANEL_SPRITEp psp)
void pGrenadeBobSetup(PANEL_SPRITEp psp)
{
if (TEST(psp->flags, PANF_BOB))
if (psp->flags & (PANF_BOB))
return;
psp->backupbobcoords();
@ -4977,7 +4977,7 @@ void pGrenadeHide(PANEL_SPRITEp psp)
void pGrenadeRest(PANEL_SPRITEp psp)
{
bool force = !!TEST(psp->flags, PANF_UNHIDE_SHOOT);
bool force = !!(psp->flags & PANF_UNHIDE_SHOOT);
if (pWeaponHideKeys(psp, ps_GrenadeHide))
return;
@ -5098,9 +5098,9 @@ void InitWeaponMine(PLAYERp pp)
if (pp->WpnAmmo[WPN_MINE] <= 0)
PutStringInfo(pp,"Out of Sticky Bombs!");
if (!TEST(pp->WpnFlags, BIT(WPN_MINE)) ||
if (!(pp->WpnFlags &BIT(WPN_MINE)) ||
pp->WpnAmmo[WPN_MINE] <= 0 ||
TEST(pp->Flags, PF_WEAPON_RETRACT))
(pp->Flags & PF_WEAPON_RETRACT))
return;
if (!pp->Wpn[WPN_MINE])
@ -5169,7 +5169,7 @@ void pMineRaise(PANEL_SPRITEp psp)
void pMinePresent(PANEL_SPRITEp psp)
{
if (TEST(psp->PlayerP->Flags, PF_WEAPON_RETRACT))
if (psp->PlayerP->Flags & (PF_WEAPON_RETRACT))
return;
psp->backupy();
@ -5186,7 +5186,7 @@ void pMinePresent(PANEL_SPRITEp psp)
void pMineBobSetup(PANEL_SPRITEp psp)
{
if (TEST(psp->flags, PANF_BOB))
if (psp->flags & (PANF_BOB))
return;
psp->backupbobcoords();
@ -5214,7 +5214,7 @@ void pMineHide(PANEL_SPRITEp psp)
void pMineRest(PANEL_SPRITEp psp)
{
bool force = !!TEST(psp->flags, PANF_UNHIDE_SHOOT);
bool force = !!(psp->flags & PANF_UNHIDE_SHOOT);
if (pWeaponHideKeys(psp, ps_MineHide))
return;
@ -5729,9 +5729,9 @@ void InitWeaponFist(PLAYERp pp)
if (Prediction)
return;
if (!TEST(pp->WpnFlags, BIT(WPN_FIST)) ||
if (!(pp->WpnFlags &BIT(WPN_FIST)) ||
//pp->WpnAmmo[WPN_FIST] <= 0 ||
TEST(pp->Flags, PF_WEAPON_RETRACT))
(pp->Flags & PF_WEAPON_RETRACT))
{
pp->WpnFirstType = WPN_SWORD;
InitWeaponSword(pp);
@ -5782,7 +5782,7 @@ void pFistPresent(PANEL_SPRITEp psp)
{
int rnd;
if (TEST(psp->PlayerP->Flags, PF_WEAPON_RETRACT))
if (psp->PlayerP->Flags & (PF_WEAPON_RETRACT))
return;
psp->backupy();
@ -5993,7 +5993,7 @@ void pFistSlideDownR(PANEL_SPRITEp psp)
void pFistBobSetup(PANEL_SPRITEp psp)
{
if (TEST(psp->flags, PANF_BOB))
if (psp->flags & (PANF_BOB))
return;
psp->backupbobcoords();
@ -6020,7 +6020,7 @@ void pFistHide(PANEL_SPRITEp psp)
void pFistRest(PANEL_SPRITEp psp)
{
bool force = !!TEST(psp->flags, PANF_UNHIDE_SHOOT);
bool force = !!(psp->flags & PANF_UNHIDE_SHOOT);
if (pWeaponHideKeys(psp, ps_FistHide))
return;
@ -6035,7 +6035,7 @@ void pFistRest(PANEL_SPRITEp psp)
pFistBobSetup(psp);
pWeaponBob(psp, PLAYER_MOVING(psp->PlayerP));
force = !!TEST(psp->flags, PANF_UNHIDE_SHOOT);
force = !!(psp->flags & PANF_UNHIDE_SHOOT);
if (psp->ActionState == ps_Kick)
psp->ActionState = ps_FistSwing;
@ -6125,12 +6125,12 @@ void pWeaponForceRest(PLAYERp pp)
bool pWeaponUnHideKeys(PANEL_SPRITEp psp, PANEL_STATEp state)
{
// initing the other weapon will take care of this
if (TEST(psp->flags, PANF_DEATH_HIDE))
if (psp->flags & (PANF_DEATH_HIDE))
{
return false;
}
if (TEST(psp->flags, PANF_WEAPON_HIDE))
if (psp->flags & (PANF_WEAPON_HIDE))
{
if (!TEST(psp->PlayerP->Flags, PF_WEAPON_DOWN))
{
@ -6171,14 +6171,14 @@ bool pWeaponUnHideKeys(PANEL_SPRITEp psp, PANEL_STATEp state)
bool pWeaponHideKeys(PANEL_SPRITEp psp, PANEL_STATEp state)
{
if (TEST(psp->PlayerP->Flags, PF_DEAD))
if (psp->PlayerP->Flags & (PF_DEAD))
{
psp->flags |= (PANF_DEATH_HIDE);
pSetState(psp, state);
return true;
}
if (TEST(psp->PlayerP->Flags, PF_WEAPON_DOWN))
if (psp->PlayerP->Flags & (PF_WEAPON_DOWN))
{
psp->flags |= (PANF_WEAPON_HIDE);
pSetState(psp, state);
@ -6418,7 +6418,7 @@ void pDisplaySprites(PLAYERp pp, double smoothratio)
if (!TEST(psp->flags, PANF_DRAW_BEFORE_VIEW))
continue;
if (TEST(psp->flags, PANF_SUICIDE))
if (psp->flags & (PANF_SUICIDE))
{
//pKillSprite(psp);
continue;
@ -6521,14 +6521,14 @@ void pDisplaySprites(PLAYERp pp, double smoothratio)
}
// don't draw
if (TEST(psp->flags, PANF_INVISIBLE))
if (psp->flags & (PANF_INVISIBLE))
continue;
if (psp->State && TEST(psp->State->flags, psf_Invisible))
continue;
// if its a weapon sprite and the view is set to the outside don't draw the sprite
if (TEST(psp->flags, PANF_WEAPON_SPRITE))
if (psp->flags & (PANF_WEAPON_SPRITE))
{
sectortype* sectp = nullptr;
int16_t floorshade = 0;
@ -6557,13 +6557,13 @@ void pDisplaySprites(PLAYERp pp, double smoothratio)
shade = overlay_shade = floorshade - 10;
if (TEST(psp->PlayerP->Flags, PF_VIEW_FROM_OUTSIDE))
if (psp->PlayerP->Flags & (PF_VIEW_FROM_OUTSIDE))
{
if (!TEST(psp->PlayerP->Flags, PF_VIEW_OUTSIDE_WEAPON))
continue;
}
if (TEST(psp->PlayerP->Flags, PF_VIEW_FROM_CAMERA))
if (psp->PlayerP->Flags & (PF_VIEW_FROM_CAMERA))
continue;
// !FRANK - this was moved from BELOW this IF statement
@ -6572,12 +6572,12 @@ void pDisplaySprites(PLAYERp pp, double smoothratio)
pal = 0;
}
if (TEST(psp->flags, PANF_TRANSLUCENT))
if (psp->flags & (PANF_TRANSLUCENT))
flags |= (RS_TRANS1);
flags |= (TEST(psp->flags, PANF_TRANS_FLIP));
flags |= (psp->flags & (PANF_TRANS_FLIP));
if (TEST(psp->flags, PANF_CORNER))
if (psp->flags & (PANF_CORNER))
flags |= (RS_TOPLEFT);
if ((psp->State && TEST(psp->State->flags, psf_Xflip)) || TEST(psp->flags, PANF_XFLIP))

View file

@ -1901,7 +1901,7 @@ void DoPlayerSlide(PLAYERp pp)
push_ret = pushmove(&pp->pos, &pp->cursector, ((int)actor->spr.clipdist<<2), pp->ceiling_dist, pp->floor_dist, CLIPMASK_PLAYER);
if (push_ret < 0)
{
if (!TEST(pp->Flags, PF_DEAD))
if (!(pp->Flags & PF_DEAD))
{
PlayerUpdateHealth(pp, -actor->user.Health); // Make sure he dies!
PlayerCheckDeath(pp, nullptr);
@ -1918,7 +1918,7 @@ void DoPlayerSlide(PLAYERp pp)
push_ret = pushmove(&pp->pos, &pp->cursector, ((int)actor->spr.clipdist<<2), pp->ceiling_dist, pp->floor_dist, CLIPMASK_PLAYER);
if (push_ret < 0)
{
if (!TEST(pp->Flags, PF_DEAD))
if (!(pp->Flags & PF_DEAD))
{
PlayerUpdateHealth(pp, -actor->user.Health); // Make sure he dies!
PlayerCheckDeath(pp, nullptr);
@ -2065,7 +2065,7 @@ void DoPlayerMove(PLAYERp pp)
if (push_ret < 0)
{
if (!TEST(pp->Flags, PF_DEAD))
if (!(pp->Flags & PF_DEAD))
{
PlayerUpdateHealth(pp, -actor->user.Health); // Make sure he dies!
PlayerCheckDeath(pp, nullptr);
@ -2094,7 +2094,7 @@ void DoPlayerMove(PLAYERp pp)
if (push_ret < 0)
{
if (!TEST(pp->Flags, PF_DEAD))
if (!(pp->Flags & PF_DEAD))
{
PlayerUpdateHealth(pp, -actor->user.Health); // Make sure he dies!
PlayerCheckDeath(pp, nullptr);
@ -4551,7 +4551,7 @@ void DoPlayerCurrent(PLAYERp pp)
push_ret = pushmove(&pp->pos, &pp->cursector, ((int)pp->actor->spr.clipdist<<2), pp->ceiling_dist, pp->floor_dist, CLIPMASK_PLAYER);
if (push_ret < 0)
{
if (!TEST(pp->Flags, PF_DEAD))
if (!(pp->Flags & PF_DEAD))
{
DSWActor* plActor = pp->actor;
@ -4570,7 +4570,7 @@ void DoPlayerCurrent(PLAYERp pp)
pushmove(&pp->pos, &pp->cursector, ((int)pp->actor->spr.clipdist<<2), pp->ceiling_dist, pp->floor_dist, CLIPMASK_PLAYER);
if (push_ret < 0)
{
if (!TEST(pp->Flags, PF_DEAD))
if (!(pp->Flags & PF_DEAD))
{
DSWActor* plActor = pp->actor;
@ -6229,7 +6229,7 @@ void DoPlayerRun(PLAYERp pp)
if (DebugOperate)
{
if (!TEST(pp->Flags, PF_DEAD) && !Prediction)
if (!(pp->Flags & PF_DEAD) && !Prediction)
{
if (pp->input.actions & SB_OPEN)
{
@ -6436,7 +6436,7 @@ void PlayerTimers(PLAYERp pp)
void ChopsCheck(PLAYERp pp)
{
if (!M_Active() && !TEST(pp->Flags, PF_DEAD) && !pp->sop_riding && numplayers <= 1)
if (!M_Active() && !(pp->Flags & PF_DEAD) && !pp->sop_riding && numplayers <= 1)
{
if (pp->input.actions & ~SB_RUN || pp->input.fvel || pp->input.svel || pp->input.avel || pp->input.horz ||
TEST(pp->Flags, PF_CLIMBING | PF_FALLING | PF_DIVING))
@ -6502,7 +6502,7 @@ void PlayerGlobal(PLAYERp pp)
if (labs(pp->loz - pp->hiz) < min_height)
{
if (!TEST(pp->Flags, PF_DEAD))
if (!(pp->Flags & PF_DEAD))
{
////DSPRINTF(ds,"Squish diff %d, min %d, cz %d, fz %d, lo %d, hi %d",labs(pp->loz - pp->hiz)>>8,min_height>>8, pp->ceiling_dist>>8, pp->floor_dist>>8,pp->lo_sectp-sector,pp->hi_sectp-sector);
//MONO_PRINT(ds);
@ -6646,7 +6646,7 @@ void domovethings(void)
Player[screenpeek].angle.settarget(bvectangbam(deltax, deltay));
}
if (!TEST(pp->Flags, PF_DEAD))
if (!(pp->Flags & PF_DEAD))
{
WeaponOperate(pp);
PlayerOperateEnv(pp);

View file

@ -818,7 +818,7 @@ int SetupRipper(DSWActor* actor)
{
ANIMATOR DoActorDecide;
if (!TEST(actor->spr.cstat, CSTAT_SPRITE_RESTORE))
if (!(actor->spr.cstat & CSTAT_SPRITE_RESTORE))
{
SpawnUser(actor, RIPPER_RUN_R0, s_RipperRun[0]);
actor->user.Health = HEALTH_RIPPER/2; // Baby rippers are weaker
@ -838,7 +838,7 @@ int SetupRipper(DSWActor* actor)
actor->spr.xrepeat = 106;
actor->spr.yrepeat = 90;
if (!TEST(actor->spr.cstat, CSTAT_SPRITE_RESTORE))
if (!(actor->spr.cstat & CSTAT_SPRITE_RESTORE))
actor->user.Health = HEALTH_MOMMA_RIPPER;
actor->spr.clipdist += 128 >> 2;
@ -1022,7 +1022,7 @@ int DoRipperHangJF(DSWActor* actor)
DoFall(actor);
}
if (!TEST(actor->user.Flags, SPR_JUMPING | SPR_FALLING))
if (!(actor->user.Flags & (SPR_JUMPING | SPR_FALLING)))
{
if (DoRipperQuickJump(actor))
return 0;
@ -1084,7 +1084,7 @@ int DoRipperMoveJump(DSWActor* actor)
DoFall(actor);
}
if (!TEST(actor->user.Flags, SPR_JUMPING | SPR_FALLING))
if (!(actor->user.Flags & (SPR_JUMPING | SPR_FALLING)))
{
if (DoRipperQuickJump(actor))
return 0;
@ -1219,7 +1219,7 @@ int DoRipperMove(DSWActor* actor)
}
// if on a player/enemy sprite jump quickly
if (!TEST(actor->user.Flags, SPR_JUMPING | SPR_FALLING))
if (!(actor->user.Flags & (SPR_JUMPING | SPR_FALLING)))
{
if (DoRipperQuickJump(actor))
return 0;

View file

@ -886,7 +886,7 @@ int SetupRipper2(DSWActor* actor)
{
ANIMATOR DoActorDecide;
if (!TEST(actor->spr.cstat, CSTAT_SPRITE_RESTORE))
if (!(actor->spr.cstat & CSTAT_SPRITE_RESTORE))
{
SpawnUser(actor, RIPPER2_RUN_R0, s_Ripper2Run[0]);
actor->user.Health = HEALTH_RIPPER2;
@ -906,7 +906,7 @@ int SetupRipper2(DSWActor* actor)
actor->spr.xrepeat += 40;
actor->spr.yrepeat += 40;
if (!TEST(actor->spr.cstat, CSTAT_SPRITE_RESTORE))
if (!(actor->spr.cstat & CSTAT_SPRITE_RESTORE))
actor->user.Health = HEALTH_MOMMA_RIPPER;
actor->spr.clipdist += 128 >> 2;
@ -1042,7 +1042,7 @@ int DoRipper2HangJF(DSWActor* actor)
DoFall(actor);
}
if (!TEST(actor->user.Flags, SPR_JUMPING | SPR_FALLING))
if (!(actor->user.Flags & (SPR_JUMPING | SPR_FALLING)))
{
if (DoRipper2QuickJump(actor))
return 0;
@ -1106,7 +1106,7 @@ int DoRipper2MoveJump(DSWActor* actor)
DoFall(actor);
}
if (!TEST(actor->user.Flags, SPR_JUMPING | SPR_FALLING))
if (!(actor->user.Flags & (SPR_JUMPING | SPR_FALLING)))
{
if (DoRipper2QuickJump(actor))
return 0;
@ -1247,7 +1247,7 @@ int DoRipper2Move(DSWActor* actor)
}
// if on a player/enemy sprite jump quickly
if (!TEST(actor->user.Flags, SPR_JUMPING | SPR_FALLING))
if (!(actor->user.Flags & (SPR_JUMPING | SPR_FALLING)))
{
if (DoRipper2QuickJump(actor))
return 0;

View file

@ -697,7 +697,7 @@ int SetupSerp(DSWActor* actor)
{
ANIMATOR DoActorDecide;
if (!TEST(actor->spr.cstat, CSTAT_SPRITE_RESTORE))
if (!(actor->spr.cstat & CSTAT_SPRITE_RESTORE))
{
SpawnUser(actor,SERP_RUN_R0,s_SerpRun[0]);
actor->user.Health = HEALTH_SERP_GOD;

View file

@ -504,7 +504,7 @@ int SetupSkel(DSWActor* actor)
{
ANIMATOR DoActorDecide;
if (!TEST(actor->spr.cstat, CSTAT_SPRITE_RESTORE))
if (!(actor->spr.cstat & CSTAT_SPRITE_RESTORE))
{
SpawnUser(actor,SKEL_RUN_R0,s_SkelRun[0]);
actor->user.Health = HEALTH_SKEL_PRIEST;

View file

@ -211,7 +211,7 @@ int SetupSkull(DSWActor* actor)
{
ANIMATOR DoActorDecide;
if (!TEST(actor->spr.cstat, CSTAT_SPRITE_RESTORE))
if (!(actor->spr.cstat & CSTAT_SPRITE_RESTORE))
{
SpawnUser(actor,SKULL_R0,s_SkullWait[0]);
actor->user.Health = HEALTH_SKULL;
@ -596,7 +596,7 @@ int SetupBetty(DSWActor* actor)
{
ANIMATOR DoActorDecide;
if (!TEST(actor->spr.cstat, CSTAT_SPRITE_RESTORE))
if (!(actor->spr.cstat & CSTAT_SPRITE_RESTORE))
{
SpawnUser(actor,BETTY_R0,s_BettyWait[0]);
actor->user.Health = HEALTH_SKULL;

View file

@ -1727,40 +1727,40 @@ void SpriteSetup(void)
actor->spr.sector()->extra |= (bit);
if (TEST(bit, SECTFX_SINK))
if (bit & (SECTFX_SINK))
{
sectp->u_defined = true;
sectp->depth_fixed = IntToFixed(actor->spr.lotag);
KillActor(actor);
}
else if (TEST(bit, SECTFX_OPERATIONAL))
else if (bit & (SECTFX_OPERATIONAL))
{
KillActor(actor);
}
else if (TEST(bit, SECTFX_CURRENT))
else if (bit & (SECTFX_CURRENT))
{
sectp->u_defined = true;
sectp->speed = actor->spr.lotag;
sectp->ang = actor->spr.ang;
KillActor(actor);
}
else if (TEST(bit, SECTFX_NO_RIDE))
else if (bit & (SECTFX_NO_RIDE))
{
change_actor_stat(actor, STAT_NO_RIDE);
}
else if (TEST(bit, SECTFX_DIVE_AREA))
else if (bit & (SECTFX_DIVE_AREA))
{
sectp->u_defined = true;
sectp->number = actor->spr.lotag;
change_actor_stat(actor, STAT_DIVE_AREA);
}
else if (TEST(bit, SECTFX_UNDERWATER))
else if (bit & (SECTFX_UNDERWATER))
{
sectp->u_defined = true;
sectp->number = actor->spr.lotag;
change_actor_stat(actor, STAT_UNDERWATER);
}
else if (TEST(bit, SECTFX_UNDERWATER2))
else if (bit & (SECTFX_UNDERWATER2))
{
sectp->u_defined = true;
sectp->number = actor->spr.lotag;

View file

@ -636,7 +636,7 @@ int SetupSumo(DSWActor* actor)
{
ANIMATOR DoActorDecide;
if (!TEST(actor->spr.cstat, CSTAT_SPRITE_RESTORE))
if (!(actor->spr.cstat & CSTAT_SPRITE_RESTORE))
{
SpawnUser(actor,SUMO_RUN_R0,s_SumoRun[0]);
actor->user.Health = 6000;
@ -675,7 +675,7 @@ int SetupSumo(DSWActor* actor)
int NullSumo(DSWActor* actor)
{
if (!TEST(actor->user.Flags,SPR_CLIMBING))
if (!(actor->user.Flags & SPR_CLIMBING))
KeepActorOnFloor(actor);
DoActorSectorDamage(actor);

View file

@ -3858,7 +3858,7 @@ int DoShrapJumpFall(DSWActor* actor)
}
else
{
if (!TEST(actor->user.Flags, SPR_BOUNCE))
if (!(actor->user.Flags & SPR_BOUNCE))
{
DoShrapVelocity(actor);
return 0;
@ -3886,7 +3886,7 @@ int DoShrapDamage(DSWActor* actor)
}
else
{
if (!TEST(actor->user.Flags, SPR_BOUNCE))
if (!(actor->user.Flags & SPR_BOUNCE))
{
actor->user.Flags |= (SPR_BOUNCE);
actor->user.jump_speed = -300;
@ -5124,7 +5124,7 @@ int ActorPain(DSWActor* actor)
if (RandomRange(1000) < 875 || actor->user.WaitTics > 0)
return false;
if (!TEST(actor->user.Flags, SPR_JUMPING | SPR_FALLING))
if (!(actor->user.Flags & (SPR_JUMPING | SPR_FALLING)))
{
if (actor->user.ActorActionSet && actor->user.ActorActionSet->Pain)
{
@ -5315,7 +5315,7 @@ int PlayerCheckDeath(PLAYERp pp, DSWActor* weapActor)
// Store off what player was struck by
pp->HitBy = weapActor;
if (actor->user.Health <= 0 && !TEST(pp->Flags, PF_DEAD))
if (actor->user.Health <= 0 && !(pp->Flags & PF_DEAD))
{
// pick a death type
if (actor->user.LastDamage >= PLAYER_DEATH_EXPLODE_DAMMAGE_AMT)
@ -6205,7 +6205,7 @@ int DoDamage(DSWActor* actor, DSWActor* weapActor)
if (actor->user.sop_parent)
{
if (TEST(actor->user.sop_parent->flags, SOBJ_DIE_HARD))
if (actor->user.sop_parent->flags & (SOBJ_DIE_HARD))
break;
SopDamage(actor->user.sop_parent, damage);
SopCheckKill(actor->user.sop_parent);
@ -6308,7 +6308,7 @@ int DoDamage(DSWActor* actor, DSWActor* weapActor)
damage /= 3;
if (actor->user.sop_parent)
{
if (TEST(actor->user.sop_parent->flags, SOBJ_DIE_HARD))
if (actor->user.sop_parent->flags & (SOBJ_DIE_HARD))
break;
SopDamage(actor->user.sop_parent, damage);
SopCheckKill(actor->user.sop_parent);
@ -6339,7 +6339,7 @@ int DoDamage(DSWActor* actor, DSWActor* weapActor)
// MONO_PRINT(ds);
if (actor->user.sop_parent)
{
if (TEST(actor->user.sop_parent->flags, SOBJ_DIE_HARD))
if (actor->user.sop_parent->flags & (SOBJ_DIE_HARD))
break;
SopDamage(actor->user.sop_parent, damage);
SopCheckKill(actor->user.sop_parent);
@ -6407,7 +6407,7 @@ int DoDamage(DSWActor* actor, DSWActor* weapActor)
damage = GetDamage(actor, weapActor, DMG_TANK_SHELL_EXP);
if (actor->user.sop_parent)
{
if (TEST(actor->user.sop_parent->flags, SOBJ_DIE_HARD))
if (actor->user.sop_parent->flags & (SOBJ_DIE_HARD))
break;
SopDamage(actor->user.sop_parent, damage);
SopCheckKill(actor->user.sop_parent);
@ -6441,7 +6441,7 @@ int DoDamage(DSWActor* actor, DSWActor* weapActor)
if (actor->user.sop_parent)
{
if (TEST(actor->user.sop_parent->flags, SOBJ_DIE_HARD))
if (actor->user.sop_parent->flags & (SOBJ_DIE_HARD))
break;
SopDamage(actor->user.sop_parent, damage);
SopCheckKill(actor->user.sop_parent);
@ -6477,7 +6477,7 @@ int DoDamage(DSWActor* actor, DSWActor* weapActor)
if (actor->user.sop_parent)
{
if (TEST(actor->user.sop_parent->flags, SOBJ_DIE_HARD))
if (actor->user.sop_parent->flags & (SOBJ_DIE_HARD))
break;
SopDamage(actor->user.sop_parent, damage);
SopCheckKill(actor->user.sop_parent);
@ -6511,7 +6511,7 @@ int DoDamage(DSWActor* actor, DSWActor* weapActor)
if (actor->user.sop_parent)
{
if (TEST(actor->user.sop_parent->flags, SOBJ_DIE_HARD))
if (actor->user.sop_parent->flags & (SOBJ_DIE_HARD))
break;
SopDamage(actor->user.sop_parent, damage);
SopCheckKill(actor->user.sop_parent);
@ -6590,7 +6590,7 @@ int DoDamage(DSWActor* actor, DSWActor* weapActor)
if (actor->user.sop_parent)
{
if (TEST(actor->user.sop_parent->flags, SOBJ_DIE_HARD))
if (actor->user.sop_parent->flags & (SOBJ_DIE_HARD))
break;
SopDamage(actor->user.sop_parent, damage);
SopCheckKill(actor->user.sop_parent);
@ -6677,7 +6677,7 @@ int DoDamage(DSWActor* actor, DSWActor* weapActor)
if (actor->user.sop_parent)
{
if (TEST(actor->user.sop_parent->flags, SOBJ_DIE_HARD))
if (actor->user.sop_parent->flags & (SOBJ_DIE_HARD))
break;
SopDamage(actor->user.sop_parent, damage);
SopCheckKill(actor->user.sop_parent);
@ -7447,7 +7447,7 @@ int DoStar(DSWActor* actor)
break;
// chance of sticking
if (!TEST(actor->user.Flags, SPR_BOUNCE) && RANDOM_P2(1024) < STAR_STICK_RNUM)
if (!(actor->user.Flags & SPR_BOUNCE) && RANDOM_P2(1024) < STAR_STICK_RNUM)
{
actor->user.motion_blur_num = 0;
ChangeState(actor, s_StarStuck);
@ -8312,7 +8312,7 @@ int DoGrenade(DSWActor* actor)
if (actor->spr.pos.Z > ((actor->user.hiz + actor->user.loz) >> 1))
{
// hit a floor
if (!TEST(actor->user.Flags, SPR_BOUNCE))
if (!(actor->user.Flags & SPR_BOUNCE))
{
actor->user.Flags |= (SPR_BOUNCE);
ScaleSpriteVector(actor, 40000); // 18000
@ -8353,7 +8353,7 @@ int DoGrenade(DSWActor* actor)
if (actor->user.lo_sectp && actor->spr.sector()->hasU() && FixedToInt(actor->spr.sector()->depth_fixed))
actor->user.Flags |= (SPR_BOUNCE); // no bouncing on shallow water
if (!TEST(actor->user.Flags, SPR_BOUNCE))
if (!(actor->user.Flags & SPR_BOUNCE))
{
actor->user.Flags |= (SPR_BOUNCE);
actor->user.coll.setNone();
@ -18072,7 +18072,7 @@ int DoShrapVelocity(DSWActor* actor)
if (actor->spr.pos.Z > ((actor->user.hiz + actor->user.loz) >> 1))
{
// hit a floor
if (!TEST(actor->user.Flags, SPR_BOUNCE))
if (!(actor->user.Flags & SPR_BOUNCE))
{
actor->user.Flags |= (SPR_BOUNCE);
ScaleSpriteVector(actor, 18000);
@ -18107,7 +18107,7 @@ int DoShrapVelocity(DSWActor* actor)
if (actor->user.lo_sectp && actor->spr.sector()->hasU() && FixedToInt(actor->spr.sector()->depth_fixed))
actor->user.Flags |= (SPR_BOUNCE); // no bouncing on shallow water
if (!TEST(actor->user.Flags, SPR_BOUNCE))
if (!(actor->user.Flags & SPR_BOUNCE))
{
actor->user.Flags |= (SPR_BOUNCE);
actor->user.coll.setNone();

View file

@ -642,7 +642,7 @@ int SetupZilla(DSWActor* actor)
{
ANIMATOR DoActorDecide;
if (!TEST(actor->spr.cstat, CSTAT_SPRITE_RESTORE))
if (!(actor->spr.cstat & CSTAT_SPRITE_RESTORE))
{
SpawnUser(actor, ZILLA_RUN_R0, s_ZillaRun[0]);
actor->user.Health = 6000;

View file

@ -885,7 +885,7 @@ int DoZombieMove(DSWActor* actor)
}
// stay on floor unless doing certain things
if (!TEST(actor->user.Flags, SPR_JUMPING | SPR_FALLING))
if (!(actor->user.Flags & (SPR_JUMPING | SPR_FALLING)))
{
KeepActorOnFloor(actor);
}