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:
parent
39110a7a51
commit
de9dc9ed99
@ -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.
|
||||
|
@ -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;
|
||||
|
@ -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()
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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.
|
||||
*/
|
||||
|
@ -148,12 +148,12 @@ namespace SourceMod
|
||||
typedef int AdminId;
|
||||
|
||||
/**
|
||||
* @brief Represents an invalid/nonexistant group or an erroneous operation.
|
||||
* @brief Represents an invalid/nonexistent group or an erroneous operation.
|
||||
*/
|
||||
#define INVALID_GROUP_ID -1
|
||||
|
||||
/**
|
||||
* @brief Represents an invalid/nonexistant user or an erroneous operation.
|
||||
* @brief Represents an invalid/nonexistent user or an erroneous operation.
|
||||
*/
|
||||
#define INVALID_ADMIN_ID -1
|
||||
|
||||
@ -571,12 +571,12 @@ namespace SourceMod
|
||||
* @brief Checks whether an AdminId can target another AdminId.
|
||||
*
|
||||
* Zeroth, if the targeting AdminId is INVALID_ADMIN_ID, targeting fails.
|
||||
* First, if the targetted AdminId is INVALID_ADMIN_ID, targeting succeeds.
|
||||
* Second, if the targeting admin is root, targeting suceeds.
|
||||
* Third, if the targetted admin has global immunity, targeting fails.
|
||||
* Fourth, if the targetted admin has default immunity,
|
||||
* First, if the targeted AdminId is INVALID_ADMIN_ID, targeting succeeds.
|
||||
* Second, if the targeting admin is root, targeting succeeds.
|
||||
* Third, if the targeted admin has global immunity, targeting fails.
|
||||
* Fourth, if the targeted admin has default immunity,
|
||||
* and the admin belongs to no groups, targeting fails.
|
||||
* Fifth, if the targetted admin has specific immunity from the
|
||||
* Fifth, if the targeted admin has specific immunity from the
|
||||
* targeting admin via group immunities, targeting fails.
|
||||
* Sixth, targeting succeeds if it passes these tests.
|
||||
*
|
||||
|
@ -175,7 +175,7 @@ namespace SourceMod
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Return false to tell Core that your extension should be considered unsable.
|
||||
* @brief Return false to tell Core that your extension should be considered usable.
|
||||
*
|
||||
* @param error Error buffer.
|
||||
* @param maxlength Size of error buffer.
|
||||
|
@ -208,9 +208,9 @@ namespace SourceMod
|
||||
|
||||
/**
|
||||
* @brief Adds a function to the call list.
|
||||
* NOTE: Cannot be used during an incompleted call.
|
||||
* NOTE: Cannot be used during an incomplete call.
|
||||
* NOTE: If used during a call, function is temporarily queued until calls are over.
|
||||
* NOTE: Adding mulitple copies of the same function is illegal.
|
||||
* NOTE: Adding multiple copies of the same function is illegal.
|
||||
*
|
||||
* @param func Function to add.
|
||||
* @return True on success, otherwise false.
|
||||
@ -219,7 +219,7 @@ namespace SourceMod
|
||||
|
||||
/**
|
||||
* @brief Adds a function to the call list.
|
||||
* NOTE: Cannot be used during an incompleted call.
|
||||
* NOTE: Cannot be used during an incomplete call.
|
||||
* NOTE: If used during a call, function is temporarily queued until calls are over.
|
||||
*
|
||||
* @param ctx Context to use as a look-up.
|
||||
|
@ -176,7 +176,7 @@ namespace SourceMod
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Called when a client has recieved authorization.
|
||||
* @brief Called when a client has received authorization.
|
||||
*
|
||||
* @param client Index of the client.
|
||||
* @param authstring Authorization string.
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
/**
|
||||
* @file ISourceMod.h
|
||||
* @brief Defines miscellanious helper functions useful to extensions.
|
||||
* @brief Defines miscellaneous helper functions useful to extensions.
|
||||
*/
|
||||
|
||||
#include <IHandleSys.h>
|
||||
@ -64,11 +64,11 @@ namespace SourceMod
|
||||
}
|
||||
public:
|
||||
/**
|
||||
* @brief Returns the full path to the mod directory.
|
||||
* @brief Returns the full path to the game directory.
|
||||
*
|
||||
* @return A string containing the full mod path.
|
||||
* @return A string containing the full game path.
|
||||
*/
|
||||
virtual const char *GetModPath() const =0;
|
||||
virtual const char *GetGamePath() const =0;
|
||||
|
||||
/**
|
||||
* @brief Returns the full path to the SourceMod directory.
|
||||
@ -111,7 +111,7 @@ namespace SourceMod
|
||||
* @brief Formats a string from a native.
|
||||
*
|
||||
* @param buffer Buffer to store message.
|
||||
* @param maxlength Maximum length of buffer (inculding null terminator).
|
||||
* @param maxlength Maximum length of buffer (including null terminator).
|
||||
* @param pContext Pointer to the plugin's context.
|
||||
* @param params Parameter array that was passed to the native.
|
||||
* @param param Parameter index where format string and variable arguments begin.
|
||||
@ -141,12 +141,12 @@ namespace SourceMod
|
||||
/**
|
||||
* @brief Returns the automated data pack handle type.
|
||||
*
|
||||
* The readonly data type is the parent of the writable type.
|
||||
* The read-only data type is the parent of the writable type.
|
||||
* Note that calling CloseHandle() on either type will release the data pack.
|
||||
* The readonly type is inheritable, but due to limitations of the Handle System,
|
||||
* The read-only type is inheritable, but due to limitations of the Handle System,
|
||||
* the writable type is not.
|
||||
*
|
||||
* @param readonly If true, the readonly type will be returned.
|
||||
* @param readonly If true, the read-only type will be returned.
|
||||
* @return The Handle type for storing generic data packs.
|
||||
*/
|
||||
virtual HandleType_t GetDataPackHandleType(bool readonly=false) =0;
|
||||
@ -163,11 +163,11 @@ namespace SourceMod
|
||||
virtual KeyValues *ReadKeyValuesHandle(Handle_t hndl, HandleError *err=NULL, bool root=false) =0;
|
||||
|
||||
/**
|
||||
* @brief Returns the name of the directory in which the mod or game's gameinfo.txt resides.
|
||||
* @brief Returns the name of the game directory.
|
||||
*
|
||||
* @return A string containing the name of the mod directory.
|
||||
* @return A string containing the name of the game directory.
|
||||
*/
|
||||
virtual const char *GetModFolderName() const =0;
|
||||
virtual const char *GetGameFolderName() const =0;
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -50,7 +50,7 @@ namespace SourceMod
|
||||
* Where KEY is an IDENTIFIER and VALUE is a STRING.
|
||||
*
|
||||
* WHITESPACE should always be omitted.
|
||||
* COMMENTS should be stripped, and are defined as text occuring in:
|
||||
* COMMENTS should be stripped, and are defined as text occurring in:
|
||||
* ;<TEXT>
|
||||
*
|
||||
* Example file below. Note that
|
||||
@ -161,7 +161,7 @@ namespace SourceMod
|
||||
* For an example, see configs/permissions.cfg
|
||||
*
|
||||
* WHITESPACE should be ignored.
|
||||
* Comments are text occuring inside the following tokens, and should be stripped
|
||||
* Comments are text occurring inside the following tokens, and should be stripped
|
||||
* unless they are inside literal strings:
|
||||
* ;<TEXT>
|
||||
* //<TEXT>
|
||||
@ -308,7 +308,7 @@ namespace SourceMod
|
||||
* @param ini_listener Event handler for reading file.
|
||||
* @param line If non-NULL, will contain last line parsed (0 if file could not be opened).
|
||||
* @param col If non-NULL, will contain last column parsed (undefined if file could not be opened).
|
||||
* @return True if parsing succeded, false if file couldn't be opened or there was a syntax error.
|
||||
* @return True if parsing succeeded, false if file couldn't be opened or there was a syntax error.
|
||||
*/
|
||||
virtual bool ParseFile_INI(const char *file,
|
||||
ITextListener_INI *ini_listener,
|
||||
@ -333,7 +333,7 @@ namespace SourceMod
|
||||
unsigned int *col) =0;
|
||||
|
||||
/**
|
||||
* @brief Converts an SMCParseError to a stirng.
|
||||
* @brief Converts an SMCParseError to a string.
|
||||
*
|
||||
* @param err SMCParseError.
|
||||
* @return String error message, or NULL if none.
|
||||
|
@ -45,7 +45,7 @@ typedef uint32_t funcid_t; /**< Function index code */
|
||||
#define SP_ERROR_INVALID_ADDRESS 5 /**< A memory address was not valid */
|
||||
#define SP_ERROR_NOT_FOUND 6 /**< The object in question was not found */
|
||||
#define SP_ERROR_INDEX 7 /**< Invalid index parameter */
|
||||
#define SP_ERROR_STACKLOW 8 /**< Nnot enough space left on the stack */
|
||||
#define SP_ERROR_STACKLOW 8 /**< Not enough space left on the stack */
|
||||
#define SP_ERROR_NOTDEBUGGING 9 /**< Debug mode was not on or debug section not found */
|
||||
#define SP_ERROR_INVALID_INSTRUCTION 10 /**< Invalid instruction was encountered */
|
||||
#define SP_ERROR_MEMACCESS 11 /**< Invalid memory access */
|
||||
@ -220,7 +220,7 @@ typedef sp_fdbg_arraydim_t sp_debug_arraydim_t;
|
||||
typedef struct sp_debug_symbol_s
|
||||
{
|
||||
uint32_t codestart; /**< Relocated code address */
|
||||
uint32_t codeend; /**< relocated code end address */
|
||||
uint32_t codeend; /**< Relocated code end address */
|
||||
const char * name; /**< Relocated name */
|
||||
sp_debug_arraydim_t *dims; /**< Relocated dimension struct, if any */
|
||||
sp_fdbg_symbol_t *sym; /**< Pointer to original symbol */
|
||||
|
Loading…
Reference in New Issue
Block a user