mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-16 12:40:38 +00:00
- backup p->kickback_pic
in prep for interpolation and tidy up other weapon interpolation variables.
This commit is contained in:
parent
11a10c1d87
commit
6ad3237b62
6 changed files with 26 additions and 7 deletions
|
@ -247,5 +247,6 @@ void updateviewport(void);
|
|||
void backuppos(player_struct* p, bool noclipping = false);
|
||||
void backuplook(player_struct* p);
|
||||
void backupview(player_struct* p);
|
||||
void backupweapon(player_struct* p);
|
||||
|
||||
END_DUKE_NS
|
||||
|
|
|
@ -253,8 +253,8 @@ void hud_input(int snum)
|
|||
if (p->aim_mode < i)
|
||||
p->return_to_center = 9;
|
||||
|
||||
// Backup weapon_pos here as this is the earliest occurence where weapon_pos can change.
|
||||
p->oweapon_pos = p->weapon_pos;
|
||||
// Backup weapon here as hud_input() is the first function where any one of the weapon variables can change.
|
||||
backupweapon(p);
|
||||
|
||||
if (isRR())
|
||||
{
|
||||
|
|
|
@ -900,6 +900,19 @@ void backupview(player_struct* p)
|
|||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void backupweapon(player_struct* p)
|
||||
{
|
||||
p->oweapon_sway = p->weapon_sway;
|
||||
p->oweapon_pos = p->weapon_pos;
|
||||
p->okickback_pic = p->kickback_pic;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void checklook(int snum, int sb_snum)
|
||||
{
|
||||
auto p = &ps[snum];
|
||||
|
|
|
@ -2732,7 +2732,6 @@ void processinput_d(int snum)
|
|||
if (p->on_crane >= 0)
|
||||
goto HORIZONLY;
|
||||
|
||||
p->oweapon_sway = p->weapon_sway;
|
||||
if (s->xvel < 32 || p->on_ground == 0 || p->bobcounter == 1024)
|
||||
{
|
||||
if ((p->weapon_sway & 2047) > (1024 + 96))
|
||||
|
|
|
@ -3627,7 +3627,6 @@ void processinput_r(int snum)
|
|||
if (p->on_crane >= 0)
|
||||
goto HORIZONLY;
|
||||
|
||||
p->oweapon_sway = p->weapon_sway;
|
||||
if (s->xvel < 32 || p->on_ground == 0 || p->bobcounter == 1024)
|
||||
{
|
||||
if ((p->weapon_sway & 2047) > (1024 + 96))
|
||||
|
|
|
@ -116,13 +116,20 @@ struct player_struct
|
|||
// this was a global variable originally.
|
||||
vec2_t fric;
|
||||
|
||||
// weapon drawer variables and their interpolation counterparts.
|
||||
int weapon_sway;
|
||||
int oweapon_sway;
|
||||
short weapon_pos, kickback_pic;
|
||||
short oweapon_pos, okickback_pic;
|
||||
|
||||
|
||||
// From here on it is unaltered from JFDuke with the exception of a few fields that are no longer needed and were removed.
|
||||
int zoom, exitx, exity, loogiex[64], loogiey[64], numloogs, loogcnt;
|
||||
int invdisptime;
|
||||
int bobposx, bobposy, oposx, oposy, oposz, pyoff, opyoff;
|
||||
int posxv, posyv, poszv, last_pissed_time, truefz, truecz;
|
||||
int player_par, visibility;
|
||||
int bobcounter, weapon_sway, oweapon_sway;
|
||||
int bobcounter;
|
||||
int pals_time, randomflamex, crack_time;
|
||||
|
||||
int aim_mode, auto_aim, ftt;
|
||||
|
@ -134,7 +141,7 @@ struct player_struct
|
|||
short holoduke_amount, newowner, hurt_delay, hbomb_hold_delay;
|
||||
short jumping_counter, airleft, knee_incs, access_incs;
|
||||
short ftq, access_wallnum, access_spritenum;
|
||||
short kickback_pic, got_access, weapon_ang, firstaid_amount;
|
||||
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 cheat_phase;
|
||||
|
@ -146,7 +153,7 @@ struct player_struct
|
|||
|
||||
short dead_flag, show_empty_weapon; // JBF 20031220: added orotscrnang
|
||||
short scuba_amount, jetpack_amount, steroids_amount, shield_amount;
|
||||
short holoduke_on, pycount, weapon_pos, frag_ps, oweapon_pos;
|
||||
short holoduke_on, pycount, frag_ps;
|
||||
short transporter_hold, last_full_weapon, footprintshade, boot_amount;
|
||||
|
||||
int scream_voice;
|
||||
|
|
Loading…
Reference in a new issue