Merge pull request #475 from diamante0018/develop

[Voice] Use regular heap alloc instead of large local
This commit is contained in:
Edo 2022-09-04 12:09:27 +02:00 committed by GitHub
commit 8956aa0945
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 4 deletions

View File

@ -1,5 +1,4 @@
#include <STDInclude.hpp>
#include "Game/Engine/LargeLocal.hpp"
namespace Components
{
@ -40,8 +39,8 @@ namespace Components
Game::msg_t msg{};
const auto clientNum = client - Game::svs_clients;
const Game::Engine::LargeLocal msg_buf_large_local(0x10000);
auto* msg_buf = static_cast<unsigned char*>(msg_buf_large_local.GetBuf());
const auto msg_buf_large = std::make_unique<unsigned char[]>(0x10000);
auto* msg_buf = msg_buf_large.get();
assert(VoicePacketCount[clientNum] >= 0);

View File

@ -13,7 +13,7 @@ namespace Game::Engine
LargeLocal& operator=(LargeLocal&&) = delete;
LargeLocal& operator=(const LargeLocal&) = delete;
void* GetBuf() const;
[[nodiscard]] void* GetBuf() const;
private:
void PopBuf();