This repository has been archived on 2024-10-22. You can view files and clone it, but cannot push or open issues or pull requests.
YimMenu/src/views/self/view_teleport.cpp
Yimura f6c00f113d
refactor!: globals (#717)
* refactor(globals): use macro's for to_json/from_json
* refactor(globals): switch from global pointer to global instance
2022-12-18 22:15:52 +00:00

53 lines
1.0 KiB
C++

#include "views/view.hpp"
#include "fiber_pool.hpp"
#include "util/globals.hpp"
#include "util/mobile.hpp"
#include "util/teleport.hpp"
#include "util/vehicle.hpp"
namespace big
{
void view::teleport()
{
ImGui::Text("Blips:");
components::button("Waypoint", []
{
teleport::to_waypoint();
});
components::button("Objective", []
{
teleport::to_objective();
});
ImGui::Checkbox("Auto-Teleport To Waypoint", &g.self.auto_tp);
ImGui::Text("Vehicles:");
components::button("Teleport to Last Vehicle", []
{
if (g_local_player && g_local_player->m_vehicle)
{
const Vehicle veh = g_pointers->m_ptr_to_handle(g_local_player->m_vehicle);
teleport::into_vehicle(veh);
}
});
components::button("Bring Personal Vehicle", []
{
Vehicle veh = mobile::mechanic::get_personal_vehicle();
vehicle::bring(veh, self::pos);
});
components::button("Teleport to Personal Vehicle", []
{
Vehicle veh = mobile::mechanic::get_personal_vehicle();
teleport::into_vehicle(veh);
});
}
}