Countdown messages display fix
as per http://www.aegidian.org/bb/viewtopic.php?t=8314 (trunk & maintenance) git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3733 127b21dd-08f5-0310-b4b7-95ae10353056
This commit is contained in:
parent
d16dc20f0b
commit
e9935b6955
@ -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;
|
||||
|
@ -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];
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user