diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-06-01 18:45:31 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-06-01 18:45:31 +0300 |
commit | 49f27fffbe07e66a3047812a838f03d7636cc4a9 (patch) | |
tree | 68996fa1dfc002e239513af1a92d1ffd69539204 /src/net/download.cpp | |
parent | 69108c8a2892cf87a3d425b5e82e0eadbb5f7fa9 (diff) | |
download | plus-49f27fffbe07e66a3047812a838f03d7636cc4a9.tar.gz plus-49f27fffbe07e66a3047812a838f03d7636cc4a9.tar.bz2 plus-49f27fffbe07e66a3047812a838f03d7636cc4a9.tar.xz plus-49f27fffbe07e66a3047812a838f03d7636cc4a9.zip |
Add chat command /testparticle for testing particle effects on player.
Command: /testparticle particle.xml - set particle effect on player.
/testparticle - remove particle effect.
Each second it check for particle file update and reloading it if need.
Diffstat (limited to 'src/net/download.cpp')
-rw-r--r-- | src/net/download.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/net/download.cpp b/src/net/download.cpp index fad0bf6f2..a8f0e1c0c 100644 --- a/src/net/download.cpp +++ b/src/net/download.cpp @@ -125,6 +125,13 @@ unsigned long Download::fadler32(FILE *const file) return adler; } +unsigned long Download::adlerBuffer(char *buffer, int size) +{ + unsigned long adler = adler32(0L, Z_NULL, 0); + return adler32(static_cast<uInt>(adler), + reinterpret_cast<Bytef*>(buffer), size); +} + void Download::addHeader(const std::string &header) { mHeaders = curl_slist_append(mHeaders, header.c_str()); |