- set_int_ang in SW, part 1.

This commit is contained in:
Christoph Oelckers 2022-08-16 23:23:23 +02:00
parent d55a84d7eb
commit 6381015229
18 changed files with 249 additions and 249 deletions

View file

@ -127,7 +127,7 @@ int DoActorDie(DSWActor* actor, DSWActor* weapActor, int meansofdeath)
actor->user.RotNum = 0; actor->user.RotNum = 0;
actor->spr.xvel <<= 1; actor->spr.xvel <<= 1;
actor->user.ActorActionFunc = nullptr; actor->user.ActorActionFunc = nullptr;
actor->spr.__int_angle = NORM_ANGLE(actor->int_ang() + 1024); actor->set_int_ang(NORM_ANGLE(actor->int_ang() + 1024));
break; break;
case NINJA_RUN_R0: case NINJA_RUN_R0:
@ -158,7 +158,7 @@ int DoActorDie(DSWActor* actor, DSWActor* weapActor, int meansofdeath)
actor->spr.xvel = 200 + RandomRange(200); actor->spr.xvel = 200 + RandomRange(200);
actor->user.jump_speed = -200 - RandomRange(250); actor->user.jump_speed = -200 - RandomRange(250);
DoActorBeginJump(actor); DoActorBeginJump(actor);
actor->spr.__int_angle = weapActor->int_ang(); actor->set_int_ang(weapActor->int_ang());
} }
} }
else else
@ -177,7 +177,7 @@ int DoActorDie(DSWActor* actor, DSWActor* weapActor, int meansofdeath)
actor->user.ActorActionFunc = nullptr; actor->user.ActorActionFunc = nullptr;
//actor->user.ActorActionFunc = NullAnimator; //actor->user.ActorActionFunc = NullAnimator;
if (!sw_ninjahack) if (!sw_ninjahack)
actor->spr.__int_angle = weapActor->int_ang(); actor->set_int_ang(weapActor->int_ang());
break; break;
case COOLG_RUN_R0: case COOLG_RUN_R0:
@ -211,7 +211,7 @@ int DoActorDie(DSWActor* actor, DSWActor* weapActor, int meansofdeath)
} }
actor->user.ActorActionFunc = nullptr; actor->user.ActorActionFunc = nullptr;
// Get angle to player // Get angle to player
actor->spr.__int_angle = NORM_ANGLE(getangle(actor->user.targetActor->int_pos().X - actor->int_pos().X, actor->user.targetActor->int_pos().Y - actor->int_pos().Y) + 1024); actor->set_int_ang(NORM_ANGLE(getangle(actor->user.targetActor->int_pos().X - actor->int_pos().X, actor->user.targetActor->int_pos().Y - actor->int_pos().Y) + 1024));
break; break;
case UZI_SMOKE+1: // Shotgun case UZI_SMOKE+1: // Shotgun
@ -234,7 +234,7 @@ int DoActorDie(DSWActor* actor, DSWActor* weapActor, int meansofdeath)
DoActorBeginJump(actor); DoActorBeginJump(actor);
actor->user.ActorActionFunc = nullptr; actor->user.ActorActionFunc = nullptr;
// Get angle to player // Get angle to player
actor->spr.__int_angle = NORM_ANGLE(getangle(actor->user.targetActor->int_pos().X - actor->int_pos().X, actor->user.targetActor->int_pos().Y - actor->int_pos().Y) + 1024); actor->set_int_ang(NORM_ANGLE(getangle(actor->user.targetActor->int_pos().X - actor->int_pos().X, actor->user.targetActor->int_pos().Y - actor->int_pos().Y) + 1024));
break; break;
default: default:
@ -259,7 +259,7 @@ int DoActorDie(DSWActor* actor, DSWActor* weapActor, int meansofdeath)
actor->spr.xvel = 300 + RandomRange(400); actor->spr.xvel = 300 + RandomRange(400);
actor->user.jump_speed = -300 - RandomRange(350); actor->user.jump_speed = -300 - RandomRange(350);
DoActorBeginJump(actor); DoActorBeginJump(actor);
actor->spr.__int_angle = weapActor->int_ang(); actor->set_int_ang(weapActor->int_ang());
break; break;
} }
break; break;
@ -422,7 +422,7 @@ int DoActorDebris(DSWActor* actor)
if (!move_debris(actor, nx, ny, 0L)) if (!move_debris(actor, nx, ny, 0L))
{ {
actor->spr.__int_angle = RANDOM_P2(2048); actor->set_int_ang(RANDOM_P2(2048));
} }
} }
@ -451,7 +451,7 @@ int DoFireFly(DSWActor* actor)
actor->spr.clipdist = 256>>2; actor->spr.clipdist = 256>>2;
if (!move_actor(actor, nx, ny, 0L)) if (!move_actor(actor, nx, ny, 0L))
{ {
actor->spr.__int_angle = NORM_ANGLE(actor->int_ang() + 1024); actor->set_int_ang(NORM_ANGLE(actor->int_ang() + 1024));
} }
actor->user.WaitTics = (actor->user.WaitTics + (ACTORMOVETICS << 1)) & 2047; actor->user.WaitTics = (actor->user.WaitTics + (ACTORMOVETICS << 1)) & 2047;
@ -738,7 +738,7 @@ int DoActorStopFall(DSWActor* actor)
if (actor->user.lowActor && !(actor->user.lowActor->spr.cstat & CSTAT_SPRITE_ALIGNMENT_FLOOR)) if (actor->user.lowActor && !(actor->user.lowActor->spr.cstat & CSTAT_SPRITE_ALIGNMENT_FLOOR))
{ {
//actor->spr.__int_angle = NORM_ANGLE(actor->spr.__int_angle + (RANDOM_P2(64<<8)>>8) - 32); //actor->spr.__int_angle = NORM_ANGLE(actor->spr.__int_angle + (RANDOM_P2(64<<8)>>8) - 32);
actor->spr.__int_angle = NORM_ANGLE(actor->int_ang() + 1024 + (RANDOM_P2(512<<8)>>8)); actor->set_int_ang(NORM_ANGLE(actor->int_ang() + 1024 + (RANDOM_P2(512<<8)>>8)));
actor->user.jump_speed = -350; actor->user.jump_speed = -350;
DoActorBeginJump(actor); DoActorBeginJump(actor);

View file

@ -816,7 +816,7 @@ int DoActorCantMoveCloser(DSWActor* actor)
if (actor->user.track >= 0) if (actor->user.track >= 0)
{ {
actor->spr.__int_angle = getangle((Track[actor->user.track].TrackPoint + actor->user.point)->x - actor->int_pos().X, (Track[actor->user.track].TrackPoint + actor->user.point)->y - actor->int_pos().Y); actor->set_int_ang(getangle((Track[actor->user.track].TrackPoint + actor->user.point)->x - actor->int_pos().X, (Track[actor->user.track].TrackPoint + actor->user.point)->y - actor->int_pos().Y));
DoActorSetSpeed(actor, MID_SPEED); DoActorSetSpeed(actor, MID_SPEED);
actor->user.Flags |= (SPR_FIND_PLAYER); actor->user.Flags |= (SPR_FIND_PLAYER);
@ -867,7 +867,7 @@ int DoActorMoveCloser(DSWActor* actor)
else else
{ {
// turn to face player // turn to face player
actor->spr.__int_angle = getangle(actor->user.targetActor->int_pos().X - actor->int_pos().X, actor->user.targetActor->int_pos().Y - actor->int_pos().Y); actor->set_int_ang(getangle(actor->user.targetActor->int_pos().X - actor->int_pos().X, actor->user.targetActor->int_pos().Y - actor->int_pos().Y));
} }
} }
@ -1048,7 +1048,7 @@ int InitActorRunAway(DSWActor* actor)
if (actor->user.track >= 0) if (actor->user.track >= 0)
{ {
actor->spr.__int_angle = NORM_ANGLE(getangle((Track[actor->user.track].TrackPoint + actor->user.point)->x - actor->int_pos().X, (Track[actor->user.track].TrackPoint + actor->user.point)->y - actor->int_pos().Y)); actor->set_int_ang(NORM_ANGLE(getangle((Track[actor->user.track].TrackPoint + actor->user.point)->x - actor->int_pos().X, (Track[actor->user.track].TrackPoint + actor->user.point)->y - actor->int_pos().Y)));
DoActorSetSpeed(actor, FAST_SPEED); DoActorSetSpeed(actor, FAST_SPEED);
actor->user.Flags |= (SPR_RUN_AWAY); actor->user.Flags |= (SPR_RUN_AWAY);
} }
@ -1128,7 +1128,7 @@ int InitActorAttack(DSWActor* actor)
//NewStateGroup(actor, actor->user.ActorActionSet->Stand); //NewStateGroup(actor, actor->user.ActorActionSet->Stand);
// face player when attacking // face player when attacking
actor->spr.__int_angle = NORM_ANGLE(getangle(actor->user.targetActor->int_pos().X - actor->int_pos().X, actor->user.targetActor->int_pos().Y - actor->int_pos().Y)); actor->set_int_ang(NORM_ANGLE(getangle(actor->user.targetActor->int_pos().X - actor->int_pos().X, actor->user.targetActor->int_pos().Y - actor->int_pos().Y)));
// If it's your own kind, lay off! // If it's your own kind, lay off!
if (actor->user.ID == actor->user.targetActor->user.ID && !actor->user.targetActor->user.PlayerP) if (actor->user.ID == actor->user.targetActor->user.ID && !actor->user.targetActor->user.PlayerP)
@ -1208,7 +1208,7 @@ int InitActorEvade(DSWActor* actor)
if (actor->user.track >= 0) if (actor->user.track >= 0)
{ {
actor->spr.__int_angle = NORM_ANGLE(getangle((Track[actor->user.track].TrackPoint + actor->user.point)->x - actor->int_pos().X, (Track[actor->user.track].TrackPoint + actor->user.point)->y - actor->int_pos().Y)); actor->set_int_ang(NORM_ANGLE(getangle((Track[actor->user.track].TrackPoint + actor->user.point)->x - actor->int_pos().X, (Track[actor->user.track].TrackPoint + actor->user.point)->y - actor->int_pos().Y)));
DoActorSetSpeed(actor, FAST_SPEED); DoActorSetSpeed(actor, FAST_SPEED);
// NOT doing a RUN_AWAY // NOT doing a RUN_AWAY
actor->user.Flags &= ~(SPR_RUN_AWAY); actor->user.Flags &= ~(SPR_RUN_AWAY);
@ -1228,7 +1228,7 @@ int InitActorWanderAround(DSWActor* actor)
if (actor->user.track >= 0) if (actor->user.track >= 0)
{ {
actor->spr.__int_angle = getangle((Track[actor->user.track].TrackPoint + actor->user.point)->x - actor->int_pos().X, (Track[actor->user.track].TrackPoint + actor->user.point)->y - actor->int_pos().Y); actor->set_int_ang(getangle((Track[actor->user.track].TrackPoint + actor->user.point)->x - actor->int_pos().X, (Track[actor->user.track].TrackPoint + actor->user.point)->y - actor->int_pos().Y));
DoActorSetSpeed(actor, NORM_SPEED); DoActorSetSpeed(actor, NORM_SPEED);
} }
@ -1244,7 +1244,7 @@ int InitActorFindPlayer(DSWActor* actor)
if (actor->user.track >= 0) if (actor->user.track >= 0)
{ {
actor->spr.__int_angle = getangle((Track[actor->user.track].TrackPoint + actor->user.point)->x - actor->int_pos().X, (Track[actor->user.track].TrackPoint + actor->user.point)->y - actor->int_pos().Y); actor->set_int_ang(getangle((Track[actor->user.track].TrackPoint + actor->user.point)->x - actor->int_pos().X, (Track[actor->user.track].TrackPoint + actor->user.point)->y - actor->int_pos().Y));
DoActorSetSpeed(actor, MID_SPEED); DoActorSetSpeed(actor, MID_SPEED);
actor->user.Flags |= (SPR_FIND_PLAYER); actor->user.Flags |= (SPR_FIND_PLAYER);
@ -1351,7 +1351,7 @@ Collision move_scan(DSWActor* actor, int ang, int dist, int *stopx, int *stopy,
ssp = actor->sector(); ssp = actor->sector();
// do the move // do the move
actor->spr.__int_angle = ang; actor->set_int_ang(ang);
nx = MulScale(dist, bcos(actor->int_ang()), 14); nx = MulScale(dist, bcos(actor->int_ang()), 14);
ny = MulScale(dist, bsin(actor->int_ang()), 14); ny = MulScale(dist, bsin(actor->int_ang()), 14);
@ -1367,7 +1367,7 @@ Collision move_scan(DSWActor* actor, int ang, int dist, int *stopx, int *stopy,
// reset position information // reset position information
actor->set_int_pos({ x, y, z }); actor->set_int_pos({ x, y, z });
actor->spr.__int_angle = sang; actor->set_int_ang(sang);
actor->user.loz = loz; actor->user.loz = loz;
actor->user.hiz = hiz; actor->user.hiz = hiz;
actor->user.lowActor = lowActor; actor->user.lowActor = lowActor;
@ -1452,13 +1452,13 @@ int FindNewAngle(DSWActor* actor, int dir, int DistToMove)
// look directly ahead for a ledge // look directly ahead for a ledge
if (!(actor->user.Flags & (SPR_NO_SCAREDZ | SPR_JUMPING | SPR_FALLING | SPR_SWIMMING | SPR_DEAD))) if (!(actor->user.Flags & (SPR_NO_SCAREDZ | SPR_JUMPING | SPR_FALLING | SPR_SWIMMING | SPR_DEAD)))
{ {
actor->spr.__int_angle = new_ang; actor->set_int_ang(new_ang);
if (DropAhead(actor, actor->user.lo_step)) if (DropAhead(actor, actor->user.lo_step))
{ {
actor->spr.__int_angle = oang; actor->set_int_ang(oang);
continue; continue;
} }
actor->spr.__int_angle = oang; actor->set_int_ang(oang);
} }
#endif #endif
@ -1497,7 +1497,7 @@ int FindNewAngle(DSWActor* actor, int dir, int DistToMove)
if (actor->user.TargetDist > 4000) if (actor->user.TargetDist > 4000)
actor->user.TargetDist -= 3500; actor->user.TargetDist -= 3500;
actor->spr.__int_angle = save_ang; actor->set_int_ang(save_ang);
return save_ang; return save_ang;
} }
@ -1576,7 +1576,7 @@ int InitActorReposition(DSWActor* actor)
return 0; return 0;
} }
actor->spr.__int_angle = ang; actor->set_int_ang(ang);
DoActorSetSpeed(actor, FAST_SPEED); DoActorSetSpeed(actor, FAST_SPEED);
actor->user.Flags &= ~(SPR_RUN_AWAY); actor->user.Flags &= ~(SPR_RUN_AWAY);
} }
@ -1606,7 +1606,7 @@ int InitActorReposition(DSWActor* actor)
DoActorSetSpeed(actor, MID_SPEED); DoActorSetSpeed(actor, MID_SPEED);
} }
actor->spr.__int_angle = ang; actor->set_int_ang(ang);
} }

View file

@ -589,7 +589,7 @@ int AutoBreakWall(walltype* wallp, int hit_x, int hit_y, int hit_z, int ang, int
auto breakActor = insertActor(0, STAT_DEFAULT); auto breakActor = insertActor(0, STAT_DEFAULT);
breakActor->spr.cstat = 0; breakActor->spr.cstat = 0;
breakActor->spr.extra = 0; breakActor->spr.extra = 0;
breakActor->spr.__int_angle = ang; breakActor->set_int_ang(ang);
breakActor->spr.picnum = ST1; breakActor->spr.picnum = ST1;
breakActor->spr.xrepeat = breakActor->spr.yrepeat = 64; breakActor->spr.xrepeat = breakActor->spr.yrepeat = 64;
SetActorZ(breakActor, &hit_pos); SetActorZ(breakActor, &hit_pos);

View file

@ -838,9 +838,9 @@ int DoBunnyBeginJumpAttack(DSWActor* actor)
0L, actor->user.ceiling_dist, actor->user.floor_dist, CLIPMASK_ACTOR, ACTORMOVETICS); 0L, actor->user.ceiling_dist, actor->user.floor_dist, CLIPMASK_ACTOR, ACTORMOVETICS);
if (coll.type != kHitNone) if (coll.type != kHitNone)
actor->spr.__int_angle = NORM_ANGLE(actor->int_ang() + 1024) + (RANDOM_NEG(256, 6) >> 6); actor->set_int_ang(NORM_ANGLE(actor->int_ang() + 1024) + (RANDOM_NEG(256, 6) >> 6));
else else
actor->spr.__int_angle = NORM_ANGLE(tang + (RANDOM_NEG(256, 6) >> 6)); actor->set_int_ang(NORM_ANGLE(tang + (RANDOM_NEG(256, 6) >> 6)));
DoActorSetSpeed(actor, FAST_SPEED); DoActorSetSpeed(actor, FAST_SPEED);
@ -1025,10 +1025,10 @@ int DoBunnyQuickJump(DSWActor* actor)
} }
actor->copyXY(hitActor); actor->copyXY(hitActor);
actor->spr.__int_angle = hitActor->int_ang(); actor->set_int_ang(hitActor->int_ang());
actor->spr.__int_angle = NORM_ANGLE(actor->int_ang() + 1024); actor->set_int_ang(NORM_ANGLE(actor->int_ang() + 1024));
HelpMissileLateral(actor, 2000); HelpMissileLateral(actor, 2000);
actor->spr.__int_angle = hitActor->int_ang(); actor->set_int_ang(hitActor->int_ang());
actor->user.Vis = actor->int_ang(); // Remember angles for later actor->user.Vis = actor->int_ang(); // Remember angles for later
hitActor->user.Vis = hitActor->int_ang(); hitActor->user.Vis = hitActor->int_ang();
@ -1084,7 +1084,7 @@ int DoBunnyRipHeart(DSWActor* actor)
actor->user.WaitTics = 6 * 120; actor->user.WaitTics = 6 * 120;
// player face bunny // player face bunny
target->spr.__int_angle = getangle(actor->int_pos().X - target->int_pos().X, actor->int_pos().Y - target->int_pos().Y); target->set_int_ang(getangle(actor->int_pos().X - target->int_pos().X, actor->int_pos().Y - target->int_pos().Y));
return 0; return 0;
} }
@ -1115,7 +1115,7 @@ void BunnyHatch(DSWActor* actor)
actorNew->spr.pos = actor->spr.pos; actorNew->spr.pos = actor->spr.pos;
actorNew->spr.xrepeat = 30; // Baby size actorNew->spr.xrepeat = 30; // Baby size
actorNew->spr.yrepeat = 24; actorNew->spr.yrepeat = 24;
actorNew->spr.__int_angle = rip_ang[i]; actorNew->set_int_ang(rip_ang[i]);
actorNew->spr.pal = 0; actorNew->spr.pal = 0;
SetupBunny(actorNew); SetupBunny(actorNew);
actorNew->spr.shade = actor->spr.shade; actorNew->spr.shade = actor->spr.shade;
@ -1171,7 +1171,7 @@ DSWActor* BunnyHatch2(DSWActor* actor)
actorNew->spr.pos = actor->spr.pos; actorNew->spr.pos = actor->spr.pos;
actorNew->spr.xrepeat = 30; // Baby size actorNew->spr.xrepeat = 30; // Baby size
actorNew->spr.yrepeat = 24; actorNew->spr.yrepeat = 24;
actorNew->spr.__int_angle = RANDOM_P2(2048); actorNew->set_int_ang(RANDOM_P2(2048));
actorNew->spr.pal = 0; actorNew->spr.pal = 0;
SetupBunny(actorNew); SetupBunny(actorNew);
actorNew->spr.shade = actor->spr.shade; actorNew->spr.shade = actor->spr.shade;
@ -1282,7 +1282,7 @@ int DoBunnyMove(DSWActor* actor)
NewStateGroup(actor,sg_BunnyStand); NewStateGroup(actor,sg_BunnyStand);
break; break;
default: default:
actor->spr.__int_angle = NORM_ANGLE(RandomRange(2048 << 6) >> 6); actor->set_int_ang(NORM_ANGLE(RandomRange(2048 << 6) >> 6));
actor->user.jump_speed = -350; actor->user.jump_speed = -350;
DoActorBeginJump(actor); DoActorBeginJump(actor);
actor->user.ActorActionFunc = DoActorMoveJump; actor->user.ActorActionFunc = DoActorMoveJump;

View file

@ -707,7 +707,7 @@ int DoCoolgCircle(DSWActor* actor)
{ {
int nx,ny,bound; int nx,ny,bound;
actor->spr.__int_angle = NORM_ANGLE(actor->int_ang() + actor->user.Counter2); actor->set_int_ang(NORM_ANGLE(actor->int_ang() + actor->user.Counter2));
nx = MulScale(actor->spr.xvel, bcos(actor->int_ang()), 14); nx = MulScale(actor->spr.xvel, bcos(actor->int_ang()), 14);
ny = MulScale(actor->spr.xvel, bsin(actor->int_ang()), 14); ny = MulScale(actor->spr.xvel, bsin(actor->int_ang()), 14);

View file

@ -526,7 +526,7 @@ DSWActor* CopySprite(sprt const* tsp, sectortype* newsector)
actorNew->spr.yrepeat = tsp->yrepeat; actorNew->spr.yrepeat = tsp->yrepeat;
actorNew->spr.xoffset = tsp->xoffset; actorNew->spr.xoffset = tsp->xoffset;
actorNew->spr.yoffset = tsp->yoffset; actorNew->spr.yoffset = tsp->yoffset;
actorNew->spr.__int_angle = tsp->int_ang(); actorNew->set_int_ang(tsp->int_ang());
actorNew->spr.xvel = tsp->xvel; actorNew->spr.xvel = tsp->xvel;
actorNew->spr.yvel = tsp->yvel; actorNew->spr.yvel = tsp->yvel;
actorNew->spr.zvel = tsp->zvel; actorNew->spr.zvel = tsp->zvel;

View file

@ -438,7 +438,7 @@ int DoHornetCircle(DSWActor* actor)
{ {
int nx,ny,bound; int nx,ny,bound;
actor->spr.__int_angle = NORM_ANGLE(actor->int_ang() + actor->user.Counter2); actor->set_int_ang(NORM_ANGLE(actor->int_ang() + actor->user.Counter2));
nx = MulScale(actor->spr.xvel, bcos(actor->int_ang()), 14); nx = MulScale(actor->spr.xvel, bcos(actor->int_ang()), 14);
ny = MulScale(actor->spr.xvel, bsin(actor->int_ang()), 14); ny = MulScale(actor->spr.xvel, bsin(actor->int_ang()), 14);
@ -449,7 +449,7 @@ int DoHornetCircle(DSWActor* actor)
// try moving in the opposite direction // try moving in the opposite direction
actor->user.Counter2 = -actor->user.Counter2; actor->user.Counter2 = -actor->user.Counter2;
actor->spr.__int_angle = NORM_ANGLE(actor->int_ang() + 1024); actor->set_int_ang(NORM_ANGLE(actor->int_ang() + 1024));
nx = MulScale(actor->spr.xvel, bcos(actor->int_ang()), 14); nx = MulScale(actor->spr.xvel, bcos(actor->int_ang()), 14);
ny = MulScale(actor->spr.xvel, bsin(actor->int_ang()), 14); ny = MulScale(actor->spr.xvel, bsin(actor->int_ang()), 14);

View file

@ -443,7 +443,7 @@ void so_dointerpolations(int32_t smoothratio) // Stick at b
{ {
DSWActor* actor = data->actorofang; DSWActor* actor = data->actorofang;
if (!actor) continue; if (!actor) continue;
actor->spr.__int_angle = NORM_ANGLE(data->lastoldipos + MulScale(data->lastangdiff, ratio, 16)); actor->set_int_ang(NORM_ANGLE(data->lastoldipos + MulScale(data->lastangdiff, ratio, 16)));
} }
else else
{ {
@ -472,7 +472,7 @@ void so_restoreinterpolations(void) // Stick at end of drawscree
if (data->curelement == soi_sprang) if (data->curelement == soi_sprang)
{ {
auto actorofang = interp->data[i].actorofang; auto actorofang = interp->data[i].actorofang;
if (actorofang) actorofang->spr.__int_angle = data->bakipos; if (actorofang) actorofang->set_int_ang(data->bakipos);
} }
else else
{ {

View file

@ -1189,7 +1189,7 @@ int SpawnRadiationCloud(DSWActor* actor)
//if (RANDOM_P2(1024) < 512) //if (RANDOM_P2(1024) < 512)
//actorNew->spr.cstat |= (CSTAT_SPRITE_YFLIP); //actorNew->spr.cstat |= (CSTAT_SPRITE_YFLIP);
actorNew->spr.__int_angle = RANDOM_P2(2048); actorNew->set_int_ang(RANDOM_P2(2048));
actorNew->spr.xvel = RANDOM_P2(32); actorNew->spr.xvel = RANDOM_P2(32);
actorNew->user.Counter = 0; actorNew->user.Counter = 0;
@ -1920,7 +1920,7 @@ int DoCarryFlag(DSWActor* actor)
{ {
vec3_t pos = { attached->int_pos().X, attached->int_pos().Y, ActorZOfMiddle(attached) }; vec3_t pos = { attached->int_pos().X, attached->int_pos().Y, ActorZOfMiddle(attached) };
SetActorZ(actor, &pos); SetActorZ(actor, &pos);
actor->spr.__int_angle = NORM_ANGLE(attached->int_ang() + 1536); actor->set_int_ang(NORM_ANGLE(attached->int_ang() + 1536));
} }
// not activated yet // not activated yet
@ -2069,7 +2069,7 @@ int DoCarryFlagNoDet(DSWActor* actor)
{ {
vec3_t pos = { attached->int_pos().X, attached->int_pos().Y, ActorZOfMiddle(attached) }; vec3_t pos = { attached->int_pos().X, attached->int_pos().Y, ActorZOfMiddle(attached) };
SetActorZ(actor, &pos); SetActorZ(actor, &pos);
actor->spr.__int_angle = NORM_ANGLE(attached->int_ang() + 1536); actor->set_int_ang(NORM_ANGLE(attached->int_ang() + 1536));
actor->set_int_z(attached->int_pos().Z - (ActorSizeZ(attached) >> 1)); actor->set_int_z(attached->int_pos().Z - (ActorSizeZ(attached) >> 1));
} }
@ -2195,22 +2195,22 @@ int SpawnShell(DSWActor* actor, int ShellNum)
if (ShellNum == -3) if (ShellNum == -3)
{ {
actorNew->spr.__int_angle = actor->int_ang(); actorNew->set_int_ang(actor->int_ang());
HelpMissileLateral(actorNew,2500); HelpMissileLateral(actorNew,2500);
actorNew->spr.__int_angle = NORM_ANGLE(actorNew->spr.__int_angle-512); actorNew->set_int_ang(NORM_ANGLE(actorNew->spr.int_ang() - 512));
HelpMissileLateral(actorNew,1000); // Was 1500 HelpMissileLateral(actorNew,1000); // Was 1500
actorNew->spr.__int_angle = NORM_ANGLE(actorNew->spr.__int_angle+712); actorNew->set_int_ang(NORM_ANGLE(actorNew->spr.int_ang() + 712));
} }
else else
{ {
actorNew->spr.__int_angle = actor->int_ang(); actorNew->set_int_ang(actor->int_ang());
HelpMissileLateral(actorNew,2500); HelpMissileLateral(actorNew,2500);
actorNew->spr.__int_angle = NORM_ANGLE(actorNew->spr.__int_angle+512); actorNew->set_int_ang(NORM_ANGLE(actorNew->spr.int_ang() + 512));
HelpMissileLateral(actorNew,1500); HelpMissileLateral(actorNew,1500);
actorNew->spr.__int_angle = NORM_ANGLE(actorNew->spr.__int_angle-128); actorNew->set_int_ang(NORM_ANGLE(actorNew->spr.int_ang() - 128));
} }
actorNew->spr.__int_angle += (RANDOM_P2(128<<5)>>5) - (128 / 2); actorNew->spr.__int_angle += (RANDOM_P2(128<<5)>>5) - (128 / 2);
actorNew->spr.__int_angle = NORM_ANGLE(actorNew->int_ang()); actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang()));
// Set the shell number // Set the shell number
actorNew->user.ShellNum = ShellCount; actorNew->user.ShellNum = ShellCount;
@ -2218,13 +2218,13 @@ int SpawnShell(DSWActor* actor, int ShellNum)
break; break;
case SHOT_SHELL: case SHOT_SHELL:
actorNew->add_int_z(-Z(13)); actorNew->add_int_z(-Z(13));
actorNew->spr.__int_angle = actor->int_ang(); actorNew->set_int_ang(actor->int_ang());
HelpMissileLateral(actorNew,2500); HelpMissileLateral(actorNew,2500);
actorNew->spr.__int_angle = NORM_ANGLE(actorNew->spr.__int_angle+512); actorNew->set_int_ang(NORM_ANGLE(actorNew->spr.int_ang() + 512));
HelpMissileLateral(actorNew,1300); HelpMissileLateral(actorNew,1300);
actorNew->spr.__int_angle = NORM_ANGLE(actorNew->spr.__int_angle-128-64); actorNew->set_int_ang(NORM_ANGLE(actorNew->spr.int_ang() - 128 - 64));
actorNew->spr.__int_angle += (RANDOM_P2(128<<5)>>5) - (128 / 2); actorNew->spr.__int_angle += (RANDOM_P2(128<<5)>>5) - (128 / 2);
actorNew->spr.__int_angle = NORM_ANGLE(actorNew->int_ang()); actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang()));
// Set the shell number // Set the shell number
actorNew->user.ShellNum = ShellCount; actorNew->user.ShellNum = ShellCount;

View file

@ -1456,14 +1456,14 @@ void UpdatePlayerSpriteAngle(PLAYER* pp)
{ {
DSWActor* plActor = pp->actor; DSWActor* plActor = pp->actor;
plActor->backupang(); plActor->backupang();
plActor->spr.__int_angle = pp->angle.ang.asbuild(); plActor->set_int_ang(pp->angle.ang.asbuild();
plActor = pp->PlayerUnderActor; plActor = pp->PlayerUnderActor;
if (!Prediction && plActor) if (!Prediction && plActor)
{ {
plActor->backupang(); plActor->backupang();
plActor->spr.__int_angle = pp->angle.ang.asbuild(); plActor->set_int_ang(pp->angle.ang.asbuild();
} }
} }
@ -1495,7 +1495,7 @@ void DoPlayerTurnVehicle(PLAYER* pp, float avel, int z, int floor_dist)
if (MultiClipTurn(pp, NORM_ANGLE(sum.asbuild()), z, floor_dist)) if (MultiClipTurn(pp, NORM_ANGLE(sum.asbuild()), z, floor_dist))
{ {
pp->angle.ang = sum; pp->angle.ang = sum;
pp->actor->spr.__int_angle = pp->angle.ang.asbuild(); pp->actor->set_int_ang(pp->angle.ang.asbuild();
} }
} }
} }
@ -1523,7 +1523,7 @@ void DoPlayerTurnVehicleRect(PLAYER* pp, int *x, int *y, int *ox, int *oy)
if (RectClipTurn(pp, NORM_ANGLE(sum.asbuild()), x, y, ox, oy)) if (RectClipTurn(pp, NORM_ANGLE(sum.asbuild()), x, y, ox, oy))
{ {
pp->angle.ang = sum; pp->angle.ang = sum;
pp->actor->spr.__int_angle = pp->angle.ang.asbuild(); pp->actor->set_int_ang(pp->angle.ang.asbuild();
} }
} }
} }
@ -1563,7 +1563,7 @@ void DoPlayerTurnTurret(PLAYER* pp, float avel)
} }
pp->angle.ang = new_ang; pp->angle.ang = new_ang;
pp->actor->spr.__int_angle = pp->angle.ang.asbuild(); pp->actor->set_int_ang(pp->angle.ang.asbuild();
} }
OperateSectorObject(pp->sop, pp->angle.ang.asbuild(), pp->sop->pmid.X, pp->sop->pmid.Y); OperateSectorObject(pp->sop, pp->angle.ang.asbuild(), pp->sop->pmid.X, pp->sop->pmid.Y);
@ -1748,7 +1748,7 @@ void UpdatePlayerSprite(PLAYER* pp)
if (pp->Flags & (PF_DEAD)) if (pp->Flags & (PF_DEAD))
{ {
ChangeActorSect(pp->actor, pp->cursector); ChangeActorSect(pp->actor, pp->cursector);
actor->spr.__int_angle = pp->angle.ang.asbuild(); actor->set_int_ang(pp->angle.ang.asbuild();
UpdatePlayerUnderSprite(pp); UpdatePlayerUnderSprite(pp);
return; return;
} }
@ -1823,7 +1823,7 @@ void UpdatePlayerSprite(PLAYER* pp)
UpdatePlayerUnderSprite(pp); UpdatePlayerUnderSprite(pp);
actor->spr.__int_angle = pp->angle.ang.asbuild(); actor->set_int_ang(pp->angle.ang.asbuild();
} }
void DoPlayerZrange(PLAYER* pp) void DoPlayerZrange(PLAYER* pp)
@ -2278,7 +2278,7 @@ void DoTankTreads(PLAYER* pp)
if (!TEST_BOOL2(actor)) if (!TEST_BOOL2(actor))
{ {
SET_BOOL2(actor); SET_BOOL2(actor);
actor->spr.__int_angle = NORM_ANGLE(actor->int_ang() + 1024); actor->set_int_ang(NORM_ANGLE(actor->int_ang() + 1024);
} }
} }
else else
@ -2286,7 +2286,7 @@ void DoTankTreads(PLAYER* pp)
if (TEST_BOOL2(actor)) if (TEST_BOOL2(actor))
{ {
RESET_BOOL2(actor); RESET_BOOL2(actor);
actor->spr.__int_angle = NORM_ANGLE(actor->int_ang() + 1024); actor->set_int_ang(NORM_ANGLE(actor->int_ang() + 1024);
} }
} }
@ -2299,7 +2299,7 @@ void DoTankTreads(PLAYER* pp)
if (!TEST_BOOL2(actor)) if (!TEST_BOOL2(actor))
{ {
SET_BOOL2(actor); SET_BOOL2(actor);
actor->spr.__int_angle = NORM_ANGLE(actor->int_ang() + 1024); actor->set_int_ang(NORM_ANGLE(actor->int_ang() + 1024);
} }
} }
else else
@ -2307,7 +2307,7 @@ void DoTankTreads(PLAYER* pp)
if (TEST_BOOL2(actor)) if (TEST_BOOL2(actor))
{ {
RESET_BOOL2(actor); RESET_BOOL2(actor);
actor->spr.__int_angle = NORM_ANGLE(actor->int_ang() + 1024); actor->set_int_ang(NORM_ANGLE(actor->int_ang() + 1024);
} }
} }
@ -2320,7 +2320,7 @@ void DoTankTreads(PLAYER* pp)
if (!TEST_BOOL2(actor)) if (!TEST_BOOL2(actor))
{ {
SET_BOOL2(actor); SET_BOOL2(actor);
actor->spr.__int_angle = NORM_ANGLE(actor->int_ang() + 1024); actor->set_int_ang(NORM_ANGLE(actor->int_ang() + 1024);
} }
} }
else else
@ -2328,7 +2328,7 @@ void DoTankTreads(PLAYER* pp)
if (TEST_BOOL2(actor)) if (TEST_BOOL2(actor))
{ {
RESET_BOOL2(actor); RESET_BOOL2(actor);
actor->spr.__int_angle = NORM_ANGLE(actor->int_ang() + 1024); actor->set_int_ang(NORM_ANGLE(actor->int_ang() + 1024);
} }
} }
@ -5754,7 +5754,7 @@ void DoPlayerDeathCheckKeys(PLAYER* pp)
plActor->spr.xrepeat = plActor->spr.yrepeat = PLAYER_NINJA_XREPEAT; plActor->spr.xrepeat = plActor->spr.yrepeat = PLAYER_NINJA_XREPEAT;
plActor->spr.cstat &= ~(CSTAT_SPRITE_YCENTER); plActor->spr.cstat &= ~(CSTAT_SPRITE_YCENTER);
plActor->set_int_pos({ pp->pos.X, pp->pos.Y, pp->pos.Z + PLAYER_HEIGHT }); plActor->set_int_pos({ pp->pos.X, pp->pos.Y, pp->pos.Z + PLAYER_HEIGHT });
plActor->spr.__int_angle = pp->angle.ang.asbuild(); plActor->set_int_ang(pp->angle.ang.asbuild();
DoSpawnTeleporterEffect(plActor); DoSpawnTeleporterEffect(plActor);
PlaySound(DIGI_TELEPORT, pp, v3df_none); PlaySound(DIGI_TELEPORT, pp, v3df_none);

View file

@ -946,7 +946,7 @@ int InitRipperHang(DSWActor* actor)
} }
Found = true; Found = true;
actor->spr.__int_angle = tang; actor->set_int_ang(tang;
break; break;
} }
@ -1002,7 +1002,7 @@ int DoRipperMoveHang(DSWActor* actor)
actor->user.WaitTics = 2 + ((RANDOM_P2(4 << 8) >> 8) * 120); actor->user.WaitTics = 2 + ((RANDOM_P2(4 << 8) >> 8) * 120);
// hang flush with the wall // hang flush with the wall
actor->spr.__int_angle = NORM_ANGLE(getangle(actor->user.coll.hitWall->delta()) - 512); actor->set_int_ang(NORM_ANGLE(getangle(actor->user.coll.hitWall->delta()) - 512);
return 0; return 0;
} }
@ -1051,9 +1051,9 @@ int DoRipperBeginJumpAttack(DSWActor* actor)
0L, actor->user.ceiling_dist, actor->user.floor_dist, CLIPMASK_ACTOR, ACTORMOVETICS); 0L, actor->user.ceiling_dist, actor->user.floor_dist, CLIPMASK_ACTOR, ACTORMOVETICS);
if (coll.type != kHitNone) if (coll.type != kHitNone)
actor->spr.__int_angle = NORM_ANGLE((actor->int_ang() + 1024) + (RANDOM_NEG(256, 6) >> 6)); actor->set_int_ang(NORM_ANGLE((actor->int_ang() + 1024) + (RANDOM_NEG(256, 6) >> 6));
else else
actor->spr.__int_angle = NORM_ANGLE(tang + (RANDOM_NEG(256, 6) >> 6)); actor->set_int_ang(NORM_ANGLE(tang + (RANDOM_NEG(256, 6) >> 6));
DoActorSetSpeed(actor, FAST_SPEED); DoActorSetSpeed(actor, FAST_SPEED);
@ -1149,7 +1149,7 @@ int DoRipperRipHeart(DSWActor* actor)
actor->user.WaitTics = 6 * 120; actor->user.WaitTics = 6 * 120;
// player face ripper // player face ripper
target->spr.__int_angle = getangle(actor->int_pos().X - target->int_pos().X, actor->int_pos().Y - target->int_pos().Y); target->set_int_ang(getangle(actor->int_pos().X - target->int_pos().X, actor->int_pos().Y - target->int_pos().Y);
return 0; return 0;
} }
@ -1176,7 +1176,7 @@ void RipperHatch(DSWActor* actor)
ClearOwner(actorNew); ClearOwner(actorNew);
actorNew->spr.pos = actor->spr.pos; actorNew->spr.pos = actor->spr.pos;
actorNew->spr.xrepeat = actorNew->spr.yrepeat = 64; actorNew->spr.xrepeat = actorNew->spr.yrepeat = 64;
actorNew->spr.__int_angle = rip_ang[i]; actorNew->set_int_ang(rip_ang[i];
actorNew->spr.pal = 0; actorNew->spr.pal = 0;
SetupRipper(actorNew); SetupRipper(actorNew);

View file

@ -955,7 +955,7 @@ int InitRipper2Hang(DSWActor* actor)
} }
Found = true; Found = true;
actor->spr.__int_angle = tang; actor->set_int_ang(tang;
break; break;
} }
@ -1022,7 +1022,7 @@ int DoRipper2MoveHang(DSWActor* actor)
actor->user.WaitTics = 0; // Double jump actor->user.WaitTics = 0; // Double jump
// hang flush with the wall // hang flush with the wall
actor->spr.__int_angle = NORM_ANGLE(getangle(actor->user.coll.hitWall->delta()) - 512); actor->set_int_ang(NORM_ANGLE(getangle(actor->user.coll.hitWall->delta()) - 512);
return 0; return 0;
} }
@ -1072,9 +1072,9 @@ int DoRipper2BeginJumpAttack(DSWActor* actor)
Collision coll = move_sprite(actor, bcos(tang, -7), bsin(tang, -7), Collision coll = move_sprite(actor, bcos(tang, -7), bsin(tang, -7),
0, actor->user.ceiling_dist, actor->user.floor_dist, CLIPMASK_ACTOR, ACTORMOVETICS); 0, actor->user.ceiling_dist, actor->user.floor_dist, CLIPMASK_ACTOR, ACTORMOVETICS);
if (coll.type != kHitNone) if (coll.type != kHitNone)
actor->spr.__int_angle = NORM_ANGLE((actor->int_ang() + 1024) + (RANDOM_NEG(256, 6) >> 6)); actor->set_int_ang(NORM_ANGLE((actor->int_ang() + 1024) + (RANDOM_NEG(256, 6) >> 6));
else else
actor->spr.__int_angle = NORM_ANGLE(tang); actor->set_int_ang(NORM_ANGLE(tang);
DoActorSetSpeed(actor, FAST_SPEED); DoActorSetSpeed(actor, FAST_SPEED);
@ -1171,7 +1171,7 @@ int DoRipper2RipHeart(DSWActor* actor)
actor->user.WaitTics = 6 * 120; actor->user.WaitTics = 6 * 120;
// player face ripper2 // player face ripper2
target->spr.__int_angle = getangle(actor->int_pos().X - target->int_pos().X, actor->int_pos().Y - target->int_pos().Y); target->set_int_ang(getangle(actor->int_pos().X - target->int_pos().X, actor->int_pos().Y - target->int_pos().Y);
return 0; return 0;
} }
@ -1202,7 +1202,7 @@ void Ripper2Hatch(DSWActor* actor)
actorNew->spr.pos = actor->spr.pos; actorNew->spr.pos = actor->spr.pos;
actorNew->spr.xrepeat = actorNew->spr.yrepeat = 64; actorNew->spr.xrepeat = actorNew->spr.yrepeat = 64;
actorNew->spr.__int_angle = rip_ang[i]; actorNew->set_int_ang(rip_ang[i];
actorNew->spr.pal = 0; actorNew->spr.pal = 0;
actorNew->spr.shade = -10; actorNew->spr.shade = -10;
SetupRipper2(actorNew); SetupRipper2(actorNew);

View file

@ -836,7 +836,7 @@ void SectorExp(DSWActor* actor, sectortype* sectp, short orig_ang, int zh)
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); SectorMidPoint(sectp, &x, &y, &z);
// randomize the explosions // randomize the explosions
actor->spr.__int_angle = orig_ang + RANDOM_P2(256) - 128; actor->set_int_ang(orig_ang + RANDOM_P2(256) - 128;
actor->set_int_pos({ x + RANDOM_P2(256) - 128, y + RANDOM_P2(1024) - 512, zh }); actor->set_int_pos({ x + RANDOM_P2(256) - 128, y + RANDOM_P2(1024) - 512, zh });
// setup vars needed by SectorExp // setup vars needed by SectorExp

View file

@ -284,7 +284,7 @@ int DoSkullBeginDeath(DSWActor* actor)
if (num_ord > 3) num_ord = 3; if (num_ord > 3) num_ord = 3;
for (i=0; i<num_ord; i++) for (i=0; i<num_ord; i++)
{ {
actor->spr.__int_angle = NORM_ANGLE(actor->spr.__int_angle+(i*1024)); actor->set_int_ang(NORM_ANGLE(actor->spr.__int_angle+(i*1024));
InitSpriteChemBomb(actor); InitSpriteChemBomb(actor);
} }
break; break;
@ -296,7 +296,7 @@ int DoSkullBeginDeath(DSWActor* actor)
if (num_ord > 10) num_ord = 10; if (num_ord > 10) num_ord = 10;
for (i=0; i<num_ord; i++) for (i=0; i<num_ord; i++)
{ {
actor->spr.__int_angle = NORM_ANGLE(RandomRange(2048)); actor->set_int_ang(NORM_ANGLE(RandomRange(2048));
InitCaltrops(actor); InitCaltrops(actor);
} }
break; break;
@ -313,7 +313,7 @@ int DoSkullBeginDeath(DSWActor* actor)
if (num_ord > 10) num_ord = 10; if (num_ord > 10) num_ord = 10;
for (i=0; i<num_ord; i++) for (i=0; i<num_ord; i++)
{ {
actor->spr.__int_angle = NORM_ANGLE(actor->spr.__int_angle+(i*(2048/num_ord))); actor->set_int_ang(NORM_ANGLE(actor->spr.__int_angle+(i*(2048/num_ord)));
InitSpriteGrenade(actor); InitSpriteGrenade(actor);
} }
break; break;
@ -321,7 +321,7 @@ int DoSkullBeginDeath(DSWActor* actor)
SpawnMineExp(actor); SpawnMineExp(actor);
for (i=0; i<3; i++) for (i=0; i<3; i++)
{ {
actor->spr.__int_angle = NORM_ANGLE(RandomRange(2048)); actor->set_int_ang(NORM_ANGLE(RandomRange(2048));
InitPhosphorus(actor); InitPhosphorus(actor);
} }
break; break;
@ -347,7 +347,7 @@ int DoSkullJump(DSWActor* actor)
if (actor->spr.xvel) if (actor->spr.xvel)
DoSkullMove(actor); DoSkullMove(actor);
else else
actor->spr.__int_angle = NORM_ANGLE(actor->int_ang() + (64 * ACTORMOVETICS)); actor->set_int_ang(NORM_ANGLE(actor->int_ang() + (64 * ACTORMOVETICS));
if (actor->user.Flags & (SPR_JUMPING)) if (actor->user.Flags & (SPR_JUMPING))
{ {
@ -453,13 +453,13 @@ int DoSkullWait(DSWActor* actor)
else else
// above the floor type // above the floor type
{ {
actor->spr.__int_angle = NORM_ANGLE(actor->int_ang() + (48 * ACTORMOVETICS)); actor->set_int_ang(NORM_ANGLE(actor->int_ang() + (48 * ACTORMOVETICS));
DoSkullBob(actor); DoSkullBob(actor);
if (dist < 8000) if (dist < 8000)
{ {
actor->spr.__int_angle = getangle(actor->user.targetActor->int_pos().X - actor->int_pos().X, actor->user.targetActor->int_pos().Y - actor->int_pos().Y); actor->set_int_ang(getangle(actor->user.targetActor->int_pos().X - actor->int_pos().X, actor->user.targetActor->int_pos().Y - actor->int_pos().Y);
actor->spr.xvel = 128 + (RANDOM_P2(256<<8)>>8); actor->spr.xvel = 128 + (RANDOM_P2(256<<8)>>8);
actor->user.jump_speed = -700; actor->user.jump_speed = -700;
NewStateGroup(actor, sg_SkullJump); NewStateGroup(actor, sg_SkullJump);
@ -664,7 +664,7 @@ int DoBettyBeginDeath(DSWActor* actor)
if (num_ord > 3) num_ord = 3; if (num_ord > 3) num_ord = 3;
for (i=0; i<num_ord; i++) for (i=0; i<num_ord; i++)
{ {
actor->spr.__int_angle = NORM_ANGLE(actor->spr.__int_angle+(i*1024)); actor->set_int_ang(NORM_ANGLE(actor->spr.__int_angle+(i*1024));
InitSpriteChemBomb(actor); InitSpriteChemBomb(actor);
} }
break; break;
@ -676,7 +676,7 @@ int DoBettyBeginDeath(DSWActor* actor)
if (num_ord > 10) num_ord = 10; if (num_ord > 10) num_ord = 10;
for (i=0; i<num_ord; i++) for (i=0; i<num_ord; i++)
{ {
actor->spr.__int_angle = NORM_ANGLE(RandomRange(2048)); actor->set_int_ang(NORM_ANGLE(RandomRange(2048));
InitCaltrops(actor); InitCaltrops(actor);
} }
break; break;
@ -692,14 +692,14 @@ int DoBettyBeginDeath(DSWActor* actor)
if (num_ord > 10) num_ord = 10; if (num_ord > 10) num_ord = 10;
for (i=0; i<num_ord; i++) for (i=0; i<num_ord; i++)
{ {
actor->spr.__int_angle = NORM_ANGLE(actor->int_ang() + (i*(2048/num_ord))); actor->set_int_ang(NORM_ANGLE(actor->int_ang() + (i*(2048/num_ord)));
InitSpriteGrenade(actor); InitSpriteGrenade(actor);
} }
break; break;
default: default:
for (i=0; i<5; i++) for (i=0; i<5; i++)
{ {
actor->spr.__int_angle = NORM_ANGLE(RandomRange(2048)); actor->set_int_ang(NORM_ANGLE(RandomRange(2048));
InitPhosphorus(actor); InitPhosphorus(actor);
SpawnMineExp(actor); SpawnMineExp(actor);
} }
@ -726,7 +726,7 @@ int DoBettyJump(DSWActor* actor)
if (actor->spr.xvel) if (actor->spr.xvel)
DoBettyMove(actor); DoBettyMove(actor);
else else
actor->spr.__int_angle = NORM_ANGLE(actor->int_ang() + (64 * ACTORMOVETICS)); actor->set_int_ang(NORM_ANGLE(actor->int_ang() + (64 * ACTORMOVETICS));
if (actor->user.Flags & (SPR_JUMPING)) if (actor->user.Flags & (SPR_JUMPING))
{ {
@ -825,13 +825,13 @@ int DoBettyWait(DSWActor* actor)
else else
// above the floor type // above the floor type
{ {
actor->spr.__int_angle = NORM_ANGLE(actor->int_ang() + (48 * ACTORMOVETICS)); actor->set_int_ang(NORM_ANGLE(actor->int_ang() + (48 * ACTORMOVETICS));
DoBettyBob(actor); DoBettyBob(actor);
if (dist < 8000) if (dist < 8000)
{ {
actor->spr.__int_angle = getangle(actor->user.targetActor->int_pos().X - actor->int_pos().X, actor->user.targetActor->int_pos().Y - actor->int_pos().Y); actor->set_int_ang(getangle(actor->user.targetActor->int_pos().X - actor->int_pos().X, actor->user.targetActor->int_pos().Y - actor->int_pos().Y);
actor->spr.xvel = 128 + (RANDOM_P2(256<<8)>>8); actor->spr.xvel = 128 + (RANDOM_P2(256<<8)>>8);
actor->user.jump_speed = -700; actor->user.jump_speed = -700;
NewStateGroup(actor, sg_BettyJump); NewStateGroup(actor, sg_BettyJump);

View file

@ -893,7 +893,7 @@ DSWActor* SpawnActor(int stat, int id, STATE* state, sectortype* sect, int x, in
spawnedActor->spr.xrepeat = 64; spawnedActor->spr.xrepeat = 64;
spawnedActor->spr.yrepeat = 64; spawnedActor->spr.yrepeat = 64;
spawnedActor->spr.__int_angle = NORM_ANGLE(init_ang); spawnedActor->set_int_ang(NORM_ANGLE(init_ang);
spawnedActor->spr.xvel = vel; spawnedActor->spr.xvel = vel;
return spawnedActor; return spawnedActor;
@ -1874,7 +1874,7 @@ void SpriteSetup(void)
actor->spr.xvel = 0; actor->spr.xvel = 0;
else else
actor->spr.xvel = actor->spr.lotag; actor->spr.xvel = actor->spr.lotag;
actor->spr.__int_angle = SP_TAG6(actor); actor->set_int_ang(SP_TAG6(actor);
// attach to the sector that contains the wall // attach to the sector that contains the wall
ChangeActorSect(actor, hit.hitSector); ChangeActorSect(actor, hit.hitSector);
StartInterpolation(hit.hitWall, Interp_Wall_PanX); StartInterpolation(hit.hitWall, Interp_Wall_PanX);
@ -2491,7 +2491,7 @@ void SpriteSetup(void)
actorNew->spr.cstat = 0; actorNew->spr.cstat = 0;
actorNew->spr.extra = 0; actorNew->spr.extra = 0;
actorNew->spr.pos = actor->spr.pos; actorNew->spr.pos = actor->spr.pos;
actorNew->spr.__int_angle = NORM_ANGLE(actor->int_ang() + 1024); actorNew->set_int_ang(NORM_ANGLE(actor->int_ang() + 1024);
actorNew->spr.picnum = actor->spr.picnum; actorNew->spr.picnum = actor->spr.picnum;
actorNew->add_int_pos({ MOVEx(256 + 128, actor->int_ang()), MOVEy(256 + 128, actor->int_ang()), 0 }); actorNew->add_int_pos({ MOVEx(256 + 128, actor->int_ang()), MOVEy(256 + 128, actor->int_ang()), 0 });
@ -3519,7 +3519,7 @@ int ActorCoughItem(DSWActor* actor)
actorNew->spr.cstat = 0; actorNew->spr.cstat = 0;
actorNew->spr.extra = 0; actorNew->spr.extra = 0;
actorNew->set_int_pos({ actor->int_pos().X, actor->int_pos().Y, ActorZOfMiddle(actor) }); actorNew->set_int_pos({ actor->int_pos().X, actor->int_pos().Y, ActorZOfMiddle(actor) });
actorNew->spr.__int_angle = 0; actorNew->set_int_ang(0;
actorNew->spr.extra = 0; actorNew->spr.extra = 0;
// vel // vel
@ -3558,7 +3558,7 @@ int ActorCoughItem(DSWActor* actor)
actorNew->spr.cstat = 0; actorNew->spr.cstat = 0;
actorNew->spr.extra = 0; actorNew->spr.extra = 0;
actorNew->set_int_pos({ actor->int_pos().X, actor->int_pos().Y, ActorZOfMiddle(actor) }); actorNew->set_int_pos({ actor->int_pos().X, actor->int_pos().Y, ActorZOfMiddle(actor) });
actorNew->spr.__int_angle = 0; actorNew->set_int_ang(0;
actorNew->spr.extra = 0; actorNew->spr.extra = 0;
// vel // vel
@ -3584,7 +3584,7 @@ int ActorCoughItem(DSWActor* actor)
actorNew->spr.cstat = 0; actorNew->spr.cstat = 0;
actorNew->spr.extra = 0; actorNew->spr.extra = 0;
actorNew->set_int_pos({ actor->int_pos().X, actor->int_pos().Y, ActorZOfMiddle(actor) }); actorNew->set_int_pos({ actor->int_pos().X, actor->int_pos().Y, ActorZOfMiddle(actor) });
actorNew->spr.__int_angle = 0; actorNew->set_int_ang(0;
actorNew->spr.extra = 0; actorNew->spr.extra = 0;
// vel // vel
@ -3613,7 +3613,7 @@ int ActorCoughItem(DSWActor* actor)
actorNew->spr.cstat = 0; actorNew->spr.cstat = 0;
actorNew->spr.extra = 0; actorNew->spr.extra = 0;
actorNew->set_int_pos({ actor->int_pos().X, actor->int_pos().Y, ActorZOfMiddle(actor) }); actorNew->set_int_pos({ actor->int_pos().X, actor->int_pos().Y, ActorZOfMiddle(actor) });
actorNew->spr.__int_angle = 0; actorNew->set_int_ang(0;
actorNew->spr.extra = 0; actorNew->spr.extra = 0;
// vel // vel
@ -3673,7 +3673,7 @@ int ActorCoughItem(DSWActor* actor)
actorNew->spr.cstat = 0; actorNew->spr.cstat = 0;
actorNew->spr.extra = 0; actorNew->spr.extra = 0;
actorNew->set_int_pos({ actor->int_pos().X, actor->int_pos().Y, ActorZOfMiddle(actor) }); actorNew->set_int_pos({ actor->int_pos().X, actor->int_pos().Y, ActorZOfMiddle(actor) });
actorNew->spr.__int_angle = 0; actorNew->set_int_ang(0;
actorNew->spr.extra = 0; actorNew->spr.extra = 0;
// vel // vel
@ -3729,7 +3729,7 @@ int ActorCoughItem(DSWActor* actor)
actorNew->spr.cstat = 0; actorNew->spr.cstat = 0;
actorNew->spr.extra = 0; actorNew->spr.extra = 0;
actorNew->set_int_pos({ actor->int_pos().X, actor->int_pos().Y, ActorLowerZ(actor) + Z(10) }); actorNew->set_int_pos({ actor->int_pos().X, actor->int_pos().Y, ActorLowerZ(actor) + Z(10) });
actorNew->spr.__int_angle = actor->int_ang(); actorNew->set_int_ang(actor->int_ang();
// vel // vel
SP_TAG7(actorNew) = 10; SP_TAG7(actorNew) = 10;
@ -3792,16 +3792,16 @@ int SpawnItemsMatch(short match)
case 90: case 90:
spawnedActor = BunnyHatch2(itActor); spawnedActor = BunnyHatch2(itActor);
spawnedActor->user.spal = spawnedActor->spr.pal = PALETTE_PLAYER8; // Boy spawnedActor->user.spal = spawnedActor->spr.pal = PALETTE_PLAYER8; // Boy
spawnedActor->spr.__int_angle = itActor->int_ang(); spawnedActor->set_int_ang(itActor->int_ang();
break; break;
case 91: case 91:
spawnedActor = BunnyHatch2(itActor); spawnedActor = BunnyHatch2(itActor);
spawnedActor->user.spal = spawnedActor->spr.pal = PALETTE_PLAYER0; // Girl spawnedActor->user.spal = spawnedActor->spr.pal = PALETTE_PLAYER0; // Girl
spawnedActor->spr.__int_angle = itActor->int_ang(); spawnedActor->set_int_ang(itActor->int_ang();
break; break;
case 92: case 92:
spawnedActor = BunnyHatch2(itActor); spawnedActor = BunnyHatch2(itActor);
spawnedActor->spr.__int_angle = itActor->int_ang(); spawnedActor->set_int_ang(itActor->int_ang();
break; break;
case 40: case 40:
@ -4736,7 +4736,7 @@ int DoGrating(DSWActor* actor)
int DoKey(DSWActor* actor) int DoKey(DSWActor* actor)
{ {
actor->spr.__int_angle = NORM_ANGLE(actor->int_ang() + (14 * ACTORMOVETICS)); actor->set_int_ang(NORM_ANGLE(actor->int_ang() + (14 * ACTORMOVETICS));
DoGet(actor); DoGet(actor);
return 0; return 0;

View file

@ -304,7 +304,7 @@ DSWActor* TrackClonePoint(DSWActor* actor)
actorNew->spr.cstat = 0; actorNew->spr.cstat = 0;
actorNew->spr.extra = 0; actorNew->spr.extra = 0;
actorNew->spr.pos = actor->spr.pos; actorNew->spr.pos = actor->spr.pos;
actorNew->spr.__int_angle = actor->int_ang(); actorNew->set_int_ang(actor->int_ang();
actorNew->spr.lotag = actor->spr.lotag; actorNew->spr.lotag = actor->spr.lotag;
actorNew->spr.hitag = actor->spr.hitag; actorNew->spr.hitag = actor->spr.hitag;
@ -1493,7 +1493,7 @@ void PlaceActorsOnTracks(void)
} }
// check angle in the "forward" direction // check angle in the "forward" direction
actor->spr.__int_angle = getangle((tpoint + actor->user.point)->x - actor->int_pos().X, (tpoint + actor->user.point)->y - actor->int_pos().Y); actor->set_int_ang(getangle((tpoint + actor->user.point)->x - actor->int_pos().X, (tpoint + actor->user.point)->y - actor->int_pos().Y);
} }
} }
@ -1717,7 +1717,7 @@ PlayerPart:
} }
int16_t oldang = actor->int_ang(); int16_t oldang = actor->int_ang();
actor->spr.__int_angle = actor->user.sang; actor->set_int_ang(actor->user.sang;
if (actor->user.Flags & (SPR_ON_SO_SECTOR)) if (actor->user.Flags & (SPR_ON_SO_SECTOR))
{ {
@ -1733,12 +1733,12 @@ PlayerPart:
if ((actor->sector()->firstWall()->extra & WALLFX_LOOP_REVERSE_SPIN)) if ((actor->sector()->firstWall()->extra & WALLFX_LOOP_REVERSE_SPIN))
{ {
rotatepoint(sop->pmid.vec2, actor->int_pos().vec2, -delta_ang, &pos.vec2); rotatepoint(sop->pmid.vec2, actor->int_pos().vec2, -delta_ang, &pos.vec2);
actor->spr.__int_angle = NORM_ANGLE(actor->int_ang() - delta_ang); actor->set_int_ang(NORM_ANGLE(actor->int_ang() - delta_ang);
} }
else else
{ {
rotatepoint(sop->pmid.vec2, actor->int_pos().vec2, delta_ang, &pos.vec2); rotatepoint(sop->pmid.vec2, actor->int_pos().vec2, delta_ang, &pos.vec2);
actor->spr.__int_angle = NORM_ANGLE(actor->int_ang() + delta_ang); actor->set_int_ang(NORM_ANGLE(actor->int_ang() + delta_ang);
} }
actor->set_int_pos(pos); actor->set_int_pos(pos);
@ -1750,7 +1750,7 @@ PlayerPart:
// NOT part of a sector - independant of any sector // NOT part of a sector - independant of any sector
auto pos = actor->int_pos(); auto pos = actor->int_pos();
rotatepoint(sop->pmid.vec2, actor->int_pos().vec2, delta_ang, &pos.vec2); rotatepoint(sop->pmid.vec2, actor->int_pos().vec2, delta_ang, &pos.vec2);
actor->spr.__int_angle = NORM_ANGLE(actor->int_ang() + delta_ang); actor->set_int_ang(NORM_ANGLE(actor->int_ang() + delta_ang);
actor->set_int_pos(pos); actor->set_int_pos(pos);
} }
@ -2832,7 +2832,7 @@ void DoActorHitTrackEndPoint(DSWActor* actor)
if (actor->user.track >= 0) if (actor->user.track >= 0)
{ {
actor->spr.__int_angle = NORM_ANGLE(getangle((Track[actor->user.track].TrackPoint + actor->user.point)->x - actor->int_pos().X, (Track[actor->user.track].TrackPoint + actor->user.point)->y - actor->int_pos().Y)); actor->set_int_ang(NORM_ANGLE(getangle((Track[actor->user.track].TrackPoint + actor->user.point)->x - actor->int_pos().X, (Track[actor->user.track].TrackPoint + actor->user.point)->y - actor->int_pos().Y));
} }
else else
{ {
@ -2848,7 +2848,7 @@ void DoActorHitTrackEndPoint(DSWActor* actor)
if (actor->user.track >= 0) if (actor->user.track >= 0)
{ {
actor->spr.__int_angle = NORM_ANGLE(getangle((Track[actor->user.track].TrackPoint + actor->user.point)->x - actor->int_pos().X, (Track[actor->user.track].TrackPoint + actor->user.point)->y - actor->int_pos().Y)); actor->set_int_ang(NORM_ANGLE(getangle((Track[actor->user.track].TrackPoint + actor->user.point)->x - actor->int_pos().X, (Track[actor->user.track].TrackPoint + actor->user.point)->y - actor->int_pos().Y));
} }
else else
{ {
@ -2971,7 +2971,7 @@ bool ActorTrackDecide(TRACK_POINT* tpoint, DSWActor* actor)
case TRACK_ACTOR_JUMP: case TRACK_ACTOR_JUMP:
if (actor->user.ActorActionSet->Jump) if (actor->user.ActorActionSet->Jump)
{ {
actor->spr.__int_angle = tpoint->ang; actor->set_int_ang(tpoint->ang;
if (!tpoint->tag_high) if (!tpoint->tag_high)
actor->user.jump_speed = ACTOR_STD_JUMP; actor->user.jump_speed = ACTOR_STD_JUMP;
@ -2991,7 +2991,7 @@ bool ActorTrackDecide(TRACK_POINT* tpoint, DSWActor* actor)
int zdiff; int zdiff;
HitInfo hit{}; HitInfo hit{};
actor->spr.__int_angle = tpoint->ang; actor->set_int_ang(tpoint->ang;
ActorLeaveTrack(actor); ActorLeaveTrack(actor);
@ -3040,7 +3040,7 @@ bool ActorTrackDecide(TRACK_POINT* tpoint, DSWActor* actor)
if (actor->user.ActorActionSet->Jump) if (actor->user.ActorActionSet->Jump)
{ {
actor->spr.__int_angle = tpoint->ang; actor->set_int_ang(tpoint->ang;
ActorLeaveTrack(actor); ActorLeaveTrack(actor);
@ -3074,7 +3074,7 @@ bool ActorTrackDecide(TRACK_POINT* tpoint, DSWActor* actor)
if (actor->user.Rot != actor->user.ActorActionSet->Duck) if (actor->user.Rot != actor->user.ActorActionSet->Duck)
{ {
actor->spr.__int_angle = tpoint->ang; actor->set_int_ang(tpoint->ang;
ActorLeaveTrack(actor); ActorLeaveTrack(actor);
@ -3100,7 +3100,7 @@ bool ActorTrackDecide(TRACK_POINT* tpoint, DSWActor* actor)
if (actor->user.Rot == actor->user.ActorActionSet->Sit || actor->user.Rot == actor->user.ActorActionSet->Stand) if (actor->user.Rot == actor->user.ActorActionSet->Sit || actor->user.Rot == actor->user.ActorActionSet->Stand)
return false; return false;
actor->spr.__int_angle = tpoint->ang; actor->set_int_ang(tpoint->ang;
z[0] = actor->int_pos().Z - ActorSizeZ(actor) + Z(5); z[0] = actor->int_pos().Z - ActorSizeZ(actor) + Z(5);
z[1] = actor->int_pos().Z - (ActorSizeZ(actor) >> 1); z[1] = actor->int_pos().Z - (ActorSizeZ(actor) >> 1);
@ -3317,7 +3317,7 @@ bool ActorTrackDecide(TRACK_POINT* tpoint, DSWActor* actor)
actor->set_int_xy(lActor->int_pos().X + nx, lActor->int_pos().Y + ny); actor->set_int_xy(lActor->int_pos().X + nx, lActor->int_pos().Y + ny);
actor->spr.__int_angle = NORM_ANGLE(lActor->int_ang() + 1024); actor->set_int_ang(NORM_ANGLE(lActor->int_ang() + 1024);
// //
// Get the z height to climb // Get the z height to climb
@ -3442,7 +3442,7 @@ int ActorFollowTrack(DSWActor* actor, short locktics)
if (!(actor->user.Flags & (SPR_CLIMBING | SPR_DONT_UPDATE_ANG))) if (!(actor->user.Flags & (SPR_CLIMBING | SPR_DONT_UPDATE_ANG)))
{ {
actor->spr.__int_angle = getangle(tpoint->x - actor->int_pos().X, tpoint->y - actor->int_pos().Y); actor->set_int_ang(getangle(tpoint->x - actor->int_pos().X, tpoint->y - actor->int_pos().Y);
} }
if ((dist = Distance(actor->int_pos().X, actor->int_pos().Y, tpoint->x, tpoint->y)) < 200) // 64 if ((dist = Distance(actor->int_pos().X, actor->int_pos().Y, tpoint->x, tpoint->y)) < 200) // 64
@ -3457,7 +3457,7 @@ int ActorFollowTrack(DSWActor* actor, short locktics)
if (!(actor->user.Flags & (SPR_CLIMBING | SPR_DONT_UPDATE_ANG))) if (!(actor->user.Flags & (SPR_CLIMBING | SPR_DONT_UPDATE_ANG)))
{ {
// calculate a new angle to the target // calculate a new angle to the target
actor->spr.__int_angle = getangle(tpoint->x - actor->int_pos().X, tpoint->y - actor->int_pos().Y); actor->set_int_ang(getangle(tpoint->x - actor->int_pos().X, tpoint->y - actor->int_pos().Y);
} }
if (actor->user.Flags & (SPR_ZDIFF_MODE)) if (actor->user.Flags & (SPR_ZDIFF_MODE))
@ -3511,7 +3511,7 @@ int ActorFollowTrack(DSWActor* actor, short locktics)
actor->spr.zvel = 0; actor->spr.zvel = 0;
actor->spr.__int_angle = getangle(tpoint->x - actor->int_pos().X, tpoint->y - actor->int_pos().Y); actor->set_int_ang(getangle(tpoint->x - actor->int_pos().X, tpoint->y - actor->int_pos().Y);
ActorLeaveTrack(actor); ActorLeaveTrack(actor);
actor->spr.cstat &= ~(CSTAT_SPRITE_YCENTER); actor->spr.cstat &= ~(CSTAT_SPRITE_YCENTER);

View file

@ -3664,13 +3664,13 @@ AutoShrap:
if (p->random_disperse) if (p->random_disperse)
{ {
actor->spr.__int_angle = shrap_ang + (RANDOM_P2(p->ang_range<<5)>>5) - (p->ang_range >> 1); actor->set_int_ang(shrap_ang + (RANDOM_P2(p->ang_range<<5)>>5) - (p->ang_range >> 1);
actor->spr.__int_angle = NORM_ANGLE(actor->int_ang()); actor->set_int_ang(NORM_ANGLE(actor->int_ang());
} }
else else
{ {
actor->spr.__int_angle = start_ang + (i * dang); actor->set_int_ang(start_ang + (i * dang);
actor->spr.__int_angle = NORM_ANGLE(actor->int_ang()); actor->set_int_ang(NORM_ANGLE(actor->int_ang());
} }
// for FastShrap // for FastShrap
@ -4099,13 +4099,13 @@ int SpawnBlood(DSWActor* actor, DSWActor* weapActor, short hit_ang, int hit_x, i
if (p->random_disperse) if (p->random_disperse)
{ {
actorNew->spr.__int_angle = hit_ang + (RANDOM_P2(p->ang_range<<5)>>5) - (p->ang_range >> 1); actorNew->set_int_ang(hit_ang + (RANDOM_P2(p->ang_range<<5)>>5) - (p->ang_range >> 1);
actorNew->spr.__int_angle = NORM_ANGLE(actorNew->int_ang()); actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang());
} }
else else
{ {
actorNew->spr.__int_angle = start_ang + (i * dang); actorNew->set_int_ang(start_ang + (i * dang);
actorNew->spr.__int_angle = NORM_ANGLE(actorNew->int_ang()); actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang());
} }
actorNew->user.Flags |= (SPR_BOUNCE); actorNew->user.Flags |= (SPR_BOUNCE);
@ -5046,7 +5046,7 @@ int ActorHealth(DSWActor* actor, short amt)
PlaySound(DIGI_NINJACHOKE, actor, v3df_follow); PlaySound(DIGI_NINJACHOKE, actor, v3df_follow);
InitPlasmaFountain(nullptr, actor); InitPlasmaFountain(nullptr, actor);
InitBloodSpray(actor,false,105); InitBloodSpray(actor,false,105);
actor->spr.__int_angle = NORM_ANGLE(getangle(actor->user.targetActor->int_pos().X - actor->int_pos().X, actor->user.targetActor->int_pos().Y - actor->int_pos().Y) + 1024); actor->set_int_ang(NORM_ANGLE(getangle(actor->user.targetActor->int_pos().X - actor->int_pos().X, actor->user.targetActor->int_pos().Y - actor->int_pos().Y) + 1024);
actor->spr.cstat &= ~(CSTAT_SPRITE_YFLIP); actor->spr.cstat &= ~(CSTAT_SPRITE_YFLIP);
if (sw_ninjahack) if (sw_ninjahack)
NewStateGroup(actor, sg_NinjaHariKari); NewStateGroup(actor, sg_NinjaHariKari);
@ -7836,7 +7836,7 @@ int VectorMissileSeek(DSWActor* actor, int16_t delay_tics, int16_t turn_speed, i
actor->user.change.Y = (actor->user.change.Y + oy*(turn_speed-1))/turn_speed; actor->user.change.Y = (actor->user.change.Y + oy*(turn_speed-1))/turn_speed;
actor->user.change.Z = (actor->user.change.Z + oz*(turn_speed-1))/turn_speed; actor->user.change.Z = (actor->user.change.Z + oz*(turn_speed-1))/turn_speed;
actor->spr.__int_angle = getangle(actor->user.change.X, actor->user.change.Y); actor->set_int_ang(getangle(actor->user.change.X, actor->user.change.Y);
} }
return 0; return 0;
@ -7892,7 +7892,7 @@ int VectorWormSeek(DSWActor* actor, int16_t delay_tics, int16_t aware_range1, in
actor->user.change.Y = (actor->user.change.Y + oy*7)/8; actor->user.change.Y = (actor->user.change.Y + oy*7)/8;
actor->user.change.Z = (actor->user.change.Z + oz*7)/8; actor->user.change.Z = (actor->user.change.Z + oz*7)/8;
actor->spr.__int_angle = getangle(actor->user.change.X, actor->user.change.Y); actor->set_int_ang(getangle(actor->user.change.X, actor->user.change.Y);
} }
return 0; return 0;
@ -7949,7 +7949,7 @@ int DoPlasmaFountain(DSWActor* actor)
// move with sprite // move with sprite
SetActorZ(actor, attachActor->int_pos()); SetActorZ(actor, attachActor->int_pos());
actor->spr.__int_angle = attachActor->int_ang(); actor->set_int_ang(attachActor->int_ang();
actor->user.Counter++; actor->user.Counter++;
if (actor->user.Counter > 3) if (actor->user.Counter > 3)
@ -8103,7 +8103,7 @@ void WallBounce(DSWActor* actor, short ang)
actor->user.change.Y = DMulScale(dax, k, -day, l, 14); actor->user.change.Y = DMulScale(dax, k, -day, l, 14);
old_ang = actor->int_ang(); old_ang = actor->int_ang();
actor->spr.__int_angle = getangle(actor->user.change.X, actor->user.change.Y); actor->set_int_ang(getangle(actor->user.change.X, actor->user.change.Y);
// hack to prevent missile from sticking to a wall // hack to prevent missile from sticking to a wall
// //
@ -8111,7 +8111,7 @@ void WallBounce(DSWActor* actor, short ang)
{ {
actor->user.change.X = -actor->user.change.X; actor->user.change.X = -actor->user.change.X;
actor->user.change.Y = -actor->user.change.Y; actor->user.change.Y = -actor->user.change.Y;
actor->spr.__int_angle = getangle(actor->user.change.X, actor->user.change.Y); actor->set_int_ang(getangle(actor->user.change.X, actor->user.change.Y);
} }
} }
@ -8176,7 +8176,7 @@ bool SlopeBounce(DSWActor* actor, bool *hit_wall)
actor->user.change.Y -= MulScale(day, k, 16); actor->user.change.Y -= MulScale(day, k, 16);
actor->user.change.Z -= MulScale(daz, k, 12); actor->user.change.Z -= MulScale(daz, k, 12);
actor->spr.__int_angle = getangle(actor->user.change.X, actor->user.change.Y); actor->set_int_ang(getangle(actor->user.change.X, actor->user.change.Y);
} }
return true; return true;
@ -8243,7 +8243,7 @@ int DoGrenade(DSWActor* actor)
{ {
for (i=0; i<5; i++) for (i=0; i<5; i++)
{ {
actor->spr.__int_angle = NORM_ANGLE(RandomRange(2048)); actor->set_int_ang(NORM_ANGLE(RandomRange(2048));
InitPhosphorus(actor); InitPhosphorus(actor);
} }
} }
@ -8313,7 +8313,7 @@ int DoGrenade(DSWActor* actor)
{ {
for (i=0; i<5; i++) for (i=0; i<5; i++)
{ {
actor->spr.__int_angle = NORM_ANGLE(RandomRange(2048)); actor->set_int_ang(NORM_ANGLE(RandomRange(2048));
InitPhosphorus(actor); InitPhosphorus(actor);
} }
} }
@ -8356,7 +8356,7 @@ int DoGrenade(DSWActor* actor)
{ {
for (i=0; i<5; i++) for (i=0; i<5; i++)
{ {
actor->spr.__int_angle = NORM_ANGLE(RandomRange(2048)); actor->set_int_ang(NORM_ANGLE(RandomRange(2048));
InitPhosphorus(actor); InitPhosphorus(actor);
} }
} }
@ -9035,7 +9035,7 @@ int DoEMPBurst(DSWActor* actor)
{ {
vec3_t pos = { attachActor->int_pos().X, attachActor->int_pos().Y, attachActor->int_pos().Z - actor->user.pos.Z }; vec3_t pos = { attachActor->int_pos().X, attachActor->int_pos().Y, attachActor->int_pos().Z - actor->user.pos.Z };
SetActorZ(actor, &pos); SetActorZ(actor, &pos);
actor->spr.__int_angle = NORM_ANGLE(attachActor->spr.__int_angle+1024); actor->set_int_ang(NORM_ANGLE(attachActor->spr.__int_angle+1024);
} }
// not activated yet // not activated yet
@ -9393,7 +9393,7 @@ int SpawnExtraMicroMini(DSWActor* actor)
actorNew->user.floor_dist = actor->user.floor_dist; actorNew->user.floor_dist = actor->user.floor_dist;
actorNew->spr.cstat = actor->spr.cstat; actorNew->spr.cstat = actor->spr.cstat;
actorNew->spr.__int_angle = NORM_ANGLE(actorNew->int_ang() + RandomRange(64) - 32); actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang() + RandomRange(64) - 32);
actorNew->spr.zvel = actor->spr.zvel; actorNew->spr.zvel = actor->spr.zvel;
actorNew->spr.zvel += RandomRange(Z(16)) - Z(8); actorNew->spr.zvel += RandomRange(Z(16)) - Z(8);
@ -9498,7 +9498,7 @@ int DoUziBullet(DSWActor* actor)
actorNew->spr.xrepeat = UZI_SMOKE_REPEAT; actorNew->spr.xrepeat = UZI_SMOKE_REPEAT;
actorNew->spr.yrepeat = UZI_SMOKE_REPEAT; actorNew->spr.yrepeat = UZI_SMOKE_REPEAT;
SetOwner(GetOwner(actor), actorNew); SetOwner(GetOwner(actor), actorNew);
actorNew->spr.__int_angle = actor->int_ang(); actorNew->set_int_ang(actor->int_ang();
actorNew->spr.clipdist = 128 >> 2; actorNew->spr.clipdist = 128 >> 2;
actorNew->spr.cstat |= (CSTAT_SPRITE_TRANSLUCENT | CSTAT_SPRITE_YCENTER); actorNew->spr.cstat |= (CSTAT_SPRITE_TRANSLUCENT | CSTAT_SPRITE_YCENTER);
@ -9509,7 +9509,7 @@ int DoUziBullet(DSWActor* actor)
actorNew->spr.xrepeat = UZI_SPARK_REPEAT; actorNew->spr.xrepeat = UZI_SPARK_REPEAT;
actorNew->spr.yrepeat = UZI_SPARK_REPEAT; actorNew->spr.yrepeat = UZI_SPARK_REPEAT;
SetOwner(GetOwner(actor), actorNew); SetOwner(GetOwner(actor), actorNew);
actorNew->spr.__int_angle = actor->int_ang(); actorNew->set_int_ang(actor->int_ang();
actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER); actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER);
} }
@ -10842,7 +10842,7 @@ int DoBloodWorm(DSWActor* actor)
actor->user.change.X = -actor->user.change.X; actor->user.change.X = -actor->user.change.X;
actor->user.change.Y = -actor->user.change.Y; actor->user.change.Y = -actor->user.change.Y;
actor->user.coll.setNone(); actor->user.coll.setNone();
actor->spr.__int_angle = NORM_ANGLE(actor->int_ang() + 1024); actor->set_int_ang(NORM_ANGLE(actor->int_ang() + 1024);
return true; return true;
} }
@ -11181,7 +11181,7 @@ int DoRing(DSWActor* actor)
} }
// rotate the ring // rotate the ring
actor->spr.__int_angle = NORM_ANGLE(actor->int_ang() + (4 * RINGMOVETICS) + RINGMOVETICS); actor->set_int_ang(NORM_ANGLE(actor->int_ang() + (4 * RINGMOVETICS) + RINGMOVETICS);
// put it out there // put it out there
actor->add_int_pos({ MulScale(actor->user.Dist, bcos(actor->int_ang()), 14), MulScale(actor->user.Dist, bsin(actor->int_ang()), 14), actor->add_int_pos({ MulScale(actor->user.Dist, bcos(actor->int_ang()), 14), MulScale(actor->user.Dist, bsin(actor->int_ang()), 14),
@ -11258,7 +11258,7 @@ void InitSpellRing(PLAYER* pp)
actorNew->add_int_pos({ MulScale(actorNew->user.Dist, bcos(actorNew->int_ang()), 14), MulScale(actorNew->user.Dist, bsin(actorNew->int_ang()), 14), actorNew->add_int_pos({ MulScale(actorNew->user.Dist, bcos(actorNew->int_ang()), 14), MulScale(actorNew->user.Dist, bsin(actorNew->int_ang()), 14),
pp->pos.Z + Z(20) + ((actorNew->user.Dist * (-pp->horizon.horiz.asq16() >> 9)) >> 9) }); pp->pos.Z + Z(20) + ((actorNew->user.Dist * (-pp->horizon.horiz.asq16() >> 9)) >> 9) });
actorNew->spr.__int_angle = NORM_ANGLE(actorNew->int_ang() + 512); actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang() + 512);
actorNew->backuppos(); actorNew->backuppos();
@ -11306,9 +11306,9 @@ int DoSerpRing(DSWActor* actor)
// rotate the heads // rotate the heads
if (actor->user.Flags & (SPR_BOUNCE)) if (actor->user.Flags & (SPR_BOUNCE))
actor->spr.__int_angle = NORM_ANGLE(actor->int_ang() + (28 * RINGMOVETICS)); actor->set_int_ang(NORM_ANGLE(actor->int_ang() + (28 * RINGMOVETICS));
else else
actor->spr.__int_angle = NORM_ANGLE(actor->int_ang() - (28 * RINGMOVETICS)); actor->set_int_ang(NORM_ANGLE(actor->int_ang() - (28 * RINGMOVETICS));
// put it out there // put it out there
actor->add_int_pos({ MulScale(actor->user.Dist, bcos(actor->user.slide_ang), 14), MulScale(actor->user.Dist, bsin(actor->user.slide_ang), 14), 0 }); actor->add_int_pos({ MulScale(actor->user.Dist, bcos(actor->user.slide_ang), 14), MulScale(actor->user.Dist, bsin(actor->user.slide_ang), 14), 0 });
@ -11351,7 +11351,7 @@ int DoSerpRing(DSWActor* actor)
{ {
extern STATE* sg_SkullJump[]; extern STATE* sg_SkullJump[];
actor->user.ID = SKULL_R0; actor->user.ID = SKULL_R0;
actor->spr.__int_angle = getangle(actor->user.targetActor->int_pos().X - actor->int_pos().X, actor->user.targetActor->int_pos().Y - actor->int_pos().Y); actor->set_int_ang(getangle(actor->user.targetActor->int_pos().X - actor->int_pos().X, actor->user.targetActor->int_pos().Y - actor->int_pos().Y);
actor->spr.xvel = dist>>5; actor->spr.xvel = dist>>5;
actor->spr.xvel += (actor->spr.xvel >> 1); actor->spr.xvel += (actor->spr.xvel >> 1);
actor->spr.xvel += (RANDOM_P2(128<<8)>>8); actor->spr.xvel += (RANDOM_P2(128<<8)>>8);
@ -11379,7 +11379,7 @@ int InitLavaThrow(DSWActor* actor)
short w; short w;
// get angle to player and also face player when attacking // get angle to player and also face player when attacking
actor->spr.__int_angle = nang = getangle(actor->user.targetActor->int_pos().X - actor->int_pos().X, actor->user.targetActor->int_pos().Y - actor->int_pos().Y); actor->set_int_ang(nang = getangle(actor->user.targetActor->int_pos().X - actor->int_pos().X, actor->user.targetActor->int_pos().Y - actor->int_pos().Y);
nx = actor->int_pos().X; nx = actor->int_pos().X;
ny = actor->int_pos().Y; ny = actor->int_pos().Y;
@ -11395,7 +11395,7 @@ int InitLavaThrow(DSWActor* actor)
actorNew->spr.xrepeat = 72; actorNew->spr.xrepeat = 72;
actorNew->spr.shade = -15; actorNew->spr.shade = -15;
actorNew->spr.zvel = 0; actorNew->spr.zvel = 0;
actorNew->spr.__int_angle = nang; actorNew->set_int_ang(nang;
if (RANDOM_P2(1024) > 512) if (RANDOM_P2(1024) > 512)
actorNew->spr.cstat |= (CSTAT_SPRITE_XFLIP); actorNew->spr.cstat |= (CSTAT_SPRITE_XFLIP);
@ -11458,7 +11458,7 @@ void InitVulcanBoulder(DSWActor* actor)
SetOwner(actor, actorNew); SetOwner(actor, actorNew);
actorNew->spr.xrepeat = actorNew->spr.yrepeat = 8 + RandomRange(72); actorNew->spr.xrepeat = actorNew->spr.yrepeat = 8 + RandomRange(72);
actorNew->spr.shade = -40; actorNew->spr.shade = -40;
actorNew->spr.__int_angle = nang; actorNew->set_int_ang(nang;
actorNew->user.Counter = 0; actorNew->user.Counter = 0;
zsize = ActorSizeZ(actorNew); zsize = ActorSizeZ(actorNew);
@ -11529,7 +11529,7 @@ int InitSerpRing(DSWActor* actor)
// ang around the serp is now slide_ang // ang around the serp is now slide_ang
actorNew->user.slide_ang = actorNew->int_ang(); actorNew->user.slide_ang = actorNew->int_ang();
// randomize the head turning angle // randomize the head turning angle
actorNew->spr.__int_angle = RANDOM_P2(2048<<5)>>5; actorNew->set_int_ang(RANDOM_P2(2048<<5)>>5;
// control direction of spinning // control direction of spinning
actor->user.Flags ^= SPR_BOUNCE; actor->user.Flags ^= SPR_BOUNCE;
@ -11612,9 +11612,9 @@ void InitSpellNapalm(PLAYER* pp)
if (mp[i].dist_over != 0) if (mp[i].dist_over != 0)
{ {
actor->spr.__int_angle = NORM_ANGLE(actor->int_ang() + mp[i].ang); actor->set_int_ang(NORM_ANGLE(actor->int_ang() + mp[i].ang);
HelpMissileLateral(actor, mp[i].dist_over); HelpMissileLateral(actor, mp[i].dist_over);
actor->spr.__int_angle = NORM_ANGLE(actor->int_ang() - mp[i].ang); actor->set_int_ang(NORM_ANGLE(actor->int_ang() - mp[i].ang);
} }
actor->user.change.X = MOVEx(actor->spr.xvel, actor->int_ang()); actor->user.change.X = MOVEx(actor->spr.xvel, actor->int_ang());
@ -11685,9 +11685,9 @@ int InitEnemyNapalm(DSWActor* actor)
if (mp[i].dist_over != 0) if (mp[i].dist_over != 0)
{ {
actorNew->spr.__int_angle = NORM_ANGLE(actorNew->int_ang() + mp[i].ang); actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang() + mp[i].ang);
HelpMissileLateral(actorNew, mp[i].dist_over); HelpMissileLateral(actorNew, mp[i].dist_over);
actorNew->spr.__int_angle = NORM_ANGLE(actorNew->int_ang() - mp[i].ang); actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang() - mp[i].ang);
} }
// find the distance to the target (player) // find the distance to the target (player)
@ -11815,7 +11815,7 @@ int InitSwordAttack(PLAYER* pp)
bubble = SpawnBubble(pp->actor); bubble = SpawnBubble(pp->actor);
if (bubble != nullptr) if (bubble != nullptr)
{ {
bubble->spr.__int_angle = pp->angle.ang.asbuild(); bubble->set_int_ang(pp->angle.ang.asbuild();
random_amt = (RANDOM_P2(32 << 8) >> 8) - 16; random_amt = (RANDOM_P2(32 << 8) >> 8) - 16;
@ -11986,7 +11986,7 @@ int InitFistAttack(PLAYER* pp)
bubble = SpawnBubble(pp->actor); bubble = SpawnBubble(pp->actor);
if (bubble != nullptr) if (bubble != nullptr)
{ {
bubble->spr.__int_angle = pp->angle.ang.asbuild(); bubble->set_int_ang(pp->angle.ang.asbuild();
random_amt = (RANDOM_P2(32<<8)>>8) - 16; random_amt = (RANDOM_P2(32<<8)>>8) - 16;
@ -12205,9 +12205,9 @@ int InitSumoNapalm(DSWActor* actor)
if (mp[i].dist_over != 0) if (mp[i].dist_over != 0)
{ {
actorNew->spr.__int_angle = NORM_ANGLE(actorNew->int_ang() + mp[i].ang); actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang() + mp[i].ang);
HelpMissileLateral(actorNew, mp[i].dist_over); HelpMissileLateral(actorNew, mp[i].dist_over);
actorNew->spr.__int_angle = NORM_ANGLE(actorNew->int_ang() - mp[i].ang); actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang() - mp[i].ang);
} }
// find the distance to the target (player) // find the distance to the target (player)
@ -12252,7 +12252,7 @@ int InitSumoSkull(DSWActor* actor)
actorNew->spr.pal = 0; actorNew->spr.pal = 0;
// randomize the head turning angle // randomize the head turning angle
actorNew->spr.__int_angle = RANDOM_P2(2048<<5)>>5; actorNew->set_int_ang(RANDOM_P2(2048<<5)>>5;
// control direction of spinning // control direction of spinning
actor->user.Flags ^= SPR_BOUNCE; actor->user.Flags ^= SPR_BOUNCE;
@ -12370,7 +12370,7 @@ int WeaponAutoAim(DSWActor* actor, DSWActor* mislActor, short ang, bool test)
hitActor->user.Flags |= (SPR_TARGETED); hitActor->user.Flags |= (SPR_TARGETED);
hitActor->user.Flags |= (SPR_ATTACKED); hitActor->user.Flags |= (SPR_ATTACKED);
mislActor->spr.__int_angle = NORM_ANGLE(getangle(hitActor->int_pos().X - mislActor->int_pos().X, hitActor->int_pos().Y - mislActor->int_pos().Y)); mislActor->set_int_ang(NORM_ANGLE(getangle(hitActor->int_pos().X - mislActor->int_pos().X, hitActor->int_pos().Y - mislActor->int_pos().Y));
dist = FindDistance2D(mislActor->int_pos().vec2 - hitActor->int_pos().vec2); dist = FindDistance2D(mislActor->int_pos().vec2 - hitActor->int_pos().vec2);
if (dist != 0) if (dist != 0)
@ -12426,7 +12426,7 @@ int WeaponAutoAimZvel(DSWActor* actor, DSWActor* missileActor, int *zvel, short
hitActor->user.Flags |= (SPR_TARGETED); hitActor->user.Flags |= (SPR_TARGETED);
hitActor->user.Flags |= (SPR_ATTACKED); hitActor->user.Flags |= (SPR_ATTACKED);
missileActor->spr.__int_angle = NORM_ANGLE(getangle(hitActor->int_pos().X - missileActor->int_pos().X, hitActor->int_pos().Y - missileActor->int_pos().Y)); missileActor->set_int_ang(NORM_ANGLE(getangle(hitActor->int_pos().X - missileActor->int_pos().X, hitActor->int_pos().Y - missileActor->int_pos().Y));
dist = FindDistance2D(missileActor->int_pos().vec2 - hitActor->int_pos().vec2); dist = FindDistance2D(missileActor->int_pos().vec2 - hitActor->int_pos().vec2);
if (dist != 0) if (dist != 0)
@ -13031,9 +13031,9 @@ int InitLaser(PLAYER* pp)
auto oclipdist = actor->spr.clipdist; auto oclipdist = actor->spr.clipdist;
actor->spr.clipdist = 0; actor->spr.clipdist = 0;
actorNew->spr.__int_angle = NORM_ANGLE(actorNew->int_ang() + 512); actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang() + 512);
HelpMissileLateral(actorNew, 900); HelpMissileLateral(actorNew, 900);
actorNew->spr.__int_angle = NORM_ANGLE(actorNew->int_ang() - 512); actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang() - 512);
if (pp->Flags & (PF_DIVING) || SpriteInUnderwaterArea(actorNew)) if (pp->Flags & (PF_DIVING) || SpriteInUnderwaterArea(actorNew))
actorNew->user.Flags |= (SPR_UNDERWATER); actorNew->user.Flags |= (SPR_UNDERWATER);
@ -13069,7 +13069,7 @@ int InitLaser(PLAYER* pp)
if (WeaponAutoAim(pp->actor, actorNew, 32, false) == -1) if (WeaponAutoAim(pp->actor, actorNew, 32, false) == -1)
{ {
actorNew->spr.__int_angle = NORM_ANGLE(actorNew->int_ang() - 5); actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang() - 5);
} }
actorNew->user.change.X = MOVEx(actorNew->spr.xvel, actorNew->int_ang()); actorNew->user.change.X = MOVEx(actorNew->spr.xvel, actorNew->int_ang());
@ -13135,9 +13135,9 @@ int InitRail(PLAYER* pp)
actor->spr.clipdist = 0; actor->spr.clipdist = 0;
actorNew->spr.clipdist = 32L>>2; actorNew->spr.clipdist = 32L>>2;
actorNew->spr.__int_angle = NORM_ANGLE(actorNew->int_ang() + 512); actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang() + 512);
HelpMissileLateral(actorNew, 700); HelpMissileLateral(actorNew, 700);
actorNew->spr.__int_angle = NORM_ANGLE(actorNew->int_ang() - 512); actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang() - 512);
if (pp->Flags & (PF_DIVING) || SpriteInUnderwaterArea(actorNew)) if (pp->Flags & (PF_DIVING) || SpriteInUnderwaterArea(actorNew))
actorNew->user.Flags |= (SPR_UNDERWATER); actorNew->user.Flags |= (SPR_UNDERWATER);
@ -13154,7 +13154,7 @@ int InitRail(PLAYER* pp)
actorNew->spr.zvel = zvel >> 1; actorNew->spr.zvel = zvel >> 1;
if (WeaponAutoAim(pp->actor, actorNew, 32, false) == -1) if (WeaponAutoAim(pp->actor, actorNew, 32, false) == -1)
{ {
actorNew->spr.__int_angle = NORM_ANGLE(actorNew->int_ang() - 4); actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang() - 4);
} }
else else
zvel = actorNew->spr.zvel; // Let autoaiming set zvel now zvel = actorNew->spr.zvel; // Let autoaiming set zvel now
@ -13211,9 +13211,9 @@ int InitZillaRail(DSWActor* actor)
actor->spr.clipdist = 0; actor->spr.clipdist = 0;
actorNew->spr.clipdist = 32L>>2; actorNew->spr.clipdist = 32L>>2;
actorNew->spr.__int_angle = NORM_ANGLE(actorNew->int_ang() + 512); actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang() + 512);
HelpMissileLateral(actorNew, 700); HelpMissileLateral(actorNew, 700);
actorNew->spr.__int_angle = NORM_ANGLE(actorNew->int_ang() - 512); actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang() - 512);
if (SpriteInUnderwaterArea(actorNew)) if (SpriteInUnderwaterArea(actorNew))
actorNew->user.Flags |= (SPR_UNDERWATER); actorNew->user.Flags |= (SPR_UNDERWATER);
@ -13230,7 +13230,7 @@ int InitZillaRail(DSWActor* actor)
actorNew->spr.zvel = zvel >> 1; actorNew->spr.zvel = zvel >> 1;
if (WeaponAutoAim(actor, actorNew, 32, false) == -1) if (WeaponAutoAim(actor, actorNew, 32, false) == -1)
{ {
actorNew->spr.__int_angle = NORM_ANGLE(actorNew->int_ang() - 4); actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang() - 4);
} }
else else
zvel = actorNew->spr.zvel; // Let autoaiming set zvel now zvel = actorNew->spr.zvel; // Let autoaiming set zvel now
@ -13317,9 +13317,9 @@ int InitRocket(PLAYER* pp)
auto oclipdist = actor->spr.clipdist; auto oclipdist = actor->spr.clipdist;
actor->spr.clipdist = 0; actor->spr.clipdist = 0;
actorNew->spr.__int_angle = NORM_ANGLE(actorNew->int_ang() + 512); actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang() + 512);
HelpMissileLateral(actorNew, 900); HelpMissileLateral(actorNew, 900);
actorNew->spr.__int_angle = NORM_ANGLE(actorNew->int_ang() - 512); actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang() - 512);
if (pp->Flags & (PF_DIVING) || SpriteInUnderwaterArea(actorNew)) if (pp->Flags & (PF_DIVING) || SpriteInUnderwaterArea(actorNew))
actorNew->user.Flags |= (SPR_UNDERWATER); actorNew->user.Flags |= (SPR_UNDERWATER);
@ -13340,7 +13340,7 @@ int InitRocket(PLAYER* pp)
actorNew->spr.zvel = zvel >> 1; actorNew->spr.zvel = zvel >> 1;
if (WeaponAutoAim(pp->actor, actorNew, 32, false) == -1) if (WeaponAutoAim(pp->actor, actorNew, 32, false) == -1)
{ {
actorNew->spr.__int_angle = NORM_ANGLE(actorNew->int_ang() - 5); actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang() - 5);
} }
else else
zvel = actorNew->spr.zvel; // Let autoaiming set zvel now zvel = actorNew->spr.zvel; // Let autoaiming set zvel now
@ -13422,9 +13422,9 @@ int InitBunnyRocket(PLAYER* pp)
auto oclipdist = actor->spr.clipdist; auto oclipdist = actor->spr.clipdist;
actor->spr.clipdist = 0; actor->spr.clipdist = 0;
actorNew->spr.__int_angle = NORM_ANGLE(actorNew->int_ang() + 512); actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang() + 512);
HelpMissileLateral(actorNew, 900); HelpMissileLateral(actorNew, 900);
actorNew->spr.__int_angle = NORM_ANGLE(actorNew->int_ang() - 512); actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang() - 512);
if (pp->Flags & (PF_DIVING) || SpriteInUnderwaterArea(actorNew)) if (pp->Flags & (PF_DIVING) || SpriteInUnderwaterArea(actorNew))
actorNew->user.Flags |= (SPR_UNDERWATER); actorNew->user.Flags |= (SPR_UNDERWATER);
@ -13445,7 +13445,7 @@ int InitBunnyRocket(PLAYER* pp)
actorNew->spr.zvel = zvel >> 1; actorNew->spr.zvel = zvel >> 1;
if (WeaponAutoAim(pp->actor, actorNew, 32, false) == -1) if (WeaponAutoAim(pp->actor, actorNew, 32, false) == -1)
{ {
actorNew->spr.__int_angle = NORM_ANGLE(actorNew->int_ang() - 5); actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang() - 5);
} }
else else
zvel = actorNew->spr.zvel; // Let autoaiming set zvel now zvel = actorNew->spr.zvel; // Let autoaiming set zvel now
@ -13515,9 +13515,9 @@ int InitNuke(PLAYER* pp)
auto oclipdist = actor->spr.clipdist; auto oclipdist = actor->spr.clipdist;
actor->spr.clipdist = 0; actor->spr.clipdist = 0;
actorNew->spr.__int_angle = NORM_ANGLE(actorNew->int_ang() + 512); actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang() + 512);
HelpMissileLateral(actorNew, 900); HelpMissileLateral(actorNew, 900);
actorNew->spr.__int_angle = NORM_ANGLE(actorNew->int_ang() - 512); actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang() - 512);
if (pp->Flags & (PF_DIVING) || SpriteInUnderwaterArea(actorNew)) if (pp->Flags & (PF_DIVING) || SpriteInUnderwaterArea(actorNew))
actorNew->user.Flags |= (SPR_UNDERWATER); actorNew->user.Flags |= (SPR_UNDERWATER);
@ -13538,7 +13538,7 @@ int InitNuke(PLAYER* pp)
actorNew->spr.zvel = zvel >> 1; actorNew->spr.zvel = zvel >> 1;
if (WeaponAutoAim(pp->actor, actorNew, 32, false) == -1) if (WeaponAutoAim(pp->actor, actorNew, 32, false) == -1)
{ {
actorNew->spr.__int_angle = NORM_ANGLE(actorNew->int_ang() - 5); actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang() - 5);
} }
else else
zvel = actorNew->spr.zvel; // Let autoaiming set zvel now zvel = actorNew->spr.zvel; // Let autoaiming set zvel now
@ -13594,9 +13594,9 @@ int InitEnemyNuke(DSWActor* actor)
actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER); actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER);
actorNew->spr.cstat |= (CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN); actorNew->spr.cstat |= (CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
actorNew->spr.__int_angle = NORM_ANGLE(actorNew->int_ang() + 512); actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang() + 512);
HelpMissileLateral(actorNew, 500); HelpMissileLateral(actorNew, 500);
actorNew->spr.__int_angle = NORM_ANGLE(actorNew->int_ang() - 512); actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang() - 512);
if (SpriteInUnderwaterArea(actorNew)) if (SpriteInUnderwaterArea(actorNew))
actorNew->user.Flags |= (SPR_UNDERWATER); actorNew->user.Flags |= (SPR_UNDERWATER);
@ -13615,7 +13615,7 @@ int InitEnemyNuke(DSWActor* actor)
actorNew->spr.zvel = zvel >> 1; actorNew->spr.zvel = zvel >> 1;
if (WeaponAutoAim(actor, actorNew, 32, false) == -1) if (WeaponAutoAim(actor, actorNew, 32, false) == -1)
{ {
actorNew->spr.__int_angle = NORM_ANGLE(actorNew->int_ang() - 5); actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang() - 5);
} }
else else
zvel = actorNew->spr.zvel; // Let autoaiming set zvel now zvel = actorNew->spr.zvel; // Let autoaiming set zvel now
@ -13701,10 +13701,10 @@ int InitMicro(PLAYER* pp)
auto oclipdist = actor->spr.clipdist; auto oclipdist = actor->spr.clipdist;
actor->spr.clipdist = 0; actor->spr.clipdist = 0;
actorNew->spr.__int_angle = NORM_ANGLE(actorNew->int_ang() + 512); actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang() + 512);
const int MICRO_LATERAL = 5000; const int MICRO_LATERAL = 5000;
HelpMissileLateral(actorNew, 1000 + (RandomRange(MICRO_LATERAL) - (MICRO_LATERAL / 2))); HelpMissileLateral(actorNew, 1000 + (RandomRange(MICRO_LATERAL) - (MICRO_LATERAL / 2)));
actorNew->spr.__int_angle = NORM_ANGLE(actorNew->int_ang() - 512); actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang() - 512);
if (pp->Flags & (PF_DIVING) || SpriteInUnderwaterArea(actorNew)) if (pp->Flags & (PF_DIVING) || SpriteInUnderwaterArea(actorNew))
actorNew->user.Flags |= (SPR_UNDERWATER); actorNew->user.Flags |= (SPR_UNDERWATER);
@ -13740,7 +13740,7 @@ int InitMicro(PLAYER* pp)
} }
else else
{ {
actorNew->spr.__int_angle = NORM_ANGLE(actorNew->int_ang() + (RandomRange(MICRO_ANG) - (MICRO_ANG / 2)) - 16); actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang() + (RandomRange(MICRO_ANG) - (MICRO_ANG / 2)) - 16);
} }
actorNew->user.change.X = MOVEx(actorNew->spr.xvel, actorNew->int_ang()); actorNew->user.change.X = MOVEx(actorNew->spr.xvel, actorNew->int_ang());
@ -14064,7 +14064,7 @@ int InitSerpSpell(DSWActor* actor)
for (i = 0; i < 2; i++) for (i = 0; i < 2; i++)
{ {
actor->spr.__int_angle = getangle(actor->user.targetActor->int_pos().X - actor->int_pos().X, actor->user.targetActor->int_pos().Y - actor->int_pos().Y); actor->set_int_ang(getangle(actor->user.targetActor->int_pos().X - actor->int_pos().X, actor->user.targetActor->int_pos().Y - actor->int_pos().Y);
auto actorNew = SpawnActor(STAT_MISSILE, SERP_METEOR, &sg_SerpMeteor[0][0], actor->sector(), auto actorNew = SpawnActor(STAT_MISSILE, SERP_METEOR, &sg_SerpMeteor[0][0], actor->sector(),
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->int_ang(), 1500); actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->int_ang(), 1500);
@ -14092,16 +14092,16 @@ int InitSerpSpell(DSWActor* actor)
auto oclipdist = actor->spr.clipdist; auto oclipdist = actor->spr.clipdist;
actor->spr.clipdist = 1; actor->spr.clipdist = 1;
actorNew->spr.__int_angle = NORM_ANGLE(actorNew->int_ang() + lat_ang[i]); actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang() + lat_ang[i]);
HelpMissileLateral(actorNew, 4200); HelpMissileLateral(actorNew, 4200);
actorNew->spr.__int_angle = NORM_ANGLE(actorNew->int_ang() - lat_ang[i]); actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang() - lat_ang[i]);
// find the distance to the target (player) // find the distance to the target (player)
dist = Distance(actorNew->int_pos().X, actorNew->int_pos().Y, actor->user.targetActor->int_pos().X, actor->user.targetActor->int_pos().Y); dist = Distance(actorNew->int_pos().X, actorNew->int_pos().Y, actor->user.targetActor->int_pos().X, actor->user.targetActor->int_pos().Y);
if (dist != 0) if (dist != 0)
actorNew->spr.zvel = (actorNew->spr.xvel * (ActorUpperZ(actor->user.targetActor) - actorNew->int_pos().Z)) / dist; actorNew->spr.zvel = (actorNew->spr.xvel * (ActorUpperZ(actor->user.targetActor) - actorNew->int_pos().Z)) / dist;
actorNew->spr.__int_angle = NORM_ANGLE(actorNew->int_ang() + delta_ang[i]); actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang() + delta_ang[i]);
actorNew->user.change.X = MOVEx(actorNew->spr.xvel, actorNew->int_ang()); actorNew->user.change.X = MOVEx(actorNew->spr.xvel, actorNew->int_ang());
actorNew->user.change.Y = MOVEy(actorNew->spr.xvel, actorNew->int_ang()); actorNew->user.change.Y = MOVEy(actorNew->spr.xvel, actorNew->int_ang());
@ -14162,7 +14162,7 @@ int InitSerpMonstSpell(DSWActor* actor)
for (i = 0; i < 1; i++) for (i = 0; i < 1; i++)
{ {
actor->spr.__int_angle = getangle(actor->user.targetActor->int_pos().X - actor->int_pos().X, actor->user.targetActor->int_pos().Y - actor->int_pos().Y); actor->set_int_ang(getangle(actor->user.targetActor->int_pos().X - actor->int_pos().X, actor->user.targetActor->int_pos().Y - actor->int_pos().Y);
auto actorNew = SpawnActor(STAT_MISSILE, SERP_METEOR, &sg_SerpMeteor[0][0], actor->sector(), auto actorNew = SpawnActor(STAT_MISSILE, SERP_METEOR, &sg_SerpMeteor[0][0], actor->sector(),
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->int_ang(), 500); actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->int_ang(), 500);
@ -14190,16 +14190,16 @@ int InitSerpMonstSpell(DSWActor* actor)
auto oclipdist = actor->spr.clipdist; auto oclipdist = actor->spr.clipdist;
actor->spr.clipdist = 1; actor->spr.clipdist = 1;
actorNew->spr.__int_angle = NORM_ANGLE(actorNew->int_ang() + lat_ang[i]); actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang() + lat_ang[i]);
HelpMissileLateral(actorNew, 4200); HelpMissileLateral(actorNew, 4200);
actorNew->spr.__int_angle = NORM_ANGLE(actorNew->int_ang() - lat_ang[i]); actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang() - lat_ang[i]);
// find the distance to the target (player) // find the distance to the target (player)
dist = Distance(actorNew->int_pos().X, actorNew->int_pos().Y, actor->user.targetActor->int_pos().X, actor->user.targetActor->int_pos().Y); dist = Distance(actorNew->int_pos().X, actorNew->int_pos().Y, actor->user.targetActor->int_pos().X, actor->user.targetActor->int_pos().Y);
if (dist != 0) if (dist != 0)
actorNew->spr.zvel = (actorNew->spr.xvel * (ActorUpperZ(actor->user.targetActor) - actorNew->int_pos().Z)) / dist; actorNew->spr.zvel = (actorNew->spr.xvel * (ActorUpperZ(actor->user.targetActor) - actorNew->int_pos().Z)) / dist;
actorNew->spr.__int_angle = NORM_ANGLE(actorNew->int_ang() + delta_ang[i]); actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang() + delta_ang[i]);
actorNew->user.change.X = MOVEx(actorNew->spr.xvel, actorNew->int_ang()); actorNew->user.change.X = MOVEx(actorNew->spr.xvel, actorNew->int_ang());
actorNew->user.change.Y = MOVEy(actorNew->spr.xvel, actorNew->int_ang()); actorNew->user.change.Y = MOVEy(actorNew->spr.xvel, actorNew->int_ang());
@ -14231,7 +14231,7 @@ int InitEnemyRocket(DSWActor* actor)
PlaySound(DIGI_NINJARIOTATTACK, actor, v3df_none); PlaySound(DIGI_NINJARIOTATTACK, actor, v3df_none);
// get angle to player and also face player when attacking // get angle to player and also face player when attacking
actor->spr.__int_angle = nang = getangle(actor->user.targetActor->int_pos().X - actor->int_pos().X, actor->user.targetActor->int_pos().Y - actor->int_pos().Y); actor->set_int_ang(nang = getangle(actor->user.targetActor->int_pos().X - actor->int_pos().X, actor->user.targetActor->int_pos().Y - actor->int_pos().Y);
nx = actor->int_pos().X; nx = actor->int_pos().X;
ny = actor->int_pos().Y; ny = actor->int_pos().Y;
@ -14253,7 +14253,7 @@ int InitEnemyRocket(DSWActor* actor)
actorNew->spr.xrepeat = 28; actorNew->spr.xrepeat = 28;
actorNew->spr.shade = -15; actorNew->spr.shade = -15;
actorNew->spr.zvel = 0; actorNew->spr.zvel = 0;
actorNew->spr.__int_angle = nang; actorNew->set_int_ang(nang;
actorNew->spr.clipdist = 64L>>2; actorNew->spr.clipdist = 64L>>2;
actorNew->user.RotNum = 5; actorNew->user.RotNum = 5;
@ -14306,11 +14306,11 @@ int InitEnemyRail(DSWActor* actor)
PlaySound(DIGI_RAILFIRE, actor, v3df_dontpan|v3df_doppler); PlaySound(DIGI_RAILFIRE, actor, v3df_dontpan|v3df_doppler);
// get angle to player and also face player when attacking // get angle to player and also face player when attacking
actor->spr.__int_angle = nang = getangle(actor->user.targetActor->int_pos().X - actor->int_pos().X, actor->user.targetActor->int_pos().Y - actor->int_pos().Y); actor->set_int_ang(nang = getangle(actor->user.targetActor->int_pos().X - actor->int_pos().X, actor->user.targetActor->int_pos().Y - actor->int_pos().Y);
// add a bit of randomness // add a bit of randomness
if (RANDOM_P2(1024) < 512) if (RANDOM_P2(1024) < 512)
actor->spr.__int_angle = NORM_ANGLE(actor->int_ang() + RANDOM_P2(128) - 64); actor->set_int_ang(NORM_ANGLE(actor->int_ang() + RANDOM_P2(128) - 64);
nx = actor->int_pos().X; nx = actor->int_pos().X;
ny = actor->int_pos().Y; ny = actor->int_pos().Y;
@ -14382,7 +14382,7 @@ int InitZillaRocket(DSWActor* actor)
PlaySound(DIGI_NINJARIOTATTACK, actor, v3df_none); PlaySound(DIGI_NINJARIOTATTACK, actor, v3df_none);
// get angle to player and also face player when attacking // get angle to player and also face player when attacking
actor->spr.__int_angle = nang = getangle(actor->user.targetActor->int_pos().X - actor->int_pos().X, actor->user.targetActor->int_pos().Y - actor->int_pos().Y); actor->set_int_ang(nang = getangle(actor->user.targetActor->int_pos().X - actor->int_pos().X, actor->user.targetActor->int_pos().Y - actor->int_pos().Y);
for (i = 0; i < (int)SIZ(mp); i++) for (i = 0; i < (int)SIZ(mp); i++)
{ {
@ -14399,7 +14399,7 @@ int InitZillaRocket(DSWActor* actor)
actorNew->spr.xrepeat = 28; actorNew->spr.xrepeat = 28;
actorNew->spr.shade = -15; actorNew->spr.shade = -15;
actorNew->spr.zvel = 0; actorNew->spr.zvel = 0;
actorNew->spr.__int_angle = nang; actorNew->set_int_ang(nang;
actorNew->spr.clipdist = 64L>>2; actorNew->spr.clipdist = 64L>>2;
actorNew->user.RotNum = 5; actorNew->user.RotNum = 5;
@ -14422,9 +14422,9 @@ int InitZillaRocket(DSWActor* actor)
if (mp[i].dist_over != 0) if (mp[i].dist_over != 0)
{ {
actorNew->spr.__int_angle = NORM_ANGLE(actorNew->int_ang() + mp[i].ang); actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang() + mp[i].ang);
HelpMissileLateral(actorNew, mp[i].dist_over); HelpMissileLateral(actorNew, mp[i].dist_over);
actorNew->spr.__int_angle = NORM_ANGLE(actorNew->int_ang() - mp[i].ang); actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang() - mp[i].ang);
} }
MissileSetPos(actorNew, DoBoltThinMan, mp[i].dist_out); MissileSetPos(actorNew, DoBoltThinMan, mp[i].dist_out);
@ -14444,7 +14444,7 @@ int InitEnemyStar(DSWActor* actor)
int nx, ny, nz, dist, nang; int nx, ny, nz, dist, nang;
// get angle to player and also face player when attacking // get angle to player and also face player when attacking
actor->spr.__int_angle = nang = NORM_ANGLE(getangle(actor->user.targetActor->int_pos().X - actor->int_pos().X, actor->user.targetActor->int_pos().Y - actor->int_pos().Y)); actor->set_int_ang(nang = NORM_ANGLE(getangle(actor->user.targetActor->int_pos().X - actor->int_pos().X, actor->user.targetActor->int_pos().Y - actor->int_pos().Y));
nx = actor->int_pos().X; nx = actor->int_pos().X;
ny = actor->int_pos().Y; ny = actor->int_pos().Y;
@ -14459,7 +14459,7 @@ int InitEnemyStar(DSWActor* actor)
actorNew->spr.xrepeat = 16; actorNew->spr.xrepeat = 16;
actorNew->spr.shade = -25; actorNew->spr.shade = -25;
actorNew->spr.zvel = 0; actorNew->spr.zvel = 0;
actorNew->spr.__int_angle = nang; actorNew->set_int_ang(nang;
actorNew->spr.clipdist = 64L>>2; actorNew->spr.clipdist = 64L>>2;
actorNew->user.change.X = MOVEx(actorNew->spr.xvel, actorNew->int_ang()); actorNew->user.change.X = MOVEx(actorNew->spr.xvel, actorNew->int_ang());
@ -14483,7 +14483,7 @@ int InitEnemyCrossbow(DSWActor* actor)
int nx, ny, nz, dist, nang; int nx, ny, nz, dist, nang;
// get angle to player and also face player when attacking // get angle to player and also face player when attacking
actor->spr.__int_angle = nang = NORM_ANGLE(getangle(actor->user.targetActor->int_pos().X - actor->int_pos().X, actor->user.targetActor->int_pos().Y - actor->int_pos().Y)); actor->set_int_ang(nang = NORM_ANGLE(getangle(actor->user.targetActor->int_pos().X - actor->int_pos().X, actor->user.targetActor->int_pos().Y - actor->int_pos().Y));
nx = actor->int_pos().X; nx = actor->int_pos().X;
ny = actor->int_pos().Y; ny = actor->int_pos().Y;
@ -14498,7 +14498,7 @@ int InitEnemyCrossbow(DSWActor* actor)
actorNew->spr.yrepeat = 26; actorNew->spr.yrepeat = 26;
actorNew->spr.shade = -25; actorNew->spr.shade = -25;
actorNew->spr.zvel = 0; actorNew->spr.zvel = 0;
actorNew->spr.__int_angle = nang; actorNew->set_int_ang(nang;
actorNew->spr.clipdist = 64L>>2; actorNew->spr.clipdist = 64L>>2;
actorNew->user.RotNum = 5; actorNew->user.RotNum = 5;
@ -14531,7 +14531,7 @@ int InitSkelSpell(DSWActor* actor)
PlaySound(DIGI_SPELEC, actor, v3df_none); PlaySound(DIGI_SPELEC, actor, v3df_none);
// get angle to player and also face player when attacking // get angle to player and also face player when attacking
actor->spr.__int_angle = nang = NORM_ANGLE(getangle(actor->user.targetActor->int_pos().X - actor->int_pos().X, actor->user.targetActor->int_pos().Y - actor->int_pos().Y)); actor->set_int_ang(nang = NORM_ANGLE(getangle(actor->user.targetActor->int_pos().X - actor->int_pos().X, actor->user.targetActor->int_pos().Y - actor->int_pos().Y));
nx = actor->int_pos().X; nx = actor->int_pos().X;
ny = actor->int_pos().Y; ny = actor->int_pos().Y;
@ -14546,7 +14546,7 @@ int InitSkelSpell(DSWActor* actor)
actorNew->spr.yrepeat -= 20; actorNew->spr.yrepeat -= 20;
actorNew->spr.shade = -40; actorNew->spr.shade = -40;
actorNew->spr.zvel = 0; actorNew->spr.zvel = 0;
actorNew->spr.__int_angle = nang; actorNew->set_int_ang(nang;
actorNew->spr.clipdist = 64L>>2; actorNew->spr.clipdist = 64L>>2;
actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER); actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER);
@ -14571,7 +14571,7 @@ int InitCoolgFire(DSWActor* actor)
int nx, ny, nz, dist, nang; int nx, ny, nz, dist, nang;
// get angle to player and also face player when attacking // get angle to player and also face player when attacking
actor->spr.__int_angle = nang = NORM_ANGLE(getangle(actor->user.targetActor->int_pos().X - actor->int_pos().X, actor->user.targetActor->int_pos().Y - actor->int_pos().Y)); actor->set_int_ang(nang = NORM_ANGLE(getangle(actor->user.targetActor->int_pos().X - actor->int_pos().X, actor->user.targetActor->int_pos().Y - actor->int_pos().Y));
nx = actor->int_pos().X; nx = actor->int_pos().X;
ny = actor->int_pos().Y; ny = actor->int_pos().Y;
@ -14592,7 +14592,7 @@ int InitCoolgFire(DSWActor* actor)
actorNew->spr.xrepeat = 18; actorNew->spr.xrepeat = 18;
actorNew->spr.shade = -40; actorNew->spr.shade = -40;
actorNew->spr.zvel = 0; actorNew->spr.zvel = 0;
actorNew->spr.__int_angle = nang; actorNew->set_int_ang(nang;
actorNew->spr.clipdist = 32L>>2; actorNew->spr.clipdist = 32L>>2;
actorNew->user.ceiling_dist = Z(4); actorNew->user.ceiling_dist = Z(4);
actorNew->user.floor_dist = Z(4); actorNew->user.floor_dist = Z(4);
@ -14886,12 +14886,12 @@ int InitTracerUzi(PLAYER* pp)
oclipdist = plActor->spr.clipdist; oclipdist = plActor->spr.clipdist;
plActor->spr.clipdist = 0; plActor->spr.clipdist = 0;
actorNew->spr.__int_angle = NORM_ANGLE(actorNew->int_ang() + 512); actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang() + 512);
if (pp->Flags & (PF_TWO_UZI) && pp->WpnUziType == 0) if (pp->Flags & (PF_TWO_UZI) && pp->WpnUziType == 0)
HelpMissileLateral(actorNew, lat_dist[RANDOM_P2(2<<8)>>8]); HelpMissileLateral(actorNew, lat_dist[RANDOM_P2(2<<8)>>8]);
else else
HelpMissileLateral(actorNew, lat_dist[0]); HelpMissileLateral(actorNew, lat_dist[0]);
actorNew->spr.__int_angle = NORM_ANGLE(actorNew->int_ang() - 512); actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang() - 512);
if (MissileSetPos(actorNew, DoTracerStart, 800)) if (MissileSetPos(actorNew, DoTracerStart, 800))
{ {
@ -14907,7 +14907,7 @@ int InitTracerUzi(PLAYER* pp)
WeaponAutoAim(pp->actor, actorNew, 32, false); WeaponAutoAim(pp->actor, actorNew, 32, false);
// a bit of randomness // a bit of randomness
actorNew->spr.__int_angle = NORM_ANGLE(actorNew->int_ang() + RandomRange(30) - 15); actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang() + RandomRange(30) - 15);
actorNew->user.change.X = MOVEx(actorNew->spr.xvel, actorNew->int_ang()); actorNew->user.change.X = MOVEx(actorNew->spr.xvel, actorNew->int_ang());
actorNew->user.change.Y = MOVEy(actorNew->spr.xvel, actorNew->int_ang()); actorNew->user.change.Y = MOVEy(actorNew->spr.xvel, actorNew->int_ang());
@ -14954,7 +14954,7 @@ int InitTracerTurret(DSWActor* actor, DSWActor* Operator, fixed_t q16horiz)
WeaponAutoAim(actor, actorNew, 32, false); WeaponAutoAim(actor, actorNew, 32, false);
// a bit of randomness // a bit of randomness
actorNew->spr.__int_angle = NORM_ANGLE(actorNew->int_ang() + RandomRange(30) - 15); actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang() + RandomRange(30) - 15);
actorNew->user.change.X = MOVEx(actorNew->spr.xvel, actorNew->int_ang()); actorNew->user.change.X = MOVEx(actorNew->spr.xvel, actorNew->int_ang());
actorNew->user.change.Y = MOVEy(actorNew->spr.xvel, actorNew->int_ang()); actorNew->user.change.Y = MOVEy(actorNew->spr.xvel, actorNew->int_ang());
@ -15053,7 +15053,7 @@ int BulletHitSprite(DSWActor* actor, DSWActor* hitActor, int hit_x, int hit_y, i
} }
SetOwner(actor, actorNew); SetOwner(actor, actorNew);
actorNew->spr.__int_angle = actor->int_ang(); actorNew->set_int_ang(actor->int_ang();
SetActorZ(actorNew, &hit_pos); SetActorZ(actorNew, &hit_pos);
actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER); actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER);
@ -15106,7 +15106,7 @@ DSWActor* SpawnWallHole(sectortype* hit_sect, walltype* hit_wall, int hit_x, int
wall_ang = NORM_ANGLE(getangle(hit_wall->delta())-512); wall_ang = NORM_ANGLE(getangle(hit_wall->delta())-512);
actor->spr.__int_angle = NORM_ANGLE(wall_ang + 1024); actor->set_int_ang(NORM_ANGLE(wall_ang + 1024);
return actor; return actor;
} }
@ -15119,7 +15119,7 @@ bool HitscanSpriteAdjust(DSWActor* actor, walltype* hit_wall)
if (hit_wall) if (hit_wall)
{ {
int16_t const wall_ang = NORM_ANGLE(getangle(hit_wall->delta())); int16_t const wall_ang = NORM_ANGLE(getangle(hit_wall->delta()));
ang = actor->spr.__int_angle = NORM_ANGLE(wall_ang + 512); ang = actor->set_int_ang(NORM_ANGLE(wall_ang + 512);
} }
else else
ang = actor->int_ang(); ang = actor->int_ang();
@ -15375,7 +15375,7 @@ int InitTankShell(DSWActor* actor, PLAYER* pp)
WeaponAutoAim(actor, actorNew, 64, false); WeaponAutoAim(actor, actorNew, 64, false);
// a bit of randomness // a bit of randomness
actorNew->spr.__int_angle += RandomRange(30) - 15; actorNew->spr.__int_angle += RandomRange(30) - 15;
actorNew->spr.__int_angle = NORM_ANGLE(actorNew->int_ang()); actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang());
actorNew->user.change.X = MOVEx(actorNew->spr.xvel, actorNew->int_ang()); actorNew->user.change.X = MOVEx(actorNew->spr.xvel, actorNew->int_ang());
actorNew->user.change.Y = MOVEy(actorNew->spr.xvel, actorNew->int_ang()); actorNew->user.change.Y = MOVEy(actorNew->spr.xvel, actorNew->int_ang());
@ -15475,7 +15475,7 @@ int InitTurretMicro(DSWActor* actor, PLAYER* pp)
} }
else else
{ {
actorNew->spr.__int_angle = NORM_ANGLE(actorNew->int_ang() + (RandomRange(MICRO_ANG) - (MICRO_ANG / 2)) - 16); actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang() + (RandomRange(MICRO_ANG) - (MICRO_ANG / 2)) - 16);
} }
actorNew->user.change.X = MOVEx(actorNew->spr.xvel, actorNew->int_ang()); actorNew->user.change.X = MOVEx(actorNew->spr.xvel, actorNew->int_ang());
@ -15550,7 +15550,7 @@ int InitTurretFireball(DSWActor* actor, PLAYER* pp)
WeaponAutoAim(actor, actorNew, 64, false); WeaponAutoAim(actor, actorNew, 64, false);
// a bit of randomness // a bit of randomness
actorNew->spr.__int_angle += RandomRange(30) - 15; actorNew->spr.__int_angle += RandomRange(30) - 15;
actorNew->spr.__int_angle = NORM_ANGLE(actorNew->int_ang()); actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang());
actorNew->user.change.X = MOVEx(actorNew->spr.xvel, actorNew->int_ang()); actorNew->user.change.X = MOVEx(actorNew->spr.xvel, actorNew->int_ang());
actorNew->user.change.Y = MOVEy(actorNew->spr.xvel, actorNew->int_ang()); actorNew->user.change.Y = MOVEy(actorNew->spr.xvel, actorNew->int_ang());
@ -15601,7 +15601,7 @@ int InitTurretRail(DSWActor* actor, PLAYER* pp)
if (WeaponAutoAim(pp->actor, actorNew, 32, false) == -1) if (WeaponAutoAim(pp->actor, actorNew, 32, false) == -1)
{ {
actorNew->spr.__int_angle = NORM_ANGLE(actorNew->int_ang()); actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang());
} }
actorNew->user.change.X = MOVEx(actorNew->spr.xvel, actorNew->int_ang()); actorNew->user.change.X = MOVEx(actorNew->spr.xvel, actorNew->int_ang());
@ -15648,7 +15648,7 @@ int InitTurretLaser(DSWActor* actor, PLAYER* pp)
if (WeaponAutoAim(actor, actorNew, 32, false) == -1) if (WeaponAutoAim(actor, actorNew, 32, false) == -1)
{ {
actorNew->spr.__int_angle = NORM_ANGLE(actorNew->int_ang()); actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang());
} }
actorNew->user.change.X = MOVEx(actorNew->spr.xvel, actorNew->int_ang()); actorNew->user.change.X = MOVEx(actorNew->spr.xvel, actorNew->int_ang());
@ -16195,7 +16195,7 @@ int InitEnemyUzi(DSWActor* actor)
if (AimHitscanToTarget(actor, &daz, &daang, 200) != nullptr) if (AimHitscanToTarget(actor, &daz, &daang, 200) != nullptr)
{ {
// set angle to player and also face player when attacking // set angle to player and also face player when attacking
actor->spr.__int_angle = daang; actor->set_int_ang(daang;
daang += RandomRange(24) - 12; daang += RandomRange(24) - 12;
daang = NORM_ANGLE(daang); daang = NORM_ANGLE(daang);
daz += RandomRange(Z(40)) - Z(20); daz += RandomRange(Z(40)) - Z(20);
@ -16378,9 +16378,9 @@ int InitGrenade(PLAYER* pp)
auto oclipdist = actor->spr.clipdist; auto oclipdist = actor->spr.clipdist;
actor->spr.clipdist = 0; actor->spr.clipdist = 0;
actorNew->spr.__int_angle = NORM_ANGLE(actorNew->int_ang() + 512); actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang() + 512);
HelpMissileLateral(actorNew, 800); HelpMissileLateral(actorNew, 800);
actorNew->spr.__int_angle = NORM_ANGLE(actorNew->int_ang() - 512); actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang() - 512);
// don't do smoke for this movement // don't do smoke for this movement
actorNew->user.Flags |= (SPR_BOUNCE); actorNew->user.Flags |= (SPR_BOUNCE);
@ -16456,9 +16456,9 @@ int InitSpriteGrenade(DSWActor* actor)
actorNew->user.change.Y = MOVEy(actorNew->spr.xvel, actorNew->int_ang()); actorNew->user.change.Y = MOVEy(actorNew->spr.xvel, actorNew->int_ang());
actorNew->user.change.Z = actorNew->spr.zvel; actorNew->user.change.Z = actorNew->spr.zvel;
actorNew->spr.__int_angle = NORM_ANGLE(actorNew->int_ang() + 512); actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang() + 512);
HelpMissileLateral(actorNew, 800); HelpMissileLateral(actorNew, 800);
actorNew->spr.__int_angle = NORM_ANGLE(actorNew->int_ang() - 512); actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang() - 512);
// don't do smoke for this movement // don't do smoke for this movement
actorNew->user.Flags |= (SPR_BOUNCE); actorNew->user.Flags |= (SPR_BOUNCE);
@ -16562,9 +16562,9 @@ int InitEnemyMine(DSWActor* actor)
actorNew->user.Flags |= (SPR_UNDERWATER); actorNew->user.Flags |= (SPR_UNDERWATER);
MissileSetPos(actorNew, DoMine, 300); MissileSetPos(actorNew, DoMine, 300);
actorNew->spr.__int_angle = NORM_ANGLE(actorNew->spr.__int_angle-512); actorNew->set_int_ang(NORM_ANGLE(actorNew->spr.__int_angle-512);
MissileSetPos(actorNew, DoMine, 300); MissileSetPos(actorNew, DoMine, 300);
actorNew->spr.__int_angle = NORM_ANGLE(actorNew->spr.__int_angle+512); actorNew->set_int_ang(NORM_ANGLE(actorNew->spr.__int_angle+512);
actorNew->user.change.Z = -5000; actorNew->user.change.Z = -5000;
actorNew->user.change.X = MOVEx(actorNew->spr.xvel, actorNew->int_ang()); actorNew->user.change.X = MOVEx(actorNew->spr.xvel, actorNew->int_ang());
@ -16637,9 +16637,9 @@ int InitFireball(PLAYER* pp)
auto oclipdist = actor->spr.clipdist; auto oclipdist = actor->spr.clipdist;
actor->spr.clipdist = 0; actor->spr.clipdist = 0;
actorNew->spr.__int_angle = NORM_ANGLE(actorNew->int_ang() + 512); actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang() + 512);
HelpMissileLateral(actorNew, 2100); HelpMissileLateral(actorNew, 2100);
actorNew->spr.__int_angle = NORM_ANGLE(actorNew->int_ang() - 512); actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang() - 512);
if (pp->Flags & (PF_DIVING) || SpriteInUnderwaterArea(actorNew)) if (pp->Flags & (PF_DIVING) || SpriteInUnderwaterArea(actorNew))
actorNew->user.Flags |= (SPR_UNDERWATER); actorNew->user.Flags |= (SPR_UNDERWATER);
@ -16656,7 +16656,7 @@ int InitFireball(PLAYER* pp)
actorNew->spr.zvel = zvel >> 1; actorNew->spr.zvel = zvel >> 1;
if (WeaponAutoAimZvel(pp->actor, actorNew, &zvel, 32, false) == -1) if (WeaponAutoAimZvel(pp->actor, actorNew, &zvel, 32, false) == -1)
{ {
actorNew->spr.__int_angle = NORM_ANGLE(actorNew->int_ang() - 9); actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang() - 9);
} }
actorNew->user.change.X = MOVEx(actorNew->spr.xvel, actorNew->int_ang()); actorNew->user.change.X = MOVEx(actorNew->spr.xvel, actorNew->int_ang());
@ -16683,7 +16683,7 @@ int InitEnemyFireball(DSWActor* actor)
PlaySound(DIGI_FIREBALL1, actor, v3df_none); PlaySound(DIGI_FIREBALL1, actor, v3df_none);
// get angle to player and also face player when attacking // get angle to player and also face player when attacking
actor->spr.__int_angle = NORM_ANGLE(getangle(targetActor->int_pos().X - actor->int_pos().X, targetActor->int_pos().Y - actor->int_pos().Y)); actor->set_int_ang(NORM_ANGLE(getangle(targetActor->int_pos().X - actor->int_pos().X, targetActor->int_pos().Y - actor->int_pos().Y));
size_z = Z(ActorSizeY(actor)); size_z = Z(ActorSizeY(actor));
nz = actor->int_pos().Z - size_z + (size_z >> 2) + (size_z >> 3) + Z(4); nz = actor->int_pos().Z - size_z + (size_z >> 2) + (size_z >> 3) + Z(4);
@ -16706,9 +16706,9 @@ int InitEnemyFireball(DSWActor* actor)
actorNew->spr.zvel = 0; actorNew->spr.zvel = 0;
actorNew->spr.clipdist = 16>>2; actorNew->spr.clipdist = 16>>2;
actorNew->spr.__int_angle = NORM_ANGLE(actorNew->int_ang() + lat_ang[i]); actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang() + lat_ang[i]);
HelpMissileLateral(actorNew, 500); HelpMissileLateral(actorNew, 500);
actorNew->spr.__int_angle = NORM_ANGLE(actorNew->int_ang() - lat_ang[i]); actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang() - lat_ang[i]);
actorNew->user.change.X = xchange; actorNew->user.change.X = xchange;
actorNew->user.change.Y = ychange; actorNew->user.change.Y = ychange;
@ -17188,7 +17188,7 @@ int SpawnVehicleSmoke(DSWActor* actor)
if (RANDOM_P2(1024) < 512) if (RANDOM_P2(1024) < 512)
actorNew->spr.cstat |= (CSTAT_SPRITE_YFLIP); actorNew->spr.cstat |= (CSTAT_SPRITE_YFLIP);
actorNew->spr.__int_angle = RANDOM_P2(2048); actorNew->set_int_ang(RANDOM_P2(2048);
actorNew->spr.xvel = RANDOM_P2(32); actorNew->spr.xvel = RANDOM_P2(32);
actorNew->user.change.X = MOVEx(actorNew->spr.xvel, actorNew->int_ang()); actorNew->user.change.X = MOVEx(actorNew->spr.xvel, actorNew->int_ang());
actorNew->user.change.Y = MOVEy(actorNew->spr.xvel, actorNew->int_ang()); actorNew->user.change.Y = MOVEy(actorNew->spr.xvel, actorNew->int_ang());
@ -17214,7 +17214,7 @@ int SpawnSmokePuff(DSWActor* actor)
if (RANDOM_P2(1024) < 512) if (RANDOM_P2(1024) < 512)
actorNew->spr.cstat |= (CSTAT_SPRITE_YFLIP); actorNew->spr.cstat |= (CSTAT_SPRITE_YFLIP);
actorNew->spr.__int_angle = RANDOM_P2(2048); actorNew->set_int_ang(RANDOM_P2(2048);
actorNew->spr.xvel = RANDOM_P2(32); actorNew->spr.xvel = RANDOM_P2(32);
actorNew->user.change.X = MOVEx(actorNew->spr.xvel, actorNew->int_ang()); actorNew->user.change.X = MOVEx(actorNew->spr.xvel, actorNew->int_ang());
actorNew->user.change.Y = MOVEy(actorNew->spr.xvel, actorNew->int_ang()); actorNew->user.change.Y = MOVEy(actorNew->spr.xvel, actorNew->int_ang());
@ -17443,7 +17443,7 @@ void QueueHole(sectortype* hit_sect, walltype* hit_wall, int hit_x, int hit_y, i
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); wall_ang = NORM_ANGLE(getangle(hit_wall->delta())+512);
spawnedActor->spr.__int_angle = wall_ang; spawnedActor->set_int_ang(wall_ang;
// move it back some // move it back some
nx = bcos(spawnedActor->int_ang(), 4); nx = bcos(spawnedActor->int_ang(), 4);
@ -17513,7 +17513,7 @@ int QueueFloorBlood(DSWActor* actor)
spawnedActor->spr.xoffset = spawnedActor->spr.yoffset = 0; spawnedActor->spr.xoffset = spawnedActor->spr.yoffset = 0;
spawnedActor->spr.pos = actor->spr.pos; spawnedActor->spr.pos = actor->spr.pos;
spawnedActor->add_int_z(Z(1)); spawnedActor->add_int_z(Z(1));
spawnedActor->spr.__int_angle = RANDOM_P2(2048); // Just make it any old angle spawnedActor->set_int_ang(RANDOM_P2(2048); // Just make it any old angle
spawnedActor->spr.shade -= 5; // Brighten it up just a bit spawnedActor->spr.shade -= 5; // Brighten it up just a bit
spawnedActor->spr.cstat |= (CSTAT_SPRITE_ALIGNMENT_FLOOR); spawnedActor->spr.cstat |= (CSTAT_SPRITE_ALIGNMENT_FLOOR);
@ -17613,7 +17613,7 @@ int QueueFootPrint(DSWActor* actor)
spawnedActor->spr.clipdist = 0; spawnedActor->spr.clipdist = 0;
spawnedActor->spr.xoffset = spawnedActor->spr.yoffset = 0; spawnedActor->spr.xoffset = spawnedActor->spr.yoffset = 0;
spawnedActor->spr.pos = actor->spr.pos; spawnedActor->spr.pos = actor->spr.pos;
spawnedActor->spr.__int_angle = actor->int_ang(); spawnedActor->set_int_ang(actor->int_ang();
spawnedActor->user.Flags &= ~(SPR_SHADOW); spawnedActor->user.Flags &= ~(SPR_SHADOW);
switch (FootMode) switch (FootMode)
{ {
@ -17756,7 +17756,7 @@ DSWActor* QueueWallBlood(DSWActor* actor, short ang)
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); wall_ang = NORM_ANGLE(getangle(hit.hitWall->delta()) + 512);
spawnedActor->spr.__int_angle = wall_ang; spawnedActor->set_int_ang(wall_ang;
// move it back some // move it back some
nx = bcos(spawnedActor->int_ang(), 4); nx = bcos(spawnedActor->int_ang(), 4);

View file

@ -779,7 +779,7 @@ void SpawnZombie(PLAYER* pp, DSWActor* weaponActor)
auto actorNew = SpawnActor(STAT_ENEMY, ZOMBIE_RUN_R0, s_ZombieRun[0], pp->cursector, pp->pos.X, pp->pos.Y, pp->pos.Z, pp->angle.ang.asbuild(), 0); auto actorNew = SpawnActor(STAT_ENEMY, ZOMBIE_RUN_R0, s_ZombieRun[0], pp->cursector, pp->pos.X, pp->pos.Y, pp->pos.Z, pp->angle.ang.asbuild(), 0);
SetOwner(actorNew, ownerActor); SetOwner(actorNew, ownerActor);
actorNew->spr.pal = actorNew->user.spal = ownerActor->user.spal; actorNew->spr.pal = actorNew->user.spal = ownerActor->user.spal;
actorNew->spr.__int_angle = RANDOM_P2(2048); actorNew->set_int_ang(RANDOM_P2(2048);
SetupZombie(actorNew); SetupZombie(actorNew);
actorNew->spr.shade = -10; actorNew->spr.shade = -10;
actorNew->user.Flags2 |= (SPR2_DONT_TARGET_OWNER); actorNew->user.Flags2 |= (SPR2_DONT_TARGET_OWNER);
@ -826,7 +826,7 @@ void SpawnZombie2(DSWActor* actor)
actorNew->user.Counter3 = 0; actorNew->user.Counter3 = 0;
SetOwner(ownerActor, actorNew); SetOwner(ownerActor, actorNew);
actorNew->spr.pal = actorNew->user.spal = ownerActor->user.spal; actorNew->spr.pal = actorNew->user.spal = ownerActor->user.spal;
actorNew->spr.__int_angle = RANDOM_P2(2048); actorNew->set_int_ang(RANDOM_P2(2048);
SetupZombie(actorNew); SetupZombie(actorNew);
actorNew->spr.shade = -10; actorNew->spr.shade = -10;
actorNew->user.Flags2 |= (SPR2_DONT_TARGET_OWNER); actorNew->user.Flags2 |= (SPR2_DONT_TARGET_OWNER);