mirror of
https://github.com/DrBeef/Raze.git
synced 2025-01-20 16:10:52 +00:00
- handle all leftover __int_angles.
Most were in comments but were changed anyway.
This commit is contained in:
parent
6bdfa09dd1
commit
9a27dc2020
11 changed files with 22 additions and 28 deletions
|
@ -273,7 +273,7 @@ void aiChooseDirection(DBloodActor* actor, int a3)
|
|||
else if (CanMove(actor, actor->GetTarget(), actor->int_ang() - v8, vsi))
|
||||
actor->xspr.goalAng = actor->int_ang() - v8;
|
||||
//else if (actor->spr.flags&2)
|
||||
//actor->xspr.goalAng = actor->spr.__int_angle+341;
|
||||
//actor->xspr.goalAng = actor->spr.angle+341;
|
||||
else // Weird..
|
||||
actor->xspr.goalAng = actor->int_ang() + 341;
|
||||
if (Chance(0x8000))
|
||||
|
|
|
@ -3281,11 +3281,11 @@ void useTeleportTarget(DBloodActor* sourceactor, DBloodActor* actor)
|
|||
{
|
||||
if (pPlayer)
|
||||
{
|
||||
pPlayer->angle.settarget(buildang(sourceactor->spr.__int_angle));
|
||||
pPlayer->angle.settarget(buildang(sourceactor->spr.angle));
|
||||
pPlayer->angle.lockinput();
|
||||
}
|
||||
else if (isDude) sourceactor->xspr.goalAng = actor->spr.__int_angle = sourceactor->spr.__int_angle;
|
||||
else actor->spr.__int_angle = sourceactor->spr.__int_angle;
|
||||
else if (isDude) sourceactor->xspr.goalAng = actor->spr.angle = sourceactor->spr.angle;
|
||||
else actor->spr.__int_angle = sourceactor->spr.angle;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -5189,7 +5189,7 @@ bool aiFightDudeCanSeeTarget(DBloodActor* dudeactor, DUDEINFO* pDudeInfo, DBlood
|
|||
if (cansee(dudeactor->int_pos().X, dudeactor->int_pos().Y, dudeactor->int_pos().Z, dudeactor->sector(), targetactor->int_pos().X, targetactor->int_pos().Y, targetactor->int_pos().Z - eyeAboveZ, targetactor->sector()))
|
||||
{
|
||||
/*int nAngle = getangle(dx, dy);
|
||||
int losAngle = ((1024 + nAngle - dudeactor->spr.__int_angle) & 2047) - 1024;
|
||||
int losAngle = ((1024 + nAngle - dudeactor->spr.angle) & 2047) - 1024;
|
||||
|
||||
// is the target visible?
|
||||
if (abs(losAngle) < 2048) // 360 deg periphery here*/
|
||||
|
|
|
@ -2352,9 +2352,9 @@ void trInit(TArray<DBloodActor*>& actors)
|
|||
{
|
||||
auto marker0 = pXSector->marker0;
|
||||
auto marker1 = pXSector->marker1;
|
||||
TranslateSector(pSector, 0, -65536, marker0->int_pos().X, marker0->int_pos().Y, marker0->int_pos().X, marker0->int_pos().Y, marker0->spr.__int_angle, marker1->int_pos().X, marker1->int_pos().Y, marker1->spr.__int_angle, pSector->type == kSectorSlide);
|
||||
TranslateSector(pSector, 0, -65536, marker0->int_pos().X, marker0->int_pos().Y, marker0->int_pos().X, marker0->int_pos().Y, marker0->spr.int_ang(), marker1->int_pos().X, marker1->int_pos().Y, marker1->spr.int_ang(), pSector->type == kSectorSlide);
|
||||
UpdateBasePoints(pSector);
|
||||
TranslateSector(pSector, 0, pXSector->busy, marker0->int_pos().X, marker0->int_pos().Y, marker0->int_pos().X, marker0->int_pos().Y, marker0->spr.__int_angle, marker1->int_pos().X, marker1->int_pos().Y, marker1->spr.__int_angle, pSector->type == kSectorSlide);
|
||||
TranslateSector(pSector, 0, pXSector->busy, marker0->int_pos().X, marker0->int_pos().Y, marker0->int_pos().X, marker0->int_pos().Y, marker0->spr.int_ang(), marker1->int_pos().X, marker1->int_pos().Y, marker1->spr.int_ang(), pSector->type == kSectorSlide);
|
||||
ZTranslateSector(pSector, pXSector, pXSector->busy, 1);
|
||||
break;
|
||||
}
|
||||
|
@ -2362,7 +2362,7 @@ void trInit(TArray<DBloodActor*>& actors)
|
|||
case kSectorRotate:
|
||||
{
|
||||
auto marker0 = pXSector->marker0;
|
||||
TranslateSector(pSector, 0, -65536, marker0->int_pos().X, marker0->int_pos().Y, marker0->int_pos().X, marker0->int_pos().Y, 0, marker0->int_pos().X, marker0->int_pos().Y, marker0->spr.__int_angle, pSector->type == kSectorRotate);
|
||||
TranslateSector(pSector, 0, -65536, marker0->int_pos().X, marker0->int_pos().Y, marker0->int_pos().X, marker0->int_pos().Y, 0, marker0->int_pos().X, marker0->int_pos().Y, marker0->spr.int_ang(), pSector->type == kSectorRotate);
|
||||
UpdateBasePoints(pSector);
|
||||
TranslateSector(pSector, 0, pXSector->busy, marker0->int_pos().X, marker0->int_pos().Y, marker0->int_pos().X, marker0->int_pos().Y, 0, marker0->int_pos().X, marker0->int_pos().Y, marker0->int_ang(), pSector->type == kSectorRotate);
|
||||
ZTranslateSector(pSector, pXSector, pXSector->busy, 1);
|
||||
|
|
|
@ -601,7 +601,7 @@ void renderCrystalBall()
|
|||
int vd4 = pOther->actor->spr.y;
|
||||
int vd0 = pOther->zView;
|
||||
int vcc = pOther->actor->spr.sectnum;
|
||||
int v50 = pOther->actor->spr.__int_angle;
|
||||
int v50 = pOther->actor->spr.angle;
|
||||
int v54 = 0;
|
||||
if (pOther->flickerEffect)
|
||||
{
|
||||
|
|
|
@ -628,7 +628,7 @@ void ProcessSpriteTag(DExhumedActor* pActor, int nLotag, int nHitag)
|
|||
{
|
||||
auto pSector = pActor->sector();
|
||||
pSector->Speed = nSpeed;
|
||||
pSector->Flag |= pActor->spr.__int_angle;
|
||||
pSector->Flag |= pActor->spr.int_ang();
|
||||
|
||||
DeleteActor(pActor);
|
||||
return;
|
||||
|
|
|
@ -413,8 +413,8 @@ int DoActorDebris(DSWActor* actor)
|
|||
}
|
||||
else
|
||||
{
|
||||
//nx = actor->spr.xvel * ACTORMOVETICS * bcos(actor->spr.__int_angle) >> 14;
|
||||
//ny = actor->spr.xvel * ACTORMOVETICS * bsin(actor->spr.__int_angle) >> 14;
|
||||
//nx = actor->spr.xvel * ACTORMOVETICS * bcos(actor->spr.angle) >> 14;
|
||||
//ny = actor->spr.xvel * ACTORMOVETICS * bsin(actor->spr.angle) >> 14;
|
||||
nx = MulScale(ACTORMOVETICS, bcos(actor->int_ang()), 14);
|
||||
ny = MulScale(ACTORMOVETICS, bsin(actor->int_ang()), 14);
|
||||
|
||||
|
@ -737,7 +737,7 @@ int DoActorStopFall(DSWActor* actor)
|
|||
// don't stand on face or wall sprites - jump again
|
||||
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.angle + (RANDOM_P2(64<<8)>>8) - 32);
|
||||
actor->set_int_ang(NORM_ANGLE(actor->int_ang() + 1024 + (RANDOM_P2(512<<8)>>8)));
|
||||
actor->user.jump_speed = -350;
|
||||
|
||||
|
|
|
@ -1645,7 +1645,7 @@ int PlayerInitCaltrops(PLAYER* pp)
|
|||
actorNew->user.Flags |= (SPR_UNDERWATER);
|
||||
|
||||
// They go out at different angles
|
||||
// spawnedActor->spr.__int_angle = NORM_ANGLE(pp->angle.ang.asbuild() + (RandomRange(50) - 25));
|
||||
// spawnedActor->spr.angle = NORM_ANGLE(pp->angle.ang.asbuild() + (RandomRange(50) - 25));
|
||||
|
||||
actorNew->spr.zvel = -pp->horizon.horiz.asq16() >> 9;
|
||||
|
||||
|
|
|
@ -1790,10 +1790,6 @@ void UpdatePlayerSprite(PLAYER* pp)
|
|||
{
|
||||
actor->set_int_z(pp->pos.Z + Z(17));
|
||||
|
||||
// move it forward a bit to look like its on the ladder
|
||||
//actor->spr.x += MOVEx(256+64, actor->spr.__int_angle);
|
||||
//actor->spr.y += MOVEy(256+64, actor->spr.__int_angle);
|
||||
|
||||
ChangeActorSect(pp->actor, pp->cursector);
|
||||
}
|
||||
else if (pp->DoPlayerAction == DoPlayerFly)
|
||||
|
|
|
@ -861,7 +861,7 @@ void DoExplodeSector(short match)
|
|||
|
||||
sectortype* sectp;
|
||||
|
||||
orig_ang = 0; //actor->spr.__int_angle;
|
||||
orig_ang = 0;
|
||||
|
||||
SWStatIterator it(STAT_EXPLODING_CEIL_FLOOR);
|
||||
while (auto actor = it.Next())
|
||||
|
|
|
@ -2855,7 +2855,7 @@ KeyMain:
|
|||
*
|
||||
* actor->user.State = actor->user.StateStart = &s_FireFly[0]; actor->user.RotNum = 0;
|
||||
*
|
||||
* actor->spr.__int_angle = 0; actor->spr.xvel = 4;
|
||||
* actor->spr.angle = 0; actor->spr.xvel = 4;
|
||||
*
|
||||
* if (labs(actor->spr.z - actor->sector()->int_floorz()) < Z(32)) actor->spr.z =
|
||||
* actor->sector()->int_floorz() - Z(32);
|
||||
|
@ -4574,8 +4574,8 @@ bool DropAhead(DSWActor* actor, int min_height)
|
|||
{
|
||||
int dax, day;
|
||||
|
||||
// dax = actor->spr.x + MOVEx(128, actor->spr.__int_angle);
|
||||
// day = actor->spr.y + MOVEy(128, actor->spr.__int_angle);
|
||||
// dax = actor->spr.x + MOVEx(128, actor->spr.angle);
|
||||
// day = actor->spr.y + MOVEy(128, actor->spr.angle);
|
||||
|
||||
dax = actor->int_pos().X + MOVEx(256, actor->int_ang());
|
||||
day = actor->int_pos().Y + MOVEy(256, actor->int_ang());
|
||||
|
|
|
@ -3723,7 +3723,6 @@ AutoShrap:
|
|||
case EMP:
|
||||
shrap_bounce = false;
|
||||
actor->add_int_z(-Z(4));
|
||||
//actor->spr.__int_angle = NORM_ANGLE(actor->spr.__int_angle + 1024);
|
||||
shrap_xsize = actor->user.pos.X = 5 + (RANDOM_P2(4<<8)>>8);
|
||||
shrap_ysize = actor->user.pos.Y = 5 + (RANDOM_P2(4<<8)>>8);
|
||||
break;
|
||||
|
@ -5351,7 +5350,6 @@ int PlayerCheckDeath(PLAYER* pp, DSWActor* weapActor)
|
|||
DoPlayerBeginDie(pp);
|
||||
|
||||
// for death direction
|
||||
//actor->user.slide_ang = weapActor->spr.__int_angle;
|
||||
actor->user.slide_ang = getangle(actor->int_pos().X - weapActor->int_pos().X, actor->int_pos().Y - weapActor->int_pos().Y);
|
||||
// for death velocity
|
||||
actor->user.slide_vel = actor->user.LastDamage * 5;
|
||||
|
@ -6544,7 +6542,7 @@ int DoDamage(DSWActor* actor, DSWActor* weapActor)
|
|||
}
|
||||
else if (actor->user.PlayerP)
|
||||
{
|
||||
PlayerDamageSlide(actor->user.PlayerP, damage, weapActor->spr.__int_angle);
|
||||
PlayerDamageSlide(actor->user.PlayerP, damage, weapActor->spr.angle);
|
||||
if (PlayerTakeDamage(actor->user.PlayerP, weapActor))
|
||||
{
|
||||
PlayerUpdateHealth(actor->user.PlayerP, damage);
|
||||
|
@ -6556,7 +6554,7 @@ int DoDamage(DSWActor* actor, DSWActor* weapActor)
|
|||
ActorHealth(actor, damage);
|
||||
ActorPain(actor);
|
||||
ActorStdMissile(actor, weapActor);
|
||||
ActorDamageSlide(actor, damage, weapActor->spr.__int_angle);
|
||||
ActorDamageSlide(actor, damage, weapActor->spr.angle);
|
||||
ActorChooseDeath(actor, weapActor);
|
||||
}
|
||||
|
||||
|
@ -8270,7 +8268,7 @@ int DoGrenade(DSWActor* actor)
|
|||
|
||||
wall_ang = NORM_ANGLE(getangle(wph->delta())+512);
|
||||
|
||||
//actor->spr.__int_angle = NORM_ANGLE(actor->spr.__int_angle + 1);
|
||||
//actor->spr.angle = NORM_ANGLE(actor->spr.angle + 1);
|
||||
WallBounce(actor, wall_ang);
|
||||
ScaleSpriteVector(actor, 22000);
|
||||
|
||||
|
@ -15507,7 +15505,7 @@ int InitTurretRocket(DSWActor* actor, PLAYER* pp)
|
|||
|
||||
WeaponAutoAim(actor, actorNew, 64, false);
|
||||
// a bit of randomness
|
||||
//actorNew->spr.__int_angle += RandomRange(30) - 15;
|
||||
//actorNew->spr.angle += 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());
|
||||
|
|
Loading…
Reference in a new issue