mirror of
https://github.com/aimrebirth/tools.git
synced 2026-04-15 01:43:25 +00:00
Remove coordinate multiplier.
This commit is contained in:
parent
a83689ccf3
commit
e93b472416
2 changed files with 9 additions and 9 deletions
|
|
@ -50,8 +50,8 @@ int main(int argc, char *argv[])
|
||||||
}
|
}
|
||||||
read_mmp(argv[1]);
|
read_mmp(argv[1]);
|
||||||
#else
|
#else
|
||||||
auto arena = read_mmp("h:\\Games\\Ìåõàíîèäû\\data\\maps.pak.dir\\arena.mmp");
|
auto arena = read_mmp("h:\\Games\\AIM\\data\\maps.pak.dir\\arena.mmp");
|
||||||
auto loc1 = read_mmp("h:\\Games\\Ìåõàíîèäû\\data\\maps.pak.dir\\location1.mmp");
|
auto loc1 = read_mmp("h:\\Games\\AIM\\data\\maps.pak.dir\\location1.mmp");
|
||||||
#endif
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
@ -152,9 +152,9 @@ void write_mmo(string db, const storage &s)
|
||||||
mb.text_id = object.name2;
|
mb.text_id = object.name2;
|
||||||
mb.building = storage->buildings[bld_ids[object.name1]];
|
mb.building = storage->buildings[bld_ids[object.name1]];
|
||||||
mb.map = this_map;
|
mb.map = this_map;
|
||||||
mb.x = object.position.x * 100.0;
|
mb.x = object.position.x;
|
||||||
mb.y = object.position.y * 100.0;
|
mb.y = object.position.y;
|
||||||
mb.z = object.position.z * 100.0;
|
mb.z = object.position.z;
|
||||||
mb.yaw = atan2(object.m_rotate_z[1].x, object.m_rotate_z[0].x);
|
mb.yaw = atan2(object.m_rotate_z[1].x, object.m_rotate_z[0].x);
|
||||||
mb.pitch = atan2(-object.m_rotate_z[2].x, sqrt(object.m_rotate_z[2].y * object.m_rotate_z[2].y + object.m_rotate_z[2].z * object.m_rotate_z[2].z));
|
mb.pitch = atan2(-object.m_rotate_z[2].x, sqrt(object.m_rotate_z[2].y * object.m_rotate_z[2].y + object.m_rotate_z[2].z * object.m_rotate_z[2].z));
|
||||||
mb.roll = atan2(object.m_rotate_z[2].y, object.m_rotate_z[2].z);
|
mb.roll = atan2(object.m_rotate_z[2].y, object.m_rotate_z[2].z);
|
||||||
|
|
@ -197,12 +197,12 @@ void write_mmo(string db, const storage &s)
|
||||||
for (auto &object : segment->objects)
|
for (auto &object : segment->objects)
|
||||||
{
|
{
|
||||||
detail::MapObject mb;
|
detail::MapObject mb;
|
||||||
//mb.text_id = object.name2;
|
mb.text_id = object.name2;
|
||||||
mb.map = this_map;
|
mb.map = this_map;
|
||||||
mb.object = storage->objects[bld_ids[object.name1]];
|
mb.object = storage->objects[bld_ids[object.name1]];
|
||||||
mb.x = object.position.x * 100.0;
|
mb.x = object.position.x;
|
||||||
mb.y = object.position.y * 100.0;
|
mb.y = object.position.y;
|
||||||
mb.z = object.position.z * 100.0;
|
mb.z = object.position.z;
|
||||||
mb.yaw = atan2(object.m_rotate_z[1].x, object.m_rotate_z[0].x);
|
mb.yaw = atan2(object.m_rotate_z[1].x, object.m_rotate_z[0].x);
|
||||||
mb.pitch = atan2(-object.m_rotate_z[2].x, sqrt(object.m_rotate_z[2].y * object.m_rotate_z[2].y + object.m_rotate_z[2].z * object.m_rotate_z[2].z));
|
mb.pitch = atan2(-object.m_rotate_z[2].x, sqrt(object.m_rotate_z[2].y * object.m_rotate_z[2].y + object.m_rotate_z[2].z * object.m_rotate_z[2].z));
|
||||||
mb.roll = atan2(object.m_rotate_z[2].y, object.m_rotate_z[2].z);
|
mb.roll = atan2(object.m_rotate_z[2].y, object.m_rotate_z[2].z);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue