mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 08:51:24 +00:00
- Duke: use player palette only on the foot weapon.
This is the only one showing Duke's clothes - the translation may cause discoloration on the others.
This commit is contained in:
parent
79a1110d5f
commit
ffd284d233
1 changed files with 9 additions and 9 deletions
|
@ -202,7 +202,7 @@ void displayweapon_d(int snum, double interpfrac)
|
|||
{
|
||||
int cw;
|
||||
int i, j;
|
||||
int o, pal;
|
||||
int o, pal, pal2;
|
||||
double weapon_sway, weapon_xoffset, gun_pos, looking_arc, kickback_pic, random_club_frame, hard_landing, look_anghalf, horiz16th, plravel;
|
||||
int8_t shade;
|
||||
player_struct* p;
|
||||
|
@ -246,9 +246,9 @@ void displayweapon_d(int snum, double interpfrac)
|
|||
shade = p->GetActor()->spr.shade;
|
||||
if(shade > 24) shade = 24;
|
||||
|
||||
pal = !p->insector() ? 0 : p->GetActor()->spr.pal == 1 ? 1 : p->cursector->floorpal;
|
||||
if (pal == 0)
|
||||
pal = p->palookup;
|
||||
pal2 = pal = !p->insector() ? 0 : p->GetActor()->spr.pal == 1 ? 1 : p->cursector->floorpal;
|
||||
if (pal2 == 0)
|
||||
pal2 = p->palookup;
|
||||
|
||||
auto adjusted_arc = looking_arc - hard_landing;
|
||||
bool playerVars = p->newOwner != nullptr || ud.cameraactor != nullptr || p->over_shoulder_on > 0 || (p->GetActor()->spr.pal != 1 && p->GetActor()->spr.extra <= 0);
|
||||
|
@ -258,7 +258,7 @@ void displayweapon_d(int snum, double interpfrac)
|
|||
if(playerVars || playerAnims)
|
||||
return;
|
||||
|
||||
animateknee(shade, p, look_anghalf, adjusted_arc, horiz16th, plravel, pal, interpfrac);
|
||||
animateknee(shade, p, look_anghalf, adjusted_arc, horiz16th, plravel, pal2, interpfrac);
|
||||
|
||||
if (isWW2GI())
|
||||
{
|
||||
|
@ -287,11 +287,11 @@ void displayweapon_d(int snum, double interpfrac)
|
|||
{
|
||||
if (j < 5 || j > 9)
|
||||
{
|
||||
hud_drawpal(weapon_xoffset + 80 - look_anghalf, looking_arc + 250 - gun_pos, KNEE, shade, o | 4, pal);
|
||||
hud_drawpal(weapon_xoffset + 80 - look_anghalf, looking_arc + 250 - gun_pos, KNEE, shade, o | 4, pal2);
|
||||
}
|
||||
else
|
||||
{
|
||||
hud_drawpal(weapon_xoffset + 160 - 16 - look_anghalf, looking_arc + 214 - gun_pos, KNEE + 1, shade, o | 4, pal);
|
||||
hud_drawpal(weapon_xoffset + 160 - 16 - look_anghalf, looking_arc + 214 - gun_pos, KNEE + 1, shade, o | 4, pal2);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -316,12 +316,12 @@ void displayweapon_d(int snum, double interpfrac)
|
|||
if (*kb < 5 || *kb > 9)
|
||||
{
|
||||
hud_drawpal(weapon_xoffset + 220 - look_anghalf,
|
||||
looking_arc + 250 - gun_pos, KNEE, shade, o, pal);
|
||||
looking_arc + 250 - gun_pos, KNEE, shade, o, pal2);
|
||||
}
|
||||
else
|
||||
{
|
||||
hud_drawpal(weapon_xoffset + 160 - look_anghalf,
|
||||
looking_arc + 214 - gun_pos, KNEE + 1, shade, o, pal);
|
||||
looking_arc + 214 - gun_pos, KNEE + 1, shade, o, pal2);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue