mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-16 12:40:38 +00:00
- re-added EDuke32's last_quick_kick to remove flicker during the animation. Fixes #7.
This commit is contained in:
parent
d2a4b4eef9
commit
8643459cbe
4 changed files with 13 additions and 6 deletions
|
@ -335,7 +335,7 @@ void displayweapon_d(int snum)
|
||||||
// rest of code should be moved to CON..
|
// rest of code should be moved to CON..
|
||||||
|
|
||||||
j = 14-p->quick_kick;
|
j = 14-p->quick_kick;
|
||||||
if (j != 14)
|
if (j != 14 || p->last_quick_kick)
|
||||||
{
|
{
|
||||||
if (sprite[p->i].pal == 1)
|
if (sprite[p->i].pal == 1)
|
||||||
pal = 1;
|
pal = 1;
|
||||||
|
@ -348,10 +348,13 @@ void displayweapon_d(int snum)
|
||||||
|
|
||||||
|
|
||||||
if (j < 5 || j > 9)
|
if (j < 5 || j > 9)
|
||||||
hud_drawpal(weapon_xoffset + 80 - (p->getlookang() >> 1),
|
{
|
||||||
looking_arc + 250 - gun_pos, KNEE, 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);
|
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)
|
if (sprite[p->i].xrepeat < 40)
|
||||||
|
|
|
@ -1404,10 +1404,13 @@ int doincrements_d(struct player_struct* p)
|
||||||
|
|
||||||
if (p->quick_kick > 0 && sprite[p->i].pal != 1)
|
if (p->quick_kick > 0 && sprite[p->i].pal != 1)
|
||||||
{
|
{
|
||||||
|
p->last_quick_kick = p->quick_kick + 1;
|
||||||
p->quick_kick--;
|
p->quick_kick--;
|
||||||
if (p->quick_kick == 8)
|
if (p->quick_kick == 8)
|
||||||
fi.shoot(p->i, KNEE);
|
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)
|
if (p->access_incs && sprite[p->i].pal != 1)
|
||||||
{
|
{
|
||||||
|
|
|
@ -187,6 +187,7 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, player_struct& w,
|
||||||
("dummyplayersprite", w.dummyplayersprite)
|
("dummyplayersprite", w.dummyplayersprite)
|
||||||
("extra_extra8", w.extra_extra8)
|
("extra_extra8", w.extra_extra8)
|
||||||
("quick_kick", w.quick_kick)
|
("quick_kick", w.quick_kick)
|
||||||
|
("last_quick_kick", w.last_quick_kick)
|
||||||
("heat_amount", w.heat_amount)
|
("heat_amount", w.heat_amount)
|
||||||
("actorsqu", w.actorsqu)
|
("actorsqu", w.actorsqu)
|
||||||
("timebeforeexit", w.timebeforeexit)
|
("timebeforeexit", w.timebeforeexit)
|
||||||
|
|
|
@ -137,7 +137,7 @@ struct player_struct
|
||||||
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, random_club_frame, fist_incs;
|
||||||
short cheat_phase;
|
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 heat_amount, actorsqu, timebeforeexit, customexitsound;
|
||||||
|
|
||||||
short weaprecs[256], weapreccnt;
|
short weaprecs[256], weapreccnt;
|
||||||
|
|
Loading…
Reference in a new issue