General improvements (#1693)
* remove(replay): remove replay interface * fix(context_menu): better console controls * feat(protections): improve protections * feat(protections): actually fix parachute crash * feat(protections): kick rejoin * feat(context_menu): more context menu stuff
This commit is contained in:
@ -509,6 +509,17 @@ enum class eNetworkEvents : uint16_t
|
||||
NETWORK_CHECK_CATALOG_CRC
|
||||
};
|
||||
|
||||
enum class KickReason : std::uint8_t
|
||||
{
|
||||
VOTED_OUT,
|
||||
PEER_COMPLAINTS,
|
||||
CONNECTION_ERROR,
|
||||
NAT_TYPE,
|
||||
SCADMIN,
|
||||
SCADMIN_BLACKLIST,
|
||||
NUM_REASONS
|
||||
};
|
||||
|
||||
enum class ScriptEntityChangeType
|
||||
{
|
||||
BlockingOfNonTemporaryEvents,
|
||||
|
@ -2,7 +2,6 @@
|
||||
#include "../pointers.hpp"
|
||||
#include "enums.hpp"
|
||||
#include "node_list.hpp"
|
||||
#include "replay.hpp"
|
||||
|
||||
class CNetGamePlayer;
|
||||
|
||||
@ -11,10 +10,10 @@ namespace rage
|
||||
class CPlayerSyncTree
|
||||
{
|
||||
public:
|
||||
char pad_0000[8]; //0x0000
|
||||
netObject* player_object;//0x0008
|
||||
char pad_0010[256]; //0x0010
|
||||
}; //Size: 0x0110
|
||||
char pad_0000[8]; //0x0000
|
||||
netObject* player_object; //0x0008
|
||||
char pad_0010[256]; //0x0010
|
||||
}; //Size: 0x0110
|
||||
|
||||
class CNetworkSyncDataULBase
|
||||
{
|
||||
@ -60,12 +59,12 @@ namespace rage
|
||||
uint8_t ownerId;
|
||||
uint8_t nextOwnerId;
|
||||
uint8_t isRemote;
|
||||
uint8_t wantsToDelete : 1;// netobj+76
|
||||
uint8_t wantsToDelete : 1; // netobj+76
|
||||
uint8_t unk1 : 1;
|
||||
uint8_t shouldNotBeDeleted : 1;
|
||||
uint8_t pad_4Dh[3];
|
||||
uint8_t pad_50h[32];
|
||||
uint32_t creationAckedPlayers;// netobj+112
|
||||
uint32_t creationAckedPlayers; // netobj+112
|
||||
uint32_t m64;
|
||||
uint32_t m68;
|
||||
uint32_t m6C;
|
||||
|
@ -56,7 +56,7 @@ public:
|
||||
std::vector<Entity> arr;
|
||||
for (auto entity : *static_cast<T*>(this))
|
||||
{
|
||||
if(entity)
|
||||
if (entity)
|
||||
arr.push_back(big::g_pointers->m_gta.m_ptr_to_handle(entity));
|
||||
}
|
||||
|
||||
@ -98,10 +98,12 @@ public:
|
||||
class GenericPool : public PoolUtils<GenericPool>
|
||||
{
|
||||
public:
|
||||
UINT64 m_pool_address;
|
||||
BYTE* m_bit_array;
|
||||
UINT32 m_size;
|
||||
UINT32 m_item_size;
|
||||
UINT64 m_pool_address; // 0x0
|
||||
BYTE* m_bit_array; // 0x8
|
||||
UINT32 m_size; // 0x10
|
||||
UINT32 m_item_size; // 0x14
|
||||
UINT32 m_pad[2]; // 0x18
|
||||
UINT32 m_item_count; // 0x20
|
||||
|
||||
inline bool is_valid(UINT32 i)
|
||||
{
|
||||
@ -113,10 +115,16 @@ public:
|
||||
return mask(i) & (m_pool_address + i * m_item_size);
|
||||
}
|
||||
|
||||
inline int get_item_count()
|
||||
{
|
||||
return (4 * m_item_count) >> 2;
|
||||
}
|
||||
|
||||
private:
|
||||
inline long long mask(UINT32 i)
|
||||
{
|
||||
long long num1 = m_bit_array[i] & 0x80;
|
||||
return ~((num1 | -num1) >> 63);
|
||||
}
|
||||
};
|
||||
};
|
||||
static_assert(offsetof(GenericPool, GenericPool::m_item_count) == 0x20);
|
@ -1,94 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include "base/CObject.hpp"
|
||||
#include "common.hpp"
|
||||
#include "fwddec.hpp"
|
||||
|
||||
#pragma pack(push, 4)
|
||||
namespace rage
|
||||
{
|
||||
template<typename T = CDynamicEntity>
|
||||
class CEntityEntry
|
||||
{
|
||||
public:
|
||||
T* m_entity_ptr; //0x0000
|
||||
int32_t m_handle; //0x0008
|
||||
char pad_000C[4]; //0x000C
|
||||
}; //Size: 0x0010
|
||||
static_assert(sizeof(CEntityEntry<CDynamicEntity>) == 0x10, "CEntityHandle is not properly sized");
|
||||
|
||||
class CObjectEntry : public CEntityEntry<CObject>
|
||||
{
|
||||
};
|
||||
|
||||
class CPedEntry : public CEntityEntry<CPed>
|
||||
{
|
||||
};
|
||||
|
||||
class CVehicleEntry : public CEntityEntry<CVehicle>
|
||||
{
|
||||
}; //Size: 0x8FC0
|
||||
|
||||
class CObjectInterface
|
||||
{
|
||||
public:
|
||||
char pad_0000[344]; //0x0000
|
||||
std::array<CObjectEntry, 2300>* m_object_list; //0x0158
|
||||
int32_t m_max_objects; //0x0160
|
||||
char pad_0164[4]; //0x0164
|
||||
int32_t m_cur_objects; //0x0168
|
||||
|
||||
CObject* get_object(const int& index)
|
||||
{
|
||||
if (index < m_max_objects)
|
||||
return (*m_object_list)[index].m_entity_ptr;
|
||||
return nullptr;
|
||||
}
|
||||
}; //Size: 0x016C
|
||||
|
||||
class CPedInterface
|
||||
{
|
||||
public:
|
||||
char pad_0000[256]; //0x0000
|
||||
std::array<CPedEntry, 256>* m_ped_list; //0x0100
|
||||
int32_t m_max_peds; //0x0108
|
||||
char pad_010C[4]; //0x010C
|
||||
int32_t m_cur_peds; //0x0110
|
||||
|
||||
CPed* get_ped(const int& index)
|
||||
{
|
||||
if (index < m_max_peds)
|
||||
return (*m_ped_list)[index].m_entity_ptr;
|
||||
return nullptr;
|
||||
}
|
||||
}; //Size: 0x0114
|
||||
|
||||
class CVehicleInterface
|
||||
{
|
||||
public:
|
||||
char pad_0000[384]; //0x0000
|
||||
std::array<CVehicleEntry, 300>* m_vehicle_list; //0x0180
|
||||
int32_t m_max_vehicles; //0x0188
|
||||
char pad_018C[4]; //0x018C
|
||||
int32_t m_cur_vehicles; //0x0190
|
||||
|
||||
CVehicle* get_vehicle(const int& index)
|
||||
{
|
||||
if (index < m_max_vehicles)
|
||||
return (*m_vehicle_list)[index].m_entity_ptr;
|
||||
return nullptr;
|
||||
}
|
||||
}; //Size: 0x0194
|
||||
|
||||
|
||||
class CReplayInterface
|
||||
{
|
||||
public:
|
||||
char pad_0000[16]; //0x0000
|
||||
class CVehicleInterface* m_vehicle_interface; //0x0010
|
||||
class CPedInterface* m_ped_interface; //0x0018
|
||||
char pad_0020[8]; //0x0020
|
||||
class CObjectInterface* m_object_interface; //0x0028
|
||||
}; //Size: 0x0030
|
||||
}
|
||||
#pragma pack(pop)
|
Reference in New Issue
Block a user