Skip to content

Commit

Permalink
Fix missing rename
Browse files Browse the repository at this point in the history
  • Loading branch information
TheNormalnij committed Nov 7, 2024
1 parent 6752784 commit 3b545cd
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Server/mods/deathmatch/logic/CElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ void CElement::ReadCustomData(CEvents* pEvents, CXMLNode& Node)
}
}

CLuaArgument* CElement::GetCustomData(const char* szName, bool bInheritData, ESyncType* pSyncType, ECustomDataClientTrust* clientChangesMode)
CLuaArgument* CElement::GetCustomData(const char* szName, bool bInheritData, ESyncType* pSyncType, eCustomDataClientTrust* clientChangesMode)
{
assert(szName);

Expand Down
2 changes: 1 addition & 1 deletion Server/mods/deathmatch/logic/CElement.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ class CElement

void ReadCustomData(CEvents* pEvents, CXMLNode& Node);
CCustomData& GetCustomDataManager() { return m_CustomData; }
CLuaArgument* GetCustomData(const char* szName, bool bInheritData, ESyncType* pSyncType = nullptr, ECustomDataClientTrust* clientChangesMode = nullptr);
CLuaArgument* GetCustomData(const char* szName, bool bInheritData, ESyncType* pSyncType = nullptr, eCustomDataClientTrust* clientChangesMode = nullptr);
CLuaArguments* GetAllCustomData(CLuaArguments* table);
bool GetCustomDataString(const char* szName, char* pOut, size_t sizeBuffer, bool bInheritData);
bool GetCustomDataInt(const char* szName, int& iOut, bool bInheritData);
Expand Down
6 changes: 3 additions & 3 deletions Server/mods/deathmatch/logic/CGame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2653,12 +2653,12 @@ void CGame::Packet_CustomData(CCustomDataPacket& Packet)
}

ESyncType lastSyncType = ESyncType::BROADCAST;
ECustomDataClientTrust clientChangesMode{};
eCustomDataClientTrust clientChangesMode{};

pElement->GetCustomData(szName, false, &lastSyncType, &clientChangesMode);

const bool changesAllowed = clientChangesMode == ECustomDataClientTrust::UNSET ? !m_pMainConfig->IsElementDataWhitelisted()
: clientChangesMode == ECustomDataClientTrust::ALLOW;
const bool changesAllowed = clientChangesMode == eCustomDataClientTrust::UNSET ? !m_pMainConfig->IsElementDataWhitelisted()
: clientChangesMode == eCustomDataClientTrust::ALLOW;
if (!changesAllowed)
{
CLogger::ErrorPrintf("Client trying to change protected element data %s (%s)", Packet.GetSourcePlayer()->GetNick(),
Expand Down
2 changes: 1 addition & 1 deletion Server/mods/deathmatch/logic/CStaticFunctionDefinitions.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class CStaticFunctionDefinitions
static bool ClearElementVisibleTo(CElement* pElement);
static bool SetElementID(CElement* pElement, const char* szID);
static bool SetElementData(CElement* pElement, const char* szName, const CLuaArgument& Variable, ESyncType syncType,
std::optional<ECustomDataClientTrust> clientTrust);
std::optional<eCustomDataClientTrust> clientTrust);
static bool RemoveElementData(CElement* pElement, const char* szName);
static bool AddElementDataSubscriber(CElement* pElement, const char* szName, CPlayer* pPlayer);
static bool RemoveElementDataSubscriber(CElement* pElement, const char* szName, CPlayer* pPlayer);
Expand Down
8 changes: 4 additions & 4 deletions Server/mods/deathmatch/logic/lua/CLuaFunctionParseHelpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -285,10 +285,10 @@ ADD_ENUM(ESyncType::LOCAL, "local")
ADD_ENUM(ESyncType::SUBSCRIBE, "subscribe")
IMPLEMENT_ENUM_CLASS_END("sync-mode")

IMPLEMENT_ENUM_CLASS_BEGIN(ECustomDataClientTrust)
ADD_ENUM(ECustomDataClientTrust::UNSET, "default")
ADD_ENUM(ECustomDataClientTrust::ALLOW, "allow")
ADD_ENUM(ECustomDataClientTrust::DENY, "deny")
IMPLEMENT_ENUM_CLASS_BEGIN(eCustomDataClientTrust)
ADD_ENUM(eCustomDataClientTrust::UNSET, "default")
ADD_ENUM(eCustomDataClientTrust::ALLOW, "allow")
ADD_ENUM(eCustomDataClientTrust::DENY, "deny")
IMPLEMENT_ENUM_CLASS_END("client-trust-mode")

//
Expand Down

0 comments on commit 3b545cd

Please sign in to comment.