mirror of
https://github.com/alliedmodders/sourcemod.git
synced 2025-12-09 19:38:34 +00:00
Remove redundant API
This commit is contained in:
parent
0aaf89da22
commit
eb98f362ca
@ -518,26 +518,6 @@ bool CHalfLife2::FindDataMapInfo(datamap_t *pMap, const char *offset, sm_datatab
|
||||
return pDataTable->prop != nullptr;
|
||||
}
|
||||
|
||||
void CHalfLife2::ClearDataTableCache()
|
||||
{
|
||||
m_Maps.clear();
|
||||
}
|
||||
|
||||
void CHalfLife2::ClearDataTableCache(datamap_t *pMap)
|
||||
{
|
||||
m_Maps.removeIfExists(pMap);
|
||||
}
|
||||
|
||||
void CHalfLife2::ClearSendPropCache()
|
||||
{
|
||||
m_Classes.clear();
|
||||
}
|
||||
|
||||
bool CHalfLife2::ClearSendPropCache(const char *classname)
|
||||
{
|
||||
return m_Classes.remove(classname);
|
||||
}
|
||||
|
||||
void CHalfLife2::SetEdictStateChanged(edict_t *pEdict, unsigned short offset)
|
||||
{
|
||||
#if SOURCE_ENGINE != SE_DARKMESSIAH
|
||||
@ -1595,10 +1575,23 @@ uint64_t CHalfLife2::GetServerSteamId64() const
|
||||
|
||||
void CHalfLife2::RemoveDataTableCache(datamap_t *pMap)
|
||||
{
|
||||
this->ClearDataTableCache(pMap);
|
||||
if (pMap == nullptr)
|
||||
{
|
||||
m_Maps.clear();
|
||||
return;
|
||||
}
|
||||
|
||||
m_Maps.removeIfExists(pMap);
|
||||
}
|
||||
|
||||
bool CHalfLife2::RemoveSendPropCache(const char *classname)
|
||||
{
|
||||
return this->ClearSendPropCache(classname);
|
||||
if (classname == nullptr)
|
||||
{
|
||||
m_Classes.clear();
|
||||
return true;
|
||||
}
|
||||
|
||||
return m_Classes.remove(classname);
|
||||
}
|
||||
|
||||
|
||||
@ -258,8 +258,8 @@ public: //IGameHelpers
|
||||
string_t AllocPooledString(const char *pszValue);
|
||||
bool GetServerSteam3Id(char *pszOut, size_t len) const override;
|
||||
uint64_t GetServerSteamId64() const override;
|
||||
void RemoveDataTableCache(datamap_t *pMap);
|
||||
bool RemoveSendPropCache(const char *classname);
|
||||
void RemoveDataTableCache(datamap_t *pMap = nullptr);
|
||||
bool RemoveSendPropCache(const char *classname = nullptr);
|
||||
public:
|
||||
void AddToFakeCliCmdQueue(int client, int userid, const char *cmd);
|
||||
void ProcessFakeCliCmdQueue();
|
||||
@ -275,11 +275,6 @@ private:
|
||||
private:
|
||||
void InitLogicalEntData();
|
||||
void InitCommandLine();
|
||||
public:
|
||||
void ClearDataTableCache();
|
||||
void ClearDataTableCache(datamap_t *pMap);
|
||||
void ClearSendPropCache();
|
||||
bool ClearSendPropCache(const char *classname);
|
||||
private:
|
||||
typedef ke::HashMap<datamap_t *, DataMapCache *, ke::PointerPolicy<datamap_t> > DataTableMap;
|
||||
|
||||
|
||||
@ -353,19 +353,19 @@ namespace SourceMod
|
||||
virtual uint64_t GetServerSteamId64() const =0;
|
||||
|
||||
/**
|
||||
* @brief Removes a datamap from the DataTable cache.
|
||||
* @brief Clears all, or removes a single datamap from the DataTable cache.
|
||||
*
|
||||
* @param pMap datamap_t pointer.
|
||||
* @param pMap NULL or datamap_t pointer.
|
||||
*/
|
||||
virtual void RemoveDataTableCache(datamap_t *pMap) =0;
|
||||
virtual void RemoveDataTableCache(datamap_t *pMap = nullptr) =0;
|
||||
|
||||
/**
|
||||
* @brief Removes a class from the SendProp cache.
|
||||
* @brief Clears all, or removes a single class from the SendProp cache.
|
||||
*
|
||||
* @param classname Entity class name.
|
||||
* @param classname NULL pointer or entity class name.
|
||||
* @return True if cache was found and removed.
|
||||
*/
|
||||
virtual bool RemoveSendPropCache(const char *classname) =0;
|
||||
virtual bool RemoveSendPropCache(const char *classname = nullptr) =0;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user