mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-01 06:01:00 +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 cw;
|
||||||
int i, j;
|
int i, j;
|
||||||
int o,pal;
|
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;
|
signed char gs;
|
||||||
struct player_struct *p;
|
struct player_struct *p;
|
||||||
|
|
||||||
|
@ -292,6 +292,7 @@ void displayweapon_d(int snum, double smoothratio)
|
||||||
looking_arc = fabs(p->q16look_ang / (double)(FRACUNIT)) / 9.;
|
looking_arc = fabs(p->q16look_ang / (double)(FRACUNIT)) / 9.;
|
||||||
weapon_sway = p->oweapon_sway + fmulscale16(p->weapon_sway - p->oweapon_sway, smoothratio);
|
weapon_sway = p->oweapon_sway + fmulscale16(p->weapon_sway - p->oweapon_sway, smoothratio);
|
||||||
kickback_pic = p->okickback_pic + fmulscale16(*kb - p->okickback_pic, 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;
|
gs = sprite[p->i].shade;
|
||||||
if(gs > 24) gs = 24;
|
if(gs > 24) gs = 24;
|
||||||
|
@ -1129,7 +1130,7 @@ void displayweapon_d(int snum, double smoothratio)
|
||||||
|
|
||||||
hud_drawpal(weapon_xoffset + 184 - p->lookanghalf(),
|
hud_drawpal(weapon_xoffset + 184 - p->lookanghalf(),
|
||||||
looking_arc + 240 - gun_pos, SHRINKER + 2,
|
looking_arc + 240 - gun_pos, SHRINKER + 2,
|
||||||
16 - (calcSinTableValue(p->random_club_frame) / 1024.),
|
16 - (xs_CRoundToInt(calcSinTableValue(random_club_frame)) >> 10),
|
||||||
o, 0);
|
o, 0);
|
||||||
|
|
||||||
hud_drawpal(weapon_xoffset + 188 - p->lookanghalf(),
|
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(),
|
hud_drawpal(weapon_xoffset + 184 - p->lookanghalf(),
|
||||||
looking_arc + 240 - gun_pos, SHRINKER + 2,
|
looking_arc + 240 - gun_pos, SHRINKER + 2,
|
||||||
16 - (calcSinTableValue(p->random_club_frame) / 1024.),
|
16 - (xs_CRoundToInt(calcSinTableValue(random_club_frame)) >> 10),
|
||||||
o, 2);
|
o, 2);
|
||||||
|
|
||||||
hud_drawpal(weapon_xoffset + 188 - p->lookanghalf(),
|
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(),
|
hud_drawpal(weapon_xoffset + 184 - p->lookanghalf(),
|
||||||
looking_arc + 240 - gun_pos, SHRINKER + 2,
|
looking_arc + 240 - gun_pos, SHRINKER + 2,
|
||||||
16 - (calcSinTableValue(p->random_club_frame) / 1024.),
|
16 - (xs_CRoundToInt(calcSinTableValue(random_club_frame)) >> 10),
|
||||||
o, 0);
|
o, 0);
|
||||||
|
|
||||||
hud_drawpal(weapon_xoffset + 188 - p->lookanghalf(),
|
hud_drawpal(weapon_xoffset + 188 - p->lookanghalf(),
|
||||||
|
|
|
@ -905,6 +905,7 @@ void backupweapon(player_struct* p)
|
||||||
p->oweapon_sway = p->weapon_sway;
|
p->oweapon_sway = p->weapon_sway;
|
||||||
p->oweapon_pos = p->weapon_pos;
|
p->oweapon_pos = p->weapon_pos;
|
||||||
p->okickback_pic = p->kickback_pic;
|
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.
|
// weapon drawer variables and their interpolation counterparts.
|
||||||
int weapon_sway;
|
int weapon_sway;
|
||||||
int oweapon_sway;
|
int oweapon_sway;
|
||||||
short weapon_pos, kickback_pic;
|
short weapon_pos, kickback_pic, random_club_frame;
|
||||||
short oweapon_pos, okickback_pic;
|
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.
|
// 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 ftq, access_wallnum, access_spritenum;
|
||||||
short got_access, weapon_ang, firstaid_amount;
|
short got_access, weapon_ang, firstaid_amount;
|
||||||
short somethingonplayer, on_crane, i, one_parallax_sectnum;
|
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 cheat_phase;
|
||||||
short dummyplayersprite, extra_extra8, quick_kick, last_quick_kick;
|
short dummyplayersprite, extra_extra8, quick_kick, last_quick_kick;
|
||||||
short heat_amount, actorsqu, timebeforeexit, customexitsound;
|
short heat_amount, actorsqu, timebeforeexit, customexitsound;
|
||||||
|
|
Loading…
Reference in a new issue