diff --git a/src/control/C4Record.cpp b/src/control/C4Record.cpp index ce26d9752..6bb861c79 100644 --- a/src/control/C4Record.cpp +++ b/src/control/C4Record.cpp @@ -989,6 +989,7 @@ const char * GetRecordChunkTypeName(C4RecordChunkType eType) case RCT_MenuAddC: return "MenuAddC"; // add menu item: Following commands case RCT_OCF: return "OCF"; // OCF setting of updating case RCT_DirectExec: return "DirectExec"; // a DirectExec-script + case RCT_Definition: return "Definition"; // Definition callback case RCT_Custom: return "Custom"; // varies diff --git a/src/control/C4Record.h b/src/control/C4Record.h index 7e61cd19f..573b9a423 100644 --- a/src/control/C4Record.h +++ b/src/control/C4Record.h @@ -92,6 +92,7 @@ enum C4RecordChunkType // record file chunk type RCT_MenuAddC = 0xA2, // add menu item: Following commands RCT_OCF = 0xA3, // OCF setting of updating RCT_DirectExec = 0xA4, // a DirectExec-script + RCT_Definition = 0xA5, // Definition callback RCT_Custom = 0xc0, // varies diff --git a/src/game/object/C4DefList.cpp b/src/game/object/C4DefList.cpp index b9016f3d6..da89bce46 100644 --- a/src/game/object/C4DefList.cpp +++ b/src/game/object/C4DefList.cpp @@ -33,6 +33,10 @@ #include #include +#ifdef DEBUGREC +#include +#endif + C4DefList::C4DefList() { Default(); @@ -442,6 +446,13 @@ void C4DefList::CallEveryDefinition() { for (Table::iterator it = table.begin(); it != table.end(); ++it) { +#ifdef DEBUGREC + // TODO: Might not be synchronous on runtime join since is run by joining + // client but not by host. Might need to go to Synchronize(). + char sz[32+1]; + strncpy(sz, it->second->GetName(), 32+1); + AddDbgRec(RCT_Definition, sz, 32); +#endif C4AulParSet Pars(C4VPropList(it->second)); it->second->Script.Call(PSF_Definition, 0, &Pars, true); it->second->Freeze();