fixed build on linux problems
--HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40470
This commit is contained in:
parent
1d44bdf37a
commit
682e7d4ab6
@ -1109,7 +1109,7 @@ unsigned int AdminCache::FlagBitsToBitArray(FlagBits bits, bool array[], unsigne
|
||||
unsigned int i;
|
||||
for (i=0; i<maxSize && i<AdminFlags_TOTAL; i++)
|
||||
{
|
||||
array[i] = ((bits & (1<<i)) == (1<<i));
|
||||
array[i] = ((bits & (1<<i)) == (unsigned)(1<<i));
|
||||
}
|
||||
|
||||
return i;
|
||||
@ -1145,7 +1145,7 @@ unsigned int AdminCache::FlagBitsToArray(FlagBits bits, AdminFlag array[], unsig
|
||||
unsigned int i, num=0;
|
||||
for (i=0; i<maxSize && i<AdminFlags_TOTAL; i++)
|
||||
{
|
||||
if ((bits & (1<<i)) == (1<<i))
|
||||
if ((bits & (1<<i)) == (unsigned)(1<<i))
|
||||
{
|
||||
array[num++] = (AdminFlag)i;
|
||||
}
|
||||
|
@ -51,4 +51,5 @@ private:
|
||||
|
||||
extern CConVarManager g_ConVarManager;
|
||||
|
||||
#endif // _INCLUDE_SOURCEMOD_CCONVARMANAGER_H_
|
||||
#endif // _INCLUDE_SOURCEMOD_CCONVARMANAGER_H_
|
||||
|
||||
|
@ -292,7 +292,7 @@ void CPlayerManager::OnClientDisconnect(edict_t *pEntity)
|
||||
{
|
||||
for (unsigned int i=1; i<=m_AuthQueue[0]; i++)
|
||||
{
|
||||
if (m_AuthQueue[i] == client)
|
||||
if (m_AuthQueue[i] == (unsigned)client)
|
||||
{
|
||||
/* Move everything ahead of us back by one */
|
||||
for (unsigned int j=i+1; j<=m_AuthQueue[0]; j++)
|
||||
|
@ -20,10 +20,10 @@ HL2PUB = $(HL2SDK)/public
|
||||
HL2LIB = $(HL2SDK)/linux_sdk
|
||||
|
||||
OBJECTS = sourcemm_api.cpp sourcemod.cpp AdminCache.cpp CDbgReporter.cpp CLogger.cpp \
|
||||
CPlayer.cpp CPlayerManager.cpp CTextParsers.cpp CTranslator.cpp \
|
||||
CPlayerManager.cpp CTextParsers.cpp CTranslator.cpp \
|
||||
sm_autonatives.cpp sm_memtable.cpp sm_srvcmds.cpp sm_trie.cpp \
|
||||
sm_stringutil.cpp smn_filesystem.cpp smn_float.cpp smn_handles.cpp \
|
||||
smn_player.cpp smn_string.cpp smn_textparse.cpp \
|
||||
smn_player.cpp smn_string.cpp smn_textparse.cpp smn_convar.cpp smn_admin.cpp \
|
||||
systems/ExtensionSys.cpp systems/ForwardSys.cpp systems/HandleSys.cpp \
|
||||
systems/LibrarySys.cpp systems/PluginInfoDatabase.cpp \
|
||||
systems/PluginSys.cpp systems/ShareSys.cpp vm/sp_vm_basecontext.cpp \
|
||||
|
@ -62,6 +62,11 @@ size_t Translate(char *buffer, size_t maxlen, IPluginContext *pCtx, const char *
|
||||
unsigned int langid;
|
||||
char *langname = NULL;
|
||||
*error = false;
|
||||
Translation pTrans;
|
||||
CPlugin *pl = (CPlugin *)g_PluginSys.FindPluginByContext(pCtx->GetContext());
|
||||
size_t langcount = pl->GetLangFileCount();
|
||||
void *new_params[MAX_TRANSLATE_PARAMS];
|
||||
unsigned int max_params = 0;
|
||||
|
||||
try_serverlang:
|
||||
if (target == LANG_SERVER)
|
||||
@ -89,9 +94,7 @@ try_serverlang:
|
||||
goto error_out;
|
||||
}
|
||||
|
||||
Translation pTrans;
|
||||
CPlugin *pl = (CPlugin *)g_PluginSys.FindPluginByContext(pCtx->GetContext());
|
||||
size_t langcount = pl->GetLangFileCount();
|
||||
max_params = pTrans.fmt_count;
|
||||
|
||||
if (!TryTranslation(pl, key, langid, langcount, &pTrans))
|
||||
{
|
||||
@ -109,8 +112,6 @@ try_serverlang:
|
||||
}
|
||||
}
|
||||
|
||||
void *new_params[MAX_TRANSLATE_PARAMS];
|
||||
unsigned int max_params = pTrans.fmt_count;
|
||||
for (size_t i=0; i<max_params; i++)
|
||||
{
|
||||
pCtx->LocalToPhysAddr(params[*arg], reinterpret_cast<cell_t **>(&new_params[i]));
|
||||
|
@ -12,6 +12,8 @@
|
||||
*/
|
||||
|
||||
#include <math.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include "sm_globals.h"
|
||||
|
||||
/****************************************
|
||||
|
@ -406,6 +406,7 @@ REGISTER_NATIVES(playernatives)
|
||||
{"PrintToConsole", sm_PrintToConsole},
|
||||
{"GetClientInfo", sm_GetClientInfo},
|
||||
{"SetUserAdmin", SetUserAdmin},
|
||||
{"GetUserAdmin", GetUserAdmin},
|
||||
{"AddUserFlags", AddUserFlags},
|
||||
{"RemoveUserFlags", RemoveUserFlags},
|
||||
{"SetUserFlagBits", SetUserFlagBits},
|
||||
|
@ -1,11 +1,11 @@
|
||||
/** This file is autogenerated by build scripts */
|
||||
|
||||
#ifndef _INCLUDE_SVN_VERSION_H_
|
||||
#define _INCLUDE_SVN_VERSION_H_
|
||||
|
||||
#define SVN_REVISION 429
|
||||
#define SVN_REVISION_STRING "429"
|
||||
#define SVN_FILE_VERSION 1,0,0,429
|
||||
|
||||
#endif //_INCLUDE_SVN_VERSION_H_
|
||||
|
||||
/** This file is autogenerated by build scripts */
|
||||
|
||||
#ifndef _INCLUDE_SVN_VERSION_H_
|
||||
#define _INCLUDE_SVN_VERSION_H_
|
||||
|
||||
#define SVN_REVISION 468
|
||||
#define SVN_REVISION_STRING "468"
|
||||
#define SVN_FILE_VERSION 1,0,0,468
|
||||
|
||||
#endif //_INCLUDE_SVN_VERSION_H_
|
||||
|
||||
|
@ -84,7 +84,7 @@ protected:
|
||||
/* :TODO: I want a caching list type here.
|
||||
* Destroying these things and using new/delete for their members feels bad.
|
||||
*/
|
||||
List<IPluginFunction *> m_functions;
|
||||
mutable List<IPluginFunction *> m_functions;
|
||||
List<IPluginFunction *> m_paused;
|
||||
|
||||
/* Type and name information */
|
||||
|
@ -1658,4 +1658,5 @@ void CPluginManager::_SetPauseState(CPlugin *pl, bool paused)
|
||||
pListener = (*iter);
|
||||
pListener->OnPluginPauseChange(pl, paused);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user