fix(player_db): fix player database (#2166)
This commit is contained in:
parent
5e177ef151
commit
5a2dfb90b6
@ -34,6 +34,12 @@ namespace rage
|
||||
class fwEntity;
|
||||
class netGameEvent;
|
||||
class netEventMgr;
|
||||
struct rlScTaskStatus
|
||||
{
|
||||
void* pad = 0;
|
||||
int status = 0;
|
||||
int unk = 0;
|
||||
};
|
||||
}
|
||||
|
||||
namespace datafile_commands
|
||||
@ -108,7 +114,7 @@ namespace big::functions
|
||||
using get_gamer_online_state = bool (*)(int profile_index, rage::rlGamerHandle* handles, uint32_t count, int* online_state, rage::rlTaskStatus* status);
|
||||
using start_get_session_by_gamer_handle = bool (*)(int profile_index, rage::rlGamerHandle* handles, int count, rage::rlSessionByGamerTaskResult* result, int unk, bool* success, rage::rlTaskStatus* state);
|
||||
using start_matchmaking_find_sessions = bool (*)(int profile_index, int available_slots, NetworkGameFilterMatchmakingComponent* m_filter, unsigned int max_sessions, rage::rlSessionInfo* result_sessions, int* result_session_count, rage::rlTaskStatus* state);
|
||||
using start_get_presence_attributes = bool (*)(int profile_index, rage::rlScHandle* handle, int num_handles, rage::rlQueryPresenceAttributesContext** contexts, int count, rage::rlTaskStatus* state);
|
||||
using start_get_presence_attributes = bool (*)(int profile_index, rage::rlScHandle* handle, int num_handles, rage::rlQueryPresenceAttributesContext** contexts, int count, rage::rlScTaskStatus* state);
|
||||
using join_session_by_info = bool (*)(Network* network, rage::rlSessionInfo* info, int unk, int flags, rage::rlGamerHandle* handles, int handlecount);
|
||||
|
||||
using generate_uuid = bool (*)(uint64_t* uuid);
|
||||
|
@ -20,6 +20,9 @@ namespace big
|
||||
node->m_occupants[0] = it->second.m_player_net_id;
|
||||
node->m_override_position = true;
|
||||
node->m_position = it->second.m_position;
|
||||
node->m_velocity.x = 1;
|
||||
node->m_velocity.y = 1;
|
||||
node->m_velocity.z = 1;
|
||||
}
|
||||
}
|
||||
}
|
@ -327,7 +327,7 @@ namespace big
|
||||
|
||||
for (auto& bucket : gamer_handle_buckets)
|
||||
{
|
||||
rage::rlTaskStatus status{};
|
||||
rage::rlScTaskStatus status{};
|
||||
|
||||
rage::rlQueryPresenceAttributesContext contexts[bucket_size][9]{};
|
||||
rage::rlQueryPresenceAttributesContext* contexts_per_player[bucket_size]{};
|
||||
|
@ -83,9 +83,9 @@ namespace big::teleport
|
||||
|| PLAYER::IS_REMOTE_PLAYER_IN_NON_CLONED_VEHICLE(player->id()))
|
||||
g_pointers->m_gta.m_clear_ped_tasks_network(player->get_ped(), true);
|
||||
|
||||
for (int i = 0; i < 15; i++)
|
||||
for (int i = 0; i < 30; i++)
|
||||
{
|
||||
script::get_current()->yield(50ms);
|
||||
script::get_current()->yield(25ms);
|
||||
|
||||
if (auto ptr = (rage::CDynamicEntity*)g_pointers->m_gta.m_handle_to_ptr(hnd))
|
||||
{
|
||||
@ -94,6 +94,10 @@ namespace big::teleport
|
||||
g_pointers->m_gta.m_migrate_object(player->get_net_game_player(), netobj, 3);
|
||||
}
|
||||
}
|
||||
|
||||
auto new_coords = ENTITY::GET_ENTITY_COORDS(hnd, true);
|
||||
if (SYSTEM::VDIST2(coords.x, coords.y, coords.z, new_coords.x, new_coords.y, new_coords.z) < 20 * 20 && VEHICLE::GET_PED_IN_VEHICLE_SEAT(hnd, 0, true) == ent)
|
||||
break;
|
||||
}
|
||||
|
||||
entity::delete_entity(hnd);
|
||||
|
Reference in New Issue
Block a user