Skip to content

Commit

Permalink
Cleanup engine sheduler
Browse files Browse the repository at this point in the history
  • Loading branch information
Xottab-DUTY committed Apr 17, 2018
1 parent 8a7d608 commit 013fbe4
Show file tree
Hide file tree
Showing 2 changed files with 95 additions and 108 deletions.
8 changes: 4 additions & 4 deletions src/xrEngine/ISheduled.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ ScheduledBase::ScheduledBase()
#endif
}

extern BOOL g_bSheduleInProgress;
ScheduledBase::~ScheduledBase()
{
VERIFY2(!Engine.Sheduler.Registered(this), make_string("0x%08x : %s", this, *shedule_Name()));

// XXX: WTF???
// sad, but true
// we need this to become MASTER_GOLD
#ifndef DEBUG
Expand All @@ -33,9 +33,9 @@ void ScheduledBase::shedule_Update(u32 dt)
if (shedule.dbg_startframe == shedule.dbg_update_shedule)
{
LPCSTR name = "unknown";
IGameObject* O = dynamic_cast<IGameObject*>(this);
if (O)
name = *O->cName();
const auto object = dynamic_cast<IGameObject*>(this);
if (object)
name = object->cName().c_str();
xrDebug::Fatal(DEBUG_INFO, "'shedule_Update' called twice per frame for %s", name);
}
shedule.dbg_update_shedule = shedule.dbg_startframe;
Expand Down
Loading

0 comments on commit 013fbe4

Please sign in to comment.