diff --git a/source/duke3d/src/player.cpp b/source/duke3d/src/player.cpp index 4a86c7abc..842c082c1 100644 --- a/source/duke3d/src/player.cpp +++ b/source/duke3d/src/player.cpp @@ -1688,6 +1688,11 @@ int P_GetKneePal(DukePlayer_t const * pPlayer, int const hudPal) return hudPal == 0 ? pPlayer->palookup : hudPal; } +int P_GetOverheadPal(DukePlayer_t const * pPlayer) +{ + return sprite[pPlayer->i].pal; +} + static int P_DisplayFist(int const fistShade) { DukePlayer_t const *const pPlayer = g_player[screenpeek].ps; diff --git a/source/duke3d/src/player.h b/source/duke3d/src/player.h index f5c8bd5a3..64376113f 100644 --- a/source/duke3d/src/player.h +++ b/source/duke3d/src/player.h @@ -368,6 +368,7 @@ int P_GetKneePal(const DukePlayer_t *pPlayer); int P_GetKneePal(const DukePlayer_t *pPlayer, int const hudPal); extern "C" { #endif +int P_GetOverheadPal(const DukePlayer_t *pPlayer); int Proj_GetDamage(projectile_t const *pProj); diff --git a/source/duke3d/src/screens.cpp b/source/duke3d/src/screens.cpp index b5a8d9397..a8bbe664a 100644 --- a/source/duke3d/src/screens.cpp +++ b/source/duke3d/src/screens.cpp @@ -611,7 +611,7 @@ static void G_DrawOverheadMap(int32_t cposx, int32_t cposy, int32_t czoom, int16 else if (j > (65536<<1)) j = (65536<<1); rotatesprite_win((x1<<4)+(xdim<<15), (y1<<4)+(ydim<<15), j, daang, i, pSprite->shade, - (pPlayer->cursectnum > -1) ? sector[pPlayer->cursectnum].floorpal : 0, 0); + P_GetOverheadPal(pPlayer), 0); } } }