TmpMenu/src/backend/looped/self/no_collision.cpp

28 lines
835 B
C++
Raw Normal View History

2022-10-30 22:23:10 +08:00
#include "backend/looped/looped.hpp"
#include "fiber_pool.hpp"
#include "natives.hpp"
#include "backend/looped_command.hpp"
#include <base/phArchetype.hpp>
#include <base/phBoundComposite.hpp>
2022-10-30 22:23:10 +08:00
namespace big
{
class no_collision : looped_command
2022-10-30 22:23:10 +08:00
{
using looped_command::looped_command;
2022-10-30 22:23:10 +08:00
virtual void on_tick() override
2022-10-30 22:23:10 +08:00
{
if (g_local_player)
((rage::phBoundComposite*)g_local_player->m_navigation->m_damp->m_bound)->m_bounds[0]->m_bounding_box_max_xyz_margin_w.w = -1;
2022-10-30 22:23:10 +08:00
}
virtual void on_disable() override
2022-10-30 22:23:10 +08:00
{
if (g_local_player)
((rage::phBoundComposite*)g_local_player->m_navigation->m_damp->m_bound)->m_bounds[0]->m_bounding_box_max_xyz_margin_w.w = 0.25;
2022-10-30 22:23:10 +08:00
}
};
no_collision g_no_collision("nocollision", "No Collision", "Allows you to walk through vehicles and most obstacles", g.self.no_collision);
2022-10-30 22:23:10 +08:00
}