diff --git a/src/game/game.hpp b/src/game/game.hpp index 1d87769..11a6f49 100644 --- a/src/game/game.hpp +++ b/src/game/game.hpp @@ -282,6 +282,11 @@ namespace game constexpr auto MAX_QPATH = 64; constexpr auto MAX_OSPATH = 256; + // Angle indexes + constexpr auto PITCH = 0; // up / down + constexpr auto YAW = 1; // left / right + constexpr auto ROLL = 2; // fall over + // From Quake III, to match game's assembly template constexpr auto VectorScale(T v, R s, T out) { out[0] = v[0] * s; out[1] = v[1] * s; out[2] = v[2] * s; } diff --git a/src/module/client_command.cpp b/src/module/client_command.cpp index 40e42f6..cd8091e 100644 --- a/src/module/client_command.cpp +++ b/src/module/client_command.cpp @@ -130,12 +130,12 @@ private: if (params.size() > 4) { - angles[1] = std::strtof(params.get(4), nullptr); // Yaw + angles[game::native::YAW] = std::strtof(params.get(4), nullptr); // Yaw } if (params.size() == 6) { - angles[0] = std::strtof(params.get(5), nullptr); // Pitch + angles[game::native::PITCH] = std::strtof(params.get(5), nullptr); // Pitch } game::native::TeleportPlayer(ent, origin, angles);