Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add some nodes and netConnection stuff #128

Merged
merged 12 commits into from
Jul 22, 2023
18 changes: 18 additions & 0 deletions classes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@
#include "netsync/nodes/entity/CEntityOrientationDataNode.hpp"
#include "netsync/nodes/entity/CEntityScriptGameStateDataNode.hpp"
#include "netsync/nodes/entity/CEntityScriptInfoDataNode.hpp"
#include "netsync/nodes/heli/CHeliHealthDataNode.hpp"
#include "netsync/nodes/heli/CHeliControlDataNode.hpp"
#include "netsync/nodes/object/CObjectCreationDataNode.hpp"
#include "netsync/nodes/ped/CPedAIDataNode.hpp"
#include "netsync/nodes/ped/CPedAppearanceDataNode.hpp"
Expand All @@ -60,32 +62,47 @@
#include "netsync/nodes/ped/CPedHealthDataNode.hpp"
#include "netsync/nodes/ped/CPedInventoryDataNode.hpp"
#include "netsync/nodes/ped/CPedMovementDataNode.hpp"
#include "netsync/nodes/ped/CPedMovementGroupDataNode.hpp"
#include "netsync/nodes/ped/CPedOrientationDataNode.hpp"
#include "netsync/nodes/ped/CPedScriptCreationDataNode.hpp"
#include "netsync/nodes/ped/CPedTaskSequenceDataNode.hpp"
#include "netsync/nodes/ped/CPedTaskSpecificDataNode.hpp"
#include "netsync/nodes/ped/CPedTaskTreeDataNode.hpp"
#include "netsync/nodes/physical/CPhysicalAngVelocityDataNode.hpp"
#include "netsync/nodes/physical/CPhysicalAttachDataNode.hpp"
#include "netsync/nodes/physical/CPhysicalGameStateDataNode.hpp"
#include "netsync/nodes/physical/CPhysicalHealthDataNode.hpp"
#include "netsync/nodes/physical/CPhysicalMigrationDataNode.hpp"
#include "netsync/nodes/physical/CPhysicalScriptGameStateDataNode.hpp"
#include "netsync/nodes/physical/CPhysicalScriptMigrationDataNode.hpp"
#include "netsync/nodes/physical/CPhysicalVelocityDataNode.hpp"
#include "netsync/nodes/pickup/CPickupCreationDataNode.hpp"
#include "netsync/nodes/pickup_placement/CPickupPlacementCreationDataNode.hpp"
#include "netsync/nodes/player/CPlayerAmbientModelStreamingNode.hpp"
#include "netsync/nodes/player/CPlayerAppearanceDataNode.hpp"
#include "netsync/nodes/player/CPlayerCameraDataNode.hpp"
#include "netsync/nodes/player/CPlayerCreationDataNode.hpp"
#include "netsync/nodes/player/CPlayerGamerDataNode.hpp"
#include "netsync/nodes/player/CPlayerGameStateDataNode.hpp"
#include "netsync/nodes/player/CPlayerPedGroupDataNode.hpp"
#include "netsync/nodes/player/CPlayerSectorPosNode.hpp"
#include "netsync/nodes/player/CPlayerWantedAndLOSDataNode.hpp"
#include "netsync/nodes/proximity_migrateable/CGlobalFlagsDataNode.hpp"
#include "netsync/nodes/proximity_migrateable/CMigrationDataNode.hpp"
#include "netsync/nodes/proximity_migrateable/CSectorDataNode.hpp"
#include "netsync/nodes/proximity_migrateable/CSectorPositionDataNode.hpp"
#include "netsync/nodes/task/ClonedTakeOffPedVariationInfo.hpp"
#include "netsync/nodes/train/CTrainGameStateDataNode.hpp"
#include "netsync/nodes/vehicle/CVehicleCreationDataNode.hpp"
#include "netsync/nodes/vehicle/CVehicleControlDataNode.hpp"
#include "netsync/nodes/vehicle/CVehicleTaskDataNode.hpp"
#include "netsync/nodes/vehicle/CVehicleGadgetDataNode.hpp"
#include "netsync/nodes/vehicle/CVehicleProximityMigrationDataNode.hpp"
#include "netsync/nodes/vehicle/CVehicleComponentReservationDataNode.hpp"
#include "netsync/nodes/vehicle/CVehicleDamageStatusDataNode.hpp"
#include "netsync/nodes/vehicle/CVehicleSteeringDataNode.hpp"
#include "netsync/nodes/vehicle/CVehicleHealthDataNode.hpp"
#include "netsync/nodes/vehicle/CVehicleGameStateDataNode.hpp"
#include "netsync/trees/CDynamicEntitySyncTreeBase.hpp"
#include "netsync/trees/CEntitySyncTreeBase.hpp"
#include "netsync/trees/CPhysicalSyncTreeBase.hpp"
Expand All @@ -108,6 +125,7 @@
#include "network/RemoteGamerInfoMsg.hpp"
#include "network/snConnectToPeerTask.hpp"
#include "network/snSession.hpp"
#include "network/netConnection.hpp"
#include "ped/CPed.hpp"
#include "ped/CPedBoneInfo.hpp"
#include "ped/CPedFactory.hpp"
Expand Down
Binary file modified gtav.rcnet
Binary file not shown.
4 changes: 2 additions & 2 deletions netsync/nodes/entity/CEntityScriptGameStateDataNode.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
#pragma pack(push, 4)
struct CEntityScriptGameStateDataNode : CSyncDataNodeInfrequent
{
bool m_visible; //0x00C0
bool m_fixed; //0x00C0
bool m_uses_collision; //0x00C1
bool m_fixed; //0x00C2
bool m_completely_disabled_collision; //0x00C2
}; //Size: 0x00C3
static_assert(sizeof(CEntityScriptGameStateDataNode) == 0xC4);
#pragma pack(pop)
25 changes: 25 additions & 0 deletions netsync/nodes/heli/CHeliControlDataNode.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#pragma once
#include <cstdint>
#include "netsync/CProjectBaseSyncDataNode.hpp"
#include "netsync/nodes/vehicle/CVehicleControlDataNode.hpp"

#pragma pack(push, 8)
class CHeliControlDataNode : CVehicleControlDataNode
{
public:
char m_pad[0x10]; // 0x130
float m_yaw_control; // 0x140
float m_pitch_control; // 0x144
float m_roll_control; // 0x148
float m_throttle_control; // 0x14C
bool m_engine_off; // 0x150
int m_landing_gear_state; // 0x154
bool m_has_landing_gear; // 0x158
bool m_has_vehicle_task; // 0x159
bool m_is_thruster_model; // 0x15A
float m_thruster_side_rcs_throttle; // 0x15C
float m_thruster_throttle; // 0x160
bool m_unk8; // 0x164
};
static_assert(sizeof(CHeliControlDataNode) == 0x168);
#pragma pack(pop)
25 changes: 25 additions & 0 deletions netsync/nodes/heli/CHeliHealthDataNode.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#pragma once
#include <cstdint>
#include "netsync/CProjectBaseSyncDataNode.hpp"
#include "netsync/nodes/physical/CPhysicalHealthDataNode.hpp"

#pragma pack(push, 8)
class CHeliHealthDataNode : CPhysicalHealthDataNode // intentionally private since the physical health node fields aren't serialized
{
public:
char m_pad[0x10]; // 0xF0
uint32_t m_main_rotor_health;
uint32_t m_rear_rotor_health;
bool m_can_tail_boom_break_off;
bool m_is_tail_boom_broken;
bool m_unk;
bool m_disable_explode_from_body_damage;
uint32_t m_body_health;
uint32_t m_petrol_tank_health;
uint32_t m_engine_health;
float m_unk_deformation_level;
float m_unk2_deformation_level;
float m_unk3_deformation_level;
};
static_assert(sizeof(CHeliHealthDataNode) == 0x118);
#pragma pack(pop)
63 changes: 34 additions & 29 deletions netsync/nodes/object/CObjectCreationDataNode.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,34 +7,39 @@
class CObjectCreationDataNode : CProjectBaseSyncDataNode
{
public:
uint16_t unk_00C0; //0x00C0
char pad_0xC2[14]; //0x00C2
rage::fvector4 m_object_orientation; //0x00D0
char pad_00E0[30]; //0x00E0
rage::fvector3 m_object_position; //0x0100
char pad_010C[4]; //0x010C
rage::fvector3 m_dummy_position; //0x010E
char pad_011A[20]; //0x011C
rage::fvector3 m_script_grab_position; //0x0130
char pad_013C[12]; //0x013C
float m_script_grab_radius; //0x0148
uint32_t m_created_by; //0x014C
uint32_t m_model; //0x0150
uint32_t m_frag_group_index; //0x0154
uint32_t m_ownership_token; //0x0158
uint32_t unk_015C; //0x015C
bool m_no_reassign; //0x0160
bool unk_0161; //0x0161
bool m_player_wants_control; //0x0162
bool m_has_init_physics; //0x0163
bool m_script_grabbed_from_world; //0x0164
bool m_has_frag_group; //0x0165
bool m_is_broken; //0x0166
bool m_has_exploded; //0x0167
bool m_keep_registered; //0x0168
bool unk_0169; //0x0169
bool unk_016A; //0x016A
bool unk_016B; //0x016B
uint32_t unk_00C0; //0x00C0
uint32_t unk_00C4; //0x00C4
uint32_t unk_00C8; //0x00C8
bool unk_00CC;
bool unk_00CD;
uint16_t unk_00D0; //0x00D0
char pad_0xC2[14]; //0x00D2
rage::fvector4 m_object_orientation; //0x00E0
char pad_00E0[30]; //0x00F0
rage::fvector3 m_object_position; //0x0110
char pad_010C[4]; //0x011C
rage::fvector3 m_dummy_position; //0x011E
char pad_011A[20]; //0x012C
rage::fvector3 m_script_grab_position; //0x0140
char pad_013C[12]; //0x013C
float m_script_grab_radius; //0x0148
uint32_t m_created_by; //0x014C
uint32_t m_model; //0x0150
uint32_t m_frag_group_index; //0x0154
uint32_t m_ownership_token; //0x0158
uint32_t unk_015C; //0x015C
bool m_no_reassign; //0x0160
bool unk_0161; //0x0161
bool m_player_wants_control; //0x0162
bool m_has_init_physics; //0x0163
bool m_script_grabbed_from_world; //0x0164
bool m_has_frag_group; //0x0165
bool m_is_broken; //0x0166
bool m_has_exploded; //0x0167
bool m_keep_registered; //0x0168
bool unk_0169; //0x0169
bool unk_016A; //0x016A
bool unk_016B; //0x016B
}; //Size: 0x016C
static_assert(sizeof(CObjectCreationDataNode) == 0x16C);
static_assert(sizeof(CObjectCreationDataNode) == 0x17C);
#pragma pack(pop)
134 changes: 67 additions & 67 deletions netsync/nodes/ped/CPedGameStateDataNode.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,72 +6,72 @@
class CPedGameStateDataNode : CSyncDataNodeInfrequent
{
public:
bool m_weapon_component_something[11]; //0x0C0
uint32_t m_weapon_component_hash[11]; //0x0CC
uint32_t m_gadget_hash[3]; //0x0F8
uint32_t unk_0104; // 0x0104
uint32_t unk_0108; // 0x0108
uint32_t unk_010C; // 0x010C
float unk_0110; // 0x0110
float unk_0114; // 0x0114
float unk_0118; // 0x0118
bool unk_011C; // 0x011C
char pad_011D[3]; //0x011D
uint32_t m_arrest_state; //0x0120
uint32_t m_death_state; //0x0124
uint32_t m_weapon_hash; //0x0128
uint32_t m_num_weapon_components; //0x012C
uint32_t m_num_equiped_gadgets; //0x0130
uint32_t m_seat; //0x0134
uint32_t m_action_mode_override; //0x0138
uint32_t unk_013C; // 0x013C
uint16_t m_vehicle; //0x0140
uint16_t m_mount_id; //0x0142
uint16_t m_custodian_id; //0x0144
uint16_t unk_0146; // 0x0146
bool m_tint_index; //0x0148
char pad_0149; //0x0149
uint8_t unk_014A; // 0x014A
bool m_is_handcuffed; //0x014B
bool m_can_preform_arrest; //0x014C
bool m_can_preform_uncuff; //0x014D
bool m_can_be_arrested; //0x014E
bool m_is_in_custody; //0x014F
char pad_0150; //0x0150
bool m_weapon_exists; //0x0151
bool m_weapon_visible; //0x0152
bool m_weapon_has_ammo; //0x0153
bool m_weapon_attach_left; //0x0154
char pad_0155; //0x0155
bool m_in_seat; //0x0156
bool m_in_vehicle; //0x0157
bool m_on_mount; //0x0158
bool m_has_custodian_or_arrest_flags; //0x0159
char pad_015A; //0x015A
bool m_action_mode_enabled; //0x015B
bool m_stealth_mode_enabled; //0x015C
bool unk_015D; // 0x015D
bool unk_015E; // 0x015E
bool unk_015F; // 0x015F
bool unk_0160; // 0x0160
bool unk_0161; // 0x0161
bool unk_0162; // 0x0162
bool unk_0163; // 0x0163
bool unk_0164; // 0x0164
bool unk_0165; // 0x0165
bool unk_0166; // 0x0166
bool unk_0167; // 0x0167
bool unk_0168; // 0x0168
bool unk_0169; // 0x0169
bool unk_016A; // 0x016A
bool unk_016B; // 0x016B
bool unk_016C; // 0x016C
bool unk_016D; // 0x016D
bool unk_016E; // 0x016E
bool unk_016F; // 0x016F
bool unk_0170; // 0x0170
bool unk_0171; // 0x0171
bool unk_0172; // 0x0172
bool m_weapon_component_something[12]; //0x0C0
uint32_t m_weapon_component_hash[12]; //0x0CC
uint32_t m_gadget_hash[3]; //0x0F8
uint32_t unk_0104; // 0x0104
uint32_t unk_0108; // 0x0108
uint32_t unk_010C; // 0x010C
float unk_0110; // 0x0110
float unk_0114; // 0x0114
float unk_0118; // 0x0118
bool unk_011C; // 0x011C
char pad_011D[3]; //0x011D
uint32_t m_arrest_state; //0x0120
uint32_t m_death_state; //0x0124
uint32_t m_weapon_hash; //0x0128
uint32_t m_num_weapon_components; //0x012C
uint32_t m_num_equiped_gadgets; //0x0130
uint32_t m_seat; //0x0134
uint32_t m_action_mode_override; //0x0138
uint32_t unk_013C; // 0x013C
uint16_t m_vehicle; //0x0140
uint16_t m_mount_id; //0x0142
uint16_t m_custodian_id; //0x0144
uint16_t unk_0146; // 0x0146
bool m_tint_index; //0x0148
char pad_0149; //0x0149
uint8_t unk_014A; // 0x014A
bool m_is_handcuffed; //0x014B
bool m_can_preform_arrest; //0x014C
bool m_can_preform_uncuff; //0x014D
bool m_can_be_arrested; //0x014E
bool m_is_in_custody; //0x014F
char pad_0150; //0x0150
bool m_weapon_exists; //0x0151
bool m_weapon_visible; //0x0152
bool m_weapon_has_ammo; //0x0153
bool m_weapon_attach_left; //0x0154
char pad_0155; //0x0155
bool m_in_seat; //0x0156
bool m_in_vehicle; //0x0157
bool m_on_mount; //0x0158
bool m_has_custodian_or_arrest_flags; //0x0159
char pad_015A; //0x015A
bool m_action_mode_enabled; //0x015B
bool m_stealth_mode_enabled; //0x015C
bool unk_015D; // 0x015D
bool unk_015E; // 0x015E
bool unk_015F; // 0x015F
bool unk_0160; // 0x0160
bool unk_0161; // 0x0161
bool unk_0162; // 0x0162
bool unk_0163; // 0x0163
bool unk_0164; // 0x0164
bool unk_0165; // 0x0165
bool unk_0166; // 0x0166
bool unk_0167; // 0x0167
bool unk_0168; // 0x0168
bool unk_0169; // 0x0169
bool unk_016A; // 0x016A
bool unk_016B; // 0x016B
bool unk_016C; // 0x016C
bool unk_016D; // 0x016D
bool unk_016E; // 0x016E
bool unk_016F; // 0x016F
bool unk_0170; // 0x0170
bool unk_0171; // 0x0171
bool unk_0172; // 0x0172
}; //Size: 0x0174
static_assert(sizeof(CPedGameStateDataNode) == 0x174);
static_assert(sizeof(CPedGameStateDataNode) == 0x178);
#pragma pack(pop)
24 changes: 24 additions & 0 deletions netsync/nodes/ped/CPedMovementGroupDataNode.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#pragma once
#include "netsync/CProjectBaseSyncDataNode.hpp"

#pragma pack(push, 4)
class CPedMovementGroupDataNode : CSyncDataNodeFrequent
{
public:
float m_unk; // 0xC0 (CTaskMotionInAutomobile+0x1EC)
uint32_t m_movement_task_index; // 0xC4
uint32_t m_movement_task_stage; // 0xC8
uint32_t m_movement_group; // 0xCC
uint32_t m_overridden_weapon_group; // 0xD0
uint32_t m_overridden_unk_group; // 0xD4 (SET_PED_ALTERNATE_MOVEMENT_ANIM?)
bool m_is_crouching; // 0xD8
bool m_is_stealthy; // 0xD9
bool m_is_strafing; // 0xDA
bool m_is_ragdolling; // 0xDB
bool m_is_ragdoll_constraint_ankle_active;// 0xDC
bool m_is_ragdoll_constraint_wrist_active;// 0xDD
char m_pad1[2]; // 0xDE
char m_tennis_data[0x20]; // 0xE0 TODO
};
static_assert(sizeof(CPedMovementGroupDataNode) == 0x100);
#pragma pack(pop)
25 changes: 25 additions & 0 deletions netsync/nodes/ped/CPedTaskSequenceDataNode.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#pragma once
#include <cstdint>
#include "netsync/CProjectBaseSyncDataNode.hpp"

#pragma pack(push,4)
class CPedTaskSequenceData
{
public:
int m_task_type; // 0x00
int m_task_data_size; // 0x04
char m_task_data[602]; // 0x08
};
static_assert(sizeof(CPedTaskSequenceData) == 0x264);

class CPedTaskSequenceDataNode : CSyncDataNodeFrequent
{
public:
bool m_has_sequence; // 0xC0
int m_sequence_resource_id; // 0xC4
int m_num_tasks_in_sequence; // 0xC8
CPedTaskSequenceData m_task_data[10]; // 0xCC
int m_unk; // 0x18B4
};
static_assert(sizeof(CPedTaskSequenceDataNode) == 0x18B8);
#pragma pack(pop)
Loading