update 2.7 (#46): fix intreactive map & radar (rotation mode)

This commit is contained in:
CallowBlack 2022-05-31 12:35:58 +03:00
parent 5d74c811c7
commit bc59508cd9
3 changed files with 5 additions and 3 deletions

View File

@ -272,6 +272,7 @@ DO_APP_FUNC(0x06533C30, int32_t, Screen_get_height, (MethodInfo* method));
DO_APP_FUNC(0x0664CF50, bool, Behaviour_get_isActiveAndEnabled, (Behaviour* __this, MethodInfo* method)); DO_APP_FUNC(0x0664CF50, bool, Behaviour_get_isActiveAndEnabled, (Behaviour* __this, MethodInfo* method));
DO_APP_FUNC(0x066306D0, Vector3, Quaternion_ToEulerAngles, (Quaternion rotation, MethodInfo* method));
DO_APP_FUNC(0x066309A0, Vector3, Quaternion_get_eulerAngles, (Quaternion__Boxed* __this, MethodInfo* method)); DO_APP_FUNC(0x066309A0, Vector3, Quaternion_get_eulerAngles, (Quaternion__Boxed* __this, MethodInfo* method));
DO_APP_FUNC(0x06555C70, Quaternion, Transform_get_rotation, (Transform* __this, MethodInfo* method)); DO_APP_FUNC(0x06555C70, Quaternion, Transform_get_rotation, (Transform* __this, MethodInfo* method));
DO_APP_FUNC(0x06552F50, Rect, RectTransform_get_rect, (RectTransform* __this, MethodInfo* method)); DO_APP_FUNC(0x06552F50, Rect, RectTransform_get_rect, (RectTransform* __this, MethodInfo* method));

View File

@ -8932,6 +8932,7 @@ namespace app {
bool _setViewAsFirst; bool _setViewAsFirst;
struct List_1_MoleMole_BaseContextComponent_* _baseComponentList; struct List_1_MoleMole_BaseContextComponent_* _baseComponentList;
struct List_1_MoleMole_BaseContextComponent_* _tickComponentList; struct List_1_MoleMole_BaseContextComponent_* _tickComponentList;
struct List_1_MoleMole_BaseContextComponent_* _lateTickComponentList;
struct Dictionary_2_System_Int32_List_1_MoleMole_BaseContextComponent_* _baseComponentNotifyRegister; struct Dictionary_2_System_Int32_List_1_MoleMole_BaseContextComponent_* _baseComponentNotifyRegister;
struct Dictionary_2_System_Int32_List_1_MoleMole_BaseContextComponent_* _baseComponentPacketRegister; struct Dictionary_2_System_Int32_List_1_MoleMole_BaseContextComponent_* _baseComponentPacketRegister;
struct Dictionary_2_System_Int32_List_1_MoleMole_BaseContextComponent_* _baseComponentActionEventRegister; struct Dictionary_2_System_Int32_List_1_MoleMole_BaseContextComponent_* _baseComponentActionEventRegister;

View File

@ -1591,14 +1591,14 @@ namespace cheat::feature
auto rotation = app::Transform_get_rotation(reinterpret_cast<app::Transform*>(back), nullptr); auto rotation = app::Transform_get_rotation(reinterpret_cast<app::Transform*>(back), nullptr);
app::Quaternion__Boxed boxed = { nullptr, nullptr, rotation }; app::Quaternion__Boxed boxed = { nullptr, nullptr, rotation };
return app::Quaternion_get_eulerAngles(&boxed, nullptr).z; return app::Quaternion_ToEulerAngles(rotation, nullptr).z;
} }
void InteractiveMap::DrawMinimapPoints() void InteractiveMap::DrawMinimapPoints()
{ {
// Found by hands. Only in Teyvat (3rd scene), need also test another scenes. // Found by hands. Only in Teyvat (3rd scene), need also test another scenes.
static const float minimapAreaLevelRadius = 175.0f; static const float minimapAreaLevelRadius = 175.0f;
constexpr float PI = 3.14159265f; constexpr float TWO_PI = 2 * 3.14159265f;
auto sceneID = game::GetCurrentPlayerSceneID(); auto sceneID = game::GetCurrentPlayerSceneID();
if (m_ScenesData.count(sceneID) == 0) if (m_ScenesData.count(sceneID) == 0)
@ -1608,7 +1608,7 @@ namespace cheat::feature
ImVec2 rotationMult = ImVec2(1.0f, 0.0f); ImVec2 rotationMult = ImVec2(1.0f, 0.0f);
if (rotation != 0) if (rotation != 0)
{ {
auto rad = ( (360.0f - rotation) * PI ) / 180.0f; auto rad = TWO_PI - rotation;// ((360.0f - rotation) * PI) / 180.0f;
rotationMult = { sin(rad), cos(rad) }; rotationMult = { sin(rad), cos(rad) };
} }