diff options
| author | oroborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e> | 2008-03-25 21:23:08 +0000 |
|---|---|---|
| committer | oroborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e> | 2008-03-25 21:23:08 +0000 |
| commit | ca324c005d511752b2bcdc21fdc7d6c46597469b (patch) | |
| tree | 050b5b836f26390ef44f67a2208fe47c161e8b62 /src/sdl_udp.c | |
| parent | 6d43cfd6df88e1b6e94c63f9e8e9eb6775bdbf42 (diff) | |
- drobne upravy v kode
- vymazanie duplivitneho kodu pri "hre s GUI" a "public serverom"
git-svn-id: http://opensvn.csie.org/tuxanci_ng@36 0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e
Diffstat (limited to 'src/sdl_udp.c')
| -rw-r--r-- | src/sdl_udp.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/sdl_udp.c b/src/sdl_udp.c index e6b669a..f4888ad 100644 --- a/src/sdl_udp.c +++ b/src/sdl_udp.c @@ -124,6 +124,10 @@ int writeSdlUdpSocket(sock_sdl_udp_t *src, sock_sdl_udp_t *dst, void *address, i assert( src != NULL ); assert( address != NULL ); +#ifdef DEBUG_LOST_PACKET + if( rand() % DEBUG_LOST_PACKET == 0 )return size; +#endif + memcpy(dst->packet->data, address, len); dst->packet->len = len; |