- lots of RESET() flags replaced.

This commit is contained in:
Christoph Oelckers 2021-12-27 18:58:15 +01:00
parent 1ae7565a2a
commit e29d0f50cf
33 changed files with 382 additions and 382 deletions

View file

@ -101,7 +101,7 @@ void FAF_DrawRooms(int x, int y, int z, fixed_t q16ang, fixed_t q16horiz, int se
actor->spr.sector()->ceilingpicnum = SP_TAG2(actor);
SP_TAG4(actor) = actor->spr.sector()->ceilingstat;
actor->spr.sector()->ceilingstat |= (ESectorFlags::FromInt(SP_TAG6(actor)));
RESET(actor->spr.sector()->ceilingstat, CSTAT_SECTOR_SKY);
actor->spr.sector()->ceilingstat &= ~(CSTAT_SECTOR_SKY);
}
else if (SP_TAG3(actor) == 1)
{
@ -109,7 +109,7 @@ void FAF_DrawRooms(int x, int y, int z, fixed_t q16ang, fixed_t q16horiz, int se
actor->spr.sector()->floorpicnum = SP_TAG2(actor);
SP_TAG4(actor) = actor->spr.sector()->floorstat;
actor->spr.sector()->floorstat |= (ESectorFlags::FromInt(SP_TAG6(actor)));
RESET(actor->spr.sector()->floorstat, CSTAT_SECTOR_SKY);
actor->spr.sector()->floorstat &= ~(CSTAT_SECTOR_SKY);
}
}
@ -129,13 +129,13 @@ void FAF_DrawRooms(int x, int y, int z, fixed_t q16ang, fixed_t q16horiz, int se
// restore ceilingpicnum and ceilingstat
actor->spr.sector()->ceilingpicnum = SP_TAG5(actor);
actor->spr.sector()->ceilingstat = ESectorFlags::FromInt(SP_TAG4(actor));
RESET(actor->spr.sector()->ceilingstat, CSTAT_SECTOR_SKY);
actor->spr.sector()->ceilingstat &= ~(CSTAT_SECTOR_SKY);
}
else if (SP_TAG3(actor) == 1)
{
actor->spr.sector()->floorpicnum = SP_TAG5(actor);
actor->spr.sector()->floorstat = ESectorFlags::FromInt(SP_TAG4(actor));
RESET(actor->spr.sector()->floorstat, CSTAT_SECTOR_SKY);
actor->spr.sector()->floorstat &= ~(CSTAT_SECTOR_SKY);
}
}
}

View file

@ -89,7 +89,7 @@ int DoActorDie(DSWActor* actor, DSWActor* weapActor, int meansofdeath)
{
change_actor_stat(actor, STAT_DEAD_ACTOR);
actor->user.Flags |= (SPR_DEAD);
RESET(actor->user.Flags, SPR_FALLING | SPR_JUMPING);
actor->user.Flags &= ~(SPR_FALLING | SPR_JUMPING);
actor->user.floor_dist = Z(40);
// test for gibable dead bodies
@ -272,7 +272,7 @@ int DoActorDie(DSWActor* actor, DSWActor* weapActor, int meansofdeath)
case COOLIE_RUN_R0:
case SUMO_RUN_R0:
case ZILLA_RUN_R0:
RESET(actor->spr.cstat, CSTAT_SPRITE_YFLIP);
actor->spr.cstat &= ~(CSTAT_SPRITE_YFLIP);
break;
}
@ -387,7 +387,7 @@ int DoActorDebris(DSWActor* actor)
int nx, ny;
// This was move from DoActorDie so actor's can't be walked through until they are on the floor
RESET(actor->spr.cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
actor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
// Don't let some actors float
switch (actor->user.ID)
@ -493,7 +493,7 @@ void KeepActorOnFloor(DSWActor* actor)
sectp = actor->spr.sector();
RESET(actor->spr.cstat, CSTAT_SPRITE_YFLIP); // If upside down, reset it
actor->spr.cstat &= ~(CSTAT_SPRITE_YFLIP); // If upside down, reset it
if (TEST(actor->user.Flags, SPR_JUMPING | SPR_FALLING))
return;
@ -512,8 +512,8 @@ void KeepActorOnFloor(DSWActor* actor)
if (actor->user.Rot != actor->user.ActorActionSet->Run && actor->user.Rot != actor->user.ActorActionSet->Swim && actor->user.Rot != actor->user.ActorActionSet->Stand)
{
// was swimming but have now stopped
RESET(actor->user.Flags, SPR_SWIMMING);
RESET(actor->spr.cstat, CSTAT_SPRITE_YCENTER);
actor->user.Flags &= ~(SPR_SWIMMING);
actor->spr.cstat &= ~(CSTAT_SPRITE_YCENTER);
actor->user.oz = actor->spr.pos.Z = actor->user.loz;
actor->spr.backupz();
return;
@ -541,8 +541,8 @@ void KeepActorOnFloor(DSWActor* actor)
}
else
{
RESET(actor->user.Flags, SPR_SWIMMING);
RESET(actor->spr.cstat, CSTAT_SPRITE_YCENTER);
actor->user.Flags &= ~(SPR_SWIMMING);
actor->spr.cstat &= ~(CSTAT_SPRITE_YCENTER);
actor->user.oz = actor->spr.pos.Z = actor->user.loz;
actor->spr.backupz();
}
@ -552,8 +552,8 @@ void KeepActorOnFloor(DSWActor* actor)
}
// NOT in a swimming situation
RESET(actor->user.Flags, SPR_SWIMMING);
RESET(actor->spr.cstat, CSTAT_SPRITE_YCENTER);
actor->user.Flags &= ~(SPR_SWIMMING);
actor->spr.cstat &= ~(CSTAT_SPRITE_YCENTER);
#if 1
if (TEST(actor->user.Flags, SPR_MOVED))
@ -601,7 +601,7 @@ int DoActorSlide(DSWActor* actor)
if (!move_actor(actor, nx, ny, 0L))
{
RESET(actor->user.Flags, SPR_SLIDING);
actor->user.Flags &= ~(SPR_SLIDING);
return false;
}
@ -609,7 +609,7 @@ int DoActorSlide(DSWActor* actor)
if (actor->user.slide_vel < 20)
{
RESET(actor->user.Flags, SPR_SLIDING);
actor->user.Flags &= ~(SPR_SLIDING);
}
return true;
@ -620,7 +620,7 @@ int DoActorSlide(DSWActor* actor)
int DoActorBeginJump(DSWActor* actor)
{
actor->user.Flags |= (SPR_JUMPING);
RESET(actor->user.Flags, SPR_FALLING);
actor->user.Flags &= ~(SPR_FALLING);
// actor->user.jump_speed = should be set before calling
@ -683,7 +683,7 @@ int DoActorJump(DSWActor* actor)
int DoActorBeginFall(DSWActor* actor)
{
actor->user.Flags |= (SPR_FALLING);
RESET(actor->user.Flags, SPR_JUMPING);
actor->user.Flags &= ~(SPR_JUMPING);
actor->user.jump_grav = ACTOR_GRAVITY;
@ -730,8 +730,8 @@ int DoActorStopFall(DSWActor* actor)
{
actor->spr.pos.Z = actor->user.loz;
RESET(actor->user.Flags, SPR_FALLING | SPR_JUMPING);
RESET(actor->spr.cstat, CSTAT_SPRITE_YFLIP);
actor->user.Flags &= ~(SPR_FALLING | SPR_JUMPING);
actor->spr.cstat &= ~(CSTAT_SPRITE_YFLIP);
// don't stand on face or wall sprites - jump again
@ -799,7 +799,7 @@ int DoActorDeathMove(DSWActor* actor)
int DoBeginJump(DSWActor* actor)
{
actor->user.Flags |= (SPR_JUMPING);
RESET(actor->user.Flags, SPR_FALLING);
actor->user.Flags &= ~(SPR_FALLING);
// set up individual actor jump gravity
actor->user.jump_grav = ACTOR_GRAVITY;
@ -849,7 +849,7 @@ int DoJump(DSWActor* actor)
int DoBeginFall(DSWActor* actor)
{
actor->user.Flags |= (SPR_FALLING);
RESET(actor->user.Flags, SPR_JUMPING);
actor->user.Flags &= ~(SPR_JUMPING);
actor->user.jump_grav = ACTOR_GRAVITY;
@ -870,7 +870,7 @@ int DoFall(DSWActor* actor)
if (actor->spr.pos.Z > actor->user.loz - actor->user.floor_dist)
{
actor->spr.pos.Z = actor->user.loz - actor->user.floor_dist;
RESET(actor->user.Flags, SPR_FALLING);
actor->user.Flags &= ~(SPR_FALLING);
}
return 0;

View file

@ -525,7 +525,7 @@ ANIMATORp DoActorActionDecide(DSWActor* actor)
// Enemy goes inactive - he is still allowed to roam about for about
// 5 seconds trying to find another player before his active_range is
// bumped down
RESET(actor->user.Flags, SPR_ACTIVE);
actor->user.Flags &= ~(SPR_ACTIVE);
// You've lost the player - now decide what to do
action = ChooseAction(actor->user.Personality->LostTarget);
@ -554,7 +554,7 @@ ANIMATORp DoActorActionDecide(DSWActor* actor)
if (TEST(actor->user.Flags, SPR_TARGETED))
{
// not going to evade, reset the target bit
RESET(actor->user.Flags, SPR_TARGETED); // as far as actor
actor->user.Flags &= ~(SPR_TARGETED); // as far as actor
// knows, its not a
// target any more
if (actor->user.ActorActionSet->Duck && RANDOM_P2(1024<<8)>>8 < 100)
@ -1216,7 +1216,7 @@ int InitActorEvade(DSWActor* actor)
actor->spr.ang = NORM_ANGLE(getangle((Track[actor->user.track].TrackPoint + actor->user.point)->x - actor->spr.pos.X, (Track[actor->user.track].TrackPoint + actor->user.point)->y - actor->spr.pos.Y));
DoActorSetSpeed(actor, FAST_SPEED);
// NOT doing a RUN_AWAY
RESET(actor->user.Flags, SPR_RUN_AWAY);
actor->user.Flags &= ~(SPR_RUN_AWAY);
}
return 0;
@ -1302,7 +1302,7 @@ int DoActorDuck(DSWActor* actor)
{
NewStateGroup(actor, actor->user.ActorActionSet->Rise);
actor->user.ActorActionFunc = DoActorDecide;
RESET(actor->user.Flags, SPR_TARGETED);
actor->user.Flags &= ~(SPR_TARGETED);
}
return 0;
@ -1585,7 +1585,7 @@ int InitActorReposition(DSWActor* actor)
actor->spr.ang = ang;
DoActorSetSpeed(actor, FAST_SPEED);
RESET(actor->user.Flags, SPR_RUN_AWAY);
actor->user.Flags &= ~(SPR_RUN_AWAY);
}
else
{
@ -1670,7 +1670,7 @@ int DoActorPause(DSWActor* actor)
if ((actor->user.Vis -= ACTORMOVETICS) < 0)
{
actor->user.ActorActionFunc = DoActorDecide;
RESET(actor->user.Flags, SPR_TARGETED);
actor->user.Flags &= ~(SPR_TARGETED);
}
return 0;

View file

@ -867,7 +867,7 @@ int UserBreakSprite(DSWActor* breakActor)
if (SP_TAG8(actor) == 0)
{
breakActor->spr.picnum = SP_TAG5(actor);
RESET(breakActor->spr.extra, SPRX_BREAKABLE);
breakActor->spr.extra &= ~(SPRX_BREAKABLE);
}
else
// kill sprite
@ -887,10 +887,10 @@ int UserBreakSprite(DSWActor* breakActor)
// reset
if (SP_TAG8(actor) == 2)
{
RESET(breakActor->spr.cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
breakActor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
}
RESET(breakActor->spr.extra, SPRX_BREAKABLE);
breakActor->spr.extra &= ~(SPRX_BREAKABLE);
}
}
else
@ -926,22 +926,22 @@ int AutoBreakSprite(DSWActor* breakActor, int type)
{
if (!TEST(break_info->flags, BF_LEAVE_BREAK))
{
RESET(breakActor->spr.extra, SPRX_BREAKABLE);
RESET(breakActor->spr.cstat, CSTAT_SPRITE_BREAKABLE);
breakActor->spr.extra &= ~(SPRX_BREAKABLE);
breakActor->spr.cstat &= ~(CSTAT_SPRITE_BREAKABLE);
}
breakActor->spr.picnum = break_info->breaknum;
// pass Break Info Globally
SpawnShrap(breakActor, nullptr, -1, break_info);
if (breakActor->spr.picnum == 3683)
RESET(breakActor->spr.cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
breakActor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
}
return false;
}
RESET(breakActor->spr.extra, SPRX_BREAKABLE);
RESET(breakActor->spr.cstat, CSTAT_SPRITE_BREAKABLE);
breakActor->spr.extra &= ~(SPRX_BREAKABLE);
breakActor->spr.cstat &= ~(CSTAT_SPRITE_BREAKABLE);
// pass Break Info Globally
SpawnShrap(breakActor, nullptr, -1, break_info);
@ -952,7 +952,7 @@ int AutoBreakSprite(DSWActor* breakActor, int type)
if (TEST(break_info->flags, BF_FIRE_FALL))
SpawnBreakFlames(breakActor);
RESET(breakActor->spr.cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
breakActor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
breakActor->spr.cstat |= CSTAT_SPRITE_INVISIBLE;
// Kill sound if one is attached
DeleteNoSoundOwner(breakActor);
@ -963,7 +963,7 @@ int AutoBreakSprite(DSWActor* breakActor, int type)
{
breakActor->spr.picnum = break_info->breaknum;
if (breakActor->spr.picnum == 3683)
RESET(breakActor->spr.cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
breakActor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
}
return false;

View file

@ -848,7 +848,7 @@ int DoBunnyBeginJumpAttack(DSWActor* actor)
PickJumpMaxSpeed(actor, -400); // was -800
actor->user.Flags |= (SPR_JUMPING);
RESET(actor->user.Flags, SPR_FALLING);
actor->user.Flags &= ~(SPR_FALLING);
// set up individual actor jump gravity
actor->user.jump_grav = 17; // was 8
@ -1155,7 +1155,7 @@ void BunnyHatch(DSWActor* actor)
PickJumpMaxSpeed(actorNew, -600);
actorNew->user.Flags |= (SPR_JUMPING);
RESET(actorNew->user.Flags, SPR_FALLING);
actorNew->user.Flags &= ~(SPR_FALLING);
actorNew->user.jump_grav = 8;
@ -1212,7 +1212,7 @@ DSWActor* BunnyHatch2(DSWActor* actor)
PickJumpMaxSpeed(actorNew, -600);
actorNew->user.Flags |= (SPR_JUMPING);
RESET(actorNew->user.Flags, SPR_FALLING);
actorNew->user.Flags &= ~(SPR_FALLING);
actorNew->user.jump_grav = 8;
actorNew->user.FlagOwner = 0;
@ -1231,7 +1231,7 @@ int DoBunnyMove(DSWActor* actor)
{
// Parental lock crap
if (TEST(actor->spr.cstat, CSTAT_SPRITE_INVISIBLE))
RESET(actor->spr.cstat, CSTAT_SPRITE_INVISIBLE); // Turn em' back on
actor->spr.cstat &= ~(CSTAT_SPRITE_INVISIBLE); // Turn em' back on
// Sometimes they just won't die!
if (actor->user.Health <= 0)
@ -1388,7 +1388,7 @@ int DoBunnyScrew(DSWActor* actor)
if (actor->user.WaitTics <= 0)
{
RESET(actor->spr.cstat, CSTAT_SPRITE_INVISIBLE); // Turn em' back on
actor->spr.cstat &= ~(CSTAT_SPRITE_INVISIBLE); // Turn em' back on
actor->user.FlagOwner = 0;
NewStateGroup(actor,sg_BunnyRun);
}

View file

@ -746,8 +746,8 @@ int DoCoolgDeath(DSWActor* actor)
{
int nx, ny;
RESET(actor->spr.cstat, CSTAT_SPRITE_TRANSLUCENT);
RESET(actor->spr.cstat, CSTAT_SPRITE_INVISIBLE);
actor->spr.cstat &= ~(CSTAT_SPRITE_TRANSLUCENT);
actor->spr.cstat &= ~(CSTAT_SPRITE_INVISIBLE);
actor->spr.xrepeat = 42;
actor->spr.shade = -10;
@ -775,8 +775,8 @@ int DoCoolgDeath(DSWActor* actor)
// on the ground
if (actor->spr.pos.Z >= actor->user.loz)
{
RESET(actor->user.Flags, SPR_FALLING|SPR_SLIDING);
RESET(actor->spr.cstat, CSTAT_SPRITE_YFLIP); // If upside down, reset it
actor->user.Flags &= ~(SPR_FALLING|SPR_SLIDING);
actor->spr.cstat &= ~(CSTAT_SPRITE_YFLIP); // If upside down, reset it
NewStateGroup(actor, actor->user.ActorActionSet->Dead);
return 0;
}
@ -797,19 +797,19 @@ int DoCoolgMove(DSWActor* actor)
break;
case 1:
PlaySound(DIGI_VOID3, actor, v3df_follow);
RESET(actor->spr.cstat, CSTAT_SPRITE_TRANSLUCENT);
actor->spr.cstat &= ~(CSTAT_SPRITE_TRANSLUCENT);
actor->spr.cstat |= (CSTAT_SPRITE_INVISIBLE);
actor->user.ShellNum = SEC(1) + SEC(RandomRange(2));
break;
case 2:
actor->spr.cstat |= (CSTAT_SPRITE_TRANSLUCENT);
RESET(actor->spr.cstat, CSTAT_SPRITE_INVISIBLE);
actor->spr.cstat &= ~(CSTAT_SPRITE_INVISIBLE);
actor->user.ShellNum = SEC(2);
break;
case 3:
PlaySound(DIGI_VOID3, actor, v3df_follow);
RESET(actor->spr.cstat, CSTAT_SPRITE_TRANSLUCENT);
RESET(actor->spr.cstat, CSTAT_SPRITE_INVISIBLE);
actor->spr.cstat &= ~(CSTAT_SPRITE_TRANSLUCENT);
actor->spr.cstat &= ~(CSTAT_SPRITE_INVISIBLE);
actor->user.ShellNum = SEC(2) + SEC(RandomRange(3));
break;
default:

View file

@ -400,7 +400,7 @@ void EnemyDefaults(DSWActor* actor, ACTOR_ACTION_SETp action, PERSONALITYp perso
break;
}
RESET(actor->spr.cstat, CSTAT_SPRITE_RESTORE);
actor->spr.cstat &= ~(CSTAT_SPRITE_RESTORE);
actor->user.spal = actor->spr.pal;

View file

@ -125,7 +125,7 @@ int GetRotation(tspritetype* tsprite, int& spritesortcnt, int tSpriteNum, int vi
if (rotation <= 4)
{
// leave rotation alone
RESET(tsp->cstat, CSTAT_SPRITE_XFLIP);
tsp->cstat &= ~(CSTAT_SPRITE_XFLIP);
}
else
{
@ -138,7 +138,7 @@ int GetRotation(tspritetype* tsprite, int& spritesortcnt, int tSpriteNum, int vi
if (rotation > 3 || rotation == 0)
{
// leave rotation alone
RESET(tsp->cstat, CSTAT_SPRITE_XFLIP); // clear x-flipping bit
tsp->cstat &= ~(CSTAT_SPRITE_XFLIP); // clear x-flipping bit
}
else
{
@ -152,7 +152,7 @@ int GetRotation(tspritetype* tsprite, int& spritesortcnt, int tSpriteNum, int vi
if (ID == TOILETGIRL_R0 || ID == WASHGIRL_R0 || ID == TRASHCAN ||
ID == CARGIRL_R0 || ID == MECHANICGIRL_R0 || ID == PRUNEGIRL_R0 ||
ID == SAILORGIRL_R0)
RESET(tsp->cstat, CSTAT_SPRITE_XFLIP); // clear x-flipping bit
tsp->cstat &= ~(CSTAT_SPRITE_XFLIP); // clear x-flipping bit
return RotTable5[rotation];
}
@ -546,7 +546,7 @@ DSWActor* CopySprite(sprt const* tsp, sectortype* newsector)
actorNew->spr.zvel = tsp->zvel;
actorNew->spr.shade = tsp->shade;
RESET(actorNew->spr.cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
actorNew->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
return actorNew;
}
@ -872,7 +872,7 @@ void analyzesprites(tspritetype* tsprite, int& spritesortcnt, int viewx, int vie
{
if (!TEST(tActor->user.PlayerP->Flags, PF_VIEW_FROM_OUTSIDE))
{
RESET(tsp->cstat, CSTAT_SPRITE_TRANSLUCENT);
tsp->cstat &= ~(CSTAT_SPRITE_TRANSLUCENT);
}
}
@ -962,7 +962,7 @@ void CircleCamera(int *nx, int *ny, int *nz, sectortype** vsect, binangle *nang,
DSWActor* actor = pp->actor;
auto bakcstat = actor->spr.cstat;
RESET(actor->spr.cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
actor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
// Make sure sector passed to hitscan is correct
//updatesector(*nx, *ny, vsect);
@ -1207,7 +1207,7 @@ void CameraView(PLAYERp pp, int *tx, int *ty, int *tz, sectortype** tsect, binan
{
pp->circle_camera_ang = 0;
pp->circle_camera_dist = CIRCLE_CAMERA_DIST_MIN;
RESET(pp->Flags, PF_VIEW_FROM_CAMERA);
pp->Flags &= ~(PF_VIEW_FROM_CAMERA);
}
}
}
@ -1220,7 +1220,7 @@ void PreDraw(void)
SWStatIterator it(STAT_FLOOR_SLOPE_DONT_DRAW);
while (auto actor = it.Next())
{
RESET(actor->spr.sector()->floorstat, CSTAT_SECTOR_SLOPE);
actor->spr.sector()->floorstat &= ~(CSTAT_SECTOR_SLOPE);
}
}
@ -1343,7 +1343,7 @@ void UpdateWallPortalState()
actor->spr.sector()->ceilingpicnum = SP_TAG2(actor);
SP_TAG4(actor) = actor->spr.sector()->ceilingstat;
actor->spr.sector()->ceilingstat |= (ESectorFlags::FromInt(SP_TAG6(actor)));
RESET(actor->spr.sector()->ceilingstat, CSTAT_SECTOR_SKY);
actor->spr.sector()->ceilingstat &= ~(CSTAT_SECTOR_SKY);
}
else if (SP_TAG3(actor) == 1)
{
@ -1351,7 +1351,7 @@ void UpdateWallPortalState()
actor->spr.sector()->floorpicnum = SP_TAG2(actor);
SP_TAG4(actor) = actor->spr.sector()->floorstat;
actor->spr.sector()->floorstat |= (ESectorFlags::FromInt(SP_TAG6(actor)));
RESET(actor->spr.sector()->floorstat, CSTAT_SECTOR_SKY);
actor->spr.sector()->floorstat &= ~(CSTAT_SECTOR_SKY);
}
}
@ -1367,13 +1367,13 @@ void RestorePortalState()
// restore ceilingpicnum and ceilingstat
actor->spr.sector()->ceilingpicnum = SP_TAG5(actor);
actor->spr.sector()->ceilingstat = ESectorFlags::FromInt(SP_TAG4(actor));
RESET(actor->spr.sector()->ceilingstat, CSTAT_SECTOR_SKY);
actor->spr.sector()->ceilingstat &= ~(CSTAT_SECTOR_SKY);
}
else if (SP_TAG3(actor) == 1)
{
actor->spr.sector()->floorpicnum = SP_TAG5(actor);
actor->spr.sector()->floorstat = ESectorFlags::FromInt(SP_TAG4(actor));
RESET(actor->spr.sector()->floorstat, CSTAT_SECTOR_SKY);
actor->spr.sector()->floorstat &= ~(CSTAT_SECTOR_SKY);
}
}
}
@ -1547,7 +1547,7 @@ void drawscreen(PLAYERp pp, double smoothratio)
{
if (TEST(actor->spr.cstat, CSTAT_SPRITE_ALIGNMENT_FLOOR))
{
RESET(actor->spr.cstat, CSTAT_SPRITE_ALIGNMENT_FLOOR);
actor->spr.cstat &= ~(CSTAT_SPRITE_ALIGNMENT_FLOOR);
actor->spr.owner = -2;
}
}

View file

@ -393,7 +393,7 @@ int SetupEel(DSWActor* actor)
EelCommon(actor);
RESET(actor->user.Flags, SPR_SHADOW); // Turn off shadows
actor->user.Flags &= ~(SPR_SHADOW); // Turn off shadows
actor->user.zclip = Z(8);
return 0;
@ -536,7 +536,7 @@ int DoEelDeath(DSWActor* actor)
// on the ground
if (actor->spr.pos.Z >= actor->user.loz)
{
RESET(actor->user.Flags, SPR_FALLING|SPR_SLIDING);
actor->user.Flags &= ~(SPR_FALLING|SPR_SLIDING);
if (RandomRange(1000) > 500)
actor->spr.cstat |= (CSTAT_SPRITE_XFLIP);
if (RandomRange(1000) > 500)

View file

@ -733,7 +733,7 @@ int SetupGirlNinja(DSWActor* actor)
DoActorSetSpeed(actor, NORM_SPEED);
actor->user.Radius = 280;
RESET(actor->user.Flags, SPR_XFLIP_TOGGLE);
actor->user.Flags &= ~(SPR_XFLIP_TOGGLE);
return 0;
}

View file

@ -495,7 +495,7 @@ int DoHornetDeath(DSWActor* actor)
}
else
{
RESET(actor->spr.cstat, CSTAT_SPRITE_YCENTER);
actor->spr.cstat &= ~(CSTAT_SPRITE_YCENTER);
actor->user.jump_speed = 0;
actor->user.floor_dist = 0;
DoBeginFall(actor);
@ -515,8 +515,8 @@ int DoHornetDeath(DSWActor* actor)
// on the ground
if (actor->spr.pos.Z >= actor->user.loz)
{
RESET(actor->user.Flags, SPR_FALLING|SPR_SLIDING);
RESET(actor->spr.cstat, CSTAT_SPRITE_YFLIP); // If upside down, reset it
actor->user.Flags &= ~(SPR_FALLING|SPR_SLIDING);
actor->spr.cstat &= ~(CSTAT_SPRITE_YFLIP); // If upside down, reset it
NewStateGroup(actor, actor->user.ActorActionSet->Dead);
DeleteNoSoundOwner(actor);
return 0;

View file

@ -323,7 +323,7 @@ void StopInventoryCloak(PLAYERp pp, short InventoryNum)
// on/off
PlayerUpdateInventory(pp, InventoryNum);
RESET(plActor->spr.cstat, CSTAT_SPRITE_TRANSLUCENT);
plActor->spr.cstat &= ~(CSTAT_SPRITE_TRANSLUCENT);
plActor->spr.shade = 0;
PlaySound(DIGI_GASPOP, pp, v3df_none);

View file

@ -300,7 +300,7 @@ void SpawnMidSplash(DSWActor* actor)
actorNew->spr.yrepeat = 70-RandomRange(20);
actorNew->spr.opos = actor->spr.opos;
actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER);
RESET(actorNew->spr.cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
actorNew->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
if (RANDOM_P2(1024) < 512)
actorNew->spr.cstat |= (CSTAT_SPRITE_XFLIP);
@ -323,7 +323,7 @@ void SpawnFloorSplash(DSWActor* actor)
actorNew->spr.yrepeat = 70-RandomRange(20);
actorNew->spr.opos = actor->spr.opos;
actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER);
RESET(actorNew->spr.cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
actorNew->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
if (RANDOM_P2(1024) < 512)
actorNew->spr.cstat |= (CSTAT_SPRITE_XFLIP);
@ -525,7 +525,7 @@ int DoBloodSpray(DSWActor* actor)
actorNew->spr.yrepeat = 40-RandomRange(30);
actorNew->spr.opos = actor->spr.opos;
actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER);
RESET(actorNew->spr.cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
actorNew->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
if (RANDOM_P2(1024) < 512)
actorNew->spr.cstat |= (CSTAT_SPRITE_XFLIP);
@ -728,7 +728,7 @@ int DoPhosphorus(DSWActor* actor)
actorNew->spr.yrepeat = 12 + RandomRange(10);
actorNew->spr.opos = actor->spr.opos;
actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER);
RESET(actorNew->spr.cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
actorNew->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
if (RANDOM_P2(1024) < 512)
actorNew->spr.cstat |= (CSTAT_SPRITE_XFLIP);
@ -952,7 +952,7 @@ int DoChemBomb(DSWActor* actor)
// !Frank - dont do translucent
actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER);
// actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER|CSTAT_SPRITE_TRANSLUCENT);
RESET(actorNew->spr.cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
actorNew->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
actorNew->user.xchange = actor->user.xchange;
actorNew->user.ychange = actor->user.ychange;
@ -1180,7 +1180,7 @@ int SpawnRadiationCloud(DSWActor* actor)
actorNew->spr.yrepeat = 32;
actorNew->spr.clipdist = actor->spr.clipdist;
actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER);
RESET(actorNew->spr.cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
actorNew->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
actorNew->user.spal = actorNew->spr.pal = PALETTE_PLAYER6;
// Won't take floor palettes
actorNew->spr.hitag = SECTFU_DONT_COPY_PALETTE;
@ -1373,7 +1373,7 @@ int InitChemBomb(DSWActor* actor)
actorNew->user.Counter = 0;
actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER | CSTAT_SPRITE_INVISIBLE); // Make nuke radiation
// invis.
RESET(actorNew->spr.cstat, CSTAT_SPRITE_BLOCK);
actorNew->spr.cstat &= ~(CSTAT_SPRITE_BLOCK);
if (SpriteInUnderwaterArea(actorNew))
actorNew->user.Flags |= (SPR_UNDERWATER);
@ -1590,7 +1590,7 @@ void SpawnFlashBombOnActor(DSWActor* actor)
actorNew->spr.shade = -40;
actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER | CSTAT_SPRITE_INVISIBLE);
RESET(actorNew->spr.cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
actorNew->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
actorNew->user.Radius = 200;
@ -2145,7 +2145,7 @@ int DoFlag(DSWActor* actor)
if (TEST(hitActor->spr.extra, SPRX_PLAYER_OR_ENEMY))
{
// attach weapon to sprite
RESET(actor->spr.cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
actor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
SetAttach(hitActor, actor);
actor->user.sz = hitActor->spr.pos.Z - (ActorSizeZ(hitActor) >> 1);
}
@ -2242,8 +2242,8 @@ int SpawnShell(DSWActor* actor, int ShellNum)
actorNew->user.floor_dist = Z(1);
actorNew->user.Counter = 0;
actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER);
RESET(actorNew->spr.cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
RESET(actorNew->user.Flags, SPR_BOUNCE|SPR_UNDERWATER); // Make em' bounce
actorNew->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
actorNew->user.Flags &= ~(SPR_BOUNCE|SPR_UNDERWATER); // Make em' bounce
actorNew->user.xchange = MOVEx(actorNew->spr.xvel, actorNew->spr.ang);
actorNew->user.ychange = MOVEy(actorNew->spr.xvel, actorNew->spr.ang);

View file

@ -136,7 +136,7 @@ int SetupToiletGirl(DSWActor* actor)
actor->user.FlagOwner = 0;
actor->user.ID = TOILETGIRL_R0;
RESET(actor->user.Flags, SPR_XFLIP_TOGGLE);
actor->user.Flags &= ~(SPR_XFLIP_TOGGLE);
return 0;
}
@ -356,7 +356,7 @@ int SetupWashGirl(DSWActor* actor)
actor->user.FlagOwner = 0;
actor->user.ID = WASHGIRL_R0;
RESET(actor->user.Flags, SPR_XFLIP_TOGGLE);
actor->user.Flags &= ~(SPR_XFLIP_TOGGLE);
return 0;
}
@ -548,8 +548,8 @@ int SetupTrashCan(DSWActor* actor)
actor->spr.xvel = actor->spr.yvel = actor->spr.zvel = 0;
actor->user.ID = TRASHCAN;
RESET(actor->user.Flags, SPR_XFLIP_TOGGLE);
RESET(actor->spr.extra, SPRX_PLAYER_OR_ENEMY);
actor->user.Flags &= ~(SPR_XFLIP_TOGGLE);
actor->spr.extra &= ~(SPRX_PLAYER_OR_ENEMY);
return 0;
}
@ -641,8 +641,8 @@ int SetupPachinkoLight(DSWActor* actor)
actor->spr.shade = -2;
actor->user.spal = actor->spr.pal;
RESET(actor->user.Flags, SPR_XFLIP_TOGGLE);
RESET(actor->spr.extra, SPRX_PLAYER_OR_ENEMY);
actor->user.Flags &= ~(SPR_XFLIP_TOGGLE);
actor->spr.extra &= ~(SPRX_PLAYER_OR_ENEMY);
return 0;
}
@ -729,8 +729,8 @@ int SetupPachinko1(DSWActor* actor)
actor->spr.yvel = actor->spr.zvel = 0;
actor->spr.lotag = PACHINKO1;
RESET(actor->user.Flags, SPR_XFLIP_TOGGLE);
RESET(actor->spr.extra, SPRX_PLAYER_OR_ENEMY);
actor->user.Flags &= ~(SPR_XFLIP_TOGGLE);
actor->spr.extra &= ~(SPRX_PLAYER_OR_ENEMY);
return 0;
}
@ -881,8 +881,8 @@ int SetupPachinko2(DSWActor* actor)
actor->spr.yvel = actor->spr.zvel = 0;
actor->spr.lotag = PACHINKO2;
RESET(actor->user.Flags, SPR_XFLIP_TOGGLE);
RESET(actor->spr.extra, SPRX_PLAYER_OR_ENEMY);
actor->user.Flags &= ~(SPR_XFLIP_TOGGLE);
actor->spr.extra &= ~(SPRX_PLAYER_OR_ENEMY);
return 0;
}
@ -957,8 +957,8 @@ int SetupPachinko3(DSWActor* actor)
actor->spr.yvel = actor->spr.zvel = 0;
actor->spr.lotag = PACHINKO3;
RESET(actor->user.Flags, SPR_XFLIP_TOGGLE);
RESET(actor->spr.extra, SPRX_PLAYER_OR_ENEMY);
actor->user.Flags &= ~(SPR_XFLIP_TOGGLE);
actor->spr.extra &= ~(SPRX_PLAYER_OR_ENEMY);
return 0;
}
@ -1034,8 +1034,8 @@ int SetupPachinko4(DSWActor* actor)
actor->spr.yvel = actor->spr.zvel = 0;
actor->spr.lotag = PACHINKO4;
RESET(actor->user.Flags, SPR_XFLIP_TOGGLE);
RESET(actor->spr.extra, SPRX_PLAYER_OR_ENEMY);
actor->user.Flags &= ~(SPR_XFLIP_TOGGLE);
actor->spr.extra &= ~(SPRX_PLAYER_OR_ENEMY);
return 0;
}
@ -1143,7 +1143,7 @@ int SetupCarGirl(DSWActor* actor)
actor->user.FlagOwner = 0;
actor->user.ID = CARGIRL_R0;
RESET(actor->user.Flags, SPR_XFLIP_TOGGLE);
actor->user.Flags &= ~(SPR_XFLIP_TOGGLE);
actor->spr.cstat |= (CSTAT_SPRITE_XFLIP);
return 0;
@ -1344,7 +1344,7 @@ int SetupMechanicGirl(DSWActor* actor)
actor->user.FlagOwner = 0;
actor->user.ID = MECHANICGIRL_R0;
RESET(actor->user.Flags, SPR_XFLIP_TOGGLE);
actor->user.Flags &= ~(SPR_XFLIP_TOGGLE);
return 0;
}
@ -1544,7 +1544,7 @@ int SetupSailorGirl(DSWActor* actor)
actor->user.FlagOwner = 0;
actor->user.ID = SAILORGIRL_R0;
RESET(actor->user.Flags, SPR_XFLIP_TOGGLE);
actor->user.Flags &= ~(SPR_XFLIP_TOGGLE);
alreadythrew = 0;
return 0;
@ -1738,7 +1738,7 @@ int SetupPruneGirl(DSWActor* actor)
actor->user.FlagOwner = 0;
actor->user.ID = PRUNEGIRL_R0;
RESET(actor->user.Flags, SPR_XFLIP_TOGGLE);
actor->user.Flags &= ~(SPR_XFLIP_TOGGLE);
return 0;
}

View file

@ -127,7 +127,7 @@ short DoSOevent(short match, short state)
{
if (sop->save_vel > 0 || sop->save_spin_speed > 0)
{
RESET(sop->flags, SOBJ_WAIT_FOR_EVENT);
sop->flags &= ~(SOBJ_WAIT_FOR_EVENT);
sop->vel = sop->save_vel;
sop->spin_speed = sop->save_spin_speed;
}

View file

@ -1933,9 +1933,9 @@ int DoNinjaHariKari(DSWActor* actor)
{
UpdateSinglePlayKills(actor);
change_actor_stat(actor, STAT_DEAD_ACTOR);
RESET(actor->spr.cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
actor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
actor->user.Flags |= (SPR_DEAD);
RESET(actor->user.Flags, SPR_FALLING | SPR_JUMPING);
actor->user.Flags &= ~(SPR_FALLING | SPR_JUMPING);
actor->user.floor_dist = Z(40);
actor->user.RotNum = 0;
actor->user.ActorActionFunc = nullptr;
@ -1960,11 +1960,11 @@ int DoNinjaGrabThroat(DSWActor* actor)
{
UpdateSinglePlayKills(actor);
RESET(actor->user.Flags2, SPR2_DYING);
RESET(actor->spr.cstat, CSTAT_SPRITE_YFLIP);
actor->spr.cstat &= ~(CSTAT_SPRITE_YFLIP);
change_actor_stat(actor, STAT_DEAD_ACTOR);
RESET(actor->spr.cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
actor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
actor->user.Flags |= (SPR_DEAD);
RESET(actor->user.Flags, SPR_FALLING | SPR_JUMPING);
actor->user.Flags &= ~(SPR_FALLING | SPR_JUMPING);
actor->user.floor_dist = Z(40);
actor->user.RotNum = 0;
actor->user.ActorActionFunc = nullptr;
@ -2165,10 +2165,10 @@ void PlayerLevelReset(PLAYERp pp)
pp->StartColor = 0;
pp->FadeAmt = 0;
pp->DeathType = 0;
RESET(actor->spr.cstat, CSTAT_SPRITE_YCENTER);
RESET(actor->spr.cstat, CSTAT_SPRITE_TRANSLUCENT);
RESET(pp->Flags, PF_WEAPON_DOWN|PF_WEAPON_RETRACT);
RESET(pp->Flags, PF_DEAD);
actor->spr.cstat &= ~(CSTAT_SPRITE_YCENTER);
actor->spr.cstat &= ~(CSTAT_SPRITE_TRANSLUCENT);
pp->Flags &= ~(PF_WEAPON_DOWN|PF_WEAPON_RETRACT);
pp->Flags &= ~(PF_DEAD);
pp->sop_control = nullptr;
pp->sop_riding = nullptr;
@ -2216,8 +2216,8 @@ void PlayerDeathReset(PLAYERp pp)
pp->WpnFlags |= (BIT(WPN_SWORD));
pp->WpnFlags |= (BIT(WPN_FIST) | BIT(actor->user.WeaponNum));
pp->WpnFlags |= (BIT(WPN_STAR) | BIT(actor->user.WeaponNum));
RESET(pp->Flags, PF_PICKED_UP_AN_UZI);
RESET(pp->Flags, PF_TWO_UZI);
pp->Flags &= ~(PF_PICKED_UP_AN_UZI);
pp->Flags &= ~(PF_TWO_UZI);
actor->user.Health = 100;
pp->MaxHealth = 100;
@ -2230,9 +2230,9 @@ void PlayerDeathReset(PLAYERp pp)
pp->StartColor = 0;
pp->FadeAmt = 0;
pp->DeathType = 0;
RESET(actor->spr.cstat, CSTAT_SPRITE_TRANSLUCENT);
RESET(pp->Flags, PF_WEAPON_DOWN|PF_WEAPON_RETRACT);
RESET(pp->Flags, PF_DEAD);
actor->spr.cstat &= ~(CSTAT_SPRITE_TRANSLUCENT);
pp->Flags &= ~(PF_WEAPON_DOWN|PF_WEAPON_RETRACT);
pp->Flags &= ~(PF_DEAD);
pp->sop_control = nullptr;
pp->sop_riding = nullptr;
@ -2290,8 +2290,8 @@ void PlayerGameReset(PLAYERp pp)
pp->WpnFlags |= (BIT(WPN_SWORD));
pp->WpnFlags |= (BIT(WPN_FIST) | BIT(actor->user.WeaponNum));
pp->WpnFlags |= (BIT(WPN_STAR) | BIT(actor->user.WeaponNum));
RESET(pp->Flags, PF_PICKED_UP_AN_UZI);
RESET(pp->Flags, PF_TWO_UZI);
pp->Flags &= ~(PF_PICKED_UP_AN_UZI);
pp->Flags &= ~(PF_TWO_UZI);
pp->MaxHealth = 100;
PlayerUpdateHealth(pp, 500);
pp->Armor = 0;
@ -2307,7 +2307,7 @@ void PlayerGameReset(PLAYERp pp)
pp->FadeAmt = 0;
pp->DeathType = 0;
RESET(actor->spr.cstat, CSTAT_SPRITE_TRANSLUCENT);
actor->spr.cstat &= ~(CSTAT_SPRITE_TRANSLUCENT);
pp->sop_control = nullptr;
pp->sop_riding = nullptr;
@ -2334,7 +2334,7 @@ void InitPlayerSprite(PLAYERp pp)
actor->spr.cstat |= (CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
actor->spr.extra |= (SPRX_PLAYER_OR_ENEMY);
RESET(actor->spr.cstat, CSTAT_SPRITE_TRANSLUCENT);
actor->spr.cstat &= ~(CSTAT_SPRITE_TRANSLUCENT);
// Grouping items that need to be reset after a LoadLevel
ChangeState(actor, s_NinjaRun[0]);

View file

@ -102,7 +102,7 @@ void GameInterface::ToggleThirdPerson()
auto pp = &Player[myconnectindex];
if (TEST(pp->Flags, PF_VIEW_FROM_OUTSIDE))
{
RESET(pp->Flags, PF_VIEW_FROM_OUTSIDE);
pp->Flags &= ~(PF_VIEW_FROM_OUTSIDE);
}
else
{

View file

@ -949,7 +949,7 @@ void InitWeaponSword(PLAYERp pp)
if (pp->Wpn[WPN_SWORD] && TEST(pp->Wpn[WPN_SWORD]->flags, PANF_DEATH_HIDE))
{
RESET(pp->Wpn[WPN_SWORD]->flags, PANF_DEATH_HIDE);
RESET(pp->Flags, PF_WEAPON_RETRACT|PF_WEAPON_DOWN);
pp->Flags &= ~(PF_WEAPON_RETRACT|PF_WEAPON_DOWN);
pSetState(pp->CurWpn, pp->CurWpn->PresentState);
return;
}
@ -1183,7 +1183,7 @@ void pSwordRest(PANEL_SPRITEp psp)
{
if ((psp->PlayerP->KeyPressBits & SB_FIRE) || force)
{
RESET(psp->flags, PANF_UNHIDE_SHOOT);
psp->flags &= ~(PANF_UNHIDE_SHOOT);
pSetState(psp, psp->ActionState);
@ -1218,7 +1218,7 @@ void pSwordRetract(PANEL_SPRITEp psp)
if (psp->y >= SWORD_YOFF + tileHeight(picnum))
{
RESET(psp->PlayerP->Flags, PF_WEAPON_RETRACT);
psp->PlayerP->Flags &= ~(PF_WEAPON_RETRACT);
psp->PlayerP->Wpn[WPN_SWORD] = nullptr;
pKillSprite(psp);
}
@ -1346,7 +1346,7 @@ void InitWeaponStar(PLAYERp pp)
if (pp->Wpn[WPN_STAR] && TEST(pp->Wpn[WPN_STAR]->flags, PANF_DEATH_HIDE))
{
RESET(pp->Wpn[WPN_STAR]->flags, PANF_DEATH_HIDE);
RESET(pp->Flags, PF_WEAPON_RETRACT);
pp->Flags &= ~(PF_WEAPON_RETRACT);
pSetState(pp->CurWpn, pp->CurWpn->PresentState);
return;
}
@ -1461,7 +1461,7 @@ void pStarRest(PANEL_SPRITEp psp)
{
if ((psp->PlayerP->KeyPressBits & SB_FIRE) || force)
{
RESET(psp->flags, PANF_UNHIDE_SHOOT);
psp->flags &= ~(PANF_UNHIDE_SHOOT);
if (!WeaponOK(psp->PlayerP))
return;
@ -1501,7 +1501,7 @@ void pStarRetract(PANEL_SPRITEp psp)
if (psp->y >= STAR_YOFF + tileHeight(picnum))
{
RESET(psp->PlayerP->Flags, PF_WEAPON_RETRACT);
psp->PlayerP->Flags &= ~(PF_WEAPON_RETRACT);
// kill only in its own routine
psp->PlayerP->Wpn[WPN_STAR] = nullptr;
@ -1984,7 +1984,7 @@ void InitWeaponUzi(PLAYERp pp)
// if actually picked an uzi up and don't currently have double uzi
if (TEST(pp->Flags, PF_PICKED_UP_AN_UZI) && !TEST(pp->Wpn[WPN_UZI]->flags, PANF_PRIMARY))
{
RESET(pp->Flags, PF_PICKED_UP_AN_UZI);
pp->Flags &= ~(PF_PICKED_UP_AN_UZI);
if (!TEST(pp->CurWpn->flags, PANF_RELOAD))
InitWeaponUzi2(pp->Wpn[WPN_UZI]);
@ -1993,7 +1993,7 @@ void InitWeaponUzi(PLAYERp pp)
}
else
{
RESET(pp->Flags, PF_PICKED_UP_AN_UZI);
pp->Flags &= ~(PF_PICKED_UP_AN_UZI);
}
PlayerUpdateWeapon(pp, WPN_UZI);
@ -2097,7 +2097,7 @@ void pUziPresent(PANEL_SPRITEp psp)
if (psp->y < UZI_YOFF)
{
RESET(psp->flags, PANF_RELOAD);
psp->flags &= ~(PANF_RELOAD);
psp->oy = psp->y = UZI_YOFF;
psp->backupx();
@ -2226,7 +2226,7 @@ void pUziRest(PANEL_SPRITEp psp)
if (!WeaponOK(psp->PlayerP))
return;
RESET(psp->flags, PANF_UNHIDE_SHOOT);
psp->flags &= ~(PANF_UNHIDE_SHOOT);
pSetState(psp, psp->ActionState);
}
@ -2327,7 +2327,7 @@ void pUziRetract(PANEL_SPRITEp psp)
// no matter whether it is PRIMARY/SECONDARY/neither.
if (TEST(psp->flags, PANF_RELOAD))
{
RESET(psp->PlayerP->Flags, PF_WEAPON_RETRACT);
psp->PlayerP->Flags &= ~(PF_WEAPON_RETRACT);
psp->PlayerP->Wpn[WPN_UZI] = nullptr;
}
else
@ -2336,7 +2336,7 @@ void pUziRetract(PANEL_SPRITEp psp)
if (TEST(psp->flags, PANF_PRIMARY))
{
// only reset when primary goes off the screen
RESET(psp->PlayerP->Flags, PF_WEAPON_RETRACT);
psp->PlayerP->Flags &= ~(PF_WEAPON_RETRACT);
psp->PlayerP->Wpn[WPN_UZI] = nullptr;
}
else if (TEST(psp->flags, PANF_SECONDARY))
@ -2350,7 +2350,7 @@ void pUziRetract(PANEL_SPRITEp psp)
else
{
// only one uzi here is retracting
RESET(psp->PlayerP->Flags, PF_WEAPON_RETRACT);
psp->PlayerP->Flags &= ~(PF_WEAPON_RETRACT);
psp->PlayerP->Wpn[WPN_UZI] = nullptr;
}
}
@ -2692,7 +2692,7 @@ void pShotgunRecoilUp(PANEL_SPRITEp psp)
pShotgunSetRecoil(psp);
pStatePlusOne(psp);
RESET(psp->flags, PANF_BOB);
psp->flags &= ~(PANF_BOB);
}
}
@ -2729,7 +2729,7 @@ void pShotgunReloadUp(PANEL_SPRITEp psp)
psp->oy = psp->y = SHOTGUN_YOFF;
pStatePlusOne(psp);
RESET(psp->flags, PANF_BOB);
psp->flags &= ~(PANF_BOB);
}
}
#endif
@ -2835,7 +2835,7 @@ bool pShotgunReloadTest(PANEL_SPRITEp psp)
if (ammo > 0 && (ammo % 4) == 0)
{
// clip has run out
RESET(psp->flags, PANF_REST_POS);
psp->flags &= ~(PANF_REST_POS);
pSetState(psp, ps_ShotgunReload);
return true;
}
@ -2869,7 +2869,7 @@ void pShotgunRest(PANEL_SPRITEp psp)
{
if ((psp->PlayerP->KeyPressBits & SB_FIRE) || force)
{
RESET(psp->flags, PANF_UNHIDE_SHOOT);
psp->flags &= ~(PANF_UNHIDE_SHOOT);
if (!WeaponOK(psp->PlayerP))
return;
@ -2912,7 +2912,7 @@ void pShotgunRestTest(PANEL_SPRITEp psp)
{
if ((psp->PlayerP->KeyPressBits & SB_FIRE) || force)
{
RESET(psp->flags, PANF_UNHIDE_SHOOT);
psp->flags &= ~(PANF_UNHIDE_SHOOT);
if (!WeaponOK(psp->PlayerP))
return;
@ -2948,7 +2948,7 @@ void pShotgunRetract(PANEL_SPRITEp psp)
if (psp->y >= SHOTGUN_YOFF + tileHeight(picnum) + 50)
{
RESET(psp->PlayerP->Flags, PF_WEAPON_RETRACT);
psp->PlayerP->Flags &= ~(PF_WEAPON_RETRACT);
psp->PlayerP->Wpn[psp->WeaponType] = nullptr;
pKillSprite(psp);
}
@ -3162,7 +3162,7 @@ void pRailRecoilUp(PANEL_SPRITEp psp)
pRailSetRecoil(psp);
pStatePlusOne(psp);
RESET(psp->flags, PANF_BOB);
psp->flags &= ~(PANF_BOB);
}
}
@ -3238,7 +3238,7 @@ void pRailRest(PANEL_SPRITEp psp)
{
if ((psp->PlayerP->KeyPressBits & SB_FIRE) || force)
{
RESET(psp->flags, PANF_UNHIDE_SHOOT);
psp->flags &= ~(PANF_UNHIDE_SHOOT);
if (!WeaponOK(psp->PlayerP))
return;
@ -3270,7 +3270,7 @@ void pRailRestTest(PANEL_SPRITEp psp)
{
if ((psp->PlayerP->KeyPressBits & SB_FIRE) || force)
{
RESET(psp->flags, PANF_UNHIDE_SHOOT);
psp->flags &= ~(PANF_UNHIDE_SHOOT);
if (!WeaponOK(psp->PlayerP))
return;
@ -3305,7 +3305,7 @@ void pRailRetract(PANEL_SPRITEp psp)
if (psp->y >= RAIL_YOFF + tileHeight(picnum) + 50)
{
RESET(psp->PlayerP->Flags, PF_WEAPON_RETRACT);
psp->PlayerP->Flags &= ~(PF_WEAPON_RETRACT);
psp->PlayerP->Wpn[psp->WeaponType] = nullptr;
DeleteNoSoundOwner(psp->PlayerP->actor);
pKillSprite(psp);
@ -3645,7 +3645,7 @@ void pHotheadRest(PANEL_SPRITEp psp)
{
if ((psp->PlayerP->KeyPressBits & SB_FIRE) || force)
{
RESET(psp->flags, PANF_UNHIDE_SHOOT);
psp->flags &= ~(PANF_UNHIDE_SHOOT);
//if (TEST(psp->PlayerP->Flags,PF_DIVING))
// return;
@ -3709,7 +3709,7 @@ void pHotheadRetract(PANEL_SPRITEp psp)
if (psp->y >= HOTHEAD_YOFF + tileHeight(picnum))
{
RESET(psp->PlayerP->Flags, PF_WEAPON_RETRACT);
psp->PlayerP->Flags &= ~(PF_WEAPON_RETRACT);
psp->PlayerP->Wpn[WPN_HOTHEAD] = nullptr;
pKillSprite(psp);
}
@ -3995,7 +3995,7 @@ void pMicroRecoilUp(PANEL_SPRITEp psp)
pMicroSetRecoil(psp);
pStatePlusOne(psp);
RESET(psp->flags, PANF_BOB);
psp->flags &= ~(PANF_BOB);
}
}
@ -4183,7 +4183,7 @@ void pMicroRest(PANEL_SPRITEp psp)
{
if ((psp->PlayerP->KeyPressBits & SB_FIRE) || force)
{
RESET(psp->flags, PANF_UNHIDE_SHOOT);
psp->flags &= ~(PANF_UNHIDE_SHOOT);
if (!WeaponOK(psp->PlayerP))
return;
@ -4255,7 +4255,7 @@ void pMicroRetract(PANEL_SPRITEp psp)
if (psp->y >= MICRO_YOFF + tileHeight(picnum))
{
RESET(psp->PlayerP->Flags, PF_WEAPON_RETRACT);
psp->PlayerP->Flags &= ~(PF_WEAPON_RETRACT);
psp->PlayerP->Wpn[WPN_MICRO] = nullptr;
pKillSprite(psp);
}
@ -4481,7 +4481,7 @@ void pHeartRest(PANEL_SPRITEp psp)
if ((psp->PlayerP->KeyPressBits & SB_FIRE) || force)
{
psp->PlayerP->KeyPressBits &= ~SB_FIRE;
RESET(psp->flags, PANF_UNHIDE_SHOOT);
psp->flags &= ~(PANF_UNHIDE_SHOOT);
if (!WeaponOK(psp->PlayerP))
return;
@ -4552,7 +4552,7 @@ void pHeartRetract(PANEL_SPRITEp psp)
if (psp->y >= HEART_YOFF + tileHeight(picnum))
{
RESET(psp->PlayerP->Flags, PF_WEAPON_RETRACT);
psp->PlayerP->Flags &= ~(PF_WEAPON_RETRACT);
psp->PlayerP->Wpn[WPN_HEART] = nullptr;
pKillSprite(psp);
}
@ -4692,7 +4692,7 @@ int DoBeginPanelJump(PANEL_SPRITEp psp)
#define PANEL_JUMP_GRAVITY FIXED(0,8000)
psp->flags |= (PANF_JUMPING);
RESET(psp->flags, PANF_FALLING);
psp->flags &= ~(PANF_FALLING);
// set up individual actor jump gravity
psp->jump_grav = PANEL_JUMP_GRAVITY;
@ -4724,7 +4724,7 @@ int DoPanelJump(PANEL_SPRITEp psp)
int DoBeginPanelFall(PANEL_SPRITEp psp)
{
psp->flags |= (PANF_FALLING);
RESET(psp->flags, PANF_JUMPING);
psp->flags &= ~(PANF_JUMPING);
psp->jump_grav = PANEL_JUMP_GRAVITY;
@ -4915,7 +4915,7 @@ void pGrenadeRecoilUp(PANEL_SPRITEp psp)
pGrenadeSetRecoil(psp);
pStatePlusOne(psp);
RESET(psp->flags, PANF_BOB);
psp->flags &= ~(PANF_BOB);
}
}
@ -4989,7 +4989,7 @@ void pGrenadeRest(PANEL_SPRITEp psp)
{
if ((psp->PlayerP->KeyPressBits & SB_FIRE) || force)
{
RESET(psp->flags, PANF_UNHIDE_SHOOT);
psp->flags &= ~(PANF_UNHIDE_SHOOT);
if (!WeaponOK(psp->PlayerP))
return;
@ -5024,7 +5024,7 @@ void pGrenadeRetract(PANEL_SPRITEp psp)
if (psp->y >= GRENADE_YOFF + tileHeight(picnum))
{
RESET(psp->PlayerP->Flags, PF_WEAPON_RETRACT);
psp->PlayerP->Flags &= ~(PF_WEAPON_RETRACT);
psp->PlayerP->Wpn[WPN_GRENADE] = nullptr;
pKillSprite(psp);
}
@ -5226,7 +5226,7 @@ void pMineRest(PANEL_SPRITEp psp)
{
if ((psp->PlayerP->KeyPressBits & SB_FIRE) || force)
{
RESET(psp->flags, PANF_UNHIDE_SHOOT);
psp->flags &= ~(PANF_UNHIDE_SHOOT);
// if (!WeaponOK(psp->PlayerP))
// return;
@ -5260,7 +5260,7 @@ void pMineRetract(PANEL_SPRITEp psp)
if (psp->y >= MINE_YOFF + tileHeight(picnum))
{
RESET(psp->PlayerP->Flags, PF_WEAPON_RETRACT);
psp->PlayerP->Flags &= ~(PF_WEAPON_RETRACT);
psp->PlayerP->Wpn[WPN_MINE] = nullptr;
pKillSprite(psp);
}
@ -6047,7 +6047,7 @@ void pFistRest(PANEL_SPRITEp psp)
{
if ((psp->PlayerP->KeyPressBits & SB_FIRE) || force)
{
RESET(psp->flags, PANF_UNHIDE_SHOOT);
psp->flags &= ~(PANF_UNHIDE_SHOOT);
psp->ActionState = ps_FistSwing;
psp->PlayerP->WpnKungFuMove = 0;
@ -6084,7 +6084,7 @@ void pFistRetract(PANEL_SPRITEp psp)
if (psp->y >= FIST_YOFF + tileHeight(picnum))
{
RESET(psp->PlayerP->Flags, PF_WEAPON_RETRACT);
psp->PlayerP->Flags &= ~(PF_WEAPON_RETRACT);
psp->PlayerP->Wpn[WPN_FIST] = nullptr;
pKillSprite(psp);
}
@ -6134,7 +6134,7 @@ bool pWeaponUnHideKeys(PANEL_SPRITEp psp, PANEL_STATEp state)
{
if (!TEST(psp->PlayerP->Flags, PF_WEAPON_DOWN))
{
RESET(psp->flags, PANF_WEAPON_HIDE);
psp->flags &= ~(PANF_WEAPON_HIDE);
pSetState(psp, state);
return true;
}
@ -6330,7 +6330,7 @@ void pWeaponBob(PANEL_SPRITEp psp, short condition)
{
if (labs((psp->sin_ndx & 1023) - 0) < 70)
{
RESET(psp->flags, PANF_BOB);
psp->flags &= ~(PANF_BOB);
psp->sin_ndx = (RANDOM_P2(1024) < 512) ? 1024 : 0;
}
}

View file

@ -1249,7 +1249,7 @@ void DoPlayerResetMovement(PLAYERp pp)
pp->slide_xvect = 0;
pp->slide_yvect = 0;
pp->drive_avel = 0;
RESET(pp->Flags, PF_PLAYER_MOVED);
pp->Flags &= ~(PF_PLAYER_MOVED);
}
void DoPlayerTeleportPause(PLAYERp pp)
@ -1261,8 +1261,8 @@ void DoPlayerTeleportPause(PLAYERp pp)
if ((actor->user.WaitTics-=synctics) <= 0)
{
//RESET(actor->spr.cstat, CSTAT_SPRITE_TRANSLUCENT);
RESET(pp->Flags2, PF2_TELEPORTED);
//actor->spr.cstat &= ~(CSTAT_SPRITE_TRANSLUCENT);
pp->Flags2 &= ~(PF2_TELEPORTED);
DoPlayerResetMovement(pp);
DoPlayerBeginRun(pp);
return;
@ -1648,7 +1648,7 @@ void DoPlayerRecoil(PLAYERp pp)
if (bsin(pp->recoil_ndx) < 0)
{
RESET(pp->Flags, PF_RECOIL);
pp->Flags &= ~(PF_RECOIL);
pp->recoil_ohorizoff = pp->recoil_horizoff = 0;
return;
}
@ -1836,7 +1836,7 @@ void DoPlayerZrange(PLAYERp pp)
// This function returns the highest and lowest z's
// for an entire box, NOT just a point. -Useful for clipping
auto bakcstat = actor->spr.cstat;
RESET(actor->spr.cstat, CSTAT_SPRITE_BLOCK);
actor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK);
vec3_t pos = pp->pos;
pos.Z += Z(8);
FAFgetzrange(pos, pp->cursector, &pp->hiz, &ceilhit, &pp->loz, &florhit, ((int)actor->spr.clipdist<<2) - GETZRANGE_CLIP_ADJ, CLIPMASK_PLAYER);
@ -2006,7 +2006,7 @@ void DoPlayerMove(PLAYERp pp)
pp->lastcursector = pp->cursector;
if (PLAYER_MOVING(pp) == 0)
RESET(pp->Flags, PF_PLAYER_MOVED);
pp->Flags &= ~(PF_PLAYER_MOVED);
else
pp->Flags |= (PF_PLAYER_MOVED);
@ -2082,7 +2082,7 @@ void DoPlayerMove(PLAYERp pp)
}
auto save_cstat = actor->spr.cstat;
RESET(actor->spr.cstat, CSTAT_SPRITE_BLOCK);
actor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK);
Collision coll;
updatesector(pp->pos.X, pp->pos.Y, &pp->cursector);
clipmove(pp->pos, &pp->cursector, pp->xvect, pp->yvect, ((int)actor->spr.clipdist<<2), pp->ceiling_dist, pp->floor_dist, CLIPMASK_PLAYER, coll);
@ -2533,7 +2533,7 @@ void DoPlayerMoveVehicle(PLAYERp pp)
setForcedSyncInput();
if (PLAYER_MOVING(pp) == 0)
RESET(pp->Flags, PF_PLAYER_MOVED);
pp->Flags &= ~(PF_PLAYER_MOVED);
else
pp->Flags |= (PF_PLAYER_MOVED);
@ -2605,7 +2605,7 @@ void DoPlayerMoveVehicle(PLAYERp pp)
int ret;
auto save_cstat = plActor->spr.cstat;
RESET(plActor->spr.cstat, CSTAT_SPRITE_BLOCK);
plActor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK);
DoPlayerTurnVehicleRect(pp, x, y, ox, oy);
ret = RectClipMove(pp, x, y);
@ -2660,7 +2660,7 @@ void DoPlayerMoveVehicle(PLAYERp pp)
}
auto save_cstat = plActor->spr.cstat;
RESET(plActor->spr.cstat, CSTAT_SPRITE_BLOCK);
plActor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK);
if (pp->sop->clipdist)
{
vec3_t clippos = { pp->pos.X, pp->pos.Y, z };
@ -2732,7 +2732,7 @@ void DoPlayerMoveTurret(PLAYERp pp)
}
if (PLAYER_MOVING(pp) == 0)
RESET(pp->Flags, PF_PLAYER_MOVED);
pp->Flags &= ~(PF_PLAYER_MOVED);
else
pp->Flags |= (PF_PLAYER_MOVED);
@ -2751,9 +2751,9 @@ void DoPlayerBeginJump(PLAYERp pp)
DSWActor* plActor = pp->actor;
pp->Flags |= (PF_JUMPING);
RESET(pp->Flags, PF_FALLING);
RESET(pp->Flags, PF_CRAWLING);
RESET(pp->Flags, PF_LOCK_CRAWL);
pp->Flags &= ~(PF_FALLING);
pp->Flags &= ~(PF_CRAWLING);
pp->Flags &= ~(PF_LOCK_CRAWL);
pp->floor_dist = PLAYER_JUMP_FLOOR_DIST;
pp->ceiling_dist = PLAYER_JUMP_CEILING_DIST;
@ -2781,7 +2781,7 @@ void DoPlayerBeginForceJump(PLAYERp pp)
DSWActor* plActor = pp->actor;
pp->Flags |= (PF_JUMPING);
RESET(pp->Flags, PF_FALLING|PF_CRAWLING|PF_CLIMBING|PF_LOCK_CRAWL);
pp->Flags &= ~(PF_FALLING|PF_CRAWLING|PF_CLIMBING|PF_LOCK_CRAWL);
pp->JumpDuration = MAX_JUMP_DURATION;
pp->DoPlayerAction = DoPlayerForceJump;
@ -2926,9 +2926,9 @@ void DoPlayerBeginFall(PLAYERp pp)
DSWActor* plActor = pp->actor;
pp->Flags |= (PF_FALLING);
RESET(pp->Flags, PF_JUMPING);
RESET(pp->Flags, PF_CRAWLING);
RESET(pp->Flags, PF_LOCK_CRAWL);
pp->Flags &= ~(PF_JUMPING);
pp->Flags &= ~(PF_CRAWLING);
pp->Flags &= ~(PF_LOCK_CRAWL);
pp->floor_dist = PLAYER_FALL_FLOOR_DIST;
pp->ceiling_dist = PLAYER_FALL_CEILING_DIST;
@ -3114,9 +3114,9 @@ void DoPlayerBeginClimb(PLAYERp pp)
{
DSWActor* actor = pp->actor;
RESET(pp->Flags, PF_JUMPING|PF_FALLING);
RESET(pp->Flags, PF_CRAWLING);
RESET(pp->Flags, PF_LOCK_CRAWL);
pp->Flags &= ~(PF_JUMPING|PF_FALLING);
pp->Flags &= ~(PF_CRAWLING);
pp->Flags &= ~(PF_LOCK_CRAWL);
pp->DoPlayerAction = DoPlayerClimb;
@ -3159,8 +3159,8 @@ void DoPlayerClimb(PLAYERp pp)
// Jump off of the ladder
if (pp->input.actions & SB_JUMP)
{
RESET(pp->Flags, PF_CLIMBING|PF_WEAPON_DOWN);
RESET(plActor->spr.cstat, CSTAT_SPRITE_YCENTER);
pp->Flags &= ~(PF_CLIMBING|PF_WEAPON_DOWN);
plActor->spr.cstat &= ~(CSTAT_SPRITE_YCENTER);
DoPlayerBeginJump(pp);
return;
}
@ -3259,8 +3259,8 @@ void DoPlayerClimb(PLAYERp pp)
if (pp->pos.Z < pp->LadderSector->floorz - Z(6))
{
pp->jump_speed = PLAYER_CLIMB_JUMP_AMT;
RESET(pp->Flags, PF_CLIMBING|PF_WEAPON_DOWN);
RESET(plActor->spr.cstat, CSTAT_SPRITE_YCENTER);
pp->Flags &= ~(PF_CLIMBING|PF_WEAPON_DOWN);
plActor->spr.cstat &= ~(CSTAT_SPRITE_YCENTER);
DoPlayerBeginForceJump(pp);
}
}
@ -3286,8 +3286,8 @@ void DoPlayerClimb(PLAYERp pp)
// if moving backwards start running
if (climbvel < 0)
{
RESET(pp->Flags, PF_CLIMBING|PF_WEAPON_DOWN);
RESET(plActor->spr.cstat, CSTAT_SPRITE_YCENTER);
pp->Flags &= ~(PF_CLIMBING|PF_WEAPON_DOWN);
plActor->spr.cstat &= ~(CSTAT_SPRITE_YCENTER);
DoPlayerBeginRun(pp);
return;
}
@ -3405,7 +3405,7 @@ void DoPlayerBeginCrawl(PLAYERp pp)
{
DSWActor* plActor = pp->actor;
RESET(pp->Flags, PF_FALLING | PF_JUMPING);
pp->Flags &= ~(PF_FALLING | PF_JUMPING);
pp->Flags |= (PF_CRAWLING);
pp->friction = PLAYER_CRAWL_FRICTION;
@ -3467,7 +3467,7 @@ void DoPlayerCrawl(PLAYERp pp)
{
if (labs(pp->loz - pp->hiz) >= PLAYER_STANDING_ROOM)
{
RESET(pp->Flags, PF_CRAWLING);
pp->Flags &= ~(PF_CRAWLING);
DoPlayerBeginRun(pp);
return;
}
@ -3483,7 +3483,7 @@ void DoPlayerCrawl(PLAYERp pp)
if (pp->WadeDepth > PLAYER_CRAWL_WADE_DEPTH)
{
RESET(pp->Flags, PF_CRAWLING);
pp->Flags &= ~(PF_CRAWLING);
DoPlayerBeginRun(pp);
return;
}
@ -3497,7 +3497,7 @@ void DoPlayerCrawl(PLAYERp pp)
if (PlayerFallTest(pp, PLAYER_CRAWL_HEIGHT))
{
pp->jump_speed = Z(1);
RESET(pp->Flags, PF_CRAWLING);
pp->Flags &= ~(PF_CRAWLING);
DoPlayerBeginFall(pp);
// call PlayerFall now seems to iron out a hitch before falling
DoPlayerFall(pp);
@ -3515,7 +3515,7 @@ void DoPlayerCrawl(PLAYERp pp)
void DoPlayerBeginFly(PLAYERp pp)
{
RESET(pp->Flags, PF_FALLING | PF_JUMPING | PF_CRAWLING);
pp->Flags &= ~(PF_FALLING | PF_JUMPING | PF_CRAWLING);
pp->Flags |= (PF_FLYING);
pp->friction = PLAYER_FLY_FRICTION;
@ -3619,7 +3619,7 @@ void DoPlayerFly(PLAYERp pp)
if (PlayerFlyKey())
{
RESET(pp->Flags, PF_FLYING);
pp->Flags &= ~(PF_FLYING);
pp->bob_amt = 0;
pp->bob_ndx = 0;
DoPlayerBeginFall(pp);
@ -4177,9 +4177,9 @@ void DoPlayerBeginDive(PLAYERp pp)
DoPlayerWarpToUnderwater(pp);
OperateTripTrigger(pp);
RESET(pp->Flags, PF_JUMPING | PF_FALLING);
RESET(pp->Flags, PF_CRAWLING);
RESET(pp->Flags, PF_LOCK_CRAWL);
pp->Flags &= ~(PF_JUMPING | PF_FALLING);
pp->Flags &= ~(PF_CRAWLING);
pp->Flags &= ~(PF_LOCK_CRAWL);
pp->friction = PLAYER_DIVE_FRICTION;
pp->ceiling_dist = PLAYER_DIVE_CEILING_DIST;
@ -4230,7 +4230,7 @@ void DoPlayerBeginDiveNoWarp(PLAYERp pp)
DoPlayerDivePalette(pp);
DoPlayerNightVisionPalette(pp);
RESET(pp->Flags, PF_JUMPING | PF_FALLING);
pp->Flags &= ~(PF_JUMPING | PF_FALLING);
pp->friction = PLAYER_DIVE_FRICTION;
pp->ceiling_dist = PLAYER_DIVE_CEILING_DIST;
@ -4258,7 +4258,7 @@ void DoPlayerStopDiveNoWarp(PLAYERp pp)
pp->bob_amt = 0;
RESET(pp->Flags, PF_DIVING|PF_DIVING_IN_LAVA);
pp->Flags &= ~(PF_DIVING|PF_DIVING_IN_LAVA);
DoPlayerDivePalette(pp);
DoPlayerNightVisionPalette(pp);
RESET(pp->actor->spr.cstat, CSTAT_SPRITE_YCENTER);
@ -4286,11 +4286,11 @@ void DoPlayerStopDive(PLAYERp pp)
pp->bob_amt = 0;
DoPlayerWarpToSurface(pp);
DoPlayerBeginWade(pp);
RESET(pp->Flags, PF_DIVING|PF_DIVING_IN_LAVA);
pp->Flags &= ~(PF_DIVING|PF_DIVING_IN_LAVA);
DoPlayerDivePalette(pp);
DoPlayerNightVisionPalette(pp);
RESET(actor->spr.cstat, CSTAT_SPRITE_YCENTER);
actor->spr.cstat &= ~(CSTAT_SPRITE_YCENTER);
if (pp == Player + screenpeek)
{
COVER_SetReverb(0);
@ -4622,8 +4622,8 @@ void DoPlayerBeginWade(PLAYERp pp)
if (DoPlayerTestPlaxDeath(pp))
return;
RESET(pp->Flags, PF_JUMPING | PF_FALLING);
RESET(pp->Flags, PF_CRAWLING);
pp->Flags &= ~(PF_JUMPING | PF_FALLING);
pp->Flags &= ~(PF_CRAWLING);
pp->friction = PLAYER_WADE_FRICTION;
pp->floor_dist = PLAYER_WADE_FLOOR_DIST;
@ -4896,7 +4896,7 @@ void DoPlayerBeginOperate(PLAYERp pp)
UseInventoryRepairKit(pp);
sop->max_damage = sop->sp_child->user.MaxHealth;
VehicleSetSmoke(sop, nullptr);
RESET(sop->flags, SOBJ_BROKEN);
sop->flags &= ~(SOBJ_BROKEN);
}
else
{
@ -4915,7 +4915,7 @@ void DoPlayerBeginOperate(PLAYERp pp)
getzsofslopeptr(pp->cursector, pp->pos.X, pp->pos.Y, &cz, &fz);
pp->pos.Z = fz - PLAYER_HEIGHT;
RESET(pp->Flags, PF_CRAWLING|PF_JUMPING|PF_FALLING|PF_LOCK_CRAWL);
pp->Flags &= ~(PF_CRAWLING|PF_JUMPING|PF_FALLING|PF_LOCK_CRAWL);
DoPlayerOperateMatch(pp, true);
@ -4982,7 +4982,7 @@ void DoPlayerBeginRemoteOperate(PLAYERp pp, SECTOR_OBJECTp sop)
UseInventoryRepairKit(pp);
sop->max_damage = sop->sp_child->user.MaxHealth;
VehicleSetSmoke(sop, nullptr);
RESET(sop->flags, SOBJ_BROKEN);
sop->flags &= ~(SOBJ_BROKEN);
}
else
{
@ -5000,7 +5000,7 @@ void DoPlayerBeginRemoteOperate(PLAYERp pp, SECTOR_OBJECTp sop)
getzsofslopeptr(pp->cursector, pp->pos.X, pp->pos.Y, &cz, &fz);
pp->pos.Z = fz - PLAYER_HEIGHT;
RESET(pp->Flags, PF_CRAWLING|PF_JUMPING|PF_FALLING|PF_LOCK_CRAWL);
pp->Flags &= ~(PF_CRAWLING|PF_JUMPING|PF_FALLING|PF_LOCK_CRAWL);
DoPlayerOperateMatch(pp, true);
@ -5106,7 +5106,7 @@ void PlayerRemoteInit(PLAYERp pp)
void DoPlayerStopOperate(PLAYERp pp)
{
RESET(pp->Flags, PF_WEAPON_DOWN);
pp->Flags &= ~(PF_WEAPON_DOWN);
DoPlayerResetMovement(pp);
DoTankTreads(pp);
DoPlayerOperateMatch(pp, false);
@ -5219,7 +5219,7 @@ void DoPlayerDeathJump(PLAYERp pp)
// have started falling
if ((pp->jump_speed += PLAYER_DEATH_GRAV) > 0)
{
RESET(pp->Flags, PF_JUMPING);
pp->Flags &= ~(PF_JUMPING);
pp->Flags |= (PF_FALLING);
DoPlayerDeathFall(pp);
return;
@ -5239,7 +5239,7 @@ void DoPlayerDeathJump(PLAYERp pp)
pp->jump_speed = -pp->jump_speed;
// start falling
RESET(pp->Flags, PF_JUMPING);
pp->Flags &= ~(PF_JUMPING);
pp->Flags |= (PF_FALLING);
DoPlayerDeathFall(pp);
return;
@ -5279,7 +5279,7 @@ void DoPlayerDeathFall(PLAYERp pp)
PlaySound(DIGI_BODYFALL2, pp, v3df_dontpan);
pp->pos.Z = loz - PLAYER_DEATH_HEIGHT;
RESET(pp->Flags, PF_FALLING);
pp->Flags &= ~(PF_FALLING);
}
}
}
@ -5447,7 +5447,7 @@ void DoPlayerBeginDie(PLAYERp pp)
if (TEST(pp->Flags, PF_DIVING))
pp->DeathType = PLAYER_DEATH_DROWN;
RESET(pp->Flags, PF_JUMPING|PF_FALLING|PF_DIVING|PF_FLYING|PF_CLIMBING|PF_CRAWLING|PF_LOCK_CRAWL);
pp->Flags &= ~(PF_JUMPING|PF_FALLING|PF_DIVING|PF_FLYING|PF_CLIMBING|PF_CRAWLING|PF_LOCK_CRAWL);
pp->tilt_dest = 0;
@ -5521,7 +5521,7 @@ void DoPlayerBeginDie(PLAYERp pp)
pp->sop_remote = nullptr;
pp->sop_riding = nullptr;
pp->sop = nullptr;
RESET(pp->Flags, PF_TWO_UZI);
pp->Flags &= ~(PF_TWO_UZI);
NewStateGroup(pp->actor, plActor->user.ActorActionSet->Run);
pWeaponForceRest(pp);
@ -5551,7 +5551,7 @@ void DoPlayerBeginDie(PLAYERp pp)
//pp->ceiling_dist = Z(0);
//pp->floor_dist = Z(0);
RESET(plActor->spr.cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
plActor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
plActor->user.ceiling_dist = Z(10);
plActor->user.floor_dist = Z(0);
DoFindGround(pp->actor);
@ -5611,8 +5611,8 @@ void DoPlayerBeginDie(PLAYERp pp)
}
pp->Flags |= (PF_DEAD);
RESET(plActor->user.Flags,SPR_BOUNCE);
RESET(pp->Flags, PF_HEAD_CONTROL);
plActor->user.Flags &= ~(SPR_BOUNCE);
pp->Flags &= ~(PF_HEAD_CONTROL);
}
void DoPlayerDeathHoriz(PLAYERp pp, short target, short speed)
@ -5747,7 +5747,7 @@ void DoPlayerDeathCheckKeys(PLAYERp pp)
plActor->spr.picnum = plActor->user.State->Pic;
plActor->spr.picnum = plActor->user.State->Pic;
plActor->spr.xrepeat = plActor->spr.yrepeat = PLAYER_NINJA_XREPEAT;
RESET(plActor->spr.cstat, CSTAT_SPRITE_YCENTER);
plActor->spr.cstat &= ~(CSTAT_SPRITE_YCENTER);
plActor->spr.pos.X = pp->pos.X;
plActor->spr.pos.Y = pp->pos.Y;
plActor->spr.pos.Z = pp->pos.Z+PLAYER_HEIGHT;
@ -5763,9 +5763,9 @@ void DoPlayerDeathCheckKeys(PLAYERp pp)
pp->sop_riding = nullptr;
pp->sop = nullptr;
RESET(pp->Flags, PF_WEAPON_DOWN|PF_WEAPON_RETRACT);
RESET(pp->Flags, PF_DEAD);
RESET(plActor->spr.cstat, CSTAT_SPRITE_YCENTER);
pp->Flags &= ~(PF_WEAPON_DOWN|PF_WEAPON_RETRACT);
pp->Flags &= ~(PF_DEAD);
plActor->spr.cstat &= ~(CSTAT_SPRITE_YCENTER);
plActor->spr.cstat |= (CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
pp->input.actions |= SB_CENTERVIEW;
plActor->spr.xrepeat = PLAYER_NINJA_XREPEAT;
@ -5844,7 +5844,7 @@ void DoPlayerDeathCheckKick(PLAYERp pp)
plActor->user.slide_ang = NORM_ANGLE(plActor->user.slide_ang + (RANDOM_P2(128<<5)>>5) - 64);
plActor->user.slide_vel = itActor->spr.xvel<<1;
RESET(plActor->user.Flags,SPR_BOUNCE);
plActor->user.Flags &= ~(SPR_BOUNCE);
pp->jump_speed = -500;
NewStateGroup(pp->actor, sg_PlayerHeadFly);
pp->Flags |= (PF_JUMPING);
@ -5860,7 +5860,7 @@ void DoPlayerDeathCheckKick(PLAYERp pp)
{
plActor->user.slide_ang = RANDOM_P2(2048);
plActor->user.slide_vel = 1000;
RESET(plActor->user.Flags,SPR_BOUNCE);
plActor->user.Flags &= ~(SPR_BOUNCE);
pp->jump_speed = -100;
NewStateGroup(pp->actor, sg_PlayerHeadFly);
pp->Flags |= (PF_JUMPING);
@ -5997,7 +5997,7 @@ void DoPlayerDeathDrown(PLAYERp pp)
if (pp->pos.Z > pp->loz - PLAYER_DEATH_HEIGHT)
{
pp->pos.Z = pp->loz - PLAYER_DEATH_HEIGHT;
RESET(pp->Flags, PF_FALLING);
pp->Flags &= ~(PF_FALLING);
}
}
}
@ -6016,7 +6016,7 @@ void DoPlayerDeathBounce(PLAYERp pp)
if (pp->lo_sectp && TEST(pp->lo_sectp->extra, SECTFX_SINK))
{
RESET(plActor->spr.cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
plActor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
NewStateGroup(pp->actor, sg_PlayerHead);
plActor->user.slide_vel = 0;
plActor->user.Flags |= (SPR_BOUNCE);
@ -6067,7 +6067,7 @@ void DoPlayerDeathCrumble(PLAYERp pp)
return;
}
RESET(plActor->spr.cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
plActor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
NewStateGroup(pp->actor, sg_PlayerHead);
}
else
@ -6119,7 +6119,7 @@ void DoPlayerDeathExplode(PLAYERp pp)
return;
}
RESET(plActor->spr.cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
plActor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
NewStateGroup(pp->actor, sg_PlayerHead);
}
else
@ -6152,7 +6152,7 @@ void DoPlayerBeginRun(PLAYERp pp)
return;
}
RESET(pp->Flags, PF_CRAWLING|PF_JUMPING|PF_FALLING|PF_LOCK_CRAWL|PF_CLIMBING);
pp->Flags &= ~(PF_CRAWLING|PF_JUMPING|PF_FALLING|PF_LOCK_CRAWL|PF_CLIMBING);
if (pp->WadeDepth)
{
@ -6446,7 +6446,7 @@ void ChopsCheck(PLAYERp pp)
if (pp->Chops)
{
if (!pp->sop_control) // specail case
RESET(pp->Flags, PF_WEAPON_DOWN);
pp->Flags &= ~(PF_WEAPON_DOWN);
ChopsSetRetract(pp);
}
ChopTics = 0;
@ -6472,7 +6472,7 @@ void ChopsCheck(PLAYERp pp)
{
ChopTics = 0;
// bring weapon back up
RESET(pp->Flags, PF_WEAPON_DOWN);
pp->Flags &= ~(PF_WEAPON_DOWN);
ChopsSetRetract(pp);
}
}
@ -6657,7 +6657,7 @@ void domovethings(void)
ChopsCheck(pp);
// Reset flags used while tying input to framerate
RESET(pp->Flags2, PF2_INPUT_CAN_AIM|PF2_INPUT_CAN_TURN_GENERAL|PF2_INPUT_CAN_TURN_VEHICLE|PF2_INPUT_CAN_TURN_TURRET);
pp->Flags2 &= ~(PF2_INPUT_CAN_AIM|PF2_INPUT_CAN_TURN_GENERAL|PF2_INPUT_CAN_TURN_VEHICLE|PF2_INPUT_CAN_TURN_TURRET);
pp->horizon.resetadjustment();
pp->angle.resetadjustment();

View file

@ -964,7 +964,7 @@ int InitRipperHang(DSWActor* actor)
PickJumpMaxSpeed(actor, -800);
actor->user.Flags |= (SPR_JUMPING);
RESET(actor->user.Flags, SPR_FALLING);
actor->user.Flags &= ~(SPR_FALLING);
// set up individual actor jump gravity
actor->user.jump_grav = 8;
@ -1061,7 +1061,7 @@ int DoRipperBeginJumpAttack(DSWActor* actor)
PickJumpMaxSpeed(actor, -400); // was -800
actor->user.Flags |= (SPR_JUMPING);
RESET(actor->user.Flags, SPR_FALLING);
actor->user.Flags &= ~(SPR_FALLING);
// set up individual actor jump gravity
actor->user.jump_grav = 17; // was 8
@ -1192,7 +1192,7 @@ void RipperHatch(DSWActor* actor)
PickJumpMaxSpeed(actorNew, -600);
actorNew->user.Flags |= (SPR_JUMPING);
RESET(actorNew->user.Flags, SPR_FALLING);
actorNew->user.Flags &= ~(SPR_FALLING);
actorNew->user.jump_grav = 8;

View file

@ -973,7 +973,7 @@ int InitRipper2Hang(DSWActor* actor)
PickJumpMaxSpeed(actor, -(RandomRange(400)+100));
actor->user.Flags |= (SPR_JUMPING);
RESET(actor->user.Flags, SPR_FALLING);
actor->user.Flags &= ~(SPR_FALLING);
// set up individual actor jump gravity
actor->user.jump_grav = 8;
@ -1083,7 +1083,7 @@ int DoRipper2BeginJumpAttack(DSWActor* actor)
PickJumpMaxSpeed(actor, -(RandomRange(400)+100));
actor->user.Flags |= (SPR_JUMPING);
RESET(actor->user.Flags, SPR_FALLING);
actor->user.Flags &= ~(SPR_FALLING);
// set up individual actor jump gravity
actor->user.jump_grav = 8;
@ -1217,7 +1217,7 @@ void Ripper2Hatch(DSWActor* actor)
PickJumpMaxSpeed(actorNew, -600);
actorNew->user.Flags |= (SPR_JUMPING);
RESET(actorNew->user.Flags, SPR_FALLING);
actorNew->user.Flags &= ~(SPR_FALLING);
actorNew->user.jump_grav = 8;

View file

@ -116,7 +116,7 @@ void SetRotatorInactive(DSWActor* actor)
// play inactivate sound
DoSoundSpotMatch(SP_TAG2(actor), 2, SOUND_OBJECT_TYPE);
RESET(actor->user.Flags, SPR_ACTIVE);
actor->user.Flags &= ~(SPR_ACTIVE);
}
// called for operation from the space bar

View file

@ -831,7 +831,7 @@ void SectorExp(DSWActor* actor, sectortype* sectp, short orig_ang, int zh)
{
int x,y,z;
RESET(actor->spr.cstat, CSTAT_SPRITE_ALIGNMENT_WALL|CSTAT_SPRITE_ALIGNMENT_FLOOR);
actor->spr.cstat &= ~(CSTAT_SPRITE_ALIGNMENT_WALL|CSTAT_SPRITE_ALIGNMENT_FLOOR);
SectorMidPoint(sectp, &x, &y, &z);
actor->spr.ang = orig_ang;
actor->spr.pos.X = x;
@ -1163,13 +1163,13 @@ void ShootableSwitch(DSWActor* actor)
switch (actor->spr.picnum)
{
case SWITCH_SHOOTABLE_1:
//RESET(actor->spr.cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
//actor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
OperateSprite(actor, false);
actor->spr.picnum = SWITCH_SHOOTABLE_1 + 1;
break;
case SWITCH_FUSE:
case SWITCH_FUSE + 1:
RESET(actor->spr.cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
actor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
OperateSprite(actor, false);
actor->spr.picnum = SWITCH_FUSE + 2;
break;
@ -1841,7 +1841,7 @@ void OperateTripTrigger(PLAYERp pp)
if (Distance(actor->spr.pos.X, actor->spr.pos.Y, pp->pos.X, pp->pos.Y) < dist)
{
actor->user.targetActor = pp->actor;
RESET(actor->user.Flags, SPR_WAIT_FOR_TRIGGER);
actor->user.Flags &= ~(SPR_WAIT_FOR_TRIGGER);
}
}
}
@ -2319,7 +2319,7 @@ void PlayerOperateEnv(PLAYERp pp)
}
}
RESET(pp->Flags2, PF2_TELEPORTED);
pp->Flags2 &= ~(PF2_TELEPORTED);
}
}

View file

@ -527,7 +527,7 @@ int SetupSkel(DSWActor* actor)
int DoSkelInitTeleport(DSWActor* actor)
{
RESET(actor->spr.cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
actor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
PlaySpriteSound(actor,attr_extra3,v3df_follow);
return 0;
}

View file

@ -327,7 +327,7 @@ int DoSkullBeginDeath(DSWActor* actor)
break;
}
RESET(actor->spr.cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
actor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
actor->user.RotNum = 0;
actor->user.Tics = 0;
actor->user.ID = SKULL_R0;
@ -706,7 +706,7 @@ int DoBettyBeginDeath(DSWActor* actor)
break;
}
RESET(actor->spr.cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
actor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
actor->user.RotNum = 0;
actor->user.Tics = 0;
actor->user.ID = BETTY_R0;

View file

@ -112,7 +112,7 @@ void SetSlidorInactive(DSWActor* actor)
// play inactivate sound
DoSoundSpotMatch(SP_TAG2(actor), 2, SOUND_OBJECT_TYPE);
RESET(actor->user.Flags, SPR_ACTIVE);
actor->user.Flags &= ~(SPR_ACTIVE);
}
// called for operation from the space bar

View file

@ -124,7 +124,7 @@ void SetSpikeInactive(DSWActor* actor)
// play activate sound
DoSoundSpotMatch(SP_TAG2(actor), 2, SOUND_OBJECT_TYPE);
RESET(actor->user.Flags, SPR_ACTIVE);
actor->user.Flags &= ~(SPR_ACTIVE);
}
// called for operation from the space bar

View file

@ -782,7 +782,7 @@ void change_actor_stat(DSWActor* actor, int stat, bool quick)
if (actor->hasU() && !quick)
{
RESET(actor->user.Flags, SPR_SKIP2|SPR_SKIP4);
actor->user.Flags &= ~(SPR_SKIP2|SPR_SKIP4);
if (stat >= STAT_SKIP4_START && stat <= STAT_SKIP4_END)
actor->user.Flags |= (SPR_SKIP4);
@ -932,7 +932,7 @@ bool ActorTestSpawn(DSWActor* actor)
actorNew->spr = actor->spr;
actorNew->spr.time = t;
change_actor_stat(actorNew, STAT_SPAWN_TRIGGER);
RESET(actorNew->spr.cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
actorNew->spr.cstat &= ~(CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
return false;
}
@ -1392,7 +1392,7 @@ void IconDefault(DSWActor* actor)
{
change_actor_stat(actor, STAT_ITEM);
RESET(actor->spr.cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
actor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
actor->user.Radius = 650;
DoActorZrange(actor);
@ -1572,7 +1572,7 @@ void SpriteSetup(void)
// CSTAT_SPIN is insupported - get rid of it
if (TEST(actor->spr.cstat, CSTAT_SPRITE_ALIGNMENT_MASK) == CSTAT_SPRITE_ALIGNMENT_SLAB)
RESET(actor->spr.cstat, CSTAT_SPRITE_ALIGNMENT_SLAB);
actor->spr.cstat &= ~(CSTAT_SPRITE_ALIGNMENT_SLAB);
// if BLOCK is set set BLOCK_HITSCAN
// Hope this doesn't screw up anything
@ -1631,12 +1631,12 @@ void SpriteSetup(void)
// crack sprite
if (actor->spr.picnum == 80)
{
RESET(actor->spr.cstat, CSTAT_SPRITE_BLOCK);
actor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK);
actor->spr.cstat |= (CSTAT_SPRITE_BLOCK_HITSCAN|CSTAT_SPRITE_BLOCK_MISSILE);;
}
else
{
RESET(actor->spr.cstat, CSTAT_SPRITE_BLOCK);
actor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK);
actor->spr.cstat |= (CSTAT_SPRITE_BLOCK_HITSCAN|CSTAT_SPRITE_BLOCK_MISSILE);;
actor->spr.cstat |= (CSTAT_SPRITE_INVISIBLE);;
}
@ -1645,7 +1645,7 @@ void SpriteSetup(void)
actor->spr.cstat |= (CSTAT_SPRITE_INVISIBLE); ;
if (TEST(SP_TAG8(actor), BIT(1)))
RESET(actor->spr.cstat, CSTAT_SPRITE_INVISIBLE);
actor->spr.cstat &= ~(CSTAT_SPRITE_INVISIBLE);
change_actor_stat(actor, STAT_SPRITE_HIT_MATCH);
continue;
@ -1709,7 +1709,7 @@ void SpriteSetup(void)
tag = actor->spr.hitag;
RESET(actor->spr.cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
actor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
actor->spr.cstat |= (CSTAT_SPRITE_INVISIBLE);
// for bounding sector objects
@ -2027,18 +2027,18 @@ void SpriteSetup(void)
switch (type)
{
case 0:
RESET(actor->user.Flags, SPR_ACTIVE);
actor->user.Flags &= ~(SPR_ACTIVE);
actor->user.ActorActionFunc = DoVator;
break;
case 1:
RESET(actor->user.Flags, SPR_ACTIVE);
actor->user.Flags &= ~(SPR_ACTIVE);
actor->user.ActorActionFunc = DoVator;
break;
case 2:
actor->user.ActorActionFunc = DoVatorAuto;
break;
case 3:
RESET(actor->user.Flags, SPR_ACTIVE);
actor->user.Flags &= ~(SPR_ACTIVE);
actor->user.ActorActionFunc = DoVatorAuto;
break;
}
@ -2138,11 +2138,11 @@ void SpriteSetup(void)
switch (type)
{
case 0:
RESET(actor->user.Flags, SPR_ACTIVE);
actor->user.Flags &= ~(SPR_ACTIVE);
actor->user.ActorActionFunc = DoRotator;
break;
case 1:
RESET(actor->user.Flags, SPR_ACTIVE);
actor->user.Flags &= ~(SPR_ACTIVE);
actor->user.ActorActionFunc = DoRotator;
break;
}
@ -2183,11 +2183,11 @@ void SpriteSetup(void)
switch (type)
{
case 0:
RESET(actor->user.Flags, SPR_ACTIVE);
actor->user.Flags &= ~(SPR_ACTIVE);
actor->user.ActorActionFunc = DoSlidor;
break;
case 1:
RESET(actor->user.Flags, SPR_ACTIVE);
actor->user.Flags &= ~(SPR_ACTIVE);
actor->user.ActorActionFunc = DoSlidor;
break;
}
@ -2231,18 +2231,18 @@ void SpriteSetup(void)
switch (type)
{
case 0:
RESET(actor->user.Flags, SPR_ACTIVE);
actor->user.Flags &= ~(SPR_ACTIVE);
actor->user.ActorActionFunc = DoSpike;
break;
case 1:
RESET(actor->user.Flags, SPR_ACTIVE);
actor->user.Flags &= ~(SPR_ACTIVE);
actor->user.ActorActionFunc = DoSpike;
break;
case 2:
actor->user.ActorActionFunc = DoSpikeAuto;
break;
case 3:
RESET(actor->user.Flags, SPR_ACTIVE);
actor->user.Flags &= ~(SPR_ACTIVE);
actor->user.ActorActionFunc = DoSpikeAuto;
break;
}
@ -2825,7 +2825,7 @@ KeyMain:
RESET(picanm[actor->spr.picnum].sf, PICANM_ANIMTYPE_MASK);
RESET(picanm[actor->spr.picnum + 1].sf, PICANM_ANIMTYPE_MASK);
change_actor_stat(actor, STAT_ITEM);
RESET(actor->spr.cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN | CSTAT_SPRITE_ONE_SIDE);
actor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN | CSTAT_SPRITE_ONE_SIDE);
actor->user.Radius = 500;
actor->spr.hitag = LUMINOUS; //Set so keys over ride colored lighting
@ -3371,8 +3371,8 @@ NUKE_REPLACEMENT:
actor->user.ID = FIREBALL_FLAMES;
actor->user.Radius = 200;
RESET(actor->spr.cstat, CSTAT_SPRITE_BLOCK);
RESET(actor->spr.cstat, CSTAT_SPRITE_BLOCK_HITSCAN);
actor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK);
actor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK_HITSCAN);
actor->spr.hitag = LUMINOUS; //Always full brightness
actor->spr.shade = -40;
@ -3390,7 +3390,7 @@ NUKE_REPLACEMENT:
change_actor_stat(actor, STAT_DEFAULT);
RESET(actor->spr.cstat, CSTAT_SPRITE_BLOCK);
actor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK);
actor->spr.cstat |= (CSTAT_SPRITE_BLOCK_HITSCAN);
actor->spr.extra |= (SPRX_BLADE);
@ -4460,7 +4460,7 @@ void DoActorZrange(DSWActor* actor)
Collision ceilhit, florhit;
auto save_cstat = actor->spr.cstat & CSTAT_SPRITE_BLOCK;
RESET(actor->spr.cstat, CSTAT_SPRITE_BLOCK);
actor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK);
vec3_t pos = actor->spr.pos;
pos.Z -= (ActorSizeZ(actor) >> 1);
FAFgetzrange(pos, actor->spr.sector(), &actor->user.hiz, &ceilhit, &actor->user.loz, &florhit, (((int) actor->spr.clipdist) << 2) - GETZRANGE_CLIP_ADJ, CLIPMASK_ACTOR);
@ -4540,7 +4540,7 @@ bool ActorDrop(DSWActor* actor, int x, int y, int z, sectortype* new_sector, sho
// look only at the center point for a floor sprite
auto save_cstat = TEST(actor->spr.cstat, CSTAT_SPRITE_BLOCK);
RESET(actor->spr.cstat, CSTAT_SPRITE_BLOCK);
actor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK);
FAFgetzrangepoint(x, y, z - (ActorSizeZ(actor) >> 1), new_sector, &hiz, &ceilhit, &loz, &florhit);
actor->spr.cstat |= (save_cstat);
@ -5017,7 +5017,7 @@ int DoGet(DSWActor* actor)
{
PlaySound(DIGI_ITEM_SPAWN, actor, v3df_none);
DoSpawnItemTeleporterEffect(actor);
RESET(actor->spr.cstat, CSTAT_SPRITE_INVISIBLE);
actor->spr.cstat &= ~(CSTAT_SPRITE_INVISIBLE);
}
return 0;
@ -5852,7 +5852,7 @@ KeyMain:
// Attach flag to player
actorNew->user.Counter = 0;
RESET(actorNew->spr.cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
actorNew->spr.cstat &= ~(CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
actorNew->spr.cstat |= (CSTAT_SPRITE_ALIGNMENT_WALL);
SetAttach(pp->actor, actorNew);
actorNew->user.sz = ActorZOfMiddle(pp->actor); // Set mid way up who it hit
@ -6085,7 +6085,7 @@ void SpriteControl(void)
}
}
RESET(actor->user.Flags, SPR_MOVED);
actor->user.Flags &= ~(SPR_MOVED);
// Only update the ones close to ANY player
if (CloseToPlayer)
@ -6095,7 +6095,7 @@ void SpriteControl(void)
else
{
// to far away to be attacked
RESET(actor->user.Flags, SPR_ATTACKED);
actor->user.Flags &= ~(SPR_ATTACKED);
}
}
}
@ -6409,7 +6409,7 @@ int MissileZrange(DSWActor* actor)
// Set the blocking bit to 0 temporarly so FAFgetzrange doesn't pick
// up its own sprite
auto tempshort = actor->spr.cstat;
RESET(actor->spr.cstat, CSTAT_SPRITE_BLOCK);
actor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK);
FAFgetzrangepoint(actor->spr.pos.X, actor->spr.pos.Y, actor->spr.pos.Z - 1, actor->spr.sector(),
&globhiz, &globhihit, &globloz, &globlohit);
@ -6464,7 +6464,7 @@ Collision move_missile(DSWActor* actor, int xchange, int ychange, int zchange, i
// Set the blocking bit to 0 temporarly so FAFgetzrange doesn't pick
// up its own sprite
auto tempshort = actor->spr.cstat;
RESET(actor->spr.cstat, CSTAT_SPRITE_BLOCK);
actor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK);
FAFgetzrangepoint(actor->spr.pos.X, actor->spr.pos.Y, actor->spr.pos.Z - 1, actor->spr.sector(),
&globhiz, &globhihit, &globloz, &globlohit);

View file

@ -1816,7 +1816,7 @@ PlayerPart:
else
{
// if player was not on any sector object set Riding flag to false
RESET(pp->Flags, PF_PLAYER_RIDING);
pp->Flags &= ~(PF_PLAYER_RIDING);
}
}
}
@ -1915,7 +1915,7 @@ void KillSectorObjectSprites(SECTOR_OBJECTp sop)
if (!actor) continue;
// not a part of the so anymore
RESET(actor->user.Flags, SPR_SO_ATTACHED);
actor->user.Flags &= ~(SPR_SO_ATTACHED);
if (actor->spr.picnum == ST1 && actor->spr.hitag == SPAWN_SPOT)
continue;
@ -2054,7 +2054,7 @@ void MoveZ(SECTOR_OBJECTp sop)
{
i = AnimGetGoal (ANIM_SopZ, int(sop - SectorObject), nullptr);
if (i < 0)
RESET(sop->flags, SOBJ_MOVE_VERTICAL);
sop->flags &= ~(SOBJ_MOVE_VERTICAL);
}
if (TEST(sop->flags, SOBJ_ZDIFF_MODE))
@ -2070,7 +2070,7 @@ void MoveZ(SECTOR_OBJECTp sop)
AnimSet(ANIM_Floorz, *sectp, sop->zorig_floor[i] + sop->z_tgt, sop->z_rate);
}
RESET(sop->flags, SOBJ_ZDOWN);
sop->flags &= ~(SOBJ_ZDOWN);
}
else if (TEST(sop->flags, SOBJ_ZUP))
{
@ -2079,7 +2079,7 @@ void MoveZ(SECTOR_OBJECTp sop)
AnimSet(ANIM_Floorz, *sectp, sop->zorig_floor[i] + sop->z_tgt, sop->z_rate);
}
RESET(sop->flags, SOBJ_ZUP);
sop->flags &= ~(SOBJ_ZUP);
}
}
@ -2173,7 +2173,7 @@ void MoveSectorObjects(SECTOR_OBJECTp sop, short locktics)
{
if (TEST(sop->flags, SOBJ_UPDATE_ONCE))
{
RESET(sop->flags, SOBJ_UPDATE_ONCE);
sop->flags &= ~(SOBJ_UPDATE_ONCE);
RefreshPoints(sop, 0, 0, false);
}
return;
@ -2236,7 +2236,7 @@ void MoveSectorObjects(SECTOR_OBJECTp sop, short locktics)
(sop->ang != sop->ang_tgt) ||
GlobSpeedSO)
{
RESET(sop->flags, SOBJ_UPDATE_ONCE);
sop->flags &= ~(SOBJ_UPDATE_ONCE);
RefreshPoints(sop, nx, ny, false);
}
}
@ -2336,7 +2336,7 @@ void DoTrack(SECTOR_OBJECTp sop, short locktics, int *nx, int *ny)
sop->vel_rate = tpoint->tag_high;
break;
case TRACK_SPEED_UP:
RESET(sop->flags, SOBJ_SLOW_DOWN | SOBJ_SPEED_UP);
sop->flags &= ~(SOBJ_SLOW_DOWN | SOBJ_SPEED_UP);
if (sop->dir < 0)
{
// set target to new slower target
@ -2352,7 +2352,7 @@ void DoTrack(SECTOR_OBJECTp sop, short locktics, int *nx, int *ny)
break;
case TRACK_SLOW_DOWN:
RESET(sop->flags, SOBJ_SLOW_DOWN | SOBJ_SPEED_UP);
sop->flags &= ~(SOBJ_SLOW_DOWN | SOBJ_SPEED_UP);
if (sop->dir > 0)
{
sop->vel_tgt = sop->vel_tgt - (tpoint->tag_high * 256);
@ -2480,7 +2480,7 @@ void DoTrack(SECTOR_OBJECTp sop, short locktics, int *nx, int *ny)
sop->z_rate = Z(tpoint->tag_high);
break;
case TRACK_ZUP:
RESET(sop->flags, SOBJ_ZDOWN | SOBJ_ZUP);
sop->flags &= ~(SOBJ_ZDOWN | SOBJ_ZUP);
if (sop->dir < 0)
{
sop->z_tgt = sop->z_tgt + Z(tpoint->tag_high);
@ -2493,7 +2493,7 @@ void DoTrack(SECTOR_OBJECTp sop, short locktics, int *nx, int *ny)
}
break;
case TRACK_ZDOWN:
RESET(sop->flags, SOBJ_ZDOWN | SOBJ_ZUP);
sop->flags &= ~(SOBJ_ZDOWN | SOBJ_ZUP);
if (sop->dir > 0)
{
sop->z_tgt = sop->z_tgt + Z(tpoint->tag_high);
@ -2560,7 +2560,7 @@ void DoTrack(SECTOR_OBJECTp sop, short locktics, int *nx, int *ny)
if ((sop->vel += (locktics << sop->vel_rate)) >= sop->vel_tgt)
{
sop->vel = sop->vel_tgt;
RESET(sop->flags, SOBJ_SPEED_UP);
sop->flags &= ~(SOBJ_SPEED_UP);
}
}
else if (TEST(sop->flags, SOBJ_SLOW_DOWN))
@ -2568,7 +2568,7 @@ void DoTrack(SECTOR_OBJECTp sop, short locktics, int *nx, int *ny)
if ((sop->vel -= (locktics << sop->vel_rate)) <= sop->vel_tgt)
{
sop->vel = sop->vel_tgt;
RESET(sop->flags, SOBJ_SLOW_DOWN);
sop->flags &= ~(SOBJ_SLOW_DOWN);
}
}
}
@ -2866,7 +2866,7 @@ void DoActorHitTrackEndPoint(DSWActor* actor)
}
else
{
RESET(actor->user.Flags, SPR_RUN_AWAY);
actor->user.Flags &= ~(SPR_RUN_AWAY);
DoActorSetSpeed(actor, NORM_SPEED);
actor->user.track = -1;
}
@ -2882,7 +2882,7 @@ void DoActorHitTrackEndPoint(DSWActor* actor)
}
else
{
RESET(actor->user.Flags, SPR_FIND_PLAYER);
actor->user.Flags &= ~(SPR_FIND_PLAYER);
DoActorSetSpeed(actor, NORM_SPEED);
actor->user.track = -1;
}
@ -2899,7 +2899,7 @@ void ActorLeaveTrack(DSWActor* actor)
if (actor->user.track == -1)
return;
RESET(actor->user.Flags, SPR_FIND_PLAYER|SPR_RUN_AWAY|SPR_CLIMBING);
actor->user.Flags &= ~(SPR_FIND_PLAYER|SPR_RUN_AWAY|SPR_CLIMBING);
RESET(Track[actor->user.track].flags, TF_TRACK_OCCUPIED);
actor->user.track = -1;
}
@ -2960,7 +2960,7 @@ bool ActorTrackDecide(TRACK_POINTp tpoint, DSWActor* actor)
actor->user.vel_rate = tpoint->tag_high;
break;
case TRACK_ACTOR_SPEED_UP:
RESET(actor->user.Flags, SPR_SLOW_DOWN | SPR_SPEED_UP);
actor->user.Flags &= ~(SPR_SLOW_DOWN | SPR_SPEED_UP);
if (actor->user.track_dir < 0)
{
// set target to new slower target
@ -2976,7 +2976,7 @@ bool ActorTrackDecide(TRACK_POINTp tpoint, DSWActor* actor)
break;
case TRACK_ACTOR_SLOW_DOWN:
RESET(actor->user.Flags, SPR_SLOW_DOWN | SPR_SPEED_UP);
actor->user.Flags &= ~(SPR_SLOW_DOWN | SPR_SPEED_UP);
if (actor->user.track_dir > 0)
{
actor->user.vel_tgt = actor->user.vel_tgt - (tpoint->tag_high * 256);
@ -3032,7 +3032,7 @@ bool ActorTrackDecide(TRACK_POINTp tpoint, DSWActor* actor)
}
else
{
RESET(actor->spr.cstat, CSTAT_SPRITE_BLOCK);
actor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK);
FAFhitscan(actor->spr.pos.X, actor->spr.pos.Y, actor->spr.pos.Z - Z(24), actor->spr.sector(), // Start position
bcos(actor->spr.ang), // X vector of 3D ang
@ -3312,7 +3312,7 @@ bool ActorTrackDecide(TRACK_POINTp tpoint, DSWActor* actor)
case TRACK_ACTOR_ZDIFF_MODE:
if (TEST(actor->user.Flags, SPR_ZDIFF_MODE))
{
RESET(actor->user.Flags, SPR_ZDIFF_MODE);
actor->user.Flags &= ~(SPR_ZDIFF_MODE);
actor->spr.pos.Z = actor->spr.sector()->floorz;
actor->spr.zvel = 0;
}
@ -3445,7 +3445,7 @@ int ActorFollowTrack(DSWActor* actor, short locktics)
if (Distance(actor->spr.pos.X, actor->spr.pos.Y, pp->pos.X, pp->pos.Y) < actor->user.Dist)
{
actor->user.targetActor = pp->actor;
RESET(actor->user.Flags, SPR_WAIT_FOR_PLAYER);
actor->user.Flags &= ~(SPR_WAIT_FOR_PLAYER);
return true;
}
}
@ -3461,7 +3461,7 @@ int ActorFollowTrack(DSWActor* actor, short locktics)
actor->user.WaitTics -= locktics;
if (actor->user.WaitTics <= 0)
{
RESET(actor->user.Flags, SPR_DONT_UPDATE_ANG);
actor->user.Flags &= ~(SPR_DONT_UPDATE_ANG);
NewStateGroup(actor, actor->user.ActorActionSet->Run);
actor->user.WaitTics = 0;
}
@ -3514,7 +3514,7 @@ int ActorFollowTrack(DSWActor* actor, short locktics)
if ((actor->user.track_vel += (locktics << actor->user.vel_rate)) >= actor->user.vel_tgt)
{
actor->user.track_vel = actor->user.vel_tgt;
RESET(actor->user.Flags, SPR_SPEED_UP);
actor->user.Flags &= ~(SPR_SPEED_UP);
}
// update the real velocity
@ -3525,7 +3525,7 @@ int ActorFollowTrack(DSWActor* actor, short locktics)
if ((actor->user.track_vel -= (locktics << actor->user.vel_rate)) <= actor->user.vel_tgt)
{
actor->user.track_vel = actor->user.vel_tgt;
RESET(actor->user.Flags, SOBJ_SLOW_DOWN);
actor->user.Flags &= ~(SOBJ_SLOW_DOWN);
}
actor->spr.xvel = (actor->user.track_vel) >> 8;
@ -3538,14 +3538,14 @@ int ActorFollowTrack(DSWActor* actor, short locktics)
{
if (ActorZOfTop(actor) + (ActorSizeZ(actor) >> 2) < actor->user.sz)
{
RESET(actor->user.Flags, SPR_CLIMBING);
actor->user.Flags &= ~(SPR_CLIMBING);
actor->spr.zvel = 0;
actor->spr.ang = getangle(tpoint->x - actor->spr.pos.X, tpoint->y - actor->spr.pos.Y);
ActorLeaveTrack(actor);
RESET(actor->spr.cstat, CSTAT_SPRITE_YCENTER);
actor->spr.cstat &= ~(CSTAT_SPRITE_YCENTER);
actor->spr.pos.Z += actor->user.sy;
DoActorSetSpeed(actor, SLOW_SPEED);

View file

@ -129,7 +129,7 @@ void SetVatorInactive(DSWActor* actor)
// play inactivate sound
DoSoundSpotMatch(SP_TAG2(actor), 2, SOUND_OBJECT_TYPE);
RESET(actor->user.Flags, SPR_ACTIVE);
actor->user.Flags &= ~(SPR_ACTIVE);
}
// called for operation from the space bar

View file

@ -2789,7 +2789,7 @@ int DoLavaErupt(DSWActor* actor)
if ((actor->user.WaitTics -= synctics) <= 0)
{
// Stop for this long
RESET(actor->user.Flags, SPR_ACTIVE);
actor->user.Flags &= ~(SPR_ACTIVE);
actor->user.Counter = 0;
actor->user.WaitTics = SP_TAG10(actor) * 120L;
}
@ -5048,7 +5048,7 @@ int ActorHealth(DSWActor* actor, short amt)
InitPlasmaFountain(nullptr, actor);
InitBloodSpray(actor,false,105);
actor->spr.ang = NORM_ANGLE(getangle(actor->user.targetActor->spr.pos.X - actor->spr.pos.X, actor->user.targetActor->spr.pos.Y - actor->spr.pos.Y) + 1024);
RESET(actor->spr.cstat, CSTAT_SPRITE_YFLIP);
actor->spr.cstat &= ~(CSTAT_SPRITE_YFLIP);
if (sw_ninjahack)
NewStateGroup(actor, sg_NinjaHariKari);
else
@ -7453,7 +7453,7 @@ int DoStar(DSWActor* actor)
ChangeState(actor, s_StarStuck);
actor->spr.xrepeat -= 16;
actor->spr.yrepeat -= 16;
RESET(actor->spr.cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
actor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
actor->spr.clipdist = 16L >> 2;
actor->user.ceiling_dist = Z(2);
actor->user.floor_dist = Z(2);
@ -7980,7 +7980,7 @@ int DoPlasmaFountain(DSWActor* actor)
actor->user.WaitTics = 0;
auto bak_cstat = actor->spr.cstat;
RESET(actor->spr.cstat, CSTAT_SPRITE_BLOCK);
actor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK);
actor->spr.cstat = bak_cstat;
KillActor(actor);
@ -8022,7 +8022,7 @@ int DoPlasma(DSWActor* actor)
actor->spr.pos.Y = oy;
actor->spr.pos.Z = oz;
RESET(hitActor->spr.cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
hitActor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
actor->user.coll = move_missile(actor, dax, day, daz, Z(16), Z(16), CLIPMASK_MISSILE, MISSILEMOVETICS);
hitActor->spr.cstat = hcstat;
}
@ -8410,7 +8410,7 @@ int DoGrenade(DSWActor* actor)
actorNew->spr.yrepeat = 40;
actorNew->spr.opos = actor->spr.opos;
actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER);
RESET(actorNew->spr.cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
actorNew->spr.cstat &= ~(CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
actorNew->user.xchange = actor->user.xchange;
actorNew->user.ychange = actor->user.ychange;
@ -8772,7 +8772,7 @@ void SetMineStuck(DSWActor* actor)
// stuck
actor->user.Flags |= (SPR_BOUNCE);
// not yet active for 1 sec
RESET(actor->user.Flags, SPR_ACTIVE);
actor->user.Flags &= ~(SPR_ACTIVE);
actor->user.WaitTics = SEC(3);
//actor->spr.cstat |= (CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
actor->spr.cstat |= (CSTAT_SPRITE_BLOCK_HITSCAN);
@ -9004,7 +9004,7 @@ int DoTracer(DSWActor* actor)
}
}
RESET(actor->spr.cstat, CSTAT_SPRITE_INVISIBLE);
actor->spr.cstat &= ~(CSTAT_SPRITE_INVISIBLE);
return false;
}
@ -9038,7 +9038,7 @@ int DoEMP(DSWActor* actor)
}
}
RESET(actor->spr.cstat, CSTAT_SPRITE_INVISIBLE);
actor->spr.cstat &= ~(CSTAT_SPRITE_INVISIBLE);
return false;
}
@ -9166,7 +9166,7 @@ int DoLaser(DSWActor* actor)
actorNew->spr.pal = actorNew->user.spal = PALETTE_RED_LIGHTING;
actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER);
RESET(actorNew->spr.cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
actorNew->spr.cstat &= ~(CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
actorNew->user.xchange = actorNew->user.ychange = actorNew->user.zchange = 0;
}
@ -9218,7 +9218,7 @@ int DoRail(DSWActor* actor)
{
auto cstat_save = hitActor->spr.cstat;
RESET(hitActor->spr.cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN|CSTAT_SPRITE_BLOCK_MISSILE);
hitActor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN|CSTAT_SPRITE_BLOCK_MISSILE);
DoRail(actor);
hitActor->spr.cstat = cstat_save;
return true;
@ -9259,7 +9259,7 @@ int DoRail(DSWActor* actor)
actorNew->spr.yrepeat = 10;
actorNew->spr.opos = actor->spr.opos;
actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER);
RESET(actorNew->spr.cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
actorNew->spr.cstat &= ~(CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
actorNew->user.xchange = actor->user.xchange;
actorNew->user.ychange = actor->user.ychange;
@ -9352,7 +9352,7 @@ int DoRocket(DSWActor* actor)
actorNew->spr.yrepeat = 40;
actorNew->spr.opos = actor->spr.opos;
actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER);
RESET(actorNew->spr.cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
actorNew->spr.cstat &= ~(CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
actorNew->user.xchange = actor->user.xchange;
actorNew->user.ychange = actor->user.ychange;
@ -9442,7 +9442,7 @@ int DoMicro(DSWActor* actor)
actorNew->spr.opos = actor->spr.opos;
actorNew->spr.zvel = actor->spr.zvel;
actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER);
RESET(actorNew->spr.cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
actorNew->spr.cstat &= ~(CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
actorNew->user.xchange = actor->user.xchange;
actorNew->user.ychange = actor->user.ychange;
@ -9459,7 +9459,7 @@ int DoMicro(DSWActor* actor)
SetActorZ(actorNew, &actorNew->spr.pos);
NewStateGroup(actor, &sg_MicroMini[0]);
actor->spr.xrepeat = actor->spr.yrepeat = 10;
RESET(actor->spr.cstat, CSTAT_SPRITE_INVISIBLE);
actor->spr.cstat &= ~(CSTAT_SPRITE_INVISIBLE);
SpawnExtraMicroMini(actor);
return true;
}
@ -9702,7 +9702,7 @@ int SpawnCoolieExp(DSWActor* actor)
actorNew->spr.shade = -40;
actorNew->spr.pal = actorNew->user.spal = actor->user.spal;
actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER);
RESET(actorNew->spr.cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
actorNew->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
actorNew->user.Radius = DamageData[DMG_BOLT_EXP].radius;
DoExpDamageTest(actorNew);
@ -9791,7 +9791,7 @@ void SpawnFireballFlames(DSWActor* actor, DSWActor* enemyActor)
actorNew->spr.shade = -40;
actorNew->spr.pal = actorNew->user.spal = actor->user.spal;
actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER);
RESET(actorNew->spr.cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
actorNew->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
//actorNew->user.Radius = DamageData[DMG_FIREBALL_FLAMES].radius;
actorNew->user.Radius = 200;
@ -9833,7 +9833,7 @@ int SpawnBreakFlames(DSWActor* actor)
if (actor->hasU())
actorNew->spr.pal = actorNew->user.spal = actor->user.spal;
actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER);
RESET(actorNew->spr.cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
actorNew->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
actorNew->user.Radius = 200;
@ -9866,7 +9866,7 @@ void SpawnBreakStaticFlames(DSWActor* actor)
actorNew->spr.shade = -40;
actorNew->spr.pal = actorNew->user.spal = actor->user.spal;
RESET(actorNew->spr.cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
actorNew->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
actorNew->user.Radius = 200;
actorNew->user.floor_dist = actorNew->user.ceiling_dist = 0;
@ -9895,7 +9895,7 @@ void SpawnFireballExp(DSWActor* actor)
actorNew->spr.pal = actorNew->user.spal = actor->user.spal;
actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER);
actorNew->user.Flags |= (TEST(actor->user.Flags,SPR_UNDERWATER));
RESET(actorNew->spr.cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
actorNew->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
//
// All this stuff assures that explosions do not go into floors &
@ -9927,7 +9927,7 @@ void SpawnGoroFireballExp(DSWActor* actor)
actorNew->spr.shade = -40;
actorNew->spr.pal = actorNew->user.spal = actor->user.spal;
actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER);
RESET(actorNew->spr.cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
actorNew->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
//
// All this stuff assures that explosions do not go into floors &
@ -9955,7 +9955,7 @@ void SpawnBoltExp(DSWActor* actor)
expActor->spr.xrepeat = 76;
expActor->spr.yrepeat = 76;
expActor->spr.cstat |= (CSTAT_SPRITE_YCENTER);
RESET(expActor->spr.cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
expActor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
if (RANDOM_P2(1024) > 512)
expActor->spr.cstat |= (CSTAT_SPRITE_XFLIP);
expActor->user.Radius = DamageData[DMG_BOLT_EXP].radius;
@ -10004,7 +10004,7 @@ void SpawnTankShellExp(DSWActor* actor)
expActor->spr.xrepeat = 64+32;
expActor->spr.yrepeat = 64+32;
expActor->spr.cstat |= (CSTAT_SPRITE_YCENTER);
RESET(expActor->spr.cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
expActor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
if (RANDOM_P2(1024) > 512)
expActor->spr.cstat |= (CSTAT_SPRITE_XFLIP);
expActor->user.Radius = DamageData[DMG_TANK_SHELL_EXP].radius;
@ -10031,7 +10031,7 @@ void SpawnNuclearSecondaryExp(DSWActor* actor, short ang)
expActor->user.ceiling_dist = Z(16);
expActor->user.floor_dist = Z(16);
expActor->spr.cstat |= (CSTAT_SPRITE_YCENTER);
RESET(expActor->spr.cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
expActor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
//ang = RANDOM_P2(2048);
int32_t const vel = (2048+128) + RandomRange(2048);
@ -10088,7 +10088,7 @@ void SpawnNuclearExp(DSWActor* actor)
expActor->spr.yrepeat = 255;
expActor->spr.clipdist = actor->spr.clipdist;
expActor->spr.cstat |= (CSTAT_SPRITE_YCENTER);
RESET(expActor->spr.cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
expActor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
expActor->user.spal = expActor->spr.pal = PALETTE_PLAYER1; // Set nuke puff to gray
InitChemBomb(expActor);
@ -10103,7 +10103,7 @@ void SpawnNuclearExp(DSWActor* actor)
expActor->spr.xrepeat = 218;
expActor->spr.yrepeat = 152;
expActor->spr.cstat |= (CSTAT_SPRITE_YCENTER);
RESET(expActor->spr.cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
expActor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
if (RANDOM_P2(1024) > 512)
expActor->spr.cstat |= (CSTAT_SPRITE_XFLIP);
@ -10150,7 +10150,7 @@ void SpawnTracerExp(DSWActor* actor)
expActor->spr.xrepeat = 4;
expActor->spr.yrepeat = 4;
expActor->spr.cstat |= (CSTAT_SPRITE_YCENTER);
RESET(expActor->spr.cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
expActor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
if (RANDOM_P2(1024) > 512)
expActor->spr.cstat |= (CSTAT_SPRITE_XFLIP);
@ -10179,7 +10179,7 @@ void SpawnMicroExp(DSWActor* actor)
expActor->spr.xrepeat = 32;
expActor->spr.yrepeat = 32;
expActor->spr.cstat |= (CSTAT_SPRITE_YCENTER);
RESET(expActor->spr.cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
expActor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
if (RANDOM_P2(1024) > 512)
expActor->spr.cstat |= (CSTAT_SPRITE_XFLIP);
if (RANDOM_P2(1024) > 512)
@ -10246,7 +10246,7 @@ void SpawnBigGunFlames(DSWActor* actor, DSWActor* Operator, SECTOR_OBJECTp sop,
expActor->spr.yrepeat = 34;
}
expActor->spr.cstat |= (CSTAT_SPRITE_YCENTER);
RESET(expActor->spr.cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
expActor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
if (RANDOM_P2(1024) > 512)
expActor->spr.cstat |= (CSTAT_SPRITE_XFLIP);
@ -10302,7 +10302,7 @@ void SpawnGrenadeSecondaryExp(DSWActor* actor, int ang)
expActor->user.ceiling_dist = Z(16);
expActor->user.floor_dist = Z(16);
expActor->spr.cstat |= (CSTAT_SPRITE_YCENTER);
RESET(expActor->spr.cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
expActor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
//ang = RANDOM_P2(2048);
vel = (1024+512) + RandomRange(1024);
@ -10370,7 +10370,7 @@ void SpawnGrenadeExp(DSWActor* actor)
expActor->spr.yrepeat = 64 + 32;
expActor->spr.clipdist = actor->spr.clipdist;
expActor->spr.cstat |= (CSTAT_SPRITE_YCENTER);
RESET(expActor->spr.cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
expActor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
expActor->user.Radius = DamageData[DMG_GRENADE_EXP].radius;
//
@ -10449,7 +10449,7 @@ void SpawnMineExp(DSWActor* actor)
expActor->spr.xrepeat = 64 + 44;
expActor->spr.yrepeat = 64 + 44;
expActor->spr.cstat |= (CSTAT_SPRITE_YCENTER);
RESET(expActor->spr.cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
expActor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
expActor->user.Radius = DamageData[DMG_MINE_EXP].radius;
//
@ -10495,7 +10495,7 @@ DSWActor* SpawnSectorExp(DSWActor* actor)
expActor->spr.xrepeat = 90; // was 40,40
expActor->spr.yrepeat = 90;
expActor->spr.cstat |= (CSTAT_SPRITE_YCENTER);
RESET(expActor->spr.cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
expActor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
expActor->user.Radius = DamageData[DMG_SECTOR_EXP].radius;
DoExpDamageTest(expActor);
@ -10518,7 +10518,7 @@ DSWActor* SpawnLargeExp(DSWActor* actor)
expActor->spr.xrepeat = 90; // was 40,40
expActor->spr.yrepeat = 90;
expActor->spr.cstat |= (CSTAT_SPRITE_YCENTER);
RESET(expActor->spr.cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
expActor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
expActor->user.Radius = DamageData[DMG_SECTOR_EXP].radius;
SpawnExpZadjust(actor, expActor, Z(50), Z(50));
@ -10567,7 +10567,7 @@ void SpawnMeteorExp(DSWActor* actor)
}
expActor->spr.cstat |= (CSTAT_SPRITE_YCENTER);
RESET(expActor->spr.cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
expActor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
expActor->user.Radius = DamageData[DMG_BASIC_EXP].radius;
}
@ -10583,7 +10583,7 @@ void SpawnLittleExp(DSWActor* actor)
expActor->spr.shade = -127;
expActor->spr.cstat |= (CSTAT_SPRITE_YCENTER);
RESET(expActor->spr.cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
expActor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
expActor->user.Radius = DamageData[DMG_BASIC_EXP].radius;
DoExpDamageTest(expActor);
SpawnVis(nullptr, expActor->spr.sector(), expActor->spr.pos.X, expActor->spr.pos.Y, expActor->spr.pos.Z, 16);
@ -10653,7 +10653,7 @@ int DoFindGround(DSWActor* actor)
// skips over enemy and other types of sprites
auto save_cstat = actor->spr.cstat;
RESET(actor->spr.cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
actor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
FAFgetzrange(actor->spr.pos, actor->spr.sector(), &actor->user.hiz, &ceilhit, &actor->user.loz, &florhit, (((int) actor->spr.clipdist) << 2) - GETZRANGE_CLIP_ADJ, CLIPMASK_PLAYER);
actor->spr.cstat = save_cstat;
@ -10675,7 +10675,7 @@ int DoFindGround(DSWActor* actor)
// reset the blocking bit of what you hit and try again -
// recursive
auto bak_cstat = florActor->spr.cstat;
RESET(florActor->spr.cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
florActor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
DoFindGround(actor);
florActor->spr.cstat = bak_cstat;
}
@ -10705,7 +10705,7 @@ int DoFindGroundPoint(DSWActor* actor)
// skips over enemy and other types of sprites
auto save_cstat = actor->spr.cstat;
RESET(actor->spr.cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
actor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
FAFgetzrangepoint(actor->spr.pos.X, actor->spr.pos.Y, actor->spr.pos.Z, actor->spr.sector(), &actor->user.hiz, &ceilhit, &actor->user.loz, &florhit);
actor->spr.cstat = save_cstat;
@ -10727,7 +10727,7 @@ int DoFindGroundPoint(DSWActor* actor)
// reset the blocking bit of what you hit and try again -
// recursive
auto bak_cstat = florActor->spr.cstat;
RESET(florActor->spr.cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
florActor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
DoFindGroundPoint(actor);
florActor->spr.cstat = bak_cstat;
}
@ -10792,7 +10792,7 @@ int DoNapalm(DSWActor* actor)
actor->spr.pos.Y = oy;
actor->spr.pos.Z = oz;
RESET(hitActor->spr.cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
hitActor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
actor->user.coll = move_missile(actor, actor->user.xchange, actor->user.ychange, actor->user.zchange, actor->user.ceiling_dist, actor->user.floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
hitActor->spr.cstat = hcstat;
}
@ -10819,7 +10819,7 @@ int DoNapalm(DSWActor* actor)
expActor->spr.cstat |= (CSTAT_SPRITE_YCENTER);
if (RANDOM_P2(1024) < 512)
expActor->spr.cstat |= (CSTAT_SPRITE_XFLIP);
RESET(expActor->spr.cstat, CSTAT_SPRITE_TRANSLUCENT);
expActor->spr.cstat &= ~(CSTAT_SPRITE_TRANSLUCENT);
expActor->user.Radius = 1500;
DoFindGroundPoint(expActor);
@ -10959,7 +10959,7 @@ int DoSerpMeteor(DSWActor* actor)
actor->spr.pos.Y = oy;
actor->spr.pos.Z = oz;
RESET(hitActor->spr.cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
hitActor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
actor->user.coll = move_missile(actor, actor->user.xchange, actor->user.ychange, actor->user.zchange, actor->user.ceiling_dist, actor->user.floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
hitActor->spr.cstat = hcstat;
}
@ -11089,7 +11089,7 @@ bool MissileSetPos(DSWActor* actor, ANIMATORp DoWeapon, int dist)
actor->user.Flags |= (SPR_SET_POS_DONT_KILL);
if ((*DoWeapon)(actor))
retval = true;
RESET(actor->user.Flags, SPR_SET_POS_DONT_KILL);
actor->user.Flags &= ~(SPR_SET_POS_DONT_KILL);
// reset values
actor->user.xchange = oldxc;
@ -11130,7 +11130,7 @@ bool TestMissileSetPos(DSWActor* actor, ANIMATORp DoWeapon, int dist, int zvel)
actor->user.Flags |= (SPR_SET_POS_DONT_KILL);
if ((*DoWeapon)(actor))
retval = true;
RESET(actor->user.Flags, SPR_SET_POS_DONT_KILL);
actor->user.Flags &= ~(SPR_SET_POS_DONT_KILL);
// reset values
actor->user.xchange = oldxc;
@ -11631,7 +11631,7 @@ void InitSpellNapalm(PLAYERp pp)
actor->spr.clipdist = 0;
actor->spr.zvel = -pp->horizon.horiz.asq16() >> 9;
actor->spr.cstat |= (CSTAT_SPRITE_TRANSLUCENT | CSTAT_SPRITE_YCENTER);
RESET(actor->spr.cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
actor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
actor->user.Flags2 |= (SPR2_BLUR_TAPER_FAST);
actor->user.floor_dist = Z(1);
@ -11710,7 +11710,7 @@ int InitEnemyNapalm(DSWActor* actor)
actorNew->spr.yrepeat = 32;
actorNew->spr.clipdist = 0;
actorNew->spr.cstat |= (CSTAT_SPRITE_TRANSLUCENT | CSTAT_SPRITE_YCENTER);
RESET(actorNew->spr.cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
actorNew->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
actorNew->user.Flags2 |= (SPR2_BLUR_TAPER_FAST);
actorNew->user.floor_dist = Z(1);
@ -11766,7 +11766,7 @@ int InitSpellMirv(PLAYERp pp)
actorNew->spr.clipdist = 32 >> 2;
actorNew->spr.zvel = -pp->horizon.horiz.asq16() >> 9;
actorNew->spr.cstat |= (CSTAT_SPRITE_TRANSLUCENT | CSTAT_SPRITE_YCENTER);
RESET(actorNew->spr.cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
actorNew->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
actorNew->user.floor_dist = Z(16);
actorNew->user.ceiling_dist = Z(16);
@ -11805,7 +11805,7 @@ int InitEnemyMirv(DSWActor* actor)
actorNew->spr.clipdist = 32L >> 2;
actorNew->spr.cstat |= (CSTAT_SPRITE_TRANSLUCENT | CSTAT_SPRITE_YCENTER);
RESET(actorNew->spr.cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
actorNew->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
actorNew->user.floor_dist = Z(16);
actorNew->user.ceiling_dist = Z(16);
@ -12236,7 +12236,7 @@ int InitSumoNapalm(DSWActor* actor)
actorNew->spr.yrepeat = 32;
actorNew->spr.clipdist = 0;
actorNew->spr.cstat |= (CSTAT_SPRITE_TRANSLUCENT | CSTAT_SPRITE_YCENTER);
RESET(actorNew->spr.cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
actorNew->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
actorNew->user.Flags2 |= (SPR2_BLUR_TAPER_FAST);
actorNew->user.floor_dist = Z(1);
@ -12763,7 +12763,7 @@ void InitHeartAttack(PLAYERp pp)
actorNew->spr.yrepeat = 52;
actorNew->spr.clipdist = 0;
actorNew->spr.zvel = -pp->horizon.horiz.asq16() >> 9;
RESET(actorNew->spr.cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
actorNew->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
actorNew->user.Flags2 |= (SPR2_DONT_TARGET_OWNER);
actorNew->spr.cstat |= (CSTAT_SPRITE_INVISIBLE);
@ -13739,7 +13739,7 @@ int InitMicro(PLAYERp pp)
actorNew->user.Radius = 200;
actorNew->user.ceiling_dist = Z(2);
actorNew->user.floor_dist = Z(2);
RESET(actorNew->spr.cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
actorNew->spr.cstat &= ~(CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER);
actorNew->spr.cstat |= (CSTAT_SPRITE_INVISIBLE);
@ -14181,7 +14181,7 @@ int SpawnDemonFist(DSWActor* actor)
expActor->user.spal = expActor->spr.pal = 25;
expActor->spr.cstat |= (CSTAT_SPRITE_YCENTER);
RESET(expActor->spr.cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
expActor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
expActor->user.Radius = DamageData[DMG_BASIC_EXP].radius;
if (RANDOM_P2(1024<<8)>>8 > 600)
@ -15112,7 +15112,7 @@ int BulletHitSprite(DSWActor* actor, DSWActor* hitActor, int hit_x, int hit_y, i
SetActorZ(actorNew, &hit_pos);
actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER);
RESET(actorNew->spr.cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
actorNew->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
if ((RANDOM_P2(1024<<5)>>5) < 512+128)
{
@ -15506,7 +15506,7 @@ int InitTurretMicro(DSWActor* actor, PLAYERp pp)
actorNew->user.Radius = 200;
actorNew->user.ceiling_dist = Z(2);
actorNew->user.floor_dist = Z(2);
RESET(actorNew->spr.cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
actorNew->spr.cstat &= ~(CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER);
actorNew->spr.cstat |= (CSTAT_SPRITE_INVISIBLE);
@ -16440,7 +16440,7 @@ int InitGrenade(PLAYERp pp)
// don't do smoke for this movement
actorNew->user.Flags |= (SPR_BOUNCE);
MissileSetPos(actorNew, DoGrenade, 1000);
RESET(actorNew->user.Flags, SPR_BOUNCE);
actorNew->user.Flags &= ~(SPR_BOUNCE);
actor->spr.clipdist = oclipdist;
@ -16518,7 +16518,7 @@ int InitSpriteGrenade(DSWActor* actor)
// don't do smoke for this movement
actorNew->user.Flags |= (SPR_BOUNCE);
MissileSetPos(actorNew, DoGrenade, 400);
RESET(actorNew->user.Flags, SPR_BOUNCE);
actorNew->user.Flags &= ~(SPR_BOUNCE);
return 0;
}
@ -16558,7 +16558,7 @@ int InitMine(PLAYERp pp)
actorNew->user.floor_dist = Z(5);
actorNew->user.Counter = 0;
actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER);
RESET(actorNew->spr.cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
actorNew->spr.cstat &= ~(CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
actorNew->user.spal = actorNew->spr.pal = actor->user.spal; // Set sticky color
if (TEST(pp->Flags, PF_DIVING) || SpriteInUnderwaterArea(actorNew))
@ -16610,7 +16610,7 @@ int InitEnemyMine(DSWActor* actor)
actorNew->user.floor_dist = Z(5);
actorNew->user.Counter = 0;
actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER);
RESET(actorNew->spr.cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
actorNew->spr.cstat &= ~(CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
actorNew->user.spal = actorNew->spr.pal = actor->user.spal; // Set sticky color
if (SpriteInUnderwaterArea(actorNew))
@ -17146,7 +17146,7 @@ bool MissileHitDiveArea(DSWActor* actor)
if (SectorIsUnderwaterArea(actor->spr.sector()))
actor->user.Flags |= (SPR_UNDERWATER);
else
RESET(actor->user.Flags, SPR_UNDERWATER);
actor->user.Flags &= ~(SPR_UNDERWATER);
}
if (actor->user.coll.type == kHitSector)
@ -17176,7 +17176,7 @@ bool MissileHitDiveArea(DSWActor* actor)
if (actor->spr.pos.Z > ((actor->user.hiz + actor->user.loz) >> 1))
return false;
RESET(actor->user.Flags, SPR_UNDERWATER);
actor->user.Flags &= ~(SPR_UNDERWATER);
if (!SpriteWarpToSurface(actor))
{
return false;
@ -17242,7 +17242,7 @@ int SpawnVehicleSmoke(DSWActor* actor)
actorNew->spr.xrepeat = 64;
actorNew->spr.yrepeat = 64;
actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER);
RESET(actorNew->spr.cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
actorNew->spr.cstat &= ~(CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
if (RANDOM_P2(1024) < 512)
actorNew->spr.cstat |= (CSTAT_SPRITE_XFLIP);
@ -17268,7 +17268,7 @@ int SpawnSmokePuff(DSWActor* actor)
actorNew->spr.xrepeat = 64;
actorNew->spr.yrepeat = 64;
actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER);
RESET(actorNew->spr.cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
actorNew->spr.cstat &= ~(CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
if (RANDOM_P2(1024) < 512)
actorNew->spr.cstat |= (CSTAT_SPRITE_XFLIP);
@ -17316,7 +17316,7 @@ int DoBubble(DSWActor* actor)
return true;
}
RESET(actor->user.Flags, SPR_UNDERWATER);
actor->user.Flags &= ~(SPR_UNDERWATER);
// stick around above water for this long
actor->user.WaitTics = (RANDOM_P2(64 << 8) >> 8);
}
@ -17501,7 +17501,7 @@ void QueueHole(sectortype* hit_sect, walltype* hit_wall, int hit_x, int hit_y, i
spawnedActor->spr.cstat |= (CSTAT_SPRITE_ALIGNMENT_WALL);
spawnedActor->spr.cstat |= (CSTAT_SPRITE_ONE_SIDE);
RESET(spawnedActor->spr.cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
spawnedActor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
wall_ang = NORM_ANGLE(getangle(hit_wall->delta())+512);
spawnedActor->spr.ang = wall_ang;
@ -17577,8 +17577,8 @@ int QueueFloorBlood(DSWActor* actor)
spawnedActor->spr.cstat |= (CSTAT_SPRITE_ALIGNMENT_FLOOR);
spawnedActor->spr.cstat |= (CSTAT_SPRITE_ONE_SIDE);
RESET(spawnedActor->spr.cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
RESET(actor->user.Flags, SPR_SHADOW);
spawnedActor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
actor->user.Flags &= ~(SPR_SHADOW);
return 0;
}
@ -17691,7 +17691,7 @@ int QueueFootPrint(DSWActor* actor)
spawnedActor->spr.cstat |= (CSTAT_SPRITE_XFLIP);
spawnedActor->spr.cstat |= (CSTAT_SPRITE_ALIGNMENT_FLOOR);
spawnedActor->spr.cstat |= (CSTAT_SPRITE_ONE_SIDE);
RESET(spawnedActor->spr.cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
spawnedActor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
return 0;
}
@ -17812,7 +17812,7 @@ DSWActor* QueueWallBlood(DSWActor* actor, short ang)
spawnedActor->spr.cstat |= (CSTAT_SPRITE_ALIGNMENT_WALL);
spawnedActor->spr.cstat |= (CSTAT_SPRITE_ONE_SIDE);
spawnedActor->spr.cstat |= (CSTAT_SPRITE_YCENTER);
RESET(spawnedActor->spr.cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
spawnedActor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
wall_ang = NORM_ANGLE(getangle(hit.hitWall->delta()) + 512);
spawnedActor->spr.ang = wall_ang;
@ -17970,8 +17970,8 @@ void QueueGeneric(DSWActor* actor, short pic)
actor->spr.extra |= (SPRX_BREAKABLE);
break;
default:
RESET(actor->spr.cstat, CSTAT_SPRITE_BREAKABLE);
RESET(actor->spr.extra, SPRX_BREAKABLE);
actor->spr.cstat &= ~(CSTAT_SPRITE_BREAKABLE);
actor->spr.extra &= ~(SPRX_BREAKABLE);
break;
}

View file

@ -737,7 +737,7 @@ int DoZillaDeathMelt(DSWActor* actor)
SpawnGrenadeExp(actor);
actor->user.ID = ZILLA_RUN_R0;
RESET(actor->user.Flags, SPR_JUMPING|SPR_FALLING|SPR_MOVED);
actor->user.Flags &= ~(SPR_JUMPING|SPR_FALLING|SPR_MOVED);
//DoMatchEverything(nullptr, actor->spr.lotag, ON);
if (!SW_SHAREWARE)

View file

@ -791,8 +791,8 @@ void SpawnZombie(PLAYERp pp, DSWActor* weaponActor)
// make immediately active
actorNew->user.Flags |= (SPR_ACTIVE);
RESET(actorNew->user.Flags, SPR_JUMPING);
RESET(actorNew->user.Flags, SPR_FALLING);
actorNew->user.Flags &= ~(SPR_JUMPING);
actorNew->user.Flags &= ~(SPR_FALLING);
// if I didn't do this here they get stuck in the air sometimes
DoActorZrange(actorNew);
@ -838,8 +838,8 @@ void SpawnZombie2(DSWActor* actor)
// make immediately active
actorNew->user.Flags |= (SPR_ACTIVE);
RESET(actorNew->user.Flags, SPR_JUMPING);
RESET(actorNew->user.Flags, SPR_FALLING);
actorNew->user.Flags &= ~(SPR_JUMPING);
actorNew->user.Flags &= ~(SPR_FALLING);
// if I didn't do this here they get stuck in the air sometimes
DoActorZrange(actorNew);