- re-added EDuke32's last_quick_kick to remove flicker during the animation. Fixes #7.

This commit is contained in:
Christoph Oelckers 2020-07-26 10:18:55 +02:00
parent d2a4b4eef9
commit 8643459cbe
4 changed files with 13 additions and 6 deletions

View file

@ -335,7 +335,7 @@ void displayweapon_d(int snum)
// rest of code should be moved to CON..
j = 14-p->quick_kick;
if (j != 14)
if (j != 14 || p->last_quick_kick)
{
if (sprite[p->i].pal == 1)
pal = 1;
@ -348,10 +348,13 @@ void displayweapon_d(int snum)
if (j < 5 || j > 9)
hud_drawpal(weapon_xoffset + 80 - (p->getlookang() >> 1),
looking_arc + 250 - gun_pos, KNEE, gs, o | 4, pal);
else hud_drawpal(weapon_xoffset + 160 - 16 - (p->getlookang() >> 1),
looking_arc + 214 - gun_pos, KNEE + 1, gs, o | 4, pal);
{
hud_drawpal(weapon_xoffset + 80 - (p->getlookang() >> 1), looking_arc + 250 - gun_pos, KNEE, gs, o | 4, pal);
}
else
{
hud_drawpal(weapon_xoffset + 160 - 16 - (p->getlookang() >> 1), looking_arc + 214 - gun_pos, KNEE + 1, gs, o | 4, pal);
}
}
if (sprite[p->i].xrepeat < 40)

View file

@ -1404,10 +1404,13 @@ int doincrements_d(struct player_struct* p)
if (p->quick_kick > 0 && sprite[p->i].pal != 1)
{
p->last_quick_kick = p->quick_kick + 1;
p->quick_kick--;
if (p->quick_kick == 8)
fi.shoot(p->i, KNEE);
}
else if (p->last_quick_kick > 0)
p->last_quick_kick--;
if (p->access_incs && sprite[p->i].pal != 1)
{

View file

@ -187,6 +187,7 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, player_struct& w,
("dummyplayersprite", w.dummyplayersprite)
("extra_extra8", w.extra_extra8)
("quick_kick", w.quick_kick)
("last_quick_kick", w.last_quick_kick)
("heat_amount", w.heat_amount)
("actorsqu", w.actorsqu)
("timebeforeexit", w.timebeforeexit)

View file

@ -137,7 +137,7 @@ struct player_struct
short somethingonplayer, on_crane, i, one_parallax_sectnum;
short over_shoulder_on, random_club_frame, fist_incs;
short cheat_phase;
short dummyplayersprite, extra_extra8, quick_kick;
short dummyplayersprite, extra_extra8, quick_kick, last_quick_kick;
short heat_amount, actorsqu, timebeforeexit, customexitsound;
short weaprecs[256], weapreccnt;