diff --git a/dlls/dod2/dodfun/dodfun.h b/dlls/dod2/dodfun/dodfun.h index 172196f2..a1c6f33b 100755 --- a/dlls/dod2/dodfun/dodfun.h +++ b/dlls/dod2/dodfun/dodfun.h @@ -114,7 +114,7 @@ edict_t *FindEntityByString(edict_t *pentStart, const char *szKeyword, const cha #define GET_CAPTURE_AREA(x) \ if ( mObjects.obj[x].areaflags == 0 ){\ mObjects.obj[x].areaflags = 1;\ - while ( mObjects.obj[x].pAreaEdict = FindEntityByString(mObjects.obj[x].pAreaEdict,"target",STRING(mObjects.obj[x].pEdict->v.targetname)) )\ + while ( (mObjects.obj[x].pAreaEdict = FindEntityByString(mObjects.obj[x].pAreaEdict,"target",STRING(mObjects.obj[x].pEdict->v.targetname))) )\ if ( strcmp( STRING(mObjects.obj[x].pAreaEdict->v.classname),"dod_capture_area" )==0){\ mObjects.obj[x].areaflags = 2;\ break;\ diff --git a/dlls/dod2/dodx/moduleconfig.cpp b/dlls/dod2/dodx/moduleconfig.cpp index 01b7245d..f1a66cdf 100755 --- a/dlls/dod2/dodx/moduleconfig.cpp +++ b/dlls/dod2/dodx/moduleconfig.cpp @@ -174,7 +174,7 @@ void PlayerPreThink_Post( edict_t *pEntity ) { } if (pPlayer->sendScore && pPlayer->sendScore < gpGlobals->time){ - pPlayer->sendScore = 0.0f; + pPlayer->sendScore = 0; MF_ExecuteForward( iFScore,pPlayer->index, pPlayer->lastScore, pPlayer->savedScore ); } diff --git a/dlls/dod2/dodx/usermsg.cpp b/dlls/dod2/dodx/usermsg.cpp index 0f75cb5a..8b1446b1 100755 --- a/dlls/dod2/dodx/usermsg.cpp +++ b/dlls/dod2/dodx/usermsg.cpp @@ -88,10 +88,10 @@ void Client_ObjScore(void* mValue) break; case 1: score = *(int*)mValue; - if ( (pPlayer->lastScore = score - pPlayer->savedScore) && isModuleActive() ) + if ( (pPlayer->lastScore = score - (int)(pPlayer->savedScore)) && isModuleActive() ) { pPlayer->updateScore(pPlayer->current,pPlayer->lastScore); - pPlayer->sendScore = gpGlobals->time + 0.25f; + pPlayer->sendScore = (int)(gpGlobals->time + 0.25f); } pPlayer->savedScore = score; break; diff --git a/dlls/mysqlx/mysql/MysqlResultSet.cpp b/dlls/mysqlx/mysql/MysqlResultSet.cpp index 1d544c53..8327a431 100644 --- a/dlls/mysqlx/mysql/MysqlResultSet.cpp +++ b/dlls/mysqlx/mysql/MysqlResultSet.cpp @@ -5,7 +5,7 @@ using namespace SourceMod; MysqlResultRow::MysqlResultRow() : - m_Columns(0), m_CurRow(NULL) + m_CurRow(NULL), m_Columns(0) { } diff --git a/dlls/mysqlx/thread/BaseWorker.cpp b/dlls/mysqlx/thread/BaseWorker.cpp index eb0aa99d..4e107f92 100644 --- a/dlls/mysqlx/thread/BaseWorker.cpp +++ b/dlls/mysqlx/thread/BaseWorker.cpp @@ -239,7 +239,7 @@ bool SWThreadHandle::WaitForThread() } SWThreadHandle::SWThreadHandle(IThreadCreator *parent, const ThreadParams *p, IThread *thread) : - m_parent(parent), m_params(*p), pThread(thread), m_state(Thread_Paused) + m_state(Thread_Paused), m_params(*p), m_parent(parent), pThread(thread) { } diff --git a/dlls/mysqlx/thread/PosixThreads.cpp b/dlls/mysqlx/thread/PosixThreads.cpp index 874faa11..47d66899 100644 --- a/dlls/mysqlx/thread/PosixThreads.cpp +++ b/dlls/mysqlx/thread/PosixThreads.cpp @@ -146,7 +146,7 @@ void PosixThreader::PosixMutex::DestroyThis() ******************/ PosixThreader::ThreadHandle::ThreadHandle(IThreader *parent, IThread *run, const ThreadParams *params) : - m_parent(parent), m_run(run), m_params(*params), m_state(Thread_Paused) + m_parent(parent), m_params(*params), m_run(run), m_state(Thread_Paused) { pthread_mutex_init(&m_runlock, NULL); pthread_mutex_init(&m_statelock, NULL); diff --git a/dlls/mysqlx/threading.cpp b/dlls/mysqlx/threading.cpp index 02a272a5..85451d47 100644 --- a/dlls/mysqlx/threading.cpp +++ b/dlls/mysqlx/threading.cpp @@ -327,7 +327,7 @@ AtomicResult::AtomicResult() { m_IsFree = true; m_CurRow = 1; - m_RowCount = NULL; + m_RowCount = 0; m_Table = NULL; m_AllocSize = 0; } diff --git a/dlls/ns/ns/CPlayer.cpp b/dlls/ns/ns/CPlayer.cpp index e3f43248..2da2fd4b 100755 --- a/dlls/ns/ns/CPlayer.cpp +++ b/dlls/ns/ns/CPlayer.cpp @@ -108,4 +108,4 @@ void CPlayer::Reset() olddeadflag=0; oldteam=0; -} \ No newline at end of file +} diff --git a/dlls/ns/ns/CSpawn.cpp b/dlls/ns/ns/CSpawn.cpp index b1ab5880..2622ac61 100755 --- a/dlls/ns/ns/CSpawn.cpp +++ b/dlls/ns/ns/CSpawn.cpp @@ -43,4 +43,4 @@ vec3_t CSpawn::getpoint(int type, int num) a=a->next; } return Vector(0.0,0.0,0.0); -} \ No newline at end of file +} diff --git a/dlls/ns/ns/NMisc.cpp b/dlls/ns/ns/NMisc.cpp index d007fd6c..d3560cd1 100755 --- a/dlls/ns/ns/NMisc.cpp +++ b/dlls/ns/ns/NMisc.cpp @@ -95,7 +95,7 @@ static cell AMX_NATIVE_CALL ns_get_speedchange(AMX *amx, cell *params) { // Params: get_speedchange(index) int index=params[1]; - if (!(params[1]>0 && params[1]<=gpGlobals->maxClients)) + if (!(index>0 && index<=gpGlobals->maxClients)) return 0; CPlayer *player = GET_PLAYER_I(params[1]); return player->speedchange; diff --git a/dlls/ns/ns/hookedfunctions.cpp b/dlls/ns/ns/hookedfunctions.cpp index 5f0c9521..15977058 100755 --- a/dlls/ns/ns/hookedfunctions.cpp +++ b/dlls/ns/ns/hookedfunctions.cpp @@ -401,8 +401,7 @@ int LogToIndex(char logline[128]) } cindex[x]='\0'; // Now we have their name, now cycle through all players to find which index it is - x=1; - for (x;x<=gpGlobals->maxClients;x++) + for (x=1;x<=gpGlobals->maxClients;x++) { cname=strdup(cindex); if (!FNullEnt(INDEXENT2(x))) @@ -418,7 +417,7 @@ int LogToIndex(char logline[128]) int Find_Building_Hive(void) { edict_t *pEntity=NULL; - while (pEntity = UTIL_FindEntityByString(pEntity,"classname","team_hive")) + while ((pEntity = UTIL_FindEntityByString(pEntity,"classname","team_hive"))) { if (pEntity->v.health > 0 && pEntity->v.solid > 0 && pEntity->v.fuser1 < 1000) { diff --git a/dlls/nvault/NVault.cpp b/dlls/nvault/NVault.cpp index 768e3423..f95e943f 100755 --- a/dlls/nvault/NVault.cpp +++ b/dlls/nvault/NVault.cpp @@ -14,7 +14,10 @@ int HashFunction(const String & k) unsigned long hash = 5381; const char *str = k.c_str(); char c; - while (c = *str++) hash = ((hash << 5) + hash) + c; // hash*33 + c + while ((c = *str++)) + { + hash = ((hash << 5) + hash) + c; // hash*33 + c + } return hash; } diff --git a/dlls/sqlite/thread/BaseWorker.cpp b/dlls/sqlite/thread/BaseWorker.cpp index eb0aa99d..4e107f92 100644 --- a/dlls/sqlite/thread/BaseWorker.cpp +++ b/dlls/sqlite/thread/BaseWorker.cpp @@ -239,7 +239,7 @@ bool SWThreadHandle::WaitForThread() } SWThreadHandle::SWThreadHandle(IThreadCreator *parent, const ThreadParams *p, IThread *thread) : - m_parent(parent), m_params(*p), pThread(thread), m_state(Thread_Paused) + m_state(Thread_Paused), m_params(*p), m_parent(parent), pThread(thread) { } diff --git a/dlls/sqlite/thread/PosixThreads.cpp b/dlls/sqlite/thread/PosixThreads.cpp index 874faa11..47d66899 100644 --- a/dlls/sqlite/thread/PosixThreads.cpp +++ b/dlls/sqlite/thread/PosixThreads.cpp @@ -146,7 +146,7 @@ void PosixThreader::PosixMutex::DestroyThis() ******************/ PosixThreader::ThreadHandle::ThreadHandle(IThreader *parent, IThread *run, const ThreadParams *params) : - m_parent(parent), m_run(run), m_params(*params), m_state(Thread_Paused) + m_parent(parent), m_params(*params), m_run(run), m_state(Thread_Paused) { pthread_mutex_init(&m_runlock, NULL); pthread_mutex_init(&m_statelock, NULL); diff --git a/dlls/sqlite/threading.cpp b/dlls/sqlite/threading.cpp index 24d279ed..f8d8038b 100644 --- a/dlls/sqlite/threading.cpp +++ b/dlls/sqlite/threading.cpp @@ -322,7 +322,7 @@ AtomicResult::AtomicResult() { m_IsFree = true; m_CurRow = 1; - m_RowCount = NULL; + m_RowCount = 0; m_Table = NULL; m_AllocSize = 0; } diff --git a/dlls/tfc/tfcx/moduleconfig.cpp b/dlls/tfc/tfcx/moduleconfig.cpp index f2e76d8f..ae70e053 100755 --- a/dlls/tfc/tfcx/moduleconfig.cpp +++ b/dlls/tfc/tfcx/moduleconfig.cpp @@ -356,3 +356,4 @@ void OnPluginsLoaded() g_damage_info = MF_RegisterForward("client_damage", ET_IGNORE, FP_CELL, FP_CELL, FP_CELL, FP_CELL, FP_CELL, FP_CELL, FP_DONE); g_death_info = MF_RegisterForward("client_death", ET_IGNORE, FP_CELL, FP_CELL, FP_CELL, FP_CELL, FP_CELL, FP_DONE); } + diff --git a/dlls/ts/tsx/NBase.cpp b/dlls/ts/tsx/NBase.cpp index f84c6283..f6f7915a 100755 --- a/dlls/ts/tsx/NBase.cpp +++ b/dlls/ts/tsx/NBase.cpp @@ -204,7 +204,7 @@ END_USER_FUNC() BEGIN_USER_FUNC(is_in_slowmo) if (pPlayer->GetOffsetF(TSX_ISSLO_OFFSET)) - return pPlayer->GetOffsetF(TSX_SLOMO2_OFFSET); + return amx_ftoc(pPlayer->GetOffsetF(TSX_SLOMO2_OFFSET)); return 0; END_USER_FUNC()