From f027d07ae5aa2d8315b91982d9e7c4be14475078 Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Fri, 25 Nov 2022 14:42:42 +1100 Subject: [PATCH] - Annotate all player angles that are being set as the sprite angles to review later. * Once the angles between player and sprite have been unified, these will be much harder to identify. --- source/games/duke/src/actors_d.cpp | 2 +- source/games/duke/src/actors_r.cpp | 4 ++-- source/games/duke/src/gameexec.cpp | 2 +- source/games/duke/src/player_r.cpp | 4 ++-- source/games/duke/src/premap.cpp | 2 +- source/games/exhumed/src/player.cpp | 2 +- source/games/sw/src/player.cpp | 4 ++-- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/source/games/duke/src/actors_d.cpp b/source/games/duke/src/actors_d.cpp index 45e4c03c0..aa0f1ba9e 100644 --- a/source/games/duke/src/actors_d.cpp +++ b/source/games/duke/src/actors_d.cpp @@ -1334,7 +1334,7 @@ void movetransports_d(void) ps[k].GetActor()->spr.extra = 0; } - ps[p].angle.ang = Owner->spr.Angles.Yaw; + ps[p].angle.ang = Owner->spr.Angles.Yaw; // check me out later. if (Owner->GetOwner() != Owner) { diff --git a/source/games/duke/src/actors_r.cpp b/source/games/duke/src/actors_r.cpp index 0248cb100..a0ca286c9 100644 --- a/source/games/duke/src/actors_r.cpp +++ b/source/games/duke/src/actors_r.cpp @@ -1222,7 +1222,7 @@ void movetransports_r(void) ps[k].GetActor()->spr.extra = 0; } - ps[p].angle.ang = Owner->spr.Angles.Yaw; + ps[p].angle.ang = Owner->spr.Angles.Yaw; // check me out later. if (Owner->GetOwner() != Owner) { @@ -1945,7 +1945,7 @@ void rr_specialstats() { if (act2->spr.picnum == RRTELEPORTDEST) { - ps[p].angle.ang = act2->spr.Angles.Yaw; + ps[p].angle.ang = act2->spr.Angles.Yaw; // check me out later. ps[p].GetActor()->spr.pos = act2->spr.pos.plusZ(-36 + gs.playerheight); ps[p].GetActor()->backuppos(); ps[p].setbobpos(); diff --git a/source/games/duke/src/gameexec.cpp b/source/games/duke/src/gameexec.cpp index 53eaf8dbf..ec71f203b 100644 --- a/source/games/duke/src/gameexec.cpp +++ b/source/games/duke/src/gameexec.cpp @@ -2833,7 +2833,7 @@ int ParseState::parse(void) case concmd_ifangdiffl: { insptr++; - auto ang = absangle(ps[g_p].angle.ang, g_ac->spr.Angles.Yaw); + auto ang = absangle(ps[g_p].angle.ang, g_ac->spr.Angles.Yaw); // check me out later. parseifelse( ang <= mapangle(*insptr)); break; } diff --git a/source/games/duke/src/player_r.cpp b/source/games/duke/src/player_r.cpp index c2ffda2d0..de02024c3 100644 --- a/source/games/duke/src/player_r.cpp +++ b/source/games/duke/src/player_r.cpp @@ -3949,7 +3949,7 @@ void OnMotorcycle(player_struct *p, DDukeActor* motosprite) if (motosprite) { p->GetActor()->spr.pos.XY() = motosprite->spr.pos.XY(); - p->angle.ang = motosprite->spr.Angles.Yaw; + p->angle.ang = motosprite->spr.Angles.Yaw; // check me out later. p->ammo_amount[MOTORCYCLE_WEAPON] = motosprite->saved_ammo; motosprite->Destroy(); } @@ -4023,7 +4023,7 @@ void OnBoat(player_struct *p, DDukeActor* boat) if (boat) { p->GetActor()->spr.pos.XY() = boat->spr.pos.XY(); - p->angle.ang = boat->spr.Angles.Yaw; + p->angle.ang = boat->spr.Angles.Yaw; // check me out later. p->ammo_amount[BOAT_WEAPON] = boat->saved_ammo; boat->Destroy(); } diff --git a/source/games/duke/src/premap.cpp b/source/games/duke/src/premap.cpp index bf1cd2135..cd0fc1502 100644 --- a/source/games/duke/src/premap.cpp +++ b/source/games/duke/src/premap.cpp @@ -626,7 +626,7 @@ void resetpspritevars(int g, const DVector3& startpos) act->SetOwner(act); ps[j].setbobpos(); - ps[j].angle.oang = ps[j].angle.ang = act->spr.Angles.Yaw; + ps[j].angle.oang = ps[j].angle.ang = act->spr.Angles.Yaw; // check me out later. updatesector(act->spr.pos, &ps[j].cursector); diff --git a/source/games/exhumed/src/player.cpp b/source/games/exhumed/src/player.cpp index b7c93dc06..151a15a44 100644 --- a/source/games/exhumed/src/player.cpp +++ b/source/games/exhumed/src/player.cpp @@ -293,7 +293,7 @@ void RestartPlayer(int nPlayer) pActor->spr.pos = nNStartSprite->spr.pos; ChangeActorSect(pActor, nNStartSprite->sector()); - plr->angle.ang = nNStartSprite->spr.Angles.Yaw; + plr->angle.ang = nNStartSprite->spr.Angles.Yaw; // check me out later. pActor->spr.Angles.Yaw = plr->angle.ang; // check me out later. floorsprt = insertActor(pActor->sector(), 0); diff --git a/source/games/sw/src/player.cpp b/source/games/sw/src/player.cpp index a055f0105..f110978d1 100644 --- a/source/games/sw/src/player.cpp +++ b/source/games/sw/src/player.cpp @@ -5334,7 +5334,7 @@ void DoPlayerStopOperate(PLAYER* pp) { DSWActor* rsp = pp->remoteActor; if (TEST_BOOL1(rsp)) - pp->angle.ang = pp->angle.oang = rsp->spr.Angles.Yaw; + pp->angle.ang = pp->angle.oang = rsp->spr.Angles.Yaw; // check me out later. else pp->angle.ang = pp->angle.oang = (pp->sop_remote->pmid.XY() - pp->actor->spr.pos.XY()).Angle(); } @@ -7203,7 +7203,7 @@ void PlayerSpawnPosition(PLAYER* pp) ASSERT(spawn_sprite != nullptr); - pp->angle.ang = pp->angle.oang = spawn_sprite->spr.Angles.Yaw; + pp->angle.ang = pp->angle.oang = spawn_sprite->spr.Angles.Yaw; // check me out later. pp->setcursector(spawn_sprite->sector()); if (pp->actor)