- Remove unused PlayerPosition structure.

* There were some plans around this being in use for all the various player structs in each game, but it hasn't come to be.
* Code remains in the commit history, it can come back if it's of use in the future.
This commit is contained in:
Mitchell Richters 2022-05-30 21:33:14 +10:00
parent 1ac58dc41c
commit 612dd049f9
2 changed files with 0 additions and 50 deletions

View file

@ -536,17 +536,3 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, PlayerHorizon& w,
} }
return arc; return arc;
} }
FSerializer& Serialize(FSerializer& arc, const char* keyname, PlayerPosition& w, PlayerPosition* def)
{
if (arc.BeginObject(keyname))
{
arc("pos", w.pos).EndObject();
if (arc.isReading())
{
w.opos = w.pos;
}
}
return arc;
}

View file

@ -250,45 +250,9 @@ private:
bool inputdisabled; bool inputdisabled;
}; };
struct PlayerPosition
{
vec3_t pos, opos;
// Interpolation helpers.
void backupx() { opos.X = pos.X; }
void backupy() { opos.Y = pos.Y; }
void backupz() { opos.Z = pos.Z; }
void backuppos() { opos = pos; }
// Interpolated points.
int32_t interpolatedx(double const smoothratio, int const scale = 16) { return interpolatedvalue(opos.X, pos.X, smoothratio, scale); }
int32_t interpolatedy(double const smoothratio, int const scale = 16) { return interpolatedvalue(opos.Y, pos.Y, smoothratio, scale); }
int32_t interpolatedz(double const smoothratio, int const scale = 16) { return interpolatedvalue(opos.Z, pos.Z, smoothratio, scale); }
// Interpolated vectors.
vec2_t interpolatedvec2(double const smoothratio, int const scale = 16)
{
return
{
interpolatedx(smoothratio, scale),
interpolatedy(smoothratio, scale)
};
}
vec3_t interpolatedvec3(double const smoothratio, int const scale = 16)
{
return
{
interpolatedx(smoothratio, scale),
interpolatedy(smoothratio, scale),
interpolatedz(smoothratio, scale)
};
}
};
class FSerializer; class FSerializer;
FSerializer& Serialize(FSerializer& arc, const char* keyname, PlayerAngle& w, PlayerAngle* def); FSerializer& Serialize(FSerializer& arc, const char* keyname, PlayerAngle& w, PlayerAngle* def);
FSerializer& Serialize(FSerializer& arc, const char* keyname, PlayerHorizon& w, PlayerHorizon* def); FSerializer& Serialize(FSerializer& arc, const char* keyname, PlayerHorizon& w, PlayerHorizon* def);
FSerializer& Serialize(FSerializer& arc, const char* keyname, PlayerPosition& w, PlayerPosition* def);
void updateTurnHeldAmt(double const scaleAdjust); void updateTurnHeldAmt(double const scaleAdjust);