- SW: Remove camq16* variables from game and backend code that supported them.

* `cl_syncinput 0` is very raw at the moment.
This commit is contained in:
Mitchell Richters 2020-09-07 08:40:14 +10:00
parent d1d40c6982
commit 6e6373deda
9 changed files with 30 additions and 81 deletions

View file

@ -1021,8 +1021,6 @@ void NetUpdate (void)
int fvel;
int64_t q16avel;
int64_t q16horz;
int64_t q16horiz; // only used by SW
int64_t q16ang; // only used by SW
for (j = 0; j < ticdup; ++j)
{
@ -1031,16 +1029,12 @@ void NetUpdate (void)
fvel += localcmds[modp].ucmd.fvel;
q16avel += localcmds[modp].ucmd.q16avel;
q16horz += localcmds[modp].ucmd.q16horz;
q16horiz += localcmds[modp].ucmd.q16horiz;
q16ang += localcmds[modp].ucmd.q16ang;
}
svel /= ticdup;
fvel /= ticdup;
q16avel /= ticdup;
q16horz /= ticdup;
q16horiz /= ticdup;
q16ang /= ticdup;
for (j = 0; j < ticdup; ++j)
{
@ -1049,8 +1043,6 @@ void NetUpdate (void)
localcmds[modp].ucmd.fvel = fvel;
localcmds[modp].ucmd.q16avel = q16avel;
localcmds[modp].ucmd.q16horz = q16horz;
localcmds[modp].ucmd.q16horiz = q16horiz;
localcmds[modp].ucmd.q16ang = q16ang;
}
Net_NewMakeTic ();

View file

@ -167,10 +167,6 @@ int UnpackUserCmd (InputPacket *ucmd, const InputPacket *basis, uint8_t **stream
ucmd->fvel = ReadWord (stream);
if (flags & UCMDF_SIDEMOVE)
ucmd->svel = ReadWord (stream);
if (flags & UCMDF_UPMOVE)
ucmd->q16horiz = ReadLong (stream);
if (flags & UCMDF_ROLL)
ucmd->q16ang = ReadLong (stream);
}
return int(*stream - start);
@ -217,16 +213,6 @@ int PackUserCmd (const InputPacket *ucmd, const InputPacket *basis, uint8_t **st
flags |= UCMDF_SIDEMOVE;
WriteWord (ucmd->svel, stream);
}
if (ucmd->q16horiz != basis->q16horiz)
{
flags |= UCMDF_UPMOVE;
WriteLong (ucmd->q16horiz, stream);
}
if (ucmd->q16ang != basis->q16ang)
{
flags |= UCMDF_ROLL;
WriteLong (ucmd->q16ang, stream);
}
// Write the packing bits
WriteByte (flags, &temp);
@ -252,10 +238,8 @@ FSerializer &Serialize(FSerializer &arc, const char *key, InputPacket &cmd, Inpu
arc("actions", cmd.actions)
("horz", cmd.q16horz)
("avel", cmd.q16avel)
("ang", cmd.q16ang)
("fvel", cmd.fvel)
("svwl", cmd.svel)
("q16horiz", cmd.q16horiz)
.EndObject();
}
return arc;
@ -269,9 +253,7 @@ int WriteUserCmdMessage (InputPacket *ucmd, const InputPacket *basis, uint8_t **
ucmd->q16horz != 0 ||
ucmd->q16avel != 0 ||
ucmd->fvel != 0 ||
ucmd->svel != 0 ||
ucmd->q16horiz != 0 ||
ucmd->q16ang != 0)
ucmd->svel != 0)
{
WriteByte (DEM_USERCMD, stream);
return PackUserCmd (ucmd, basis, stream) + 1;
@ -282,9 +264,7 @@ int WriteUserCmdMessage (InputPacket *ucmd, const InputPacket *basis, uint8_t **
ucmd->q16horz != basis->q16horz ||
ucmd->q16avel != basis->q16avel ||
ucmd->fvel != basis->fvel ||
ucmd->svel != basis->svel ||
ucmd->q16horiz != basis->q16horiz ||
ucmd->q16ang != basis->q16ang)
ucmd->svel != basis->svel)
{
WriteByte (DEM_USERCMD, stream);
return PackUserCmd (ucmd, basis, stream) + 1;

View file

@ -74,8 +74,6 @@ struct InputPacket
int16_t fvel;
fixed_t q16avel;
fixed_t q16horz;
fixed_t q16horiz; // only used by SW
fixed_t q16ang; // only used by SW
ESyncBits actions;