Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions extensions/sdktools/vhelpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -412,12 +412,12 @@ void UTIL_DrawSendTable_XML(FILE *fp, SendTable *pTable, int space_count)
SendTable *pOtherTable;
SendProp *pProp;

fprintf(fp, " %s<sendtable name=\"%s\">\n", spaces, pTable->GetName());
fprintf(fp, " %s<sendtable name='%s'>\n", spaces, pTable->GetName());
for (int i = 0; i < pTable->GetNumProps(); i++)
{
pProp = pTable->GetProp(i);

fprintf(fp, " %s<property name=\"%s\">\n", spaces, pProp->GetName());
fprintf(fp, " %s<property name='%s'>\n", spaces, pProp->GetName());

if ((type_name = GetDTTypeName(pProp->GetType())) != NULL)
{
Expand All @@ -444,9 +444,9 @@ void UTIL_DrawSendTable_XML(FILE *fp, SendTable *pTable, int space_count)

void UTIL_DrawServerClass_XML(FILE *fp, ServerClass *sc)
{
fprintf(fp, "<serverclass name=\"%s\">\n", sc->GetName());
UTIL_DrawSendTable_XML(fp, sc->m_pTable, 0);
fprintf(fp, "</serverclass>\n");
fprintf(fp, " <serverclass name='%s'>\n", sc->GetName());
UTIL_DrawSendTable_XML(fp, sc->m_pTable, 1);
fprintf(fp, " </serverclass>\n");
}

void UTIL_DrawSendTable(FILE *fp, SendTable *pTable, int level = 1)
Expand Down Expand Up @@ -540,6 +540,7 @@ CON_COMMAND(sm_dump_netprops_xml, "Dumps the networkable property table as an XM

fprintf(fp, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n");
fprintf(fp, "<!-- Dump of all network properties for \"%s\" as at %s -->\n\n", g_pSM->GetGameFolderName(), buffer);
fprintf(fp, "<netprops>\n");

ServerClass *pBase = gamedll->GetAllServerClasses();
while (pBase != NULL)
Expand All @@ -548,6 +549,7 @@ CON_COMMAND(sm_dump_netprops_xml, "Dumps the networkable property table as an XM
pBase = pBase->m_pNext;
}

fprintf(fp, "</netprops>\n");
fclose(fp);
}

Expand Down