feat(OffRadar): Moved to util/mobile

This commit is contained in:
Yimura 2022-01-07 15:05:47 +01:00
parent 831ba8ad3a
commit df92a95aa9
2 changed files with 20 additions and 9 deletions

View File

@ -1,16 +1,11 @@
#include "backend/looped/looped.hpp"
#include "pointers.hpp"
#include "natives.hpp"
#include "script_global.hpp"
#include "util/mobile.hpp"
namespace big
{
void looped::self_off_radar()
{
if (g.self.off_radar)
{
*script_global(2689156).at(PLAYER::GET_PLAYER_INDEX(), 453).at(209).as<int*>() = 1;
*script_global(2703656).at(70).as<int*>() = NETWORK::GET_NETWORK_TIME() + 1;
}
mobile::lester::off_radar(g.self.off_radar);
}
}

View File

@ -2,13 +2,29 @@
#include "core/enums.hpp"
#include "script_global.hpp"
#include "misc.hpp"
#include "natives.hpp"
namespace big::mobile
{
inline auto player_global = script_global(2689156);
inline auto vehicle_global = script_global(1585844);
namespace lester
{
inline void off_radar(bool toggle)
{
*player_global.at(PLAYER::GET_PLAYER_INDEX(), 453).at(209).as<int*>() = toggle;
*script_global(2703656).at(70).as<int*>() = NETWORK::GET_NETWORK_TIME() + 1;
}
}
namespace mechanic
{
}
namespace mors_mutual
{
auto vehicle_global = script_global(1585844);
bool fix_index(int veh_idx); // forward declare func
inline int fix_all()
{