mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-28 12:30:46 +00:00
- Duke: Fix bug where player wasn't cracking knuckles after 777 idle tics while cl_syncinput
was 1.
* Use opportunity to replace the literal constant of `777` with an enum.
This commit is contained in:
parent
55f688b13f
commit
3e79e7b63f
5 changed files with 19 additions and 15 deletions
|
@ -425,6 +425,12 @@ enum
|
|||
TRIPBOMB_TIMER = 2
|
||||
};
|
||||
|
||||
// Miscellaenous constants in use throughout the game.
|
||||
enum
|
||||
{
|
||||
CRACK_TIME = 777
|
||||
};
|
||||
|
||||
// World tour
|
||||
enum EFlamethrowerState
|
||||
{
|
||||
|
|
|
@ -732,7 +732,7 @@ void playerCrouch(int snum)
|
|||
if (GetGameVarID(g_iReturnVarID, p->i, snum) == 0)
|
||||
{
|
||||
p->posz += (2048 + 768);
|
||||
p->crack_time = 777;
|
||||
p->crack_time = CRACK_TIME;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -112,7 +112,7 @@ void shoot_d(int i, int atwith)
|
|||
sz = ps[p].posz + ps[p].pyoff + (4 << 8);
|
||||
sa = ps[p].getang();
|
||||
|
||||
ps[p].crack_time = 777;
|
||||
ps[p].crack_time = CRACK_TIME;
|
||||
|
||||
}
|
||||
else
|
||||
|
@ -1352,7 +1352,7 @@ int doincrements_d(struct player_struct* p)
|
|||
if (p->crack_time == 0)
|
||||
{
|
||||
p->knuckle_incs = 1;
|
||||
p->crack_time = 777;
|
||||
p->crack_time = CRACK_TIME;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1586,7 +1586,7 @@ static void operateJetpack(int snum, ESyncBits sb_snum, int psectlotag, int fz,
|
|||
if (GetGameVarID(g_iReturnVarID, pi, snum) == 0)
|
||||
{
|
||||
p->posz -= j;
|
||||
p->crack_time = 777;
|
||||
p->crack_time = CRACK_TIME;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1598,7 +1598,7 @@ static void operateJetpack(int snum, ESyncBits sb_snum, int psectlotag, int fz,
|
|||
if (GetGameVarID(g_iReturnVarID, pi, snum) == 0)
|
||||
{
|
||||
p->posz += j;
|
||||
p->crack_time = 777;
|
||||
p->crack_time = CRACK_TIME;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1945,7 +1945,7 @@ static void fireweapon(int snum)
|
|||
auto p = &ps[snum];
|
||||
int pi = p->i;
|
||||
|
||||
p->crack_time = 777;
|
||||
p->crack_time = CRACK_TIME;
|
||||
|
||||
if (p->holster_weapon == 1)
|
||||
{
|
||||
|
@ -2787,8 +2787,6 @@ void processinput_d(int snum)
|
|||
// may still be needed later for demo recording
|
||||
|
||||
applylook(snum, 1, sb_avel);
|
||||
|
||||
p->crack_time = 777;
|
||||
}
|
||||
|
||||
if (p->spritebridge == 0)
|
||||
|
@ -2832,7 +2830,7 @@ void processinput_d(int snum)
|
|||
|
||||
if (p->posxv || p->posyv || sb_fvel || sb_svel)
|
||||
{
|
||||
p->crack_time = 777;
|
||||
p->crack_time = CRACK_TIME;
|
||||
|
||||
k = sintable[p->bobcounter & 2047] >> 12;
|
||||
|
||||
|
|
|
@ -107,7 +107,7 @@ void shoot_r(int i, int atwith)
|
|||
sz = ps[p].posz + ps[p].pyoff + (4 << 8);
|
||||
sa = ps[p].getang();
|
||||
|
||||
if (isRRRA()) ps[p].crack_time = 777;
|
||||
if (isRRRA()) ps[p].crack_time = CRACK_TIME;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1284,7 +1284,7 @@ int doincrements_r(struct player_struct* p)
|
|||
if (p->crack_time == 0)
|
||||
{
|
||||
p->knuckle_incs = 1;
|
||||
p->crack_time = 777;
|
||||
p->crack_time = CRACK_TIME;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2612,7 +2612,7 @@ static void fireweapon(int snum)
|
|||
auto p = &ps[snum];
|
||||
int pi = p->i;
|
||||
|
||||
p->crack_time = 777;
|
||||
p->crack_time = CRACK_TIME;
|
||||
|
||||
if (p->holster_weapon == 1)
|
||||
{
|
||||
|
@ -3699,7 +3699,7 @@ void processinput_r(int snum)
|
|||
|
||||
applylook(snum, 1, sb_avel);
|
||||
|
||||
p->crack_time = 777;
|
||||
p->crack_time = CRACK_TIME;
|
||||
}
|
||||
|
||||
if (p->spritebridge == 0)
|
||||
|
@ -3725,7 +3725,7 @@ void processinput_r(int snum)
|
|||
|
||||
if (p->posxv || p->posyv || sb_fvel || sb_svel)
|
||||
{
|
||||
p->crack_time = 777;
|
||||
p->crack_time = CRACK_TIME;
|
||||
|
||||
k = sintable[p->bobcounter & 2047] >> 12;
|
||||
|
||||
|
|
|
@ -144,7 +144,7 @@ void fireweapon_ww(int snum)
|
|||
auto p = &ps[snum];
|
||||
int pi = p->i;
|
||||
|
||||
p->crack_time = 777;
|
||||
p->crack_time = CRACK_TIME;
|
||||
|
||||
if (p->holster_weapon == 1)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue