[Voice]: Add debug print (#1009)
This commit is contained in:
parent
4f4ef31840
commit
e018f6c8fd
@ -320,6 +320,7 @@ namespace Components
|
|||||||
auto* clc = Game::CL_GetLocalClientConnection(0);
|
auto* clc = Game::CL_GetLocalClientConnection(0);
|
||||||
if (!Game::NET_CompareBaseAdr(clc->serverAddress, *address))
|
if (!Game::NET_CompareBaseAdr(clc->serverAddress, *address))
|
||||||
{
|
{
|
||||||
|
Logger::Debug("Ignoring stray 'v' network message from '{}'", Game::NET_AdrToString(*address));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
39
src/Game/Engine/FastCriticalSection.cpp
Normal file
39
src/Game/Engine/FastCriticalSection.cpp
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
#include <STDInclude.hpp>
|
||||||
|
#include "FastCriticalSection.hpp"
|
||||||
|
|
||||||
|
namespace Game::Engine
|
||||||
|
{
|
||||||
|
FastCriticalSectionScopeRead::FastCriticalSectionScopeRead(FastCriticalSection* cs)
|
||||||
|
: cs_(cs)
|
||||||
|
{
|
||||||
|
if (this->cs_)
|
||||||
|
{
|
||||||
|
Sys_LockRead(this->cs_);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
FastCriticalSectionScopeRead::~FastCriticalSectionScopeRead()
|
||||||
|
{
|
||||||
|
if (this->cs_)
|
||||||
|
{
|
||||||
|
Sys_UnlockRead(this->cs_);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
FastCriticalSectionScopeWrite::FastCriticalSectionScopeWrite(FastCriticalSection* cs)
|
||||||
|
: cs_(cs)
|
||||||
|
{
|
||||||
|
if (this->cs_)
|
||||||
|
{
|
||||||
|
Sys_LockWrite(this->cs_);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
FastCriticalSectionScopeWrite::~FastCriticalSectionScopeWrite()
|
||||||
|
{
|
||||||
|
if (this->cs_)
|
||||||
|
{
|
||||||
|
Sys_UnlockWrite(this->cs_);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
24
src/Game/Engine/FastCriticalSection.hpp
Normal file
24
src/Game/Engine/FastCriticalSection.hpp
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
namespace Game::Engine
|
||||||
|
{
|
||||||
|
class FastCriticalSectionScopeRead
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
FastCriticalSectionScopeRead(FastCriticalSection* cs);
|
||||||
|
~FastCriticalSectionScopeRead();
|
||||||
|
|
||||||
|
private:
|
||||||
|
FastCriticalSection* cs_;
|
||||||
|
};
|
||||||
|
|
||||||
|
class FastCriticalSectionScopeWrite
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
FastCriticalSectionScopeWrite(FastCriticalSection* cs);
|
||||||
|
~FastCriticalSectionScopeWrite();
|
||||||
|
|
||||||
|
private:
|
||||||
|
FastCriticalSection* cs_;
|
||||||
|
};
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user