maint: add quakeIII constants
This commit is contained in:
parent
aa102174c4
commit
cec72268b0
@ -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 <typename T, typename R>
|
||||
constexpr auto VectorScale(T v, R s, T out) { out[0] = v[0] * s; out[1] = v[1] * s; out[2] = v[2] * s; }
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user