mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 17:01:51 +00:00
- set_int_ang in SW, part 1.
This commit is contained in:
parent
d55a84d7eb
commit
6381015229
18 changed files with 249 additions and 249 deletions
|
@ -127,7 +127,7 @@ int DoActorDie(DSWActor* actor, DSWActor* weapActor, int meansofdeath)
|
|||
actor->user.RotNum = 0;
|
||||
actor->spr.xvel <<= 1;
|
||||
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;
|
||||
|
||||
case NINJA_RUN_R0:
|
||||
|
@ -158,7 +158,7 @@ int DoActorDie(DSWActor* actor, DSWActor* weapActor, int meansofdeath)
|
|||
actor->spr.xvel = 200 + RandomRange(200);
|
||||
actor->user.jump_speed = -200 - RandomRange(250);
|
||||
DoActorBeginJump(actor);
|
||||
actor->spr.__int_angle = weapActor->int_ang();
|
||||
actor->set_int_ang(weapActor->int_ang());
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -177,7 +177,7 @@ int DoActorDie(DSWActor* actor, DSWActor* weapActor, int meansofdeath)
|
|||
actor->user.ActorActionFunc = nullptr;
|
||||
//actor->user.ActorActionFunc = NullAnimator;
|
||||
if (!sw_ninjahack)
|
||||
actor->spr.__int_angle = weapActor->int_ang();
|
||||
actor->set_int_ang(weapActor->int_ang());
|
||||
break;
|
||||
|
||||
case COOLG_RUN_R0:
|
||||
|
@ -211,7 +211,7 @@ int DoActorDie(DSWActor* actor, DSWActor* weapActor, int meansofdeath)
|
|||
}
|
||||
actor->user.ActorActionFunc = nullptr;
|
||||
// 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;
|
||||
|
||||
case UZI_SMOKE+1: // Shotgun
|
||||
|
@ -234,7 +234,7 @@ int DoActorDie(DSWActor* actor, DSWActor* weapActor, int meansofdeath)
|
|||
DoActorBeginJump(actor);
|
||||
actor->user.ActorActionFunc = nullptr;
|
||||
// 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;
|
||||
|
||||
default:
|
||||
|
@ -259,7 +259,7 @@ int DoActorDie(DSWActor* actor, DSWActor* weapActor, int meansofdeath)
|
|||
actor->spr.xvel = 300 + RandomRange(400);
|
||||
actor->user.jump_speed = -300 - RandomRange(350);
|
||||
DoActorBeginJump(actor);
|
||||
actor->spr.__int_angle = weapActor->int_ang();
|
||||
actor->set_int_ang(weapActor->int_ang());
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
@ -422,7 +422,7 @@ int DoActorDebris(DSWActor* actor)
|
|||
|
||||
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;
|
||||
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;
|
||||
|
@ -738,7 +738,7 @@ int DoActorStopFall(DSWActor* actor)
|
|||
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->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;
|
||||
|
||||
DoActorBeginJump(actor);
|
||||
|
|
|
@ -816,7 +816,7 @@ int DoActorCantMoveCloser(DSWActor* actor)
|
|||
|
||||
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);
|
||||
actor->user.Flags |= (SPR_FIND_PLAYER);
|
||||
|
@ -867,7 +867,7 @@ int DoActorMoveCloser(DSWActor* actor)
|
|||
else
|
||||
{
|
||||
// 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)
|
||||
{
|
||||
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);
|
||||
actor->user.Flags |= (SPR_RUN_AWAY);
|
||||
}
|
||||
|
@ -1128,7 +1128,7 @@ int InitActorAttack(DSWActor* actor)
|
|||
//NewStateGroup(actor, actor->user.ActorActionSet->Stand);
|
||||
|
||||
// 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 (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)
|
||||
{
|
||||
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);
|
||||
// NOT doing a RUN_AWAY
|
||||
actor->user.Flags &= ~(SPR_RUN_AWAY);
|
||||
|
@ -1228,7 +1228,7 @@ int InitActorWanderAround(DSWActor* actor)
|
|||
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -1244,7 +1244,7 @@ int InitActorFindPlayer(DSWActor* actor)
|
|||
|
||||
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);
|
||||
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();
|
||||
|
||||
// do the move
|
||||
actor->spr.__int_angle = ang;
|
||||
actor->set_int_ang(ang);
|
||||
nx = MulScale(dist, bcos(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
|
||||
actor->set_int_pos({ x, y, z });
|
||||
actor->spr.__int_angle = sang;
|
||||
actor->set_int_ang(sang);
|
||||
actor->user.loz = loz;
|
||||
actor->user.hiz = hiz;
|
||||
actor->user.lowActor = lowActor;
|
||||
|
@ -1452,13 +1452,13 @@ int FindNewAngle(DSWActor* actor, int dir, int DistToMove)
|
|||
// look directly ahead for a ledge
|
||||
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))
|
||||
{
|
||||
actor->spr.__int_angle = oang;
|
||||
actor->set_int_ang(oang);
|
||||
continue;
|
||||
}
|
||||
actor->spr.__int_angle = oang;
|
||||
actor->set_int_ang(oang);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -1497,7 +1497,7 @@ int FindNewAngle(DSWActor* actor, int dir, int DistToMove)
|
|||
if (actor->user.TargetDist > 4000)
|
||||
actor->user.TargetDist -= 3500;
|
||||
|
||||
actor->spr.__int_angle = save_ang;
|
||||
actor->set_int_ang(save_ang);
|
||||
return save_ang;
|
||||
}
|
||||
|
||||
|
@ -1576,7 +1576,7 @@ int InitActorReposition(DSWActor* actor)
|
|||
return 0;
|
||||
}
|
||||
|
||||
actor->spr.__int_angle = ang;
|
||||
actor->set_int_ang(ang);
|
||||
DoActorSetSpeed(actor, FAST_SPEED);
|
||||
actor->user.Flags &= ~(SPR_RUN_AWAY);
|
||||
}
|
||||
|
@ -1606,7 +1606,7 @@ int InitActorReposition(DSWActor* actor)
|
|||
DoActorSetSpeed(actor, MID_SPEED);
|
||||
}
|
||||
|
||||
actor->spr.__int_angle = ang;
|
||||
actor->set_int_ang(ang);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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);
|
||||
breakActor->spr.cstat = 0;
|
||||
breakActor->spr.extra = 0;
|
||||
breakActor->spr.__int_angle = ang;
|
||||
breakActor->set_int_ang(ang);
|
||||
breakActor->spr.picnum = ST1;
|
||||
breakActor->spr.xrepeat = breakActor->spr.yrepeat = 64;
|
||||
SetActorZ(breakActor, &hit_pos);
|
||||
|
|
|
@ -838,9 +838,9 @@ int DoBunnyBeginJumpAttack(DSWActor* actor)
|
|||
0L, actor->user.ceiling_dist, actor->user.floor_dist, CLIPMASK_ACTOR, ACTORMOVETICS);
|
||||
|
||||
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
|
||||
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);
|
||||
|
||||
|
@ -1025,10 +1025,10 @@ int DoBunnyQuickJump(DSWActor* actor)
|
|||
}
|
||||
|
||||
actor->copyXY(hitActor);
|
||||
actor->spr.__int_angle = hitActor->int_ang();
|
||||
actor->spr.__int_angle = NORM_ANGLE(actor->int_ang() + 1024);
|
||||
actor->set_int_ang(hitActor->int_ang());
|
||||
actor->set_int_ang(NORM_ANGLE(actor->int_ang() + 1024));
|
||||
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
|
||||
hitActor->user.Vis = hitActor->int_ang();
|
||||
|
||||
|
@ -1084,7 +1084,7 @@ int DoBunnyRipHeart(DSWActor* actor)
|
|||
actor->user.WaitTics = 6 * 120;
|
||||
|
||||
// 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;
|
||||
}
|
||||
|
||||
|
@ -1115,7 +1115,7 @@ void BunnyHatch(DSWActor* actor)
|
|||
actorNew->spr.pos = actor->spr.pos;
|
||||
actorNew->spr.xrepeat = 30; // Baby size
|
||||
actorNew->spr.yrepeat = 24;
|
||||
actorNew->spr.__int_angle = rip_ang[i];
|
||||
actorNew->set_int_ang(rip_ang[i]);
|
||||
actorNew->spr.pal = 0;
|
||||
SetupBunny(actorNew);
|
||||
actorNew->spr.shade = actor->spr.shade;
|
||||
|
@ -1171,7 +1171,7 @@ DSWActor* BunnyHatch2(DSWActor* actor)
|
|||
actorNew->spr.pos = actor->spr.pos;
|
||||
actorNew->spr.xrepeat = 30; // Baby size
|
||||
actorNew->spr.yrepeat = 24;
|
||||
actorNew->spr.__int_angle = RANDOM_P2(2048);
|
||||
actorNew->set_int_ang(RANDOM_P2(2048));
|
||||
actorNew->spr.pal = 0;
|
||||
SetupBunny(actorNew);
|
||||
actorNew->spr.shade = actor->spr.shade;
|
||||
|
@ -1282,7 +1282,7 @@ int DoBunnyMove(DSWActor* actor)
|
|||
NewStateGroup(actor,sg_BunnyStand);
|
||||
break;
|
||||
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;
|
||||
DoActorBeginJump(actor);
|
||||
actor->user.ActorActionFunc = DoActorMoveJump;
|
||||
|
|
|
@ -707,7 +707,7 @@ int DoCoolgCircle(DSWActor* actor)
|
|||
{
|
||||
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);
|
||||
ny = MulScale(actor->spr.xvel, bsin(actor->int_ang()), 14);
|
||||
|
|
|
@ -526,7 +526,7 @@ DSWActor* CopySprite(sprt const* tsp, sectortype* newsector)
|
|||
actorNew->spr.yrepeat = tsp->yrepeat;
|
||||
actorNew->spr.xoffset = tsp->xoffset;
|
||||
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.yvel = tsp->yvel;
|
||||
actorNew->spr.zvel = tsp->zvel;
|
||||
|
|
|
@ -438,7 +438,7 @@ int DoHornetCircle(DSWActor* actor)
|
|||
{
|
||||
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);
|
||||
ny = MulScale(actor->spr.xvel, bsin(actor->int_ang()), 14);
|
||||
|
@ -449,7 +449,7 @@ int DoHornetCircle(DSWActor* actor)
|
|||
|
||||
// try moving in the opposite direction
|
||||
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);
|
||||
ny = MulScale(actor->spr.xvel, bsin(actor->int_ang()), 14);
|
||||
|
||||
|
|
|
@ -443,7 +443,7 @@ void so_dointerpolations(int32_t smoothratio) // Stick at b
|
|||
{
|
||||
DSWActor* actor = data->actorofang;
|
||||
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
|
||||
{
|
||||
|
@ -472,7 +472,7 @@ void so_restoreinterpolations(void) // Stick at end of drawscree
|
|||
if (data->curelement == soi_sprang)
|
||||
{
|
||||
auto actorofang = interp->data[i].actorofang;
|
||||
if (actorofang) actorofang->spr.__int_angle = data->bakipos;
|
||||
if (actorofang) actorofang->set_int_ang(data->bakipos);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -1189,7 +1189,7 @@ int SpawnRadiationCloud(DSWActor* actor)
|
|||
//if (RANDOM_P2(1024) < 512)
|
||||
//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->user.Counter = 0;
|
||||
|
@ -1920,7 +1920,7 @@ int DoCarryFlag(DSWActor* actor)
|
|||
{
|
||||
vec3_t pos = { attached->int_pos().X, attached->int_pos().Y, ActorZOfMiddle(attached) };
|
||||
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
|
||||
|
@ -2069,7 +2069,7 @@ int DoCarryFlagNoDet(DSWActor* actor)
|
|||
{
|
||||
vec3_t pos = { attached->int_pos().X, attached->int_pos().Y, ActorZOfMiddle(attached) };
|
||||
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));
|
||||
}
|
||||
|
||||
|
@ -2195,22 +2195,22 @@ int SpawnShell(DSWActor* actor, int ShellNum)
|
|||
|
||||
if (ShellNum == -3)
|
||||
{
|
||||
actorNew->spr.__int_angle = actor->int_ang();
|
||||
actorNew->set_int_ang(actor->int_ang());
|
||||
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
|
||||
actorNew->spr.__int_angle = NORM_ANGLE(actorNew->spr.__int_angle+712);
|
||||
actorNew->set_int_ang(NORM_ANGLE(actorNew->spr.int_ang() + 712));
|
||||
}
|
||||
else
|
||||
{
|
||||
actorNew->spr.__int_angle = actor->int_ang();
|
||||
actorNew->set_int_ang(actor->int_ang());
|
||||
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);
|
||||
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 = NORM_ANGLE(actorNew->int_ang());
|
||||
actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang()));
|
||||
|
||||
// Set the shell number
|
||||
actorNew->user.ShellNum = ShellCount;
|
||||
|
@ -2218,13 +2218,13 @@ int SpawnShell(DSWActor* actor, int ShellNum)
|
|||
break;
|
||||
case SHOT_SHELL:
|
||||
actorNew->add_int_z(-Z(13));
|
||||
actorNew->spr.__int_angle = actor->int_ang();
|
||||
actorNew->set_int_ang(actor->int_ang());
|
||||
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);
|
||||
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 = NORM_ANGLE(actorNew->int_ang());
|
||||
actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang()));
|
||||
|
||||
// Set the shell number
|
||||
actorNew->user.ShellNum = ShellCount;
|
||||
|
|
|
@ -1456,14 +1456,14 @@ void UpdatePlayerSpriteAngle(PLAYER* pp)
|
|||
{
|
||||
DSWActor* plActor = pp->actor;
|
||||
plActor->backupang();
|
||||
plActor->spr.__int_angle = pp->angle.ang.asbuild();
|
||||
plActor->set_int_ang(pp->angle.ang.asbuild();
|
||||
|
||||
plActor = pp->PlayerUnderActor;
|
||||
|
||||
if (!Prediction && plActor)
|
||||
{
|
||||
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))
|
||||
{
|
||||
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))
|
||||
{
|
||||
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->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);
|
||||
|
@ -1748,7 +1748,7 @@ void UpdatePlayerSprite(PLAYER* pp)
|
|||
if (pp->Flags & (PF_DEAD))
|
||||
{
|
||||
ChangeActorSect(pp->actor, pp->cursector);
|
||||
actor->spr.__int_angle = pp->angle.ang.asbuild();
|
||||
actor->set_int_ang(pp->angle.ang.asbuild();
|
||||
UpdatePlayerUnderSprite(pp);
|
||||
return;
|
||||
}
|
||||
|
@ -1823,7 +1823,7 @@ void UpdatePlayerSprite(PLAYER* pp)
|
|||
|
||||
UpdatePlayerUnderSprite(pp);
|
||||
|
||||
actor->spr.__int_angle = pp->angle.ang.asbuild();
|
||||
actor->set_int_ang(pp->angle.ang.asbuild();
|
||||
}
|
||||
|
||||
void DoPlayerZrange(PLAYER* pp)
|
||||
|
@ -2278,7 +2278,7 @@ void DoTankTreads(PLAYER* pp)
|
|||
if (!TEST_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
|
||||
|
@ -2286,7 +2286,7 @@ void DoTankTreads(PLAYER* pp)
|
|||
if (TEST_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))
|
||||
{
|
||||
SET_BOOL2(actor);
|
||||
actor->spr.__int_angle = NORM_ANGLE(actor->int_ang() + 1024);
|
||||
actor->set_int_ang(NORM_ANGLE(actor->int_ang() + 1024);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -2307,7 +2307,7 @@ void DoTankTreads(PLAYER* pp)
|
|||
if (TEST_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))
|
||||
{
|
||||
SET_BOOL2(actor);
|
||||
actor->spr.__int_angle = NORM_ANGLE(actor->int_ang() + 1024);
|
||||
actor->set_int_ang(NORM_ANGLE(actor->int_ang() + 1024);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -2328,7 +2328,7 @@ void DoTankTreads(PLAYER* pp)
|
|||
if (TEST_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.cstat &= ~(CSTAT_SPRITE_YCENTER);
|
||||
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);
|
||||
PlaySound(DIGI_TELEPORT, pp, v3df_none);
|
||||
|
|
|
@ -946,7 +946,7 @@ int InitRipperHang(DSWActor* actor)
|
|||
}
|
||||
|
||||
Found = true;
|
||||
actor->spr.__int_angle = tang;
|
||||
actor->set_int_ang(tang;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -1002,7 +1002,7 @@ int DoRipperMoveHang(DSWActor* actor)
|
|||
actor->user.WaitTics = 2 + ((RANDOM_P2(4 << 8) >> 8) * 120);
|
||||
|
||||
// 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;
|
||||
}
|
||||
|
@ -1051,9 +1051,9 @@ int DoRipperBeginJumpAttack(DSWActor* actor)
|
|||
0L, actor->user.ceiling_dist, actor->user.floor_dist, CLIPMASK_ACTOR, ACTORMOVETICS);
|
||||
|
||||
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
|
||||
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);
|
||||
|
||||
|
@ -1149,7 +1149,7 @@ int DoRipperRipHeart(DSWActor* actor)
|
|||
actor->user.WaitTics = 6 * 120;
|
||||
|
||||
// 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;
|
||||
}
|
||||
|
||||
|
@ -1176,7 +1176,7 @@ void RipperHatch(DSWActor* actor)
|
|||
ClearOwner(actorNew);
|
||||
actorNew->spr.pos = actor->spr.pos;
|
||||
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;
|
||||
SetupRipper(actorNew);
|
||||
|
||||
|
|
|
@ -955,7 +955,7 @@ int InitRipper2Hang(DSWActor* actor)
|
|||
}
|
||||
|
||||
Found = true;
|
||||
actor->spr.__int_angle = tang;
|
||||
actor->set_int_ang(tang;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -1022,7 +1022,7 @@ int DoRipper2MoveHang(DSWActor* actor)
|
|||
actor->user.WaitTics = 0; // Double jump
|
||||
|
||||
// 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;
|
||||
}
|
||||
|
@ -1072,9 +1072,9 @@ int DoRipper2BeginJumpAttack(DSWActor* actor)
|
|||
Collision coll = move_sprite(actor, bcos(tang, -7), bsin(tang, -7),
|
||||
0, actor->user.ceiling_dist, actor->user.floor_dist, CLIPMASK_ACTOR, ACTORMOVETICS);
|
||||
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
|
||||
actor->spr.__int_angle = NORM_ANGLE(tang);
|
||||
actor->set_int_ang(NORM_ANGLE(tang);
|
||||
|
||||
|
||||
DoActorSetSpeed(actor, FAST_SPEED);
|
||||
|
@ -1171,7 +1171,7 @@ int DoRipper2RipHeart(DSWActor* actor)
|
|||
actor->user.WaitTics = 6 * 120;
|
||||
|
||||
// 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;
|
||||
}
|
||||
|
||||
|
@ -1202,7 +1202,7 @@ void Ripper2Hatch(DSWActor* actor)
|
|||
actorNew->spr.pos = actor->spr.pos;
|
||||
|
||||
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.shade = -10;
|
||||
SetupRipper2(actorNew);
|
||||
|
|
|
@ -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);
|
||||
SectorMidPoint(sectp, &x, &y, &z);
|
||||
// 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 });
|
||||
|
||||
// setup vars needed by SectorExp
|
||||
|
|
|
@ -284,7 +284,7 @@ int DoSkullBeginDeath(DSWActor* actor)
|
|||
if (num_ord > 3) num_ord = 3;
|
||||
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);
|
||||
}
|
||||
break;
|
||||
|
@ -296,7 +296,7 @@ int DoSkullBeginDeath(DSWActor* actor)
|
|||
if (num_ord > 10) num_ord = 10;
|
||||
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);
|
||||
}
|
||||
break;
|
||||
|
@ -313,7 +313,7 @@ int DoSkullBeginDeath(DSWActor* actor)
|
|||
if (num_ord > 10) num_ord = 10;
|
||||
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);
|
||||
}
|
||||
break;
|
||||
|
@ -321,7 +321,7 @@ int DoSkullBeginDeath(DSWActor* actor)
|
|||
SpawnMineExp(actor);
|
||||
for (i=0; i<3; i++)
|
||||
{
|
||||
actor->spr.__int_angle = NORM_ANGLE(RandomRange(2048));
|
||||
actor->set_int_ang(NORM_ANGLE(RandomRange(2048));
|
||||
InitPhosphorus(actor);
|
||||
}
|
||||
break;
|
||||
|
@ -347,7 +347,7 @@ int DoSkullJump(DSWActor* actor)
|
|||
if (actor->spr.xvel)
|
||||
DoSkullMove(actor);
|
||||
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))
|
||||
{
|
||||
|
@ -453,13 +453,13 @@ int DoSkullWait(DSWActor* actor)
|
|||
else
|
||||
// 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);
|
||||
|
||||
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->user.jump_speed = -700;
|
||||
NewStateGroup(actor, sg_SkullJump);
|
||||
|
@ -664,7 +664,7 @@ int DoBettyBeginDeath(DSWActor* actor)
|
|||
if (num_ord > 3) num_ord = 3;
|
||||
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);
|
||||
}
|
||||
break;
|
||||
|
@ -676,7 +676,7 @@ int DoBettyBeginDeath(DSWActor* actor)
|
|||
if (num_ord > 10) num_ord = 10;
|
||||
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);
|
||||
}
|
||||
break;
|
||||
|
@ -692,14 +692,14 @@ int DoBettyBeginDeath(DSWActor* actor)
|
|||
if (num_ord > 10) num_ord = 10;
|
||||
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);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
for (i=0; i<5; i++)
|
||||
{
|
||||
actor->spr.__int_angle = NORM_ANGLE(RandomRange(2048));
|
||||
actor->set_int_ang(NORM_ANGLE(RandomRange(2048));
|
||||
InitPhosphorus(actor);
|
||||
SpawnMineExp(actor);
|
||||
}
|
||||
|
@ -726,7 +726,7 @@ int DoBettyJump(DSWActor* actor)
|
|||
if (actor->spr.xvel)
|
||||
DoBettyMove(actor);
|
||||
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))
|
||||
{
|
||||
|
@ -825,13 +825,13 @@ int DoBettyWait(DSWActor* actor)
|
|||
else
|
||||
// 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);
|
||||
|
||||
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->user.jump_speed = -700;
|
||||
NewStateGroup(actor, sg_BettyJump);
|
||||
|
|
|
@ -893,7 +893,7 @@ DSWActor* SpawnActor(int stat, int id, STATE* state, sectortype* sect, int x, in
|
|||
|
||||
spawnedActor->spr.xrepeat = 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;
|
||||
|
||||
return spawnedActor;
|
||||
|
@ -1874,7 +1874,7 @@ void SpriteSetup(void)
|
|||
actor->spr.xvel = 0;
|
||||
else
|
||||
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
|
||||
ChangeActorSect(actor, hit.hitSector);
|
||||
StartInterpolation(hit.hitWall, Interp_Wall_PanX);
|
||||
|
@ -2491,7 +2491,7 @@ void SpriteSetup(void)
|
|||
actorNew->spr.cstat = 0;
|
||||
actorNew->spr.extra = 0;
|
||||
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->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.extra = 0;
|
||||
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;
|
||||
|
||||
// vel
|
||||
|
@ -3558,7 +3558,7 @@ int ActorCoughItem(DSWActor* actor)
|
|||
actorNew->spr.cstat = 0;
|
||||
actorNew->spr.extra = 0;
|
||||
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;
|
||||
|
||||
// vel
|
||||
|
@ -3584,7 +3584,7 @@ int ActorCoughItem(DSWActor* actor)
|
|||
actorNew->spr.cstat = 0;
|
||||
actorNew->spr.extra = 0;
|
||||
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;
|
||||
|
||||
// vel
|
||||
|
@ -3613,7 +3613,7 @@ int ActorCoughItem(DSWActor* actor)
|
|||
actorNew->spr.cstat = 0;
|
||||
actorNew->spr.extra = 0;
|
||||
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;
|
||||
|
||||
// vel
|
||||
|
@ -3673,7 +3673,7 @@ int ActorCoughItem(DSWActor* actor)
|
|||
actorNew->spr.cstat = 0;
|
||||
actorNew->spr.extra = 0;
|
||||
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;
|
||||
|
||||
// vel
|
||||
|
@ -3729,7 +3729,7 @@ int ActorCoughItem(DSWActor* actor)
|
|||
actorNew->spr.cstat = 0;
|
||||
actorNew->spr.extra = 0;
|
||||
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
|
||||
SP_TAG7(actorNew) = 10;
|
||||
|
@ -3792,16 +3792,16 @@ int SpawnItemsMatch(short match)
|
|||
case 90:
|
||||
spawnedActor = BunnyHatch2(itActor);
|
||||
spawnedActor->user.spal = spawnedActor->spr.pal = PALETTE_PLAYER8; // Boy
|
||||
spawnedActor->spr.__int_angle = itActor->int_ang();
|
||||
spawnedActor->set_int_ang(itActor->int_ang();
|
||||
break;
|
||||
case 91:
|
||||
spawnedActor = BunnyHatch2(itActor);
|
||||
spawnedActor->user.spal = spawnedActor->spr.pal = PALETTE_PLAYER0; // Girl
|
||||
spawnedActor->spr.__int_angle = itActor->int_ang();
|
||||
spawnedActor->set_int_ang(itActor->int_ang();
|
||||
break;
|
||||
case 92:
|
||||
spawnedActor = BunnyHatch2(itActor);
|
||||
spawnedActor->spr.__int_angle = itActor->int_ang();
|
||||
spawnedActor->set_int_ang(itActor->int_ang();
|
||||
break;
|
||||
|
||||
case 40:
|
||||
|
@ -4736,7 +4736,7 @@ int DoGrating(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);
|
||||
return 0;
|
||||
|
|
|
@ -304,7 +304,7 @@ DSWActor* TrackClonePoint(DSWActor* actor)
|
|||
actorNew->spr.cstat = 0;
|
||||
actorNew->spr.extra = 0;
|
||||
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.hitag = actor->spr.hitag;
|
||||
|
||||
|
@ -1493,7 +1493,7 @@ void PlaceActorsOnTracks(void)
|
|||
}
|
||||
|
||||
// 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();
|
||||
actor->spr.__int_angle = actor->user.sang;
|
||||
actor->set_int_ang(actor->user.sang;
|
||||
|
||||
if (actor->user.Flags & (SPR_ON_SO_SECTOR))
|
||||
{
|
||||
|
@ -1733,12 +1733,12 @@ PlayerPart:
|
|||
if ((actor->sector()->firstWall()->extra & WALLFX_LOOP_REVERSE_SPIN))
|
||||
{
|
||||
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
|
||||
{
|
||||
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);
|
||||
|
||||
|
@ -1750,7 +1750,7 @@ PlayerPart:
|
|||
// NOT part of a sector - independant of any sector
|
||||
auto pos = actor->int_pos();
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -2832,7 +2832,7 @@ void DoActorHitTrackEndPoint(DSWActor* actor)
|
|||
|
||||
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
|
||||
{
|
||||
|
@ -2848,7 +2848,7 @@ void DoActorHitTrackEndPoint(DSWActor* actor)
|
|||
|
||||
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
|
||||
{
|
||||
|
@ -2971,7 +2971,7 @@ bool ActorTrackDecide(TRACK_POINT* tpoint, DSWActor* actor)
|
|||
case TRACK_ACTOR_JUMP:
|
||||
if (actor->user.ActorActionSet->Jump)
|
||||
{
|
||||
actor->spr.__int_angle = tpoint->ang;
|
||||
actor->set_int_ang(tpoint->ang;
|
||||
|
||||
if (!tpoint->tag_high)
|
||||
actor->user.jump_speed = ACTOR_STD_JUMP;
|
||||
|
@ -2991,7 +2991,7 @@ bool ActorTrackDecide(TRACK_POINT* tpoint, DSWActor* actor)
|
|||
int zdiff;
|
||||
HitInfo hit{};
|
||||
|
||||
actor->spr.__int_angle = tpoint->ang;
|
||||
actor->set_int_ang(tpoint->ang;
|
||||
|
||||
|
||||
ActorLeaveTrack(actor);
|
||||
|
@ -3040,7 +3040,7 @@ bool ActorTrackDecide(TRACK_POINT* tpoint, DSWActor* actor)
|
|||
|
||||
if (actor->user.ActorActionSet->Jump)
|
||||
{
|
||||
actor->spr.__int_angle = tpoint->ang;
|
||||
actor->set_int_ang(tpoint->ang;
|
||||
|
||||
ActorLeaveTrack(actor);
|
||||
|
||||
|
@ -3074,7 +3074,7 @@ bool ActorTrackDecide(TRACK_POINT* tpoint, DSWActor* actor)
|
|||
|
||||
if (actor->user.Rot != actor->user.ActorActionSet->Duck)
|
||||
{
|
||||
actor->spr.__int_angle = tpoint->ang;
|
||||
actor->set_int_ang(tpoint->ang;
|
||||
|
||||
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)
|
||||
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[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->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
|
||||
|
@ -3442,7 +3442,7 @@ int ActorFollowTrack(DSWActor* actor, short locktics)
|
|||
|
||||
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
|
||||
|
@ -3457,7 +3457,7 @@ int ActorFollowTrack(DSWActor* actor, short locktics)
|
|||
if (!(actor->user.Flags & (SPR_CLIMBING | SPR_DONT_UPDATE_ANG)))
|
||||
{
|
||||
// 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))
|
||||
|
@ -3511,7 +3511,7 @@ int ActorFollowTrack(DSWActor* actor, short locktics)
|
|||
|
||||
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);
|
||||
actor->spr.cstat &= ~(CSTAT_SPRITE_YCENTER);
|
||||
|
|
|
@ -3664,13 +3664,13 @@ AutoShrap:
|
|||
|
||||
if (p->random_disperse)
|
||||
{
|
||||
actor->spr.__int_angle = 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(shrap_ang + (RANDOM_P2(p->ang_range<<5)>>5) - (p->ang_range >> 1);
|
||||
actor->set_int_ang(NORM_ANGLE(actor->int_ang());
|
||||
}
|
||||
else
|
||||
{
|
||||
actor->spr.__int_angle = start_ang + (i * dang);
|
||||
actor->spr.__int_angle = NORM_ANGLE(actor->int_ang());
|
||||
actor->set_int_ang(start_ang + (i * dang);
|
||||
actor->set_int_ang(NORM_ANGLE(actor->int_ang());
|
||||
}
|
||||
|
||||
// for FastShrap
|
||||
|
@ -4099,13 +4099,13 @@ int SpawnBlood(DSWActor* actor, DSWActor* weapActor, short hit_ang, int hit_x, i
|
|||
|
||||
if (p->random_disperse)
|
||||
{
|
||||
actorNew->spr.__int_angle = 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(hit_ang + (RANDOM_P2(p->ang_range<<5)>>5) - (p->ang_range >> 1);
|
||||
actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang());
|
||||
}
|
||||
else
|
||||
{
|
||||
actorNew->spr.__int_angle = start_ang + (i * dang);
|
||||
actorNew->spr.__int_angle = NORM_ANGLE(actorNew->int_ang());
|
||||
actorNew->set_int_ang(start_ang + (i * dang);
|
||||
actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang());
|
||||
}
|
||||
|
||||
actorNew->user.Flags |= (SPR_BOUNCE);
|
||||
|
@ -5046,7 +5046,7 @@ int ActorHealth(DSWActor* actor, short amt)
|
|||
PlaySound(DIGI_NINJACHOKE, actor, v3df_follow);
|
||||
InitPlasmaFountain(nullptr, actor);
|
||||
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);
|
||||
if (sw_ninjahack)
|
||||
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.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;
|
||||
|
@ -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.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;
|
||||
|
@ -7949,7 +7949,7 @@ int DoPlasmaFountain(DSWActor* actor)
|
|||
|
||||
// move with sprite
|
||||
SetActorZ(actor, attachActor->int_pos());
|
||||
actor->spr.__int_angle = attachActor->int_ang();
|
||||
actor->set_int_ang(attachActor->int_ang();
|
||||
|
||||
actor->user.Counter++;
|
||||
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);
|
||||
|
||||
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
|
||||
//
|
||||
|
@ -8111,7 +8111,7 @@ void WallBounce(DSWActor* actor, short ang)
|
|||
{
|
||||
actor->user.change.X = -actor->user.change.X;
|
||||
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.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;
|
||||
|
@ -8243,7 +8243,7 @@ int DoGrenade(DSWActor* actor)
|
|||
{
|
||||
for (i=0; i<5; i++)
|
||||
{
|
||||
actor->spr.__int_angle = NORM_ANGLE(RandomRange(2048));
|
||||
actor->set_int_ang(NORM_ANGLE(RandomRange(2048));
|
||||
InitPhosphorus(actor);
|
||||
}
|
||||
}
|
||||
|
@ -8313,7 +8313,7 @@ int DoGrenade(DSWActor* actor)
|
|||
{
|
||||
for (i=0; i<5; i++)
|
||||
{
|
||||
actor->spr.__int_angle = NORM_ANGLE(RandomRange(2048));
|
||||
actor->set_int_ang(NORM_ANGLE(RandomRange(2048));
|
||||
InitPhosphorus(actor);
|
||||
}
|
||||
}
|
||||
|
@ -8356,7 +8356,7 @@ int DoGrenade(DSWActor* actor)
|
|||
{
|
||||
for (i=0; i<5; i++)
|
||||
{
|
||||
actor->spr.__int_angle = NORM_ANGLE(RandomRange(2048));
|
||||
actor->set_int_ang(NORM_ANGLE(RandomRange(2048));
|
||||
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 };
|
||||
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
|
||||
|
@ -9393,7 +9393,7 @@ int SpawnExtraMicroMini(DSWActor* actor)
|
|||
actorNew->user.floor_dist = actor->user.floor_dist;
|
||||
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 += RandomRange(Z(16)) - Z(8);
|
||||
|
||||
|
@ -9498,7 +9498,7 @@ int DoUziBullet(DSWActor* actor)
|
|||
actorNew->spr.xrepeat = UZI_SMOKE_REPEAT;
|
||||
actorNew->spr.yrepeat = UZI_SMOKE_REPEAT;
|
||||
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.cstat |= (CSTAT_SPRITE_TRANSLUCENT | CSTAT_SPRITE_YCENTER);
|
||||
|
||||
|
@ -9509,7 +9509,7 @@ int DoUziBullet(DSWActor* actor)
|
|||
actorNew->spr.xrepeat = UZI_SPARK_REPEAT;
|
||||
actorNew->spr.yrepeat = UZI_SPARK_REPEAT;
|
||||
SetOwner(GetOwner(actor), actorNew);
|
||||
actorNew->spr.__int_angle = actor->int_ang();
|
||||
actorNew->set_int_ang(actor->int_ang();
|
||||
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.Y = -actor->user.change.Y;
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -11181,7 +11181,7 @@ int DoRing(DSWActor* actor)
|
|||
}
|
||||
|
||||
// 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
|
||||
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),
|
||||
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();
|
||||
|
||||
|
@ -11306,9 +11306,9 @@ int DoSerpRing(DSWActor* actor)
|
|||
|
||||
// rotate the heads
|
||||
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
|
||||
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
|
||||
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[];
|
||||
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 += (actor->spr.xvel >> 1);
|
||||
actor->spr.xvel += (RANDOM_P2(128<<8)>>8);
|
||||
|
@ -11379,7 +11379,7 @@ int InitLavaThrow(DSWActor* actor)
|
|||
short w;
|
||||
|
||||
// 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;
|
||||
ny = actor->int_pos().Y;
|
||||
|
@ -11395,7 +11395,7 @@ int InitLavaThrow(DSWActor* actor)
|
|||
actorNew->spr.xrepeat = 72;
|
||||
actorNew->spr.shade = -15;
|
||||
actorNew->spr.zvel = 0;
|
||||
actorNew->spr.__int_angle = nang;
|
||||
actorNew->set_int_ang(nang;
|
||||
|
||||
if (RANDOM_P2(1024) > 512)
|
||||
actorNew->spr.cstat |= (CSTAT_SPRITE_XFLIP);
|
||||
|
@ -11458,7 +11458,7 @@ void InitVulcanBoulder(DSWActor* actor)
|
|||
SetOwner(actor, actorNew);
|
||||
actorNew->spr.xrepeat = actorNew->spr.yrepeat = 8 + RandomRange(72);
|
||||
actorNew->spr.shade = -40;
|
||||
actorNew->spr.__int_angle = nang;
|
||||
actorNew->set_int_ang(nang;
|
||||
actorNew->user.Counter = 0;
|
||||
|
||||
zsize = ActorSizeZ(actorNew);
|
||||
|
@ -11529,7 +11529,7 @@ int InitSerpRing(DSWActor* actor)
|
|||
// ang around the serp is now slide_ang
|
||||
actorNew->user.slide_ang = actorNew->int_ang();
|
||||
// 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
|
||||
actor->user.Flags ^= SPR_BOUNCE;
|
||||
|
@ -11612,9 +11612,9 @@ void InitSpellNapalm(PLAYER* pp)
|
|||
|
||||
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);
|
||||
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());
|
||||
|
@ -11685,9 +11685,9 @@ int InitEnemyNapalm(DSWActor* actor)
|
|||
|
||||
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);
|
||||
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)
|
||||
|
@ -11815,7 +11815,7 @@ int InitSwordAttack(PLAYER* pp)
|
|||
bubble = SpawnBubble(pp->actor);
|
||||
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;
|
||||
|
||||
|
@ -11986,7 +11986,7 @@ int InitFistAttack(PLAYER* pp)
|
|||
bubble = SpawnBubble(pp->actor);
|
||||
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;
|
||||
|
||||
|
@ -12205,9 +12205,9 @@ int InitSumoNapalm(DSWActor* actor)
|
|||
|
||||
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);
|
||||
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)
|
||||
|
@ -12252,7 +12252,7 @@ int InitSumoSkull(DSWActor* actor)
|
|||
actorNew->spr.pal = 0;
|
||||
|
||||
// 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
|
||||
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_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);
|
||||
|
||||
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_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);
|
||||
|
||||
if (dist != 0)
|
||||
|
@ -13031,9 +13031,9 @@ int InitLaser(PLAYER* pp)
|
|||
auto oclipdist = actor->spr.clipdist;
|
||||
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);
|
||||
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))
|
||||
actorNew->user.Flags |= (SPR_UNDERWATER);
|
||||
|
@ -13069,7 +13069,7 @@ int InitLaser(PLAYER* pp)
|
|||
|
||||
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());
|
||||
|
@ -13135,9 +13135,9 @@ int InitRail(PLAYER* pp)
|
|||
actor->spr.clipdist = 0;
|
||||
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);
|
||||
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))
|
||||
actorNew->user.Flags |= (SPR_UNDERWATER);
|
||||
|
@ -13154,7 +13154,7 @@ int InitRail(PLAYER* pp)
|
|||
actorNew->spr.zvel = zvel >> 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
|
||||
zvel = actorNew->spr.zvel; // Let autoaiming set zvel now
|
||||
|
@ -13211,9 +13211,9 @@ int InitZillaRail(DSWActor* actor)
|
|||
actor->spr.clipdist = 0;
|
||||
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);
|
||||
actorNew->spr.__int_angle = NORM_ANGLE(actorNew->int_ang() - 512);
|
||||
actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang() - 512);
|
||||
|
||||
if (SpriteInUnderwaterArea(actorNew))
|
||||
actorNew->user.Flags |= (SPR_UNDERWATER);
|
||||
|
@ -13230,7 +13230,7 @@ int InitZillaRail(DSWActor* actor)
|
|||
actorNew->spr.zvel = zvel >> 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
|
||||
zvel = actorNew->spr.zvel; // Let autoaiming set zvel now
|
||||
|
@ -13317,9 +13317,9 @@ int InitRocket(PLAYER* pp)
|
|||
auto oclipdist = actor->spr.clipdist;
|
||||
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);
|
||||
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))
|
||||
actorNew->user.Flags |= (SPR_UNDERWATER);
|
||||
|
@ -13340,7 +13340,7 @@ int InitRocket(PLAYER* pp)
|
|||
actorNew->spr.zvel = zvel >> 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
|
||||
zvel = actorNew->spr.zvel; // Let autoaiming set zvel now
|
||||
|
@ -13422,9 +13422,9 @@ int InitBunnyRocket(PLAYER* pp)
|
|||
auto oclipdist = actor->spr.clipdist;
|
||||
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);
|
||||
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))
|
||||
actorNew->user.Flags |= (SPR_UNDERWATER);
|
||||
|
@ -13445,7 +13445,7 @@ int InitBunnyRocket(PLAYER* pp)
|
|||
actorNew->spr.zvel = zvel >> 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
|
||||
zvel = actorNew->spr.zvel; // Let autoaiming set zvel now
|
||||
|
@ -13515,9 +13515,9 @@ int InitNuke(PLAYER* pp)
|
|||
auto oclipdist = actor->spr.clipdist;
|
||||
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);
|
||||
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))
|
||||
actorNew->user.Flags |= (SPR_UNDERWATER);
|
||||
|
@ -13538,7 +13538,7 @@ int InitNuke(PLAYER* pp)
|
|||
actorNew->spr.zvel = zvel >> 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
|
||||
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_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);
|
||||
actorNew->spr.__int_angle = NORM_ANGLE(actorNew->int_ang() - 512);
|
||||
actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang() - 512);
|
||||
|
||||
if (SpriteInUnderwaterArea(actorNew))
|
||||
actorNew->user.Flags |= (SPR_UNDERWATER);
|
||||
|
@ -13615,7 +13615,7 @@ int InitEnemyNuke(DSWActor* actor)
|
|||
actorNew->spr.zvel = zvel >> 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
|
||||
zvel = actorNew->spr.zvel; // Let autoaiming set zvel now
|
||||
|
@ -13701,10 +13701,10 @@ int InitMicro(PLAYER* pp)
|
|||
auto oclipdist = actor->spr.clipdist;
|
||||
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;
|
||||
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))
|
||||
actorNew->user.Flags |= (SPR_UNDERWATER);
|
||||
|
@ -13740,7 +13740,7 @@ int InitMicro(PLAYER* pp)
|
|||
}
|
||||
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());
|
||||
|
@ -14064,7 +14064,7 @@ int InitSerpSpell(DSWActor* actor)
|
|||
|
||||
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(),
|
||||
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;
|
||||
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);
|
||||
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)
|
||||
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)
|
||||
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.Y = MOVEy(actorNew->spr.xvel, actorNew->int_ang());
|
||||
|
@ -14162,7 +14162,7 @@ int InitSerpMonstSpell(DSWActor* actor)
|
|||
|
||||
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(),
|
||||
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;
|
||||
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);
|
||||
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)
|
||||
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)
|
||||
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.Y = MOVEy(actorNew->spr.xvel, actorNew->int_ang());
|
||||
|
@ -14231,7 +14231,7 @@ int InitEnemyRocket(DSWActor* actor)
|
|||
PlaySound(DIGI_NINJARIOTATTACK, actor, v3df_none);
|
||||
|
||||
// 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;
|
||||
ny = actor->int_pos().Y;
|
||||
|
@ -14253,7 +14253,7 @@ int InitEnemyRocket(DSWActor* actor)
|
|||
actorNew->spr.xrepeat = 28;
|
||||
actorNew->spr.shade = -15;
|
||||
actorNew->spr.zvel = 0;
|
||||
actorNew->spr.__int_angle = nang;
|
||||
actorNew->set_int_ang(nang;
|
||||
actorNew->spr.clipdist = 64L>>2;
|
||||
|
||||
actorNew->user.RotNum = 5;
|
||||
|
@ -14306,11 +14306,11 @@ int InitEnemyRail(DSWActor* actor)
|
|||
PlaySound(DIGI_RAILFIRE, actor, v3df_dontpan|v3df_doppler);
|
||||
|
||||
// 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
|
||||
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;
|
||||
ny = actor->int_pos().Y;
|
||||
|
@ -14382,7 +14382,7 @@ int InitZillaRocket(DSWActor* actor)
|
|||
PlaySound(DIGI_NINJARIOTATTACK, actor, v3df_none);
|
||||
|
||||
// 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++)
|
||||
{
|
||||
|
@ -14399,7 +14399,7 @@ int InitZillaRocket(DSWActor* actor)
|
|||
actorNew->spr.xrepeat = 28;
|
||||
actorNew->spr.shade = -15;
|
||||
actorNew->spr.zvel = 0;
|
||||
actorNew->spr.__int_angle = nang;
|
||||
actorNew->set_int_ang(nang;
|
||||
actorNew->spr.clipdist = 64L>>2;
|
||||
|
||||
actorNew->user.RotNum = 5;
|
||||
|
@ -14422,9 +14422,9 @@ int InitZillaRocket(DSWActor* actor)
|
|||
|
||||
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);
|
||||
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);
|
||||
|
@ -14444,7 +14444,7 @@ int InitEnemyStar(DSWActor* actor)
|
|||
int nx, ny, nz, dist, nang;
|
||||
|
||||
// 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;
|
||||
ny = actor->int_pos().Y;
|
||||
|
@ -14459,7 +14459,7 @@ int InitEnemyStar(DSWActor* actor)
|
|||
actorNew->spr.xrepeat = 16;
|
||||
actorNew->spr.shade = -25;
|
||||
actorNew->spr.zvel = 0;
|
||||
actorNew->spr.__int_angle = nang;
|
||||
actorNew->set_int_ang(nang;
|
||||
actorNew->spr.clipdist = 64L>>2;
|
||||
|
||||
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;
|
||||
|
||||
// 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;
|
||||
ny = actor->int_pos().Y;
|
||||
|
@ -14498,7 +14498,7 @@ int InitEnemyCrossbow(DSWActor* actor)
|
|||
actorNew->spr.yrepeat = 26;
|
||||
actorNew->spr.shade = -25;
|
||||
actorNew->spr.zvel = 0;
|
||||
actorNew->spr.__int_angle = nang;
|
||||
actorNew->set_int_ang(nang;
|
||||
actorNew->spr.clipdist = 64L>>2;
|
||||
|
||||
actorNew->user.RotNum = 5;
|
||||
|
@ -14531,7 +14531,7 @@ int InitSkelSpell(DSWActor* actor)
|
|||
PlaySound(DIGI_SPELEC, actor, v3df_none);
|
||||
|
||||
// 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;
|
||||
ny = actor->int_pos().Y;
|
||||
|
@ -14546,7 +14546,7 @@ int InitSkelSpell(DSWActor* actor)
|
|||
actorNew->spr.yrepeat -= 20;
|
||||
actorNew->spr.shade = -40;
|
||||
actorNew->spr.zvel = 0;
|
||||
actorNew->spr.__int_angle = nang;
|
||||
actorNew->set_int_ang(nang;
|
||||
actorNew->spr.clipdist = 64L>>2;
|
||||
actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER);
|
||||
|
||||
|
@ -14571,7 +14571,7 @@ int InitCoolgFire(DSWActor* actor)
|
|||
int nx, ny, nz, dist, nang;
|
||||
|
||||
// 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;
|
||||
ny = actor->int_pos().Y;
|
||||
|
@ -14592,7 +14592,7 @@ int InitCoolgFire(DSWActor* actor)
|
|||
actorNew->spr.xrepeat = 18;
|
||||
actorNew->spr.shade = -40;
|
||||
actorNew->spr.zvel = 0;
|
||||
actorNew->spr.__int_angle = nang;
|
||||
actorNew->set_int_ang(nang;
|
||||
actorNew->spr.clipdist = 32L>>2;
|
||||
actorNew->user.ceiling_dist = Z(4);
|
||||
actorNew->user.floor_dist = Z(4);
|
||||
|
@ -14886,12 +14886,12 @@ int InitTracerUzi(PLAYER* pp)
|
|||
oclipdist = plActor->spr.clipdist;
|
||||
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)
|
||||
HelpMissileLateral(actorNew, lat_dist[RANDOM_P2(2<<8)>>8]);
|
||||
else
|
||||
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))
|
||||
{
|
||||
|
@ -14907,7 +14907,7 @@ int InitTracerUzi(PLAYER* pp)
|
|||
WeaponAutoAim(pp->actor, actorNew, 32, false);
|
||||
|
||||
// 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.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);
|
||||
|
||||
// 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.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);
|
||||
actorNew->spr.__int_angle = actor->int_ang();
|
||||
actorNew->set_int_ang(actor->int_ang();
|
||||
|
||||
SetActorZ(actorNew, &hit_pos);
|
||||
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);
|
||||
|
||||
actor->spr.__int_angle = NORM_ANGLE(wall_ang + 1024);
|
||||
actor->set_int_ang(NORM_ANGLE(wall_ang + 1024);
|
||||
|
||||
return actor;
|
||||
}
|
||||
|
@ -15119,7 +15119,7 @@ bool HitscanSpriteAdjust(DSWActor* actor, walltype* hit_wall)
|
|||
if (hit_wall)
|
||||
{
|
||||
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
|
||||
ang = actor->int_ang();
|
||||
|
@ -15375,7 +15375,7 @@ int InitTankShell(DSWActor* actor, PLAYER* pp)
|
|||
WeaponAutoAim(actor, actorNew, 64, false);
|
||||
// a bit of randomness
|
||||
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.Y = MOVEy(actorNew->spr.xvel, actorNew->int_ang());
|
||||
|
@ -15475,7 +15475,7 @@ int InitTurretMicro(DSWActor* actor, PLAYER* pp)
|
|||
}
|
||||
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());
|
||||
|
@ -15550,7 +15550,7 @@ int InitTurretFireball(DSWActor* actor, PLAYER* pp)
|
|||
WeaponAutoAim(actor, actorNew, 64, false);
|
||||
// a bit of randomness
|
||||
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.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)
|
||||
{
|
||||
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());
|
||||
|
@ -15648,7 +15648,7 @@ int InitTurretLaser(DSWActor* actor, PLAYER* pp)
|
|||
|
||||
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());
|
||||
|
@ -16195,7 +16195,7 @@ int InitEnemyUzi(DSWActor* actor)
|
|||
if (AimHitscanToTarget(actor, &daz, &daang, 200) != nullptr)
|
||||
{
|
||||
// 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 = NORM_ANGLE(daang);
|
||||
daz += RandomRange(Z(40)) - Z(20);
|
||||
|
@ -16378,9 +16378,9 @@ int InitGrenade(PLAYER* pp)
|
|||
auto oclipdist = actor->spr.clipdist;
|
||||
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);
|
||||
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
|
||||
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.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);
|
||||
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
|
||||
actorNew->user.Flags |= (SPR_BOUNCE);
|
||||
|
@ -16562,9 +16562,9 @@ int InitEnemyMine(DSWActor* actor)
|
|||
actorNew->user.Flags |= (SPR_UNDERWATER);
|
||||
|
||||
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);
|
||||
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.X = MOVEx(actorNew->spr.xvel, actorNew->int_ang());
|
||||
|
@ -16637,9 +16637,9 @@ int InitFireball(PLAYER* pp)
|
|||
auto oclipdist = actor->spr.clipdist;
|
||||
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);
|
||||
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))
|
||||
actorNew->user.Flags |= (SPR_UNDERWATER);
|
||||
|
@ -16656,7 +16656,7 @@ int InitFireball(PLAYER* pp)
|
|||
actorNew->spr.zvel = zvel >> 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());
|
||||
|
@ -16683,7 +16683,7 @@ int InitEnemyFireball(DSWActor* actor)
|
|||
PlaySound(DIGI_FIREBALL1, actor, v3df_none);
|
||||
|
||||
// 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));
|
||||
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.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);
|
||||
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.Y = ychange;
|
||||
|
@ -17188,7 +17188,7 @@ int SpawnVehicleSmoke(DSWActor* actor)
|
|||
if (RANDOM_P2(1024) < 512)
|
||||
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->user.change.X = MOVEx(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)
|
||||
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->user.change.X = MOVEx(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);
|
||||
|
||||
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
|
||||
nx = bcos(spawnedActor->int_ang(), 4);
|
||||
|
@ -17513,7 +17513,7 @@ int QueueFloorBlood(DSWActor* actor)
|
|||
spawnedActor->spr.xoffset = spawnedActor->spr.yoffset = 0;
|
||||
spawnedActor->spr.pos = actor->spr.pos;
|
||||
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.cstat |= (CSTAT_SPRITE_ALIGNMENT_FLOOR);
|
||||
|
@ -17613,7 +17613,7 @@ int QueueFootPrint(DSWActor* actor)
|
|||
spawnedActor->spr.clipdist = 0;
|
||||
spawnedActor->spr.xoffset = spawnedActor->spr.yoffset = 0;
|
||||
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);
|
||||
switch (FootMode)
|
||||
{
|
||||
|
@ -17756,7 +17756,7 @@ DSWActor* QueueWallBlood(DSWActor* actor, short ang)
|
|||
spawnedActor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
|
||||
|
||||
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
|
||||
nx = bcos(spawnedActor->int_ang(), 4);
|
||||
|
|
|
@ -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);
|
||||
SetOwner(actorNew, ownerActor);
|
||||
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);
|
||||
actorNew->spr.shade = -10;
|
||||
actorNew->user.Flags2 |= (SPR2_DONT_TARGET_OWNER);
|
||||
|
@ -826,7 +826,7 @@ void SpawnZombie2(DSWActor* actor)
|
|||
actorNew->user.Counter3 = 0;
|
||||
SetOwner(ownerActor, actorNew);
|
||||
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);
|
||||
actorNew->spr.shade = -10;
|
||||
actorNew->user.Flags2 |= (SPR2_DONT_TARGET_OWNER);
|
||||
|
|
Loading…
Reference in a new issue