Skip to content
Permalink
Browse files

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...
  • Loading branch information
KyleSanderson committed Mar 3, 2020
1 parent cc6059a commit 22eeb2f3a56849141ed068483adc1a511fa86100
Showing with 3 additions and 3 deletions.
  1. +3 −3 core/PlayerManager.cpp
@@ -97,7 +97,7 @@ SH_DECL_HOOK2_void(IVEngineServer, ClientPrintf, SH_NOATTRIB, 0, edict_t *, cons

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;
@@ -868,7 +868,7 @@ void PlayerManager::OnClientPrintf(edict_t *pEdict, const char *szMsg)
RETURN_META(MRES_IGNORED);

size_t nMsgLen = strlen(szMsg);
#if SOURCE_ENGINE == SE_EPISODEONE
#if SOURCE_ENGINE == SE_EPISODEONE || SOURCE_ENGINE == SE_DARKMESSIAH
static const int nNumBitsWritten = 0;
#else
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())
{
#if SOURCE_ENGINE == SE_EPISODEONE
#if SOURCE_ENGINE == SE_EPISODEONE || SOURCE_ENGINE == SE_DARKMESSIAH
static const int nNumBitsWritten = 0;
#else
int nNumBitsWritten = pNetChan->GetNumBitsWritten(false); // SVC_Print uses unreliable netchan

0 comments on commit 22eeb2f

Please sign in to comment.
You can’t perform that action at this time.