Skip to content

Commit 5bd6eb8

Browse files
committed
Fix errors caused by conflicts
1 parent c4a8662 commit 5bd6eb8

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Server/mods/deathmatch/logic/CElement.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -716,7 +716,7 @@ bool CElement::SetCustomData(const CStringName& name, const CLuaArgument& Variab
716716
{
717717
// Don't allow it to be set if the name is too long
718718
CLogger::ErrorPrintf("Custom data name too long (%s)\n", *SStringX(name.ToCString()).Left(MAX_CUSTOMDATA_NAME_LENGTH + 1));
719-
return;
719+
return false;
720720
}
721721

722722
// Grab the old variable and sync type
@@ -743,9 +743,9 @@ bool CElement::SetCustomData(const CStringName& name, const CLuaArgument& Variab
743743
{
744744
// Event was cancelled, restore previous value
745745
if (pData)
746-
m_CustomData.Set(szName, oldVariable, oldSyncType);
746+
m_CustomData.Set(name, oldVariable, oldSyncType);
747747
else
748-
m_CustomData.Delete(szName);
748+
m_CustomData.Delete(name);
749749
return false;
750750
}
751751
}
@@ -772,7 +772,7 @@ bool CElement::DeleteCustomData(const CStringName& name)
772772
if (!CallEvent("onElementDataChange", Arguments))
773773
{
774774
// Event was cancelled, restore previous value
775-
m_CustomData.Set(szName, oldVariable, oldSyncType);
775+
m_CustomData.Set(name, oldVariable, oldSyncType);
776776
return false;
777777
}
778778
return true;

Server/mods/deathmatch/logic/CStaticFunctionDefinitions.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1015,7 +1015,7 @@ bool CStaticFunctionDefinitions::SetElementData(CElement* pElement, CStringName
10151015

10161016
if (!pCurrentVariable || *pCurrentVariable != Variable || lastSyncType != syncType)
10171017
{
1018-
if (!pElement->SetCustomData(szName, Variable, syncType))
1018+
if (!pElement->SetCustomData(name, Variable, syncType))
10191019
return false; // The server cancelled the change in onElementDataChange
10201020

10211021
if (syncType != ESyncType::LOCAL)
@@ -1052,7 +1052,7 @@ bool CStaticFunctionDefinitions::RemoveElementData(CElement* pElement, CStringNa
10521052
// Check it exists
10531053
if (pElement->GetCustomData(name, false))
10541054
{
1055-
if (!pElement->DeleteCustomData(szName))
1055+
if (!pElement->DeleteCustomData(name))
10561056
return false; // The server cancelled the change in onElementDataChange
10571057

10581058
// Tell our clients to update their data

0 commit comments

Comments
 (0)