projects
/
rocksndiamonds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1c857c9
)
fixed bug in counter wait function
author
Holger Schemel
<info@artsoft.org>
Mon, 18 May 2015 06:58:04 +0000
(08:58 +0200)
committer
Holger Schemel
<info@artsoft.org>
Mon, 18 May 2015 06:58:04 +0000
(08:58 +0200)
src/libgame/misc.c
patch
|
blob
|
history
diff --git
a/src/libgame/misc.c
b/src/libgame/misc.c
index 6d80620b99c61c1ebad5f5c5445c153ec6e5887d..cf387ceb9234585a7ea7a2ed850ddffc3d85fb0e 100644
(file)
--- a/
src/libgame/misc.c
+++ b/
src/libgame/misc.c
@@
-427,7
+427,9
@@
int WaitUntilDelayReached(unsigned int *counter_var, unsigned int delay)
break;
}
- if (*counter_var != 0 && actual_counter >= *counter_var + delay)
+ if (*counter_var != 0 &&
+ delay != 0 &&
+ actual_counter >= *counter_var + delay)
{
int lag = actual_counter - (*counter_var + delay);
int delay2 = (delay + 1) / 2;