mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-29 04:50:42 +00:00
- interpolate p->random_club_frame
for Duke 3D.
This commit is contained in:
parent
038039eb3f
commit
43ff42b330
3 changed files with 9 additions and 7 deletions
|
@ -279,7 +279,7 @@ void displayweapon_d(int snum, double smoothratio)
|
|||
int cw;
|
||||
int i, j;
|
||||
int o,pal;
|
||||
double weapon_sway, weapon_xoffset, gun_pos, looking_arc, kickback_pic;
|
||||
double weapon_sway, weapon_xoffset, gun_pos, looking_arc, kickback_pic, random_club_frame;
|
||||
signed char gs;
|
||||
struct player_struct *p;
|
||||
|
||||
|
@ -292,6 +292,7 @@ void displayweapon_d(int snum, double smoothratio)
|
|||
looking_arc = fabs(p->q16look_ang / (double)(FRACUNIT)) / 9.;
|
||||
weapon_sway = p->oweapon_sway + fmulscale16(p->weapon_sway - p->oweapon_sway, smoothratio);
|
||||
kickback_pic = p->okickback_pic + fmulscale16(*kb - p->okickback_pic, smoothratio);
|
||||
random_club_frame = p->orandom_club_frame + fmulscale16(p->random_club_frame - p->orandom_club_frame, smoothratio);
|
||||
|
||||
gs = sprite[p->i].shade;
|
||||
if(gs > 24) gs = 24;
|
||||
|
@ -1129,7 +1130,7 @@ void displayweapon_d(int snum, double smoothratio)
|
|||
|
||||
hud_drawpal(weapon_xoffset + 184 - p->lookanghalf(),
|
||||
looking_arc + 240 - gun_pos, SHRINKER + 2,
|
||||
16 - (calcSinTableValue(p->random_club_frame) / 1024.),
|
||||
16 - (xs_CRoundToInt(calcSinTableValue(random_club_frame)) >> 10),
|
||||
o, 0);
|
||||
|
||||
hud_drawpal(weapon_xoffset + 188 - p->lookanghalf(),
|
||||
|
@ -1286,7 +1287,7 @@ void displayweapon_d(int snum, double smoothratio)
|
|||
{
|
||||
hud_drawpal(weapon_xoffset + 184 - p->lookanghalf(),
|
||||
looking_arc + 240 - gun_pos, SHRINKER + 2,
|
||||
16 - (calcSinTableValue(p->random_club_frame) / 1024.),
|
||||
16 - (xs_CRoundToInt(calcSinTableValue(random_club_frame)) >> 10),
|
||||
o, 2);
|
||||
|
||||
hud_drawpal(weapon_xoffset + 188 - p->lookanghalf(),
|
||||
|
@ -1296,7 +1297,7 @@ void displayweapon_d(int snum, double smoothratio)
|
|||
{
|
||||
hud_drawpal(weapon_xoffset + 184 - p->lookanghalf(),
|
||||
looking_arc + 240 - gun_pos, SHRINKER + 2,
|
||||
16 - (calcSinTableValue(p->random_club_frame) / 1024.),
|
||||
16 - (xs_CRoundToInt(calcSinTableValue(random_club_frame)) >> 10),
|
||||
o, 0);
|
||||
|
||||
hud_drawpal(weapon_xoffset + 188 - p->lookanghalf(),
|
||||
|
|
|
@ -905,6 +905,7 @@ void backupweapon(player_struct* p)
|
|||
p->oweapon_sway = p->weapon_sway;
|
||||
p->oweapon_pos = p->weapon_pos;
|
||||
p->okickback_pic = p->kickback_pic;
|
||||
p->orandom_club_frame = p->random_club_frame;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
|
|
@ -119,8 +119,8 @@ struct player_struct
|
|||
// weapon drawer variables and their interpolation counterparts.
|
||||
int weapon_sway;
|
||||
int oweapon_sway;
|
||||
short weapon_pos, kickback_pic;
|
||||
short oweapon_pos, okickback_pic;
|
||||
short weapon_pos, kickback_pic, random_club_frame;
|
||||
short oweapon_pos, okickback_pic, orandom_club_frame;
|
||||
|
||||
|
||||
// From here on it is unaltered from JFDuke with the exception of a few fields that are no longer needed and were removed.
|
||||
|
@ -143,7 +143,7 @@ struct player_struct
|
|||
short ftq, access_wallnum, access_spritenum;
|
||||
short got_access, weapon_ang, firstaid_amount;
|
||||
short somethingonplayer, on_crane, i, one_parallax_sectnum;
|
||||
short over_shoulder_on, random_club_frame, fist_incs;
|
||||
short over_shoulder_on, fist_incs;
|
||||
short cheat_phase;
|
||||
short dummyplayersprite, extra_extra8, quick_kick, last_quick_kick;
|
||||
short heat_amount, actorsqu, timebeforeexit, customexitsound;
|
||||
|
|
Loading…
Reference in a new issue