mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Use new Dev* logger functions
These get compiled in if IsCert() returns false.
This commit is contained in:
parent
71b0781715
commit
c8752420a0
@ -405,24 +405,16 @@ bool CNetChan::ProcessMessages(bf_read* buf)
|
|||||||
|
|
||||||
if (!netMsg)
|
if (!netMsg)
|
||||||
{
|
{
|
||||||
if (IsDebug())
|
DevWarning(eDLL_T::ENGINE, "%s(%s): Received unknown net message (%i)!\n",
|
||||||
{
|
|
||||||
Warning(eDLL_T::ENGINE, "%s(%s): Received unknown net message (%i)!\n",
|
|
||||||
__FUNCTION__, GetAddress(), cmd);
|
__FUNCTION__, GetAddress(), cmd);
|
||||||
}
|
|
||||||
|
|
||||||
Assert(0);
|
Assert(0);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!netMsg->ReadFromBuffer(buf))
|
if (!netMsg->ReadFromBuffer(buf))
|
||||||
{
|
{
|
||||||
if (IsDebug())
|
DevWarning(eDLL_T::ENGINE, "%s(%s): Failed reading message '%s'!\n",
|
||||||
{
|
|
||||||
Warning(eDLL_T::ENGINE, "%s(%s): Failed reading message '%s'!\n",
|
|
||||||
__FUNCTION__, GetAddress(), netMsg->GetName());
|
__FUNCTION__, GetAddress(), netMsg->GetName());
|
||||||
}
|
|
||||||
|
|
||||||
Assert(0);
|
Assert(0);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -446,13 +438,9 @@ bool CNetChan::ProcessMessages(bf_read* buf)
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (!bRet)
|
if (!bRet)
|
||||||
{
|
|
||||||
if (IsDebug())
|
|
||||||
{
|
{
|
||||||
Warning(eDLL_T::ENGINE, "%s(%s): Failed processing message '%s'!\n",
|
Warning(eDLL_T::ENGINE, "%s(%s): Failed processing message '%s'!\n",
|
||||||
__FUNCTION__, GetAddress(), netMsg->GetName());
|
__FUNCTION__, GetAddress(), netMsg->GetName());
|
||||||
}
|
|
||||||
|
|
||||||
Assert(0);
|
Assert(0);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -162,35 +162,23 @@ void CPlayer::ProcessUserCmds(CUserCmd* cmds, int numCmds, int totalCmds,
|
|||||||
{
|
{
|
||||||
// Too much to unlag, clamp to max !!!
|
// Too much to unlag, clamp to max !!!
|
||||||
recomputeUnlag = true;
|
recomputeUnlag = true;
|
||||||
|
DevWarning(eDLL_T::SERVER, "%s: commandDelta( %f ) > maxUnlag( %f ) !!!\n",
|
||||||
if (IsDebug())
|
|
||||||
{
|
|
||||||
Warning(eDLL_T::SERVER, "%s: commandDelta( %f ) > maxUnlag( %f ) !!!\n",
|
|
||||||
__FUNCTION__, commandDelta, maxUnlag);
|
__FUNCTION__, commandDelta, maxUnlag);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else if (commandTime < (lastCommandTime - clockDriftMsecs))
|
else if (commandTime < (lastCommandTime - clockDriftMsecs))
|
||||||
{
|
{
|
||||||
// Can never be lower than last !!!
|
// Can never be lower than last !!!
|
||||||
recomputeUnlag = true;
|
recomputeUnlag = true;
|
||||||
|
DevWarning(eDLL_T::SERVER, "%s: cmd->command_time( %f ) < (m_LastCmd.command_time( %f ) - clockDriftMsecs( %f )) !!!\n",
|
||||||
if (IsDebug())
|
|
||||||
{
|
|
||||||
Warning(eDLL_T::SERVER, "%s: cmd->command_time( %f ) < (m_LastCmd.command_time( %f ) - clockDriftMsecs( %f )) !!!\n",
|
|
||||||
__FUNCTION__, commandTime, lastCommandTime, clockDriftMsecs);
|
__FUNCTION__, commandTime, lastCommandTime, clockDriftMsecs);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else if (commandTime > (serverTime + clockDriftMsecs))
|
else if (commandTime > (serverTime + clockDriftMsecs))
|
||||||
{
|
{
|
||||||
// Too far in the future, clamp to max !!!
|
// Too far in the future, clamp to max !!!
|
||||||
recomputeUnlag = true;
|
recomputeUnlag = true;
|
||||||
|
DevWarning(eDLL_T::SERVER, "%s: cmd->command_time( %f ) > (g_pGlobals->m_flCurTime( %f ) + clockDriftMsecs( %f )) !!!\n",
|
||||||
if (IsDebug())
|
|
||||||
{
|
|
||||||
Warning(eDLL_T::SERVER, "%s: cmd->command_time( %f ) > (g_pGlobals->m_flCurTime( %f ) + clockDriftMsecs( %f )) !!!\n",
|
|
||||||
__FUNCTION__, commandTime, serverTime, clockDriftMsecs);
|
__FUNCTION__, commandTime, serverTime, clockDriftMsecs);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (recomputeUnlag)
|
if (recomputeUnlag)
|
||||||
{
|
{
|
||||||
@ -199,12 +187,9 @@ void CPlayer::ProcessUserCmds(CUserCmd* cmds, int numCmds, int totalCmds,
|
|||||||
float newCommandTime = Clamp(serverTime - latencyAmount, lastCommandTime, serverTime);
|
float newCommandTime = Clamp(serverTime - latencyAmount, lastCommandTime, serverTime);
|
||||||
cmd->command_time = newCommandTime;
|
cmd->command_time = newCommandTime;
|
||||||
|
|
||||||
if (IsDebug())
|
DevWarning(eDLL_T::SERVER, "%s: Clamped cmd->command_time( %f ) to %f !!!\n",
|
||||||
{
|
|
||||||
Warning(eDLL_T::SERVER, "%s: Clamped cmd->command_time( %f ) to %f !!!\n",
|
|
||||||
__FUNCTION__, commandTime, newCommandTime);
|
__FUNCTION__, commandTime, newCommandTime);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
CUserCmd* queuedCmd = &m_Commands[lastCommandNumber];
|
CUserCmd* queuedCmd = &m_Commands[lastCommandNumber];
|
||||||
queuedCmd->Copy(cmd);
|
queuedCmd->Copy(cmd);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user