Skip to content

Commit

Permalink
merge release to rc
Browse files Browse the repository at this point in the history
  • Loading branch information
Doxoh committed Oct 21, 2023
2 parents d91cedf + ce4d268 commit 1a464ae
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 2 deletions.
28 changes: 28 additions & 0 deletions c-api/core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ alt::MValueConst* Core_CreateMValueFunction(alt::ICore* core, CustomInvoker* val
return AllocMValue(std::move(mValue));
}

<<<<<<< HEAD
alt::IPlayer** Core_GetPlayers(alt::ICore* core, uint64_t& size) {
auto players = core->GetBaseObjects(alt::IBaseObject::Type::PLAYER);
size = players.size();
Expand All @@ -144,6 +145,33 @@ alt::IPlayer** Core_GetPlayers(alt::ICore* core, uint64_t& size) {
return out;
}

=======
uint64_t Core_GetMValueSize(alt::ICore* core, alt::MValueConst* args)
{
return core->GetMValueSize(args->get()->Clone());
}

uint64_t Core_GetMValueArgsSize(alt::ICore* core, alt::MValueConst* args[], int size)
{
alt::MValueArgs mValues = alt::MValueArgs(size);
for (int i = 0; i < size; i++) {
ToMValueArg(mValues, core, args[i], i);
}
return core->GetMValueArgsSize(mValues);
}

alt::IPlayer** Core_GetPlayers(alt::ICore* core, uint64_t& size) {
auto players = core->GetBaseObjects(alt::IBaseObject::Type::PLAYER);
size = players.size();
auto out = new alt::IPlayer*[size];
for (auto i = 0; i < size; i++) {
out[i] = dynamic_cast<alt::IPlayer*>(players[i]);
}

return out;
}

>>>>>>> release
alt::IVehicle** Core_GetVehicles(alt::ICore* core, uint64_t& size) {
auto vehiclesArray = core->GetBaseObjects(alt::IBaseObject::Type::VEHICLE);
size = vehiclesArray.size();
Expand Down
5 changes: 5 additions & 0 deletions c-api/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ EXPORT_SHARED alt::MValueConst* Core_CreateMValueVector2(alt::ICore* core, vecto
EXPORT_SHARED alt::MValueConst* Core_CreateMValueRgba(alt::ICore* core, rgba_t value);
EXPORT_SHARED alt::MValueConst* Core_CreateMValueByteArray(alt::ICore* core, uint64_t size, const void* data);
EXPORT_SHARED alt::MValueConst* Core_CreateMValueFunction(alt::ICore* core, CustomInvoker* value);
<<<<<<< HEAD
=======
EXPORT_SHARED uint64_t Core_GetMValueSize(alt::ICore* core, alt::MValueConst* args);
EXPORT_SHARED uint64_t Core_GetMValueArgsSize(alt::ICore* core, alt::MValueConst* args[], int size);
>>>>>>> release

EXPORT_SHARED alt::IPlayer** Core_GetPlayers(alt::ICore* core, uint64_t& size);
EXPORT_SHARED alt::IVehicle** Core_GetVehicles(alt::ICore* core, uint64_t& size);
Expand Down
14 changes: 14 additions & 0 deletions c-api/func_table.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
#include "func_table.h"

<<<<<<< HEAD
inline uint64_t capiHash = 4677548953854785821UL;
=======
inline uint64_t capiHash = 16677003916101455049UL;
>>>>>>> release
inline uint64_t capiHashes[] = {
0,
#ifdef ALT_CLIENT_API
Expand Down Expand Up @@ -1058,6 +1062,11 @@ inline uint64_t capiHashes[] = {
13737530370025977174UL,
7482854450085275693UL,
2139798095052897524UL,
<<<<<<< HEAD
=======
2001253713694863162UL,
3166577616070768315UL,
>>>>>>> release
15652019729912249391UL,
8454955647873390265UL,
5411021830103603795UL,
Expand Down Expand Up @@ -2801,6 +2810,11 @@ inline void* capiPointers[] = {
(void*) Core_GetEventTypeSize,
(void*) Core_GetMarkers,
(void*) Core_GetMetaData,
<<<<<<< HEAD
=======
(void*) Core_GetMValueArgsSize,
(void*) Core_GetMValueSize,
>>>>>>> release
(void*) Core_GetNetTime,
(void*) Core_GetNetworkObjects,
(void*) Core_GetPeds,
Expand Down
2 changes: 1 addition & 1 deletion client/src/coreclr/CoreClrValidation.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <json.hpp>
#include <json.hpp>
#include <Log.h>
#include <sha1.hpp>
#include <sha512.hpp>
Expand Down
2 changes: 1 addition & 1 deletion cpp-sdk
Submodule cpp-sdk updated 1 files
+2 −0 ICore.h

0 comments on commit 1a464ae

Please sign in to comment.