- SW: Replace remaining Player+ pointer arithmetic with array accesses.

This commit is contained in:
Mitchell Richters 2023-10-02 14:21:03 +11:00
parent edd089cc0d
commit 3cc2aa7af4
4 changed files with 5 additions and 5 deletions

View file

@ -376,7 +376,7 @@ void drawroomstotile(const DVector3& pos, DAngle ang, DAngle horiz, sectortype*
void JS_ProcessEchoSpot()
{
SWPlayer* pp = Player+screenpeek;
SWPlayer* pp = &Player[screenpeek];
int16_t reverb;
bool reverb_set = false;

View file

@ -874,7 +874,7 @@ int PachinkoCheckWin(DSWActor* actor)
// Do a possible combo switch
if (ComboSwitchTest(TAG_COMBO_SWITCH_EVERYTHING, actor->spr.hitag))
{
DoMatchEverything(Player+myconnectindex, actor->spr.hitag, 1);
DoMatchEverything(&Player[myconnectindex], actor->spr.hitag, 1);
}
ActorCoughItem(actor); // I WON! I WON!

View file

@ -2292,7 +2292,7 @@ void PlayerGameReset(SWPlayer* pp)
PlayerUpdateArmor(pp, 0);
pp->KillerActor = nullptr;;
if (pp == Player+screenpeek)
if (pp == &Player[screenpeek])
{
videoFadePalette(0,0,0,0);
}
@ -2387,7 +2387,7 @@ void InitPlayerSprite(SWPlayer* pp, const DVector3& spawnpos, const DAngle start
memset(pp->InventoryTics,0,sizeof(pp->InventoryTics));
if (pp == Player+screenpeek)
if (pp == &Player[screenpeek])
{
videoFadePalette(0,0,0,0);
}

View file

@ -4103,7 +4103,7 @@ void DoPlayerDivePalette(SWPlayer* pp)
{
if (pp != Player + screenpeek) return;
if ((pp->DeathType == PLAYER_DEATH_DROWN || ((Player+screenpeek)->Flags & PF_DIVING)) && !(pp->Flags & PF_DIVING_IN_LAVA))
if ((pp->DeathType == PLAYER_DEATH_DROWN || (Player[screenpeek].Flags & PF_DIVING)) && !(pp->Flags & PF_DIVING_IN_LAVA))
{
SetFadeAmt(pp,-1005,210); // Dive color , org color 208
}