-
Notifications
You must be signed in to change notification settings - Fork 256
bugfix(gui): Convert MessageDelayMS to logic frames so the setting takes effect #3133
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
1a64013
11e92dd
038e550
6434a09
f2d5ed3
3843826
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 |
|---|---|---|
|
|
@@ -924,9 +924,22 @@ void INI::parseInGameUIDefinition( INI* ini ) | |
| { | ||
| // parse the ini weapon definition | ||
| ini->initFromINI( TheInGameUI, TheInGameUI->getFieldParse() ); | ||
| TheInGameUI->validate(); | ||
| } | ||
| } | ||
|
|
||
| //------------------------------------------------------------------------------------------------- | ||
| void InGameUI::validate() | ||
| { | ||
| #if ENABLE_GUI_HACKS | ||
| // TheSuperHackers @bugfix bobtista 02/09/2026 Correct the known retail InGameUI.ini message delay typo | ||
| if (m_messageDelayMS == 75000) | ||
| { | ||
| m_messageDelayMS = 7500; | ||
|
Comment on lines
+935
to
+938
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.
Every parsed Prompt To Fix With AIThis is a comment left during a code review.
Path: Generals/Code/GameEngine/Source/GameClient/InGameUI.cpp
Line: 935-938
Comment:
**Intentional delays are overridden**
Every parsed `InGameUI` block that sets `MessageDelayMS = 75000` is silently rewritten to `7500` when GUI hacks are enabled. Because this parser also handles layered and mod-provided InGameUI files, an intentional 75-second delay becomes 7.5 seconds, causing messages to fade roughly 67.5 seconds earlier than configured. The same issue appears in `GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cpp:964-967`. Restrict this correction to known retail source data rather than applying it to every parsed value.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
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. This also affects intentional 75000 values when GUI hacks are enabled. I’m keeping the guarded correction per Mauller’s recommendation |
||
| } | ||
| #endif | ||
| } | ||
|
|
||
| //------------------------------------------------------------------------------------------------- | ||
| namespace | ||
| { | ||
|
|
@@ -1848,7 +1861,8 @@ void InGameUI::update() | |
| // frame | ||
| // | ||
| UnsignedInt currLogicFrame = TheGameLogic->getFrame(); | ||
| const int messageTimeout = m_messageDelayMS / LOGICFRAMES_PER_SECOND / 1000; | ||
| // TheSuperHackers @bugfix bobtista 13/08/2026 Convert milliseconds to logic frames | ||
| const int messageTimeout = REAL_TO_INT_CEIL( ConvertDurationFromMsecsToFrames( (Real)max(0, m_messageDelayMS) ) ); | ||
|
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. The clamp would be a better fit in the validate function. |
||
| UnsignedByte r, g, b, a; | ||
| Int amount; | ||
| for( i = MAX_UI_MESSAGES - 1; i >= 0; i-- ) | ||
|
|
||
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.
validateMessageDelayis a better nameThere 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.
The name is probably general purpose so more things could go in there.