mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 00:42:08 +00:00
- SW: Replace !TEST\(([\w\-\>.()\[\]]+),\s?([\w\_\|\s]+)\)
with !($1 & ($2))
This commit is contained in:
parent
8df3966d08
commit
5316e23737
10 changed files with 29 additions and 29 deletions
|
@ -1314,7 +1314,7 @@ int DoActorMoveJump(DSWActor* actor)
|
|||
|
||||
move_actor(actor, nx, ny, 0L);
|
||||
|
||||
if (!TEST(actor->user.Flags, SPR_JUMPING|SPR_FALLING))
|
||||
if (!(actor->user.Flags & (SPR_JUMPING|SPR_FALLING)))
|
||||
{
|
||||
InitActorDecide(actor);
|
||||
}
|
||||
|
@ -1452,7 +1452,7 @@ int FindNewAngle(DSWActor* actor, int dir, int DistToMove)
|
|||
|
||||
#if 1
|
||||
// look directly ahead for a ledge
|
||||
if (!TEST(actor->user.Flags, SPR_NO_SCAREDZ | SPR_JUMPING | SPR_FALLING | SPR_SWIMMING | SPR_DEAD))
|
||||
if (!(actor->user.Flags & (SPR_NO_SCAREDZ | SPR_JUMPING | SPR_FALLING | SPR_SWIMMING | SPR_DEAD)))
|
||||
{
|
||||
actor->spr.ang = new_ang;
|
||||
if (DropAhead(actor, actor->user.lo_step))
|
||||
|
|
|
@ -304,7 +304,7 @@ void DoShadows(tspritetype* tsprite, int& spritesortcnt, tspriteptr_t tsp, int v
|
|||
loz = ownerActor->user.loz;
|
||||
if (ownerActor->user.lowActor)
|
||||
{
|
||||
if (!TEST(ownerActor->user.lowActor->spr.cstat, CSTAT_SPRITE_ALIGNMENT_WALL | CSTAT_SPRITE_ALIGNMENT_FLOOR))
|
||||
if (!(ownerActor->user.lowActor->spr.cstat & (CSTAT_SPRITE_ALIGNMENT_WALL | CSTAT_SPRITE_ALIGNMENT_FLOOR)))
|
||||
{
|
||||
loz = DoShadowFindGroundPoint(tsp);
|
||||
}
|
||||
|
@ -1488,7 +1488,7 @@ void drawscreen(PLAYERp pp, double smoothratio)
|
|||
}
|
||||
}
|
||||
|
||||
if (!TEST(pp->Flags, PF_VIEW_FROM_CAMERA|PF_VIEW_FROM_OUTSIDE))
|
||||
if (!(pp->Flags & (PF_VIEW_FROM_CAMERA|PF_VIEW_FROM_OUTSIDE)))
|
||||
{
|
||||
if (cl_viewbob)
|
||||
{
|
||||
|
|
|
@ -788,7 +788,7 @@ int GirlNinjaJumpActionFunc(DSWActor* actor)
|
|||
return 0;
|
||||
}
|
||||
|
||||
if (!TEST(actor->user.Flags, SPR_JUMPING|SPR_FALLING))
|
||||
if (!(actor->user.Flags & (SPR_JUMPING|SPR_FALLING)))
|
||||
{
|
||||
InitActorDecide(actor);
|
||||
}
|
||||
|
@ -800,10 +800,10 @@ int NullGirlNinja(DSWActor* actor)
|
|||
{
|
||||
if (actor->user.WaitTics > 0) actor->user.WaitTics -= ACTORMOVETICS;
|
||||
|
||||
if (actor->user.Flags & (SPR_SLIDING) && !(actor->user.Flags & SPR_CLIMBING) && !TEST(actor->user.Flags, SPR_JUMPING|SPR_FALLING))
|
||||
if (actor->user.Flags & (SPR_SLIDING) && !(actor->user.Flags & SPR_CLIMBING) && !(actor->user.Flags & (SPR_JUMPING|SPR_FALLING)))
|
||||
DoActorSlide(actor);
|
||||
|
||||
if (!(actor->user.Flags & SPR_CLIMBING) && !TEST(actor->user.Flags, SPR_JUMPING|SPR_FALLING))
|
||||
if (!(actor->user.Flags & SPR_CLIMBING) && !(actor->user.Flags & (SPR_JUMPING|SPR_FALLING)))
|
||||
KeepActorOnFloor(actor);
|
||||
|
||||
DoActorSectorDamage(actor);
|
||||
|
|
|
@ -513,7 +513,7 @@ int DoBloodSpray(DSWActor* actor)
|
|||
|
||||
|
||||
// if you haven't bounced or your going slow do some puffs
|
||||
if (!TEST(actor->user.Flags, SPR_BOUNCE | SPR_UNDERWATER))
|
||||
if (!(actor->user.Flags & (SPR_BOUNCE | SPR_UNDERWATER)))
|
||||
{
|
||||
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, GOREDrip, s_BloodSpray, actor->spr.sector(),
|
||||
|
@ -715,7 +715,7 @@ int DoPhosphorus(DSWActor* actor)
|
|||
|
||||
|
||||
// if you haven't bounced or your going slow do some puffs
|
||||
if (!TEST(actor->user.Flags, SPR_BOUNCE | SPR_UNDERWATER) && !(actor->spr.cstat & CSTAT_SPRITE_INVISIBLE))
|
||||
if (!(actor->user.Flags & (SPR_BOUNCE | SPR_UNDERWATER)) && !(actor->spr.cstat & CSTAT_SPRITE_INVISIBLE))
|
||||
{
|
||||
|
||||
auto actorNew = SpawnActor(STAT_SKIP4, PUFF, s_PhosphorExp, actor->spr.sector(),
|
||||
|
@ -939,7 +939,7 @@ int DoChemBomb(DSWActor* actor)
|
|||
}
|
||||
|
||||
// if you haven't bounced or your going slow do some puffs
|
||||
if (!TEST(actor->user.Flags, SPR_BOUNCE | SPR_UNDERWATER) && !(actor->spr.cstat & CSTAT_SPRITE_INVISIBLE))
|
||||
if (!(actor->user.Flags & (SPR_BOUNCE | SPR_UNDERWATER)) && !(actor->spr.cstat & CSTAT_SPRITE_INVISIBLE))
|
||||
{
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, PUFF, s_Puff, actor->spr.sector(),
|
||||
actor->spr.pos.X, actor->spr.pos.Y, actor->spr.pos.Z, actor->spr.ang, 100);
|
||||
|
|
|
@ -2047,7 +2047,7 @@ int NinjaJumpActionFunc(DSWActor* actor)
|
|||
return 0;
|
||||
}
|
||||
|
||||
if (!TEST(actor->user.Flags, SPR_JUMPING|SPR_FALLING))
|
||||
if (!(actor->user.Flags & (SPR_JUMPING|SPR_FALLING)))
|
||||
{
|
||||
InitActorDecide(actor);
|
||||
}
|
||||
|
@ -2066,10 +2066,10 @@ int NullNinja(DSWActor* actor)
|
|||
{
|
||||
if (actor->user.WaitTics > 0) actor->user.WaitTics -= ACTORMOVETICS;
|
||||
|
||||
if (actor->user.Flags & (SPR_SLIDING) && !(actor->user.Flags & SPR_CLIMBING) && !TEST(actor->user.Flags, SPR_JUMPING|SPR_FALLING))
|
||||
if (actor->user.Flags & (SPR_SLIDING) && !(actor->user.Flags & SPR_CLIMBING) && !(actor->user.Flags & (SPR_JUMPING|SPR_FALLING)))
|
||||
DoActorSlide(actor);
|
||||
|
||||
if (!(actor->user.Flags & SPR_CLIMBING) && !TEST(actor->user.Flags, SPR_JUMPING|SPR_FALLING))
|
||||
if (!(actor->user.Flags & SPR_CLIMBING) && !(actor->user.Flags & (SPR_JUMPING|SPR_FALLING)))
|
||||
KeepActorOnFloor(actor);
|
||||
|
||||
DoActorSectorDamage(actor);
|
||||
|
|
|
@ -1057,7 +1057,7 @@ STATEp sg_PlayerNinjaFly[] =
|
|||
|
||||
void DoPlayerSpriteThrow(PLAYERp pp)
|
||||
{
|
||||
if (!TEST(pp->Flags, PF_DIVING|PF_FLYING|PF_CRAWLING))
|
||||
if (!(pp->Flags & (PF_DIVING|PF_FLYING|PF_CRAWLING)))
|
||||
{
|
||||
if (pp->CurWpn == pp->Wpn[WPN_SWORD] && pp->actor->user.Rot != sg_PlayerNinjaSword)
|
||||
NewStateGroup(pp->actor, sg_PlayerNinjaSword);
|
||||
|
@ -1588,7 +1588,7 @@ void SlipSlope(PLAYERp pp)
|
|||
|
||||
void DoPlayerHorizon(PLAYERp pp, float const horz, double const scaleAdjust)
|
||||
{
|
||||
bool const canslopetilt = !TEST(pp->Flags, PF_FLYING|PF_SWIMMING|PF_DIVING|PF_CLIMBING|PF_JUMPING|PF_FALLING) && pp->cursector && TEST(pp->cursector->floorstat, CSTAT_SECTOR_SLOPE);
|
||||
bool const canslopetilt = !(pp->Flags & (PF_FLYING|PF_SWIMMING|PF_DIVING|PF_CLIMBING|PF_JUMPING|PF_FALLING)) && pp->cursector && TEST(pp->cursector->floorstat, CSTAT_SECTOR_SLOPE);
|
||||
pp->horizon.calcviewpitch(pp->pos.vec2, pp->angle.ang, pp->input.actions & SB_AIMMODE, canslopetilt, pp->cursector, scaleAdjust, TEST(pp->Flags, PF_CLIMBING));
|
||||
pp->horizon.applyinput(horz, &pp->input.actions, scaleAdjust);
|
||||
}
|
||||
|
@ -4309,7 +4309,7 @@ void DoPlayerDiveMeter(PLAYERp pp)
|
|||
// Don't draw bar from other players
|
||||
if (pp != Player+myconnectindex) return;
|
||||
|
||||
if (!TEST(pp->Flags, PF_DIVING|PF_DIVING_IN_LAVA)) return;
|
||||
if (!(pp->Flags & (PF_DIVING|PF_DIVING_IN_LAVA))) return;
|
||||
|
||||
meterunit = PLAYER_DIVE_TIME / 30;
|
||||
if (meterunit > 0)
|
||||
|
@ -4317,7 +4317,7 @@ void DoPlayerDiveMeter(PLAYERp pp)
|
|||
else
|
||||
return;
|
||||
|
||||
if (metertics <= 0 && !TEST(pp->Flags, PF_DIVING|PF_DIVING_IN_LAVA))
|
||||
if (metertics <= 0 && !(pp->Flags & (PF_DIVING|PF_DIVING_IN_LAVA)))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -5684,7 +5684,7 @@ void DoPlayerDeathHurl(PLAYERp pp)
|
|||
}
|
||||
}
|
||||
|
||||
if (!TEST(pp->Flags, PF_JUMPING|PF_FALLING))
|
||||
if (!(pp->Flags & (PF_JUMPING|PF_FALLING)))
|
||||
NewStateGroup(pp->actor, sg_PlayerHead);
|
||||
}
|
||||
|
||||
|
@ -6059,7 +6059,7 @@ void DoPlayerDeathCrumble(PLAYERp pp)
|
|||
DoPlayerDeathHoriz(pp, PLAYER_DEATH_HORIZ_FALL_VALUE, 3);
|
||||
}
|
||||
|
||||
if (!TEST(pp->Flags,PF_JUMPING|PF_FALLING))
|
||||
if (!(pp->Flags & (PF_JUMPING|PF_FALLING)))
|
||||
{
|
||||
if (!(plActor->user.Flags & SPR_BOUNCE))
|
||||
{
|
||||
|
@ -6111,7 +6111,7 @@ void DoPlayerDeathExplode(PLAYERp pp)
|
|||
DoPlayerDeathHoriz(pp, PLAYER_DEATH_HORIZ_JUMP_VALUE, 3);
|
||||
}
|
||||
|
||||
if (!TEST(pp->Flags,PF_JUMPING|PF_FALLING))
|
||||
if (!(pp->Flags & (PF_JUMPING|PF_FALLING)))
|
||||
{
|
||||
if (!(plActor->user.Flags & SPR_BOUNCE))
|
||||
{
|
||||
|
|
|
@ -4646,7 +4646,7 @@ int move_actor(DSWActor* actor, int xchange, int ychange, int zchange)
|
|||
ASSERT(actor->spr.insector());
|
||||
|
||||
// try and determine whether you moved > lo_step in the z direction
|
||||
if (!TEST(actor->user.Flags, SPR_NO_SCAREDZ | SPR_JUMPING | SPR_CLIMBING | SPR_FALLING | SPR_DEAD | SPR_SWIMMING))
|
||||
if (!(actor->user.Flags & (SPR_NO_SCAREDZ | SPR_JUMPING | SPR_CLIMBING | SPR_FALLING | SPR_DEAD | SPR_SWIMMING)))
|
||||
{
|
||||
if (labs(actor->spr.pos.Z - globloz) > actor->user.lo_step)
|
||||
{
|
||||
|
|
|
@ -1802,7 +1802,7 @@ PlayerPart:
|
|||
//pp->posz -= Z(24);
|
||||
DoPlayerZrange(pp);
|
||||
|
||||
if (!TEST(pp->Flags, PF_JUMPING | PF_FALLING | PF_FLYING))
|
||||
if (!(pp->Flags & (PF_JUMPING | PF_FALLING | PF_FLYING)))
|
||||
{
|
||||
pp->pos.Z = pp->loz - PLAYER_HEIGHT;
|
||||
pp->actor->spr.pos.Z = pp->loz;
|
||||
|
@ -3567,7 +3567,7 @@ int ActorFollowTrack(DSWActor* actor, short locktics)
|
|||
|
||||
if (actor->user.coll.type != kHitNone)
|
||||
{
|
||||
if (!TEST(actor->user.Flags, SPR_JUMPING|SPR_FALLING))
|
||||
if (!(actor->user.Flags & (SPR_JUMPING|SPR_FALLING)))
|
||||
ActorLeaveTrack(actor);
|
||||
}
|
||||
|
||||
|
|
|
@ -5140,7 +5140,7 @@ int ActorPain(DSWActor* actor)
|
|||
|
||||
int ActorPainPlasma(DSWActor* actor)
|
||||
{
|
||||
if (!TEST(actor->user.Flags, SPR_JUMPING | SPR_FALLING | SPR_ELECTRO_TOLERANT))
|
||||
if (!(actor->user.Flags & (SPR_JUMPING | SPR_FALLING | SPR_ELECTRO_TOLERANT)))
|
||||
{
|
||||
if (actor->user.ActorActionSet && actor->user.ActorActionSet->Pain)
|
||||
{
|
||||
|
@ -7091,7 +7091,7 @@ int DoFlamesDamageTest(DSWActor* actor)
|
|||
if (actor == itActor)
|
||||
continue;
|
||||
|
||||
if (!TEST(itActor->spr.cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN))
|
||||
if (!(itActor->spr.cstat & (CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN)))
|
||||
continue;
|
||||
|
||||
if (actor->spr.cstat & (CSTAT_SPRITE_INVISIBLE))
|
||||
|
@ -7238,7 +7238,7 @@ int DoExpDamageTest(DSWActor* actor)
|
|||
continue;
|
||||
|
||||
// added hitscan block because mines no long clip against actors/players
|
||||
if (!TEST(itActor->spr.cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN))
|
||||
if (!(itActor->spr.cstat & (CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN)))
|
||||
continue;
|
||||
|
||||
// Second parameter MUST have blocking bits set or cansee won't work
|
||||
|
@ -8389,7 +8389,7 @@ int DoGrenade(DSWActor* actor)
|
|||
}
|
||||
|
||||
// if you haven't bounced or your going slow do some puffs
|
||||
if (!TEST(actor->user.Flags, SPR_BOUNCE|SPR_UNDERWATER))
|
||||
if (!(actor->user.Flags & (SPR_BOUNCE|SPR_UNDERWATER)))
|
||||
{
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, PUFF, s_Puff, actor->spr.sector(),
|
||||
actor->spr.pos.X, actor->spr.pos.Y, actor->spr.pos.Z, actor->spr.ang, 100);
|
||||
|
|
|
@ -917,10 +917,10 @@ int NullZombie(DSWActor* actor)
|
|||
if (actor->user.WaitTics > 0)
|
||||
actor->user.WaitTics -= ACTORMOVETICS;
|
||||
|
||||
if (actor->user.Flags & (SPR_SLIDING) && !TEST(actor->user.Flags, SPR_JUMPING|SPR_FALLING))
|
||||
if (actor->user.Flags & (SPR_SLIDING) && !(actor->user.Flags & (SPR_JUMPING|SPR_FALLING)))
|
||||
DoActorSlide(actor);
|
||||
|
||||
if (!TEST(actor->user.Flags, SPR_JUMPING|SPR_FALLING))
|
||||
if (!(actor->user.Flags & (SPR_JUMPING|SPR_FALLING)))
|
||||
KeepActorOnFloor(actor);
|
||||
|
||||
DoActorSectorDamage(actor);
|
||||
|
|
Loading…
Reference in a new issue