mirror of
https://github.com/aimrebirth/tools.git
synced 2026-04-15 01:43:25 +00:00
[mmo_extractor] Improve yaw calculations. Remove hardcoded angle. Fix atan2 arguments to correctly calculate yaw.
This commit is contained in:
parent
4158345612
commit
deba3b5e72
1 changed files with 2 additions and 2 deletions
|
|
@ -132,9 +132,9 @@ void write_mmo(Storage *storage, const mmo_storage &s, const std::string &mapnam
|
||||||
|
|
||||||
auto calc_yaw = [](auto &v)
|
auto calc_yaw = [](auto &v)
|
||||||
{
|
{
|
||||||
auto yaw = atan2(v[1].x / v[2].z, v[0].x / v[2].z);
|
auto yaw = atan2(-v[0].y, -v[0].x);
|
||||||
yaw = RAD2GRAD(yaw);
|
yaw = RAD2GRAD(yaw);
|
||||||
return -(yaw - 90);
|
return yaw;
|
||||||
};
|
};
|
||||||
|
|
||||||
int inserted = 0;
|
int inserted = 0;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue