mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 08:52:00 +00:00
- uncouple the fist animation for being shrunk from the display frame rate.
This commit is contained in:
parent
26d89e932a
commit
4ee64df844
5 changed files with 12 additions and 13 deletions
|
@ -302,24 +302,19 @@ void displayweapon_d(int snum, double smoothratio)
|
|||
|
||||
if (p->GetActor()->spr.xrepeat < 40)
|
||||
{
|
||||
static int fistsign;
|
||||
//shrunken..
|
||||
int fistsign = interpolatedvalue(p->ofistsign, p->fistsign, (int)smoothratio);
|
||||
if (p->jetpack_on == 0)
|
||||
{
|
||||
i = p->GetActor()->spr.xvel;
|
||||
looking_arc += 32 - (i >> 1);
|
||||
fistsign += i >> 1;
|
||||
}
|
||||
double owo = weapon_xoffset;
|
||||
weapon_xoffset += bsinf(fistsign, -10);
|
||||
hud_draw(weapon_xoffset + 250 - look_anghalf,
|
||||
looking_arc + 258 - fabs(bsinf(fistsign, -8)),
|
||||
FIST, shade, o);
|
||||
hud_draw(weapon_xoffset + 250 - look_anghalf, looking_arc + 258 - fabs(bsinf(fistsign, -8)), FIST, shade, o);
|
||||
weapon_xoffset = owo;
|
||||
weapon_xoffset -= bsinf(fistsign, -10);
|
||||
hud_draw(weapon_xoffset + 40 - look_anghalf,
|
||||
looking_arc + 200 + fabs(bsinf(fistsign, -8)),
|
||||
FIST, shade, o | 4);
|
||||
hud_draw(weapon_xoffset + 40 - look_anghalf, looking_arc + 200 + fabs(bsinf(fistsign, -8)), FIST, shade, o | 4);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -789,6 +789,7 @@ void player_struct::backupweapon()
|
|||
okickback_pic = kickback_pic;
|
||||
orandom_club_frame = random_club_frame;
|
||||
ohard_landing = hard_landing;
|
||||
ofistsign = fistsign;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
|
|
@ -2817,6 +2817,11 @@ void processinput_d(int snum)
|
|||
return;
|
||||
}
|
||||
|
||||
if (p->GetActor()->spr.xrepeat < 40 && p->jetpack_on == 0)
|
||||
{
|
||||
p->fistsign += p->GetActor()->spr.xvel;
|
||||
}
|
||||
|
||||
if (p->transporter_hold > 0)
|
||||
{
|
||||
p->transporter_hold--;
|
||||
|
|
|
@ -273,6 +273,7 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, player_struct& w,
|
|||
("actions", w.sync.actions)
|
||||
.Array("frags", w.frags, MAXPLAYERS)
|
||||
("uservars", w.uservars)
|
||||
("fistsign", w.fistsign)
|
||||
.EndObject();
|
||||
|
||||
w.invdisptime = 0;
|
||||
|
@ -280,11 +281,7 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, player_struct& w,
|
|||
w.opos.Y = w.pos.Y;
|
||||
w.opos.Z = w.pos.Z;
|
||||
w.opyoff = w.pyoff;
|
||||
w.oweapon_sway = w.weapon_sway;
|
||||
w.oweapon_pos = w.weapon_pos;
|
||||
w.okickback_pic = w.kickback_pic;
|
||||
w.orandom_club_frame = w.random_club_frame;
|
||||
w.ohard_landing = w.hard_landing;
|
||||
w.backupweapon();
|
||||
w.sync.actions &= SB_CENTERVIEW|SB_CROUCH; // these are the only bits we need to preserve.
|
||||
}
|
||||
return arc;
|
||||
|
|
|
@ -204,6 +204,7 @@ struct player_struct
|
|||
short oweapon_pos, okickback_pic, orandom_club_frame;
|
||||
uint8_t hard_landing;
|
||||
uint8_t ohard_landing;
|
||||
int fistsign, ofistsign;
|
||||
|
||||
// Store current psectlotag as determined in processinput() for use with scaling angle aiming.
|
||||
short psectlotag;
|
||||
|
|
Loading…
Reference in a new issue