From 711ce588023eb123f0507770a35712d83e45a235 Mon Sep 17 00:00:00 2001 From: doxoh Date: Wed, 3 Apr 2024 22:46:50 +0200 Subject: [PATCH 1/3] fix(client): fix some errors for downloading required files --- client/src/coreclr/CoreClr.cpp | 2 +- client/src/coreclr/CoreClrValidation.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/client/src/coreclr/CoreClr.cpp b/client/src/coreclr/CoreClr.cpp index ce299aa..c5a605d 100644 --- a/client/src/coreclr/CoreClr.cpp +++ b/client/src/coreclr/CoreClr.cpp @@ -195,7 +195,7 @@ uint8_t GetCachedAssembly(const char* name, int* bufferSize, void** buffer) { std::stringstream contentStream; auto fileName = std::string("lib/net6.0/") + name + ".dll"; if (!zip.has_file(fileName)) { - cs::Log::Warning << "Nupkg was found, but no dll was found in it" << cs::Log::Endl; + cs::Log::Warning << "Nupkg was found, but no dll was found in it " << fileName << cs::Log::Endl; zip.printdir(); return false; } diff --git a/client/src/coreclr/CoreClrValidation.cpp b/client/src/coreclr/CoreClrValidation.cpp index 23e4c8b..98e4887 100644 --- a/client/src/coreclr/CoreClrValidation.cpp +++ b/client/src/coreclr/CoreClrValidation.cpp @@ -13,6 +13,7 @@ namespace fs = std::filesystem; std::string CoreClr::GetBaseCdnUrl() const { static auto branch = _core->GetBranch(); + if (branch == "internal") branch = "dev"; return "https://cdn.alt-mp.com/coreclr-client-module/" + branch + "/x64_win32/"; } From f7b711184f57d849c12244e8c4de40b4e62dd31c Mon Sep 17 00:00:00 2001 From: doxoh Date: Wed, 29 May 2024 19:16:04 +0200 Subject: [PATCH 2/3] feat(client): Add ReloadVehiclePhysics --- c-api/core.cpp | 5 +++++ c-api/core.h | 4 +++- c-api/func_table.cpp | 4 +++- cpp-sdk | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/c-api/core.cpp b/c-api/core.cpp index b117dea..50b9030 100644 --- a/c-api/core.cpp +++ b/c-api/core.cpp @@ -2159,6 +2159,11 @@ uint64_t Core_GetServerTime(alt::ICore* core) { return core->GetServerTime(); } + +uint8_t Core_ReloadVehiclePhysics(alt::ICore* core, uint32_t modelHash) +{ + return core->ReloadVehiclePhysics(modelHash); +} #endif CAPI_END() diff --git a/c-api/core.h b/c-api/core.h index 70ac5ab..f2bc101 100644 --- a/c-api/core.h +++ b/c-api/core.h @@ -430,4 +430,6 @@ EXPORT_CLIENT void Core_RemoveVoiceFilter(alt::ICore* core, uint32_t playerRemod EXPORT_CLIENT alt::IAudioFilter* Core_GetVoiceFilter(alt::ICore* core, uint32_t playerRemodeId); EXPORT_CLIENT void Core_UpdateClipContext(alt::ICore* core, const char* keys[], const char* values[], uint64_t size); -EXPORT_CLIENT uint64_t Core_GetServerTime(alt::ICore* core); \ No newline at end of file +EXPORT_CLIENT uint64_t Core_GetServerTime(alt::ICore* core); + +EXPORT_CLIENT uint8_t Core_ReloadVehiclePhysics(alt::ICore* core, uint32_t modelHash); \ No newline at end of file diff --git a/c-api/func_table.cpp b/c-api/func_table.cpp index fe46f81..71b34bb 100644 --- a/c-api/func_table.cpp +++ b/c-api/func_table.cpp @@ -1,6 +1,6 @@ #include "func_table.h" -inline uint64_t capiHash = 78812385462098472UL; +inline uint64_t capiHash = 4464148992254491289UL; inline uint64_t capiHashes[] = { 0, #ifdef ALT_CLIENT_API @@ -211,6 +211,7 @@ inline uint64_t capiHashes[] = { 11543552066785919265UL, 15255809094076439747UL, 84574382701044016UL, + 6341556497973967320UL, 2950682702415179672UL, 3186817815537256556UL, 4203146524234440953UL, @@ -1992,6 +1993,7 @@ inline void* capiPointers[] = { (void*) Core_OverrideFocusEntity, (void*) Core_OverrideFocusPosition, (void*) Core_RegisterFont, + (void*) Core_ReloadVehiclePhysics, (void*) Core_RemoveGXTText, (void*) Core_RemoveIpl, (void*) Core_RemoveVoiceFilter, diff --git a/cpp-sdk b/cpp-sdk index 95a2cfa..9933a67 160000 --- a/cpp-sdk +++ b/cpp-sdk @@ -1 +1 @@ -Subproject commit 95a2cfadc2ba1de018c8c55c72b21984067b6181 +Subproject commit 9933a6743140e4d05da8662f9b95393705bbceb3 From 093184127c3cd2661a3af3e8d63c90b3ef621a81 Mon Sep 17 00:00:00 2001 From: Oleg Trofimov Date: Fri, 7 Jun 2024 14:35:13 +0300 Subject: [PATCH 3/3] Update sdk to 22e1fdd --- cpp-sdk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp-sdk b/cpp-sdk index 9933a67..22e1fdd 160000 --- a/cpp-sdk +++ b/cpp-sdk @@ -1 +1 @@ -Subproject commit 9933a6743140e4d05da8662f9b95393705bbceb3 +Subproject commit 22e1fdd37b8e379d04b279161571276cb7bb12da