2022-10-30 22:23:10 +08:00
|
|
|
#include "backend/looped/looped.hpp"
|
2022-11-09 06:44:52 +08:00
|
|
|
#include "base/phArchetype.hpp"
|
|
|
|
#include "base/phBoundComposite.hpp"
|
2022-10-30 22:23:10 +08:00
|
|
|
|
|
|
|
namespace big
|
|
|
|
{
|
|
|
|
static bool bLastNoCollsion = false;
|
|
|
|
|
|
|
|
void looped::self_no_collision()
|
|
|
|
{
|
|
|
|
if (g_local_player == nullptr) return;
|
|
|
|
|
2022-12-18 23:15:52 +01:00
|
|
|
bool bNoCollsion = g.self.no_collision;
|
2022-10-30 22:23:10 +08:00
|
|
|
|
|
|
|
if (bNoCollsion)
|
|
|
|
{
|
2022-11-09 06:44:52 +08:00
|
|
|
((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
|
|
|
bLastNoCollsion = bNoCollsion;
|
|
|
|
}
|
|
|
|
else if (bNoCollsion != bLastNoCollsion)
|
|
|
|
{
|
2022-11-09 06:44:52 +08:00
|
|
|
((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
|
|
|
bLastNoCollsion = bNoCollsion;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|