mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-28 12:30:46 +00:00
- change Duke's synchronized_input
to CVAR cl_syncinput
.
This commit is contained in:
parent
4a3366d798
commit
158fd46581
9 changed files with 20 additions and 20 deletions
|
@ -89,6 +89,7 @@ CVARD(Bool, cl_interpolate, true, CVAR_ARCHIVE, "enable/disable view interpolati
|
|||
CVARD(Bool, cl_slopetilting, false, CVAR_ARCHIVE, "enable/disable slope tilting") // only implemented in Blood
|
||||
CVARD(Int, cl_showweapon, 1, CVAR_ARCHIVE, "enable/disable show weapons") // only implemented in Blood
|
||||
CVARD(Bool, cl_sointerpolation, true, CVAR_ARCHIVE, "enable/disable sector object interpolation") // only implemented in SW
|
||||
CVARD(Bool, cl_syncinput, false, CVAR_ARCHIVE, "enable/disable synchronized input with game's ticrate") // only implemented in SW
|
||||
CUSTOM_CVARD(Int, cl_crosshairscale, 50, CVAR_ARCHIVE, "changes the size of the crosshair")
|
||||
{
|
||||
if (self < 1) self = 1;
|
||||
|
|
|
@ -24,6 +24,7 @@ EXTERN_CVAR(Int, cl_showweapon)
|
|||
EXTERN_CVAR(Int, cl_weaponswitch)
|
||||
EXTERN_CVAR(Int, cl_crosshairscale)
|
||||
EXTERN_CVAR(Bool, cl_sointerpolation)
|
||||
EXTERN_CVAR(Bool, cl_syncinput)
|
||||
|
||||
EXTERN_CVAR(Bool, demorec_seeds_cvar)
|
||||
EXTERN_CVAR(Bool, demoplay_diffs)
|
||||
|
|
|
@ -64,7 +64,6 @@ int16_t weaponsandammosprites[15];
|
|||
int PHEIGHT = PHEIGHT_DUKE;
|
||||
int duke3d_globalflags;
|
||||
input_t loc;
|
||||
bool synchronized_input;
|
||||
uint8_t ready2send;
|
||||
int gamequit;
|
||||
int playerswhenstarted;
|
||||
|
|
|
@ -50,7 +50,6 @@ extern int16_t max_ammo_amount[MAX_WEAPONS];
|
|||
extern int16_t weaponsandammosprites[15];
|
||||
extern int32_t PHEIGHT;
|
||||
extern int duke3d_globalflags;
|
||||
extern bool synchronized_input;
|
||||
extern uint8_t ready2send;
|
||||
extern input_t loc;
|
||||
extern int gamequit;
|
||||
|
|
|
@ -1181,7 +1181,7 @@ static void FinalizeInput(int playerNum, input_t& input, bool vehicle)
|
|||
if (p->on_crane < 0 && p->newowner == -1)
|
||||
{
|
||||
loc.q16avel += input.q16avel;
|
||||
if (!synchronized_input)
|
||||
if (!cl_syncinput)
|
||||
{
|
||||
p->q16ang = (p->q16ang + input.q16avel) & 0x7FFFFFF;
|
||||
|
||||
|
@ -1193,7 +1193,7 @@ static void FinalizeInput(int playerNum, input_t& input, bool vehicle)
|
|||
if (p->newowner == -1 && p->return_to_center <= 0)
|
||||
{
|
||||
loc.q16horz = fix16_clamp(loc.q16horz + input.q16horz, F16(-MAXHORIZVEL), F16(MAXHORIZVEL));
|
||||
if (!synchronized_input)
|
||||
if (!cl_syncinput)
|
||||
p->q16horiz += input.q16horz; // will be clamped by the caller because further operations on q16horiz can follow.
|
||||
}
|
||||
}
|
||||
|
@ -1241,7 +1241,7 @@ void GetInput()
|
|||
processVehicleInput(p, info, input, scaleAdjust);
|
||||
FinalizeInput(myconnectindex, input, true);
|
||||
|
||||
if (!synchronized_input)
|
||||
if (!cl_syncinput)
|
||||
{
|
||||
p->q16horiz = clamp(p->q16horiz, F16(HORIZ_MIN), F16(HORIZ_MAX));
|
||||
if (sprite[p->i].extra > 0)
|
||||
|
@ -1257,7 +1257,7 @@ void GetInput()
|
|||
processInputBits(p, info);
|
||||
FinalizeInput(myconnectindex, input, false);
|
||||
|
||||
if (!synchronized_input)
|
||||
if (!cl_syncinput)
|
||||
{
|
||||
// Do these in the same order as the old code.
|
||||
applylook(myconnectindex, scaleAdjust);
|
||||
|
|
|
@ -405,7 +405,7 @@ void dokneeattack(int snum, int pi, const std::initializer_list<int> & respawnli
|
|||
if (p->knee_incs > 0)
|
||||
{
|
||||
p->knee_incs++;
|
||||
if (synchronized_input)
|
||||
if (cl_syncinput)
|
||||
p->addhoriz(-48);
|
||||
else
|
||||
{
|
||||
|
@ -881,7 +881,7 @@ void checklook(int snum, int sb_snum)
|
|||
}
|
||||
p->oq16ang = p->q16ang;
|
||||
|
||||
if (synchronized_input)
|
||||
if (cl_syncinput)
|
||||
applylook(snum, 1);
|
||||
}
|
||||
|
||||
|
|
|
@ -2596,7 +2596,7 @@ void processinput_d(int snum)
|
|||
pi = p->i;
|
||||
s = &sprite[pi];
|
||||
|
||||
if (!synchronized_input)
|
||||
if (!cl_syncinput)
|
||||
{
|
||||
p->horizAngleAdjust = 0;
|
||||
p->horizSkew = 0;
|
||||
|
@ -2637,7 +2637,7 @@ void processinput_d(int snum)
|
|||
hittype[pi].floorz = fz;
|
||||
hittype[pi].ceilingz = cz;
|
||||
|
||||
if (synchronized_input)
|
||||
if (cl_syncinput)
|
||||
{
|
||||
p->oq16horiz = p->q16horiz;
|
||||
p->oq16horizoff = p->q16horizoff;
|
||||
|
@ -2796,7 +2796,7 @@ void processinput_d(int snum)
|
|||
}
|
||||
else if (sb_avel) //p->ang += syncangvel * constant
|
||||
{ //ENGINE calculates angvel for you
|
||||
if (synchronized_input)
|
||||
if (cl_syncinput)
|
||||
{
|
||||
// may still be needed later for demo recording
|
||||
int tempang;
|
||||
|
@ -3017,7 +3017,7 @@ HORIZONLY:
|
|||
fi.activatebysector(psect, pi);
|
||||
}
|
||||
|
||||
if (!synchronized_input)
|
||||
if (!cl_syncinput)
|
||||
{
|
||||
if (p->return_to_center > 0)
|
||||
p->return_to_center--;
|
||||
|
@ -3051,7 +3051,7 @@ HORIZONLY:
|
|||
p->hard_landing--;
|
||||
}
|
||||
|
||||
if (synchronized_input)
|
||||
if (cl_syncinput)
|
||||
{
|
||||
p->q16horiz += (sync[snum].q16horz >> 1);
|
||||
sethorizon(snum, sb_snum, 1);
|
||||
|
|
|
@ -3472,7 +3472,7 @@ void processinput_r(int snum)
|
|||
hittype[pi].floorz = fz;
|
||||
hittype[pi].ceilingz = cz;
|
||||
|
||||
if (synchronized_input)
|
||||
if (cl_syncinput)
|
||||
{
|
||||
p->oq16horiz = p->q16horiz;
|
||||
p->oq16horizoff = p->q16horizoff;
|
||||
|
@ -3704,7 +3704,7 @@ void processinput_r(int snum)
|
|||
}
|
||||
else if (sb_avel) //p->ang += syncangvel * constant
|
||||
{ //ENGINE calculates angvel for you
|
||||
if (synchronized_input)
|
||||
if (cl_syncinput)
|
||||
{
|
||||
// may still be needed later for demo recording
|
||||
int tempang;
|
||||
|
@ -4041,7 +4041,7 @@ HORIZONLY:
|
|||
return;
|
||||
}
|
||||
|
||||
if (!synchronized_input && p->return_to_center > 0)
|
||||
if (!cl_syncinput && p->return_to_center > 0)
|
||||
p->return_to_center--;
|
||||
|
||||
if (sb_snum & SKB_CENTER_VIEW || p->hard_landing)
|
||||
|
@ -4078,7 +4078,7 @@ HORIZONLY:
|
|||
p->hard_landing--;
|
||||
}
|
||||
|
||||
if (synchronized_input)
|
||||
if (cl_syncinput)
|
||||
{
|
||||
p->q16horiz += (sync[snum].q16horz >> 1);
|
||||
sethorizon(snum, sb_snum, 1);
|
||||
|
|
|
@ -536,7 +536,7 @@ void displayrooms(int snum, int smoothratio)
|
|||
setdrugmode(p, i);
|
||||
}
|
||||
|
||||
if (!synchronized_input)
|
||||
if (!cl_syncinput)
|
||||
renderSetRollAngle(p->q16rotscrnang / (float)(FRACUNIT));
|
||||
else
|
||||
{
|
||||
|
@ -549,7 +549,7 @@ void displayrooms(int snum, int smoothratio)
|
|||
cposx = omyx + mulscale16((int)(myx - omyx), smoothratio);
|
||||
cposy = omyy + mulscale16((int)(myy - omyy), smoothratio);
|
||||
cposz = omyz + mulscale16((int)(myz - omyz), smoothratio);
|
||||
if (synchronized_input)
|
||||
if (cl_syncinput)
|
||||
{
|
||||
cang.interpolate(q16ang(oq16myang), q16ang(q16myang), smoothratio);
|
||||
fix16_t osum = (oq16myhoriz + oq16myhorizoff);
|
||||
|
@ -568,7 +568,7 @@ void displayrooms(int snum, int smoothratio)
|
|||
cposx = p->oposx + mulscale16((int)(p->posx - p->oposx), smoothratio);
|
||||
cposy = p->oposy + mulscale16((int)(p->posy - p->oposy), smoothratio);
|
||||
cposz = p->oposz + mulscale16((int)(p->posz - p->oposz), smoothratio);
|
||||
if (synchronized_input /*|| smoothcamera*/)
|
||||
if (cl_syncinput /*|| smoothcamera*/)
|
||||
{
|
||||
// Original code for when the values are passed through the sync struct
|
||||
cang.interpolate(q16ang(p->oq16ang), q16ang(p->q16ang), smoothratio);
|
||||
|
|
Loading…
Reference in a new issue