diff options
| author | oroborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e> | 2008-03-16 17:13:39 +0000 |
|---|---|---|
| committer | oroborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e> | 2008-03-16 17:13:39 +0000 |
| commit | 932b71bf3e486fc38002bbcfba606085e48b6434 (patch) | |
| tree | 17b317eb251e856da389e2b34f4ca9ff878efb27 /src/publicServer.c | |
| parent | 642a85360b3846b9e84c8a0e9671e23686313daf (diff) | |
- aktualny stav
git-svn-id: http://opensvn.csie.org/tuxanci_ng@21 0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e
Diffstat (limited to 'src/publicServer.c')
| -rw-r--r-- | src/publicServer.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/publicServer.c b/src/publicServer.c index ae229d5..952628c 100644 --- a/src/publicServer.c +++ b/src/publicServer.c @@ -85,16 +85,25 @@ void findFreeSpace(int *x, int *y, int w, int h) void eventPublicServer() { - static my_time_t time = 0; + static my_time_t lastActive = 0; + my_time_t interval; + + eventNetMultiplayer(); if( time == 0 ) { - time = getMyTime(); + lastActive = getMyTime(); } - printf("time %d\n", getMyTime() - time ); + interval = getMyTime() - lastActive; + + if( interval < 50 ) + { + return; + } - time = getMyTime(); + printf("interval = %d\n", interval); + lastActive = getMyTime(); eventConflictTuxWithTeleport(arena->listTux, arena->listTeleport); eventConflictTuxWithShot(arena->listTux, arena->listShot); @@ -109,7 +118,6 @@ void eventPublicServer() eventListTux(arena->listTux); eventTimer(); - eventNetMultiplayer(); } void quitPublicServer() |