-
Notifications
You must be signed in to change notification settings - Fork 171
feature(headless): Add GhostObjectManagerDummy for headless mode #2244
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
9506b60
05b40ee
5f90c55
f02b950
92c86ea
ecf1ecf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -349,7 +349,7 @@ void GameLogic::init() | |
| // Create system for holding deleted objects that are | ||
| // still in the partition manager because player has a fogged | ||
| // view of them. | ||
| TheGhostObjectManager = createGhostObjectManager(); | ||
| TheGhostObjectManager = createGhostObjectManager(TheGlobalData->m_headless); | ||
|
|
||
| // create the terrain logic | ||
| TheTerrainLogic = createTerrainLogic(); | ||
|
|
@@ -3933,7 +3933,7 @@ UnsignedInt GameLogic::getObjectCount() | |
|
|
||
| // ------------------------------------------------------------------------------------------------ | ||
| // ------------------------------------------------------------------------------------------------ | ||
| GhostObjectManager *GameLogic::createGhostObjectManager() | ||
| GhostObjectManager *GameLogic::createGhostObjectManager(bool) | ||
| { | ||
| return NEW GhostObjectManager; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should this also return the dummy variant? |
||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -59,6 +59,7 @@ class W3DGameLogic : public GameLogic | |
|
|
||
| /// factory for TheTerrainLogic, called from init() | ||
| virtual TerrainLogic *createTerrainLogic() { return NEW W3DTerrainLogic; }; | ||
| virtual GhostObjectManager *createGhostObjectManager() { return NEW W3DGhostObjectManager; } | ||
| // TheSuperHackers @feature bobtista 19/01/2026 Use dummy for headless mode | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Superfluous comment |
||
| virtual GhostObjectManager *createGhostObjectManager(bool headless) { return headless ? static_cast<GhostObjectManager*>(NEW GhostObjectManagerDummy) : NEW W3DGhostObjectManager; } | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Better name this There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I do wonder, why is a cast necessary for the first pointer but not the second? |
||
|
|
||
| }; | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dummy