diff --git a/src/Core/Universe.h b/src/Core/Universe.h index 62493454..3a431f46 100644 --- a/src/Core/Universe.h +++ b/src/Core/Universe.h @@ -179,7 +179,8 @@ enum NSString *currentMessage; OOTimeAbsolute messageRepeatTime; - + OOTimeAbsolute countdown_messageRepeatTime; // Getafix(4/Aug/2010) - Quickfix countdown messages colliding with weapon overheat messages. + // For proper handling of message dispatching, code refactoring is needed. GuiDisplayGen *gui; GuiDisplayGen *message_gui; GuiDisplayGen *comm_log_gui; diff --git a/src/Core/Universe.m b/src/Core/Universe.m index af463fa8..31e5819e 100644 --- a/src/Core/Universe.m +++ b/src/Core/Universe.m @@ -4704,11 +4704,11 @@ OOINLINE BOOL EntityInRange(Vector p1, Entity *e2, float range) - (void) displayCountdownMessage:(NSString *) text forCount:(OOTimeDelta)count { - if (![currentMessage isEqual:text]) + if (![currentMessage isEqual:text] && universal_time >= countdown_messageRepeatTime) { if (currentMessage) [currentMessage release]; currentMessage = [text retain]; - + countdown_messageRepeatTime=universal_time + count; [message_gui printLineNoScroll:text align:GUI_ALIGN_CENTER color:[OOColor yellowColor] fadeTime:count key:nil addToArray:nil]; } }