Revert "- SW: Attempt at making vehicle movement work nicely while uninterpolated."

This reverts commit 28a3ef131f.

I mostly added this to visualise an attempt at how I've attempted to make the vehicles work with unsynchronised input. I don't wish for this to be committed to the main branch as it's a net negative.
This commit is contained in:
Mitchell Richters 2020-09-10 19:56:13 +10:00
parent 2ffb6a3580
commit be6e0d87d7
2 changed files with 10 additions and 23 deletions

View File

@ -191,11 +191,6 @@ void so_setinterpolationtics(SECTOR_OBJECTp sop, int16_t locktics)
interp->lasttic = locktics;
}
static inline bool so_nointerpolations(short track)
{
return !cl_syncinput && (track >= SO_TURRET_MGUN && track <= SO_VEHICLE);
}
void so_updateinterpolations(void) // Stick at beginning of domovethings
{
int32_t i;
@ -207,7 +202,8 @@ void so_updateinterpolations(void) // Stick at beginning of domovethings
for (sop = SectorObject, interp = so_interpdata;
sop < &SectorObject[MAX_SECTOR_OBJECTS]; sop++, interp++)
{
if (SO_EMPTY(sop) || so_nointerpolations(sop->track))
bool skip = !cl_syncinput && (sop->track == SO_TURRET);
if (SO_EMPTY(sop) || skip)
continue;
if (interp->tic < interp->lasttic)
interp->tic += synctics;
@ -245,7 +241,8 @@ void so_dointerpolations(int32_t smoothratio) // Stick at b
for (sop = SectorObject, interp = so_interpdata;
sop < &SectorObject[MAX_SECTOR_OBJECTS]; sop++, interp++)
{
if (SO_EMPTY(sop) || so_nointerpolations(sop->track))
bool skip = !cl_syncinput && (sop->track == SO_TURRET);
if (SO_EMPTY(sop) || skip)
continue;
for (i = 0; i < interp->numinterpolations; i++)
@ -271,7 +268,8 @@ void so_dointerpolations(int32_t smoothratio) // Stick at b
for (sop = SectorObject, interp = so_interpdata;
sop < &SectorObject[MAX_SECTOR_OBJECTS]; sop++, interp++)
{
if (SO_EMPTY(sop) || so_nointerpolations(sop->track))
bool skip = !cl_syncinput && (sop->track == SO_TURRET);
if (SO_EMPTY(sop) || skip)
continue;
// Check if interpolation has been explicitly disabled
@ -331,7 +329,8 @@ void so_restoreinterpolations(void) // Stick at end of drawscree
for (sop = SectorObject, interp = so_interpdata;
sop < &SectorObject[MAX_SECTOR_OBJECTS]; sop++, interp++)
{
if (SO_EMPTY(sop) || so_nointerpolations(sop->track))
bool skip = !cl_syncinput && (sop->track == SO_TURRET);
if (SO_EMPTY(sop) || skip)
continue;
for (i = 0, data = interp->data; i < interp->numinterpolations; i++, data++)

View File

@ -1669,11 +1669,6 @@ DoPlayerTurnVehicle(PLAYERp pp, fixed_t q16avel, int z, int floor_dist)
sprite[pp->PlayerSprite].ang = FixedToInt(pp->q16ang);
}
}
if (!cl_syncinput)
{
OperateSectorObject(pp->sop, FixedToInt(pp->q16ang), pp->oposx + mulscale16(pp->posx - pp->oposx, smoothratio), pp->oposy + mulscale16(pp->posy - pp->oposy, smoothratio));
}
}
void
@ -3049,10 +3044,7 @@ DoPlayerMoveVehicle(PLAYERp pp)
}
save_sectnum = pp->cursectnum;
if (cl_syncinput)
{
OperateSectorObject(pp->sop, FixedToInt(pp->q16ang), MAXSO, MAXSO);
}
OperateSectorObject(pp->sop, FixedToInt(pp->q16ang), MAXSO, MAXSO);
pp->cursectnum = pp->sop->op_main_sector; // for speed
floor_dist = labs(z - pp->sop->floor_loz);
@ -3156,11 +3148,7 @@ DoPlayerMoveVehicle(PLAYERp pp)
}
}
if (cl_syncinput)
{
OperateSectorObject(pp->sop, FixedToInt(pp->q16ang), pp->posx, pp->posy);
}
OperateSectorObject(pp->sop, FixedToInt(pp->q16ang), pp->posx, pp->posy);
pp->cursectnum = save_sectnum; // for speed
if (!cl_syncinput)