Skip to content

Commit

Permalink
Merge branch 'ddnet:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
sjrc6 authored Oct 7, 2024
2 parents ccaba8d + 46abb54 commit 091d439
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
10 changes: 9 additions & 1 deletion src/engine/shared/console.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,15 @@ void CConsole::ExecuteLineStroked(int Stroke, const char *pStr, int ClientId, bo

if(Stroke || IsStrokeCommand)
{
if(int Error = ParseArgs(&Result, pCommand->m_pParams, pCommand->m_pfnCallback == &SColorConfigVariable::CommandCallback))
bool IsColor = false;
{
FCommandCallback pfnCallback = pCommand->m_pfnCallback;
void *pUserData = pCommand->m_pUserData;
TraverseChain(&pfnCallback, &pUserData);
IsColor = pfnCallback == &SColorConfigVariable::CommandCallback;
}

if(int Error = ParseArgs(&Result, pCommand->m_pParams, IsColor))
{
char aBuf[CMDLINE_LENGTH + 64];
if(Error == PARSEARGS_INVALID_INTEGER)
Expand Down
3 changes: 2 additions & 1 deletion src/game/client/components/camera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ CCamera::CCamera()

float CCamera::CameraSmoothingProgress(float CurrentTime) const
{
return (CurrentTime - m_CameraSmoothingStart) / (m_CameraSmoothingEnd - m_CameraSmoothingStart);
float Progress = (CurrentTime - m_CameraSmoothingStart) / (m_CameraSmoothingEnd - m_CameraSmoothingStart);
return 1.0 - std::pow(2.0, -10.0 * Progress);
}

float CCamera::ZoomProgress(float CurrentTime) const
Expand Down

0 comments on commit 091d439

Please sign in to comment.