forked from Mirrors/openclonk
Add another DebugRec for the Definition() call
parent
3f85fac869
commit
1eff3d7661
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -33,6 +33,10 @@
|
|||
#include <C4GameVersion.h>
|
||||
#include <C4Language.h>
|
||||
|
||||
#ifdef DEBUGREC
|
||||
#include <C4Record.h>
|
||||
#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();
|
||||
|
|
Loading…
Reference in New Issue