Various pointless things of no importance:
- Renamed ISourceMod::GetModPath() to GetGamePath() - Renamed ISourceMod::GetModFolderName() to GetGameFolderName() - Various spelling corrections (why did I do this?) --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40735
This commit is contained in:
+5
-5
@@ -1184,7 +1184,7 @@ bool AdminCache::CanAdminTarget(AdminId id, AdminId target)
|
||||
{
|
||||
/**
|
||||
* Zeroth, if the targeting AdminId is INVALID_ADMIN_ID, targeting fails.
|
||||
* First, if the targetted AdminId is INVALID_ADMIN_ID, targeting succeeds.
|
||||
* First, if the targeted AdminId is INVALID_ADMIN_ID, targeting succeeds.
|
||||
*/
|
||||
|
||||
if (id == INVALID_ADMIN_ID)
|
||||
@@ -1210,21 +1210,21 @@ bool AdminCache::CanAdminTarget(AdminId id, AdminId target)
|
||||
}
|
||||
|
||||
/**
|
||||
* Second, if the targeting admin is root, targeting suceeds.
|
||||
* Second, if the targeting admin is root, targeting succeeds.
|
||||
*/
|
||||
if (pUser->eflags & ADMFLAG_ROOT)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/** Fourth, if the targetted admin has global immunity, targeting fails. */
|
||||
/** Fourth, if the targeted admin has global immunity, targeting fails. */
|
||||
if (pTarget->immune_global)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fifth, if the targetted admin has default immunity
|
||||
* Fifth, if the targeted admin has default immunity
|
||||
* and the admin belongs to no groups, targeting fails.
|
||||
*/
|
||||
if (pTarget->immune_default && pUser->grp_count < 1)
|
||||
@@ -1233,7 +1233,7 @@ bool AdminCache::CanAdminTarget(AdminId id, AdminId target)
|
||||
}
|
||||
|
||||
/**
|
||||
* Sixth, if the targetted admin has specific immunity from the
|
||||
* Sixth, if the targeted admin has specific immunity from the
|
||||
* targeting admin via group immunities, targeting fails.
|
||||
*/
|
||||
//:TODO: speed this up... maybe with trie hacks.
|
||||
|
||||
+3
-3
@@ -35,7 +35,7 @@ struct AdminGroup
|
||||
uint32_t magic; /* Magic flag, for memory validation (ugh) */
|
||||
bool immune_global; /* Global immunity? */
|
||||
bool immune_default; /* Default immunity? */
|
||||
/* Immune from target table (-1 = nonexistant)
|
||||
/* Immune from target table (-1 = nonexistent)
|
||||
* [0] = number of entries
|
||||
* [1...N] = immune targets
|
||||
*/
|
||||
@@ -70,8 +70,8 @@ struct AdminUser
|
||||
unsigned int grp_count; /* Number of groups */
|
||||
unsigned int grp_size; /* Size of groups table */
|
||||
int grp_table; /* Group table itself */
|
||||
int next_user; /* Next user in ze list */
|
||||
int prev_user; /* Prev user in the list */
|
||||
int next_user; /* Next user in the list */
|
||||
int prev_user; /* Previous user in the list */
|
||||
UserAuth auth; /* Auth method for this user */
|
||||
bool immune_global; /* Whether globally immune */
|
||||
bool immune_default; /* Whether defaultly immune */
|
||||
|
||||
@@ -910,7 +910,7 @@ void _IntExt_CallYams()
|
||||
{
|
||||
if (strcasecmp(arg, "mock") == 0)
|
||||
{
|
||||
g_RootMenu.ConsolePrint("You mock BAILOPAN's pronounciation. In a fit of rage, ");
|
||||
g_RootMenu.ConsolePrint("You mock BAILOPAN's pronunciation. In a fit of rage, ");
|
||||
g_RootMenu.ConsolePrint("he sticks an INT 3 call into your chest, rendering you broken.");
|
||||
g_RootMenu.ConsolePrint("YOU HAVE DIED. GAME OVER.");
|
||||
g_yam_state = 0;
|
||||
|
||||
@@ -301,7 +301,7 @@ Handle_t ConVarManager::FindConVar(const char *name)
|
||||
/* If we don't have a handle, then create a new one */
|
||||
hndl = g_HandleSys.CreateHandle(m_ConVarType, pConVar, NULL, g_pCoreIdent, NULL);
|
||||
|
||||
/* Create and initilize ConVarInfo structure */
|
||||
/* Create and initialize ConVarInfo structure */
|
||||
pInfo = new ConVarInfo();
|
||||
pInfo->handle = hndl;
|
||||
pInfo->sourceMod = false;
|
||||
|
||||
+1
-1
@@ -79,7 +79,7 @@ void CoreConfig::Initialize()
|
||||
}
|
||||
|
||||
/* Format path to config file */
|
||||
g_LibSys.PathFormat(filePath, sizeof(filePath), "%s/%s", g_SourceMod.GetModPath(), corecfg);
|
||||
g_LibSys.PathFormat(filePath, sizeof(filePath), "%s/%s", g_SourceMod.GetGamePath(), corecfg);
|
||||
|
||||
/* Parse config file */
|
||||
if ((err=g_TextParser.ParseFile_SMC(filePath, this, NULL, NULL)) != SMCParse_Okay)
|
||||
|
||||
@@ -301,7 +301,7 @@ void GameConfigManager::OnSourceModStartup(bool late)
|
||||
{
|
||||
LoadGameConfigFile("core.games", &g_pGameConf, NULL, 0);
|
||||
|
||||
strncopy(g_mod, g_SourceMod.GetModFolderName(), sizeof(g_mod));
|
||||
strncopy(g_mod, g_SourceMod.GetGameFolderName(), sizeof(g_mod));
|
||||
}
|
||||
|
||||
void GameConfigManager::OnSourceModAllInitialized()
|
||||
|
||||
+1
-1
@@ -72,7 +72,7 @@ CSharedEdictChangeInfo *g_pSharedChangeInfo = NULL;
|
||||
void CHalfLife2::OnSourceModStartup(bool late)
|
||||
{
|
||||
/* The Ship currently is the only known game to use an older version of the engine */
|
||||
if (strcasecmp(g_SourceMod.GetModFolderName(), "ship") == 0)
|
||||
if (strcasecmp(g_SourceMod.GetGameFolderName(), "ship") == 0)
|
||||
{
|
||||
/* :TODO: Better engine versioning - perhaps something added to SourceMM? */
|
||||
g_IsOriginalEngine = true;
|
||||
|
||||
@@ -158,7 +158,7 @@ void PlayerManager::RunAuthChecks()
|
||||
/* Clean up the queue */
|
||||
if (removed)
|
||||
{
|
||||
/* We don't have to compcat the list if it's empty */
|
||||
/* We don't have to compact the list if it's empty */
|
||||
if (removed != m_AuthQueue[0])
|
||||
{
|
||||
unsigned int diff = 0;
|
||||
|
||||
+2
-2
@@ -21,7 +21,7 @@
|
||||
* Double Array Trie algorithm, based on:
|
||||
* An Efficient Implementation of Trie Structures, by
|
||||
* Jun-ichi Aoe and Katsushi Maromoto, and Takashi Sato
|
||||
* from Sofiware - Practice and Experience, Vol. 22(9), 695-721 (September 1992)
|
||||
* from Software - Practice and Experience, Vol. 22(9), 695-721 (September 1992)
|
||||
*
|
||||
* A Trie is a simple data structure which stores strings as DFAs, with each
|
||||
* transition state being a string entry. For example, observe the following strings:
|
||||
@@ -47,7 +47,7 @@
|
||||
*
|
||||
* BASE[] is an array where each member is a node in the Trie. The node can either be UNUSED (empty), an ARC
|
||||
* (containing an offset to the next set of ARCs), or a TERMINATOR (contains the rest of a string).
|
||||
* Each node has an index which must be interpeted based on the node type. If the node is a TERMINATOR, then the
|
||||
* Each node has an index which must be interpreted based on the node type. If the node is a TERMINATOR, then the
|
||||
* index is an index into a string table, to find the rest of the string.
|
||||
* If the node is an ARC, the index is another index into BASE. For each possible token that can follow the
|
||||
* current token, the value of those tokens can be added to the index given in the ARC. Thus, given a current
|
||||
|
||||
@@ -142,7 +142,7 @@ static cell_t GetGameDescription(IPluginContext *pContext, const cell_t *params)
|
||||
|
||||
static cell_t GetGameFolderName(IPluginContext *pContext, const cell_t *params)
|
||||
{
|
||||
const char *name = g_SourceMod.GetModFolderName();
|
||||
const char *name = g_SourceMod.GetGameFolderName();
|
||||
size_t numBytes;
|
||||
|
||||
pContext->StringToLocalUTF8(params[1], params[2], name, &numBytes);
|
||||
|
||||
+3
-3
@@ -449,7 +449,7 @@ size_t SourceModBase::BuildPath(PathType type, char *buffer, size_t maxlength, c
|
||||
const char *base = NULL;
|
||||
if (type == Path_Game)
|
||||
{
|
||||
base = GetModPath();
|
||||
base = GetGamePath();
|
||||
} else if (type == Path_SM) {
|
||||
base = GetSourceModPath();
|
||||
} else if (type == Path_SM_Rel) {
|
||||
@@ -580,7 +580,7 @@ const char *SourceModBase::GetSourceModPath() const
|
||||
return m_SMBaseDir;
|
||||
}
|
||||
|
||||
const char *SourceModBase::GetModPath() const
|
||||
const char *SourceModBase::GetGamePath() const
|
||||
{
|
||||
return g_BaseDir.c_str();
|
||||
}
|
||||
@@ -625,7 +625,7 @@ Handle_t SourceModBase::GetDataPackHandleType(bool readonly)
|
||||
return 0;
|
||||
}
|
||||
|
||||
const char *SourceModBase::GetModFolderName() const
|
||||
const char *SourceModBase::GetGameFolderName() const
|
||||
{
|
||||
return m_ModDir;
|
||||
}
|
||||
|
||||
+2
-2
@@ -84,7 +84,7 @@ public: // SMGlobalClass
|
||||
char *error,
|
||||
size_t maxlength);
|
||||
public: // ISourceMod
|
||||
const char *GetModPath() const;
|
||||
const char *GetGamePath() const;
|
||||
const char *GetSourceModPath() const;
|
||||
size_t BuildPath(PathType type, char *buffer, size_t maxlength, char *format, ...);
|
||||
void LogMessage(IExtension *pExt, const char *format, ...);
|
||||
@@ -94,7 +94,7 @@ public: // ISourceMod
|
||||
void FreeDataPack(IDataPack *pack);
|
||||
HandleType_t GetDataPackHandleType(bool readonly=false);
|
||||
KeyValues *ReadKeyValuesHandle(Handle_t hndl, HandleError *err=NULL, bool root=false);
|
||||
const char *GetModFolderName() const;
|
||||
const char *GetGameFolderName() const;
|
||||
private:
|
||||
/**
|
||||
* @brief Loading plugins
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
Genesis/**
|
||||
* vim: set ts=4 :
|
||||
* ===============================================================
|
||||
* SourceMod (C)2004-2007 AlliedModders LLC. All rights reserved.
|
||||
@@ -22,7 +22,7 @@
|
||||
CForwardManager g_Forwards;
|
||||
|
||||
/**
|
||||
* Gensis turns to its source, reduction occurs stepwise although the essence is all one.
|
||||
* Genesis turns to its source, reduction occurs stepwise although the essence is all one.
|
||||
* End of line. FTL system check.
|
||||
*
|
||||
* :TODO: WHAT NEEDS TO BE TESTED IN THIS BEAST
|
||||
|
||||
@@ -157,7 +157,7 @@ protected:
|
||||
bool identity=false);
|
||||
|
||||
/**
|
||||
* Frees a primitive handle. Does no object freeing, only reference count, bookkeepping,
|
||||
* Frees a primitive handle. Does no object freeing, only reference count, bookkeeping,
|
||||
* and linked list maintenance.
|
||||
* If used on an Identity handle, destroys all Handles under that identity.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user