-
Notifications
You must be signed in to change notification settings - Fork 160
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
180d1f7
949e4c9
f8639cd
4d12a95
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 | ||||
|---|---|---|---|---|---|---|
|
|
@@ -36,6 +36,7 @@ | |||||
| // SYSTEM INCLUDES //////////////////////////////////////////////////////////// | ||||||
|
|
||||||
| // USER INCLUDES ////////////////////////////////////////////////////////////// | ||||||
| #include "Common/GlobalData.h" | ||||||
| #include "GameLogic/GameLogic.h" | ||||||
| #include "W3DDevice/GameLogic/W3DTerrainLogic.h" | ||||||
| #include "W3DDevice/GameLogic/W3DGhostObject.h" | ||||||
|
|
@@ -59,6 +60,7 @@ class W3DGameLogic : public GameLogic | |||||
|
|
||||||
| /// factory for TheTerrainLogic, called from init() | ||||||
| virtual TerrainLogic *createTerrainLogic( void ) { return NEW W3DTerrainLogic; }; | ||||||
| virtual GhostObjectManager *createGhostObjectManager(void) { return NEW W3DGhostObjectManager; } | ||||||
| // TheSuperHackers @feature bobtista 19/01/2026 Use dummy for headless mode | ||||||
| virtual GhostObjectManager *createGhostObjectManager(void) { return TheGlobalData->m_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. Unnecessary
Suggested change
Prompt To Fix With AIThis is a comment left during a code review.
Path: GeneralsMD/Code/GameEngineDevice/Include/W3DDevice/GameLogic/W3DGameLogic.h
Line: 64:64
Comment:
Unnecessary `static_cast<GhostObjectManager*>` since `GhostObjectManagerDummy` already inherits from `GhostObjectManager`
```suggestion
virtual GhostObjectManager *createGhostObjectManager(void) { return TheGlobalData->m_headless ? NEW GhostObjectManagerDummy : NEW W3DGhostObjectManager; }
```
How can I resolve this? If you propose a fix, please make it concise.
Author
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 think this is required for VC6, it failed to build without it |
||||||
|
|
||||||
| }; | ||||||
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.
Unnecessary
static_cast<GhostObjectManager*>sinceGhostObjectManagerDummyalready inherits fromGhostObjectManagerPrompt To Fix With AI