Skip to content

Commit

Permalink
Additional object destruction logging
Browse files Browse the repository at this point in the history
  • Loading branch information
past-due committed Jun 28, 2024
1 parent 63ae90c commit d6e1440
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/mechanics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@
/* Shutdown the mechanics system */
bool mechanicsShutdown()
{
if (!psDestroyedObj.empty())
{
debug(LOG_INFO, "%zu destroyed objects", psDestroyedObj.size());
}
for (BASE_OBJECT* psObj : psDestroyedObj)
{
objmemDestroy(psObj, true);
Expand Down
4 changes: 4 additions & 0 deletions src/mission.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2969,6 +2969,10 @@ void missionDestroyObjects()

// FIXME: check that orders do not reference anything bad?

if (!psDestroyedObj.empty())
{
debug(LOG_INFO, "%zu destroyed objects", psDestroyedObj.size());
}
gameTime++; // Wonderful hack to ensure objects destroyed above get free'ed up by objmemUpdate.
objmemUpdate(); // Actually free objects removed above
}
Expand Down

0 comments on commit d6e1440

Please sign in to comment.