Fixing issues with very small timeouts in network games.

This commit is contained in:
lotodore
2011-02-06 14:03:45 +00:00
parent e823b7b788
commit f5c3b2d1c0
+4 -1
View File
@@ -31,6 +31,8 @@ MyTimeoutLabel::~MyTimeoutLabel()
void MyTimeoutLabel::startTimeOutAnimation(int secs, bool beep) { void MyTimeoutLabel::startTimeOutAnimation(int secs, bool beep) {
if (secs >= 4) // smaller timeouts may lead to errors/endless loops below
{
isBeepPlayed = FALSE; isBeepPlayed = FALSE;
isBeep = beep; isBeep = beep;
@@ -59,9 +61,10 @@ void MyTimeoutLabel::startTimeOutAnimation(int secs, bool beep) {
realTimer.reset(); realTimer.reset();
realTimer.start(); realTimer.start();
// std::cout << timerIntervall << endl; // std::cout << timerIntervall << endl;
timeOutAnimation = TRUE; timeOutAnimation = TRUE;
timeOutAnimationTimer->start(timerIntervall); timeOutAnimationTimer->start(timerIntervall);
}
} }
void MyTimeoutLabel::startTimeOutAnimationNow() { void MyTimeoutLabel::startTimeOutAnimationNow() {