diff --git a/source/core/gameinput.cpp b/source/core/gameinput.cpp index e31dc4b9889..f40292ad51f 100644 --- a/source/core/gameinput.cpp +++ b/source/core/gameinput.cpp @@ -536,17 +536,3 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, PlayerHorizon& w, } 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; -} diff --git a/source/core/gameinput.h b/source/core/gameinput.h index ea98563cfb7..5bcf5fc16a0 100644 --- a/source/core/gameinput.h +++ b/source/core/gameinput.h @@ -250,45 +250,9 @@ struct PlayerAngle 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; 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, PlayerPosition& w, PlayerPosition* def); void updateTurnHeldAmt(double const scaleAdjust);