MCPcopy Create free account
hub / github.com/MergHQ/CRYENGINE / SerializeFunction

Method SerializeFunction

Code/CryEngine/CryAction/Network/ScriptRMI.cpp:575–599  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

573}
574
575int CScriptRMI::SerializeFunction(IFunctionHandler* pH, void* pBuffer, int nSize)
576{
577 SmartScriptTable serTable;
578 ScriptHandle hdl;
579 pH->GetParam(1, serTable);
580 pH->GetParam(2, hdl);
581 SSerializeFunctionParams* p = (SSerializeFunctionParams*) hdl.ptr;
582
583 SSynchedPropertyInfo* pInfo = (SSynchedPropertyInfo*) pBuffer;
584 int nProperties = nSize / sizeof(SSynchedPropertyInfo);
585
586 if (p->ser.IsReading())
587 {
588 for (int i = 0; i < nProperties; i++)
589 if (!m_pThis->ReadValue(pInfo[i].name, pInfo[i].type, p->ser, serTable.GetPtr()))
590 return pH->EndFunction(false);
591 }
592 else
593 {
594 for (int i = 0; i < nProperties; i++)
595 if (!m_pThis->WriteValue(pInfo[i].name, pInfo[i].type, p->ser, serTable.GetPtr()))
596 return pH->EndFunction(false);
597 }
598 return pH->EndFunction(true);
599}
600
601// one-time validation of entity tables
602bool CScriptRMI::ValidateDispatchTable(const char* clazz, SmartScriptTable dispatch, SmartScriptTable methods, bool bServerTable)

Callers

nothing calls this directly

Calls 6

GetParamMethod · 0.45
IsReadingMethod · 0.45
ReadValueMethod · 0.45
GetPtrMethod · 0.45
EndFunctionMethod · 0.45
WriteValueMethod · 0.45

Tested by

no test coverage detected