DarkM: build-fix for engine msg caching (#1195)
* DarkM: build-fix for engine msg caching * style + promote ptr casting to uintptr_t. * sync type to uintptr_t in pm.h * return of the uint32_t * update header. * oh, right, unsigned int...
This commit is contained in:
parent
cc6059a4b7
commit
22eeb2f3a5
@ -97,7 +97,7 @@ SH_DECL_HOOK2_void(IVEngineServer, ClientPrintf, SH_NOATTRIB, 0, edict_t *, cons
|
|||||||
|
|
||||||
static void PrintfBuffer_FrameAction(void *data)
|
static void PrintfBuffer_FrameAction(void *data)
|
||||||
{
|
{
|
||||||
g_Players.OnPrintfFrameAction(reinterpret_cast<unsigned int>(data));
|
g_Players.OnPrintfFrameAction(static_cast<unsigned int>(reinterpret_cast<uintptr_t>(data)));
|
||||||
}
|
}
|
||||||
|
|
||||||
ConCommand *maxplayersCmd = NULL;
|
ConCommand *maxplayersCmd = NULL;
|
||||||
@ -868,7 +868,7 @@ void PlayerManager::OnClientPrintf(edict_t *pEdict, const char *szMsg)
|
|||||||
RETURN_META(MRES_IGNORED);
|
RETURN_META(MRES_IGNORED);
|
||||||
|
|
||||||
size_t nMsgLen = strlen(szMsg);
|
size_t nMsgLen = strlen(szMsg);
|
||||||
#if SOURCE_ENGINE == SE_EPISODEONE
|
#if SOURCE_ENGINE == SE_EPISODEONE || SOURCE_ENGINE == SE_DARKMESSIAH
|
||||||
static const int nNumBitsWritten = 0;
|
static const int nNumBitsWritten = 0;
|
||||||
#else
|
#else
|
||||||
int nNumBitsWritten = pNetChan->GetNumBitsWritten(false); // SVC_Print uses unreliable netchan
|
int nNumBitsWritten = pNetChan->GetNumBitsWritten(false); // SVC_Print uses unreliable netchan
|
||||||
@ -913,7 +913,7 @@ void PlayerManager::OnPrintfFrameAction(unsigned int serial)
|
|||||||
|
|
||||||
while (!player.m_PrintfBuffer.empty())
|
while (!player.m_PrintfBuffer.empty())
|
||||||
{
|
{
|
||||||
#if SOURCE_ENGINE == SE_EPISODEONE
|
#if SOURCE_ENGINE == SE_EPISODEONE || SOURCE_ENGINE == SE_DARKMESSIAH
|
||||||
static const int nNumBitsWritten = 0;
|
static const int nNumBitsWritten = 0;
|
||||||
#else
|
#else
|
||||||
int nNumBitsWritten = pNetChan->GetNumBitsWritten(false); // SVC_Print uses unreliable netchan
|
int nNumBitsWritten = pNetChan->GetNumBitsWritten(false); // SVC_Print uses unreliable netchan
|
||||||
|
Loading…
Reference in New Issue
Block a user