From e93b472416373b51861986bf730bb0945d540de9 Mon Sep 17 00:00:00 2001 From: lzwdgc Date: Mon, 6 Jul 2015 02:17:37 +0300 Subject: [PATCH] Remove coordinate multiplier. --- src/mmp_extractor/mmp_extractor.cpp | 4 ++-- src/obj_extractor/obj_extractor.cpp | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/mmp_extractor/mmp_extractor.cpp b/src/mmp_extractor/mmp_extractor.cpp index 267d1ea..dd5fc67 100644 --- a/src/mmp_extractor/mmp_extractor.cpp +++ b/src/mmp_extractor/mmp_extractor.cpp @@ -50,8 +50,8 @@ int main(int argc, char *argv[]) } read_mmp(argv[1]); #else - auto arena = read_mmp("h:\\Games\\Механоиды\\data\\maps.pak.dir\\arena.mmp"); - auto loc1 = read_mmp("h:\\Games\\Механоиды\\data\\maps.pak.dir\\location1.mmp"); + auto arena = read_mmp("h:\\Games\\AIM\\data\\maps.pak.dir\\arena.mmp"); + auto loc1 = read_mmp("h:\\Games\\AIM\\data\\maps.pak.dir\\location1.mmp"); #endif return 0; } \ No newline at end of file diff --git a/src/obj_extractor/obj_extractor.cpp b/src/obj_extractor/obj_extractor.cpp index c8587f8..a55a7f0 100644 --- a/src/obj_extractor/obj_extractor.cpp +++ b/src/obj_extractor/obj_extractor.cpp @@ -152,9 +152,9 @@ void write_mmo(string db, const storage &s) mb.text_id = object.name2; mb.building = storage->buildings[bld_ids[object.name1]]; mb.map = this_map; - mb.x = object.position.x * 100.0; - mb.y = object.position.y * 100.0; - mb.z = object.position.z * 100.0; + mb.x = object.position.x; + mb.y = object.position.y; + mb.z = object.position.z; 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.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) { detail::MapObject mb; - //mb.text_id = object.name2; + mb.text_id = object.name2; mb.map = this_map; mb.object = storage->objects[bld_ids[object.name1]]; - mb.x = object.position.x * 100.0; - mb.y = object.position.y * 100.0; - mb.z = object.position.z * 100.0; + mb.x = object.position.x; + mb.y = object.position.y; + mb.z = object.position.z; 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.roll = atan2(object.m_rotate_z[2].y, object.m_rotate_z[2].z);