From ff459b38058f7d0ebbf5e7ac711aae983aa9c7e0 Mon Sep 17 00:00:00 2001 From: Rene Kjellerup Date: Fri, 20 Apr 2018 10:14:40 -0700 Subject: [PATCH] picked off a few more clang warnings --- .../ClientShellShared/GameClientShell.cpp | 12 ++++++------ .../ObjectShared/AIGoalAttackRangedDynamic.cpp | 1 + 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/NOLF2/ClientShellDLL/ClientShellShared/GameClientShell.cpp b/NOLF2/ClientShellDLL/ClientShellShared/GameClientShell.cpp index 52eb7202..51d95de4 100644 --- a/NOLF2/ClientShellDLL/ClientShellShared/GameClientShell.cpp +++ b/NOLF2/ClientShellDLL/ClientShellShared/GameClientShell.cpp @@ -1150,14 +1150,14 @@ uint32 CGameClientShell::OnEngineInitialized(RMode *pMode, LTGUID *pAppGuid) // Process command line. - if (hVar = g_pLTClient->GetConsoleVar("join")) // looking for join [ip] format + if ((hVar = g_pLTClient->GetConsoleVar("join"))) // looking for join [ip] format { g_pInterfaceMgr->SetCommandLineJoin( true ); // Change to the splash screen. We'll start the game after that. GetInterfaceMgr( )->ChangeState(GS_SPLASHSCREEN); } - else if (hVar = g_pLTClient->GetConsoleVar("host")) // looking for host [1] format + else if ((hVar = g_pLTClient->GetConsoleVar("host"))) // looking for host [1] format { int nHost = atoi(g_pLTClient->GetVarValueString( hVar )); @@ -1229,7 +1229,7 @@ uint32 CGameClientShell::OnEngineInitialized(RMode *pMode, LTGUID *pAppGuid) GetInterfaceMgr( )->ChangeState(GS_SPLASHSCREEN); } } - else if (hVar = g_pLTClient->GetConsoleVar("runworld")) + else if ((hVar = g_pLTClient->GetConsoleVar("runworld"))) { const char* pMap = g_pLTClient->GetVarValueString(hVar); if (!pMap) @@ -1708,9 +1708,9 @@ void CGameClientShell::UpdatePlaying() ( nEndTicks + ~g_nStartTicks ); // Make sure all the counters match up. - if( (( uint32 ) abs( (long)(nDeltaTimeB - nDeltaClientTime) ) > g_nTolerance ) || - (( uint32 ) abs( (long)(nDeltaTicks - nDeltaClientTime) ) > g_nTolerance ) || - (( uint32 ) abs( (long)(nDeltaTimeB - nDeltaTicks) ) > g_nTolerance ) ) + if( (( uint32 ) abs( (int)(nDeltaTimeB - nDeltaClientTime) ) > g_nTolerance ) || + (( uint32 ) abs( (int)(nDeltaTicks - nDeltaClientTime) ) > g_nTolerance ) || + (( uint32 ) abs( (int)(nDeltaTimeB - nDeltaTicks) ) > g_nTolerance ) ) { g_pLTClient->CPrint( "Speedhack kick" ); g_pLTClient->CPrint( "nDeltaTimeB %d", nDeltaTimeB ); diff --git a/NOLF2/ObjectDLL/ObjectShared/AIGoalAttackRangedDynamic.cpp b/NOLF2/ObjectDLL/ObjectShared/AIGoalAttackRangedDynamic.cpp index 6f7ed490..80acaae0 100644 --- a/NOLF2/ObjectDLL/ObjectShared/AIGoalAttackRangedDynamic.cpp +++ b/NOLF2/ObjectDLL/ObjectShared/AIGoalAttackRangedDynamic.cpp @@ -194,6 +194,7 @@ void CAIGoalAttackRangedDynamic::UpdateGoal() case kState_HumanAttackMove: HandleStateAttackMove(); return; + default: break; } super::ActivateGoal();