diff options
author | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2012-04-02 20:35:41 +0200 |
---|---|---|
committer | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2012-04-02 20:35:41 +0200 |
commit | 31010d6d3ba6600860a9f6dd925ac3d8e3f2c830 (patch) | |
tree | 88e0c06f16f00e635860f1ecc7d65d8e0cf4d1de /src/net | |
parent | bbb4c1c61863b9032af2291bff20814733995391 (diff) | |
parent | 9015268746ed9052a9dc83839b2834b5feeab166 (diff) | |
download | mana-31010d6d3ba6600860a9f6dd925ac3d8e3f2c830.tar.gz mana-31010d6d3ba6600860a9f6dd925ac3d8e3f2c830.tar.bz2 mana-31010d6d3ba6600860a9f6dd925ac3d8e3f2c830.tar.xz mana-31010d6d3ba6600860a9f6dd925ac3d8e3f2c830.zip |
Merge branch '0.6'
Diffstat (limited to 'src/net')
-rw-r--r-- | src/net/download.cpp | 8 | ||||
-rw-r--r-- | src/net/manaserv/connection.h | 1 | ||||
-rw-r--r-- | src/net/tmwa/beinghandler.cpp | 5 |
3 files changed, 8 insertions, 6 deletions
diff --git a/src/net/download.cpp b/src/net/download.cpp index 988cc662..bccba7a3 100644 --- a/src/net/download.cpp +++ b/src/net/download.cpp @@ -220,9 +220,11 @@ int Download::downloadThread(void *ptr) curl_easy_setopt(d->mCurl, CURLOPT_WRITEDATA, file); } - curl_easy_setopt(d->mCurl, CURLOPT_USERAGENT, - strprintf(PACKAGE_EXTENDED_VERSION, - branding.getStringValue("appShort").c_str()).c_str()); + const std::string appShort = branding.getStringValue("appShort"); + const std::string userAgent = + strprintf(PACKAGE_EXTENDED_VERSION, appShort.c_str()); + + curl_easy_setopt(d->mCurl, CURLOPT_USERAGENT, userAgent.c_str()); curl_easy_setopt(d->mCurl, CURLOPT_ERRORBUFFER, d->mError); curl_easy_setopt(d->mCurl, CURLOPT_URL, d->mUrl.c_str()); curl_easy_setopt(d->mCurl, CURLOPT_NOPROGRESS, 0); diff --git a/src/net/manaserv/connection.h b/src/net/manaserv/connection.h index 954849de..42932c47 100644 --- a/src/net/manaserv/connection.h +++ b/src/net/manaserv/connection.h @@ -23,6 +23,7 @@ #define NET_MANASERV_CONNECTION_H #include <enet/enet.h> +#include "net/manaserv/network.h" #include <iosfwd> diff --git a/src/net/tmwa/beinghandler.cpp b/src/net/tmwa/beinghandler.cpp index c94e08df..b7d84685 100644 --- a/src/net/tmwa/beinghandler.cpp +++ b/src/net/tmwa/beinghandler.cpp @@ -427,9 +427,8 @@ void BeingHandler::handleMessage(Net::MessageIn &msg) if (player_relations.hasPermission(dstBeing, PlayerRelation::EMOTE)) { - const int fx = EmoteDB::get(msg.readInt8())->effect; - //TODO: figure out why the -1 is needed - effectManager->trigger(fx - 1, dstBeing); + const int fx = EmoteDB::get(msg.readInt8() - 1)->effect; + effectManager->trigger(fx, dstBeing); } break; |