Skip to content

Commit

Permalink
ALTV-278 add new vehicle methods
Browse files Browse the repository at this point in the history
  • Loading branch information
Doxoh committed Aug 4, 2024
1 parent 8746375 commit 14d72a6
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 2 deletions.
20 changes: 20 additions & 0 deletions c-api/entities/vehicle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1742,6 +1742,26 @@ void Vehicle_SetupTransmission(alt::IVehicle* vehicle)
vehicle->SetupTransmission();
}

uint8_t Vehicle_GetWheelDynamicFlag(alt::IVehicle* vehicle, uint8_t wheelId, uint32_t flag)
{
return vehicle->GetWheelDynamicFlag(wheelId, flag);
}

void Vehicle_SetWheelDynamicFlag(alt::IVehicle* vehicle, uint8_t wheelId, uint32_t flag, uint8_t state)
{
vehicle->SetWheelDynamicFlag(wheelId, flag, state);
}

uint8_t Vehicle_GetWheelConfigFlag(alt::IVehicle* vehicle, uint8_t wheelId, uint32_t flag)
{
return vehicle->GetWheelConfigFlag(wheelId, flag);
}

void Vehicle_SetWheelConfigFlag(alt::IVehicle* vehicle, uint8_t wheelId, uint32_t flag, uint8_t state)
{
vehicle->SetWheelConfigFlag(wheelId, flag, state);
}

#endif

CAPI_END()
7 changes: 6 additions & 1 deletion c-api/entities/vehicle.h
Original file line number Diff line number Diff line change
Expand Up @@ -478,4 +478,9 @@ EXPORT_CLIENT void Vehicle_SetSuspensionHeight(alt::IVehicle* vehicle, float val

EXPORT_CLIENT void Vehicle_SetupTransmission(alt::IVehicle* vehicle);

EXPORT_SERVER void Vehicle_SetBadge(alt::IVehicle* vehicle, uint32_t textureDictionary, uint32_t texture, vehicleBadgePosition_t vehicleBadgePosition[], uint16_t size);
EXPORT_SERVER void Vehicle_SetBadge(alt::IVehicle* vehicle, uint32_t textureDictionary, uint32_t texture, vehicleBadgePosition_t vehicleBadgePosition[], uint16_t size);

EXPORT_CLIENT uint8_t Vehicle_GetWheelDynamicFlag(alt::IVehicle* vehicle, uint8_t wheelId, uint32_t flag);
EXPORT_CLIENT void Vehicle_SetWheelDynamicFlag(alt::IVehicle* vehicle, uint8_t wheelId, uint32_t flag, uint8_t state);
EXPORT_CLIENT uint8_t Vehicle_GetWheelConfigFlag(alt::IVehicle* vehicle, uint8_t wheelId, uint32_t flag);
EXPORT_CLIENT void Vehicle_SetWheelConfigFlag(alt::IVehicle* vehicle, uint8_t wheelId, uint32_t flag, uint8_t state);
10 changes: 9 additions & 1 deletion c-api/func_table.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "func_table.h"

inline uint64_t capiHash = 14417011119465511955UL;
inline uint64_t capiHash = 8028889173226987673UL;
inline uint64_t capiHashes[] = {
0,
#ifdef ALT_CLIENT_API
Expand Down Expand Up @@ -666,6 +666,8 @@ inline uint64_t capiHashes[] = {
9716002269308828916UL,
11483934154441286346UL,
13303370691287708161UL,
5271385185182015743UL,
883185529540149226UL,
1338791052731372072UL,
13382865868223894905UL,
13422594452494959622UL,
Expand Down Expand Up @@ -824,6 +826,8 @@ inline uint64_t capiHashes[] = {
18123777833957296121UL,
15515593616288926025UL,
10533830814607560700UL,
17284682775935975738UL,
8015620088058696041UL,
14037400183140364255UL,
3095801372631152772UL,
2293924763385881861UL,
Expand Down Expand Up @@ -2449,6 +2453,8 @@ inline void* capiPointers[] = {
(void*) Vehicle_GetSpeedVector,
(void*) Vehicle_GetSuspensionHeight,
(void*) Vehicle_GetWheelCamber,
(void*) Vehicle_GetWheelConfigFlag,
(void*) Vehicle_GetWheelDynamicFlag,
(void*) Vehicle_GetWheelHeight,
(void*) Vehicle_GetWheelRimRadius,
(void*) Vehicle_GetWheelSpeed,
Expand Down Expand Up @@ -2607,6 +2613,8 @@ inline void* capiPointers[] = {
(void*) Vehicle_SetSuspensionHeight,
(void*) Vehicle_SetupTransmission,
(void*) Vehicle_SetWheelCamber,
(void*) Vehicle_SetWheelConfigFlag,
(void*) Vehicle_SetWheelDynamicFlag,
(void*) Vehicle_SetWheelHeight,
(void*) Vehicle_SetWheelRimRadius,
(void*) Vehicle_SetWheelTrackWidth,
Expand Down

0 comments on commit 14d72a6

Please sign in to comment.