mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-13 07:58:04 +00:00
- restored original palette handling for access cards that got broken in 242f958c41
Unlike all the other HUD sprites this one works differently.
This commit is contained in:
parent
53e698e707
commit
3766c5aed0
1 changed files with 7 additions and 2 deletions
|
@ -189,7 +189,7 @@ static int animatetip(int gs, player_struct* p, double look_anghalf, double look
|
|||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
int animateaccess(int gs, player_struct* p, double look_anghalf, double looking_arc, double horiz16th, double plravel, int pal)
|
||||
int animateaccess(int gs, player_struct* p, double look_anghalf, double looking_arc, double horiz16th, double plravel)
|
||||
{
|
||||
if(p->access_incs == 0 || p->GetActor()->s->extra <= 0) return 0;
|
||||
|
||||
|
@ -197,6 +197,11 @@ int animateaccess(int gs, player_struct* p, double look_anghalf, double looking_
|
|||
|
||||
looking_arc += access_y[p->access_incs];
|
||||
|
||||
int pal;
|
||||
if (p->access_spritenum != nullptr)
|
||||
pal = p->access_spritenum->s->pal;
|
||||
else pal = 0;
|
||||
|
||||
if((p->access_incs-3) > 0 && (p->access_incs-3)>>3)
|
||||
hud_drawpal(170 + plravel - look_anghalf + (access_y[p->access_incs] >> 2), looking_arc + 266 - horiz16th, HANDHOLDINGLASER + (p->access_incs >> 3), gs, 0, pal);
|
||||
else
|
||||
|
@ -266,7 +271,7 @@ void displayweapon_d(int snum, double smoothratio)
|
|||
auto adjusted_arc = looking_arc - hard_landing;
|
||||
bool playerVars = p->newOwner != nullptr || ud.cameraactor != nullptr || p->over_shoulder_on > 0 || (p->GetActor()->s->pal != 1 && p->GetActor()->s->extra <= 0);
|
||||
bool playerAnims = animatefist(shade, p, look_anghalf, looking_arc, plravel, pal) || animateknuckles(shade, p, look_anghalf, adjusted_arc, horiz16th, plravel, pal) ||
|
||||
animatetip(shade, p, look_anghalf, adjusted_arc, horiz16th, plravel, pal) || animateaccess(shade, p, look_anghalf, adjusted_arc, horiz16th, plravel, pal);
|
||||
animatetip(shade, p, look_anghalf, adjusted_arc, horiz16th, plravel, pal) || animateaccess(shade, p, look_anghalf, adjusted_arc, horiz16th, plravel);
|
||||
|
||||
if(playerVars || playerAnims)
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue