diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-09-09 22:10:53 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-09-09 22:11:30 +0300 |
commit | 703a3c4df3732e3e88559147001260f3355d42d6 (patch) | |
tree | fcaf8919cf734429374e4bb9a83b2b4a33835d1d /src/client.cpp | |
parent | 3a875a0026936d4bcb3bd1c2b6e8ac547cd5e27e (diff) | |
download | manaverse-703a3c4df3732e3e88559147001260f3355d42d6.tar.gz manaverse-703a3c4df3732e3e88559147001260f3355d42d6.tar.bz2 manaverse-703a3c4df3732e3e88559147001260f3355d42d6.tar.xz manaverse-703a3c4df3732e3e88559147001260f3355d42d6.zip |
Continue fix for shadow variables/methods errors.
Diffstat (limited to 'src/client.cpp')
-rw-r--r-- | src/client.cpp | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/src/client.cpp b/src/client.cpp index b9e9735c9..be1c00197 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -196,16 +196,16 @@ Uint32 nextSecond(Uint32 interval, void *param A_UNUSED) * @return the elapsed time in milliseconds * between two tick values. */ -int get_elapsed_time(int start_time) +int get_elapsed_time(int startTime) { - if (start_time <= tick_time) + if (startTime <= tick_time) { - return (tick_time - start_time) * MILLISECONDS_IN_A_TICK; + return (tick_time - startTime) * MILLISECONDS_IN_A_TICK; } else { - return (tick_time + (MAX_TICK_VALUE - start_time)) - * MILLISECONDS_IN_A_TICK; + return (tick_time + (MAX_TICK_VALUE - startTime)) + * MILLISECONDS_IN_A_TICK; } } @@ -845,10 +845,10 @@ int Client::exec() if (mState != mOldState) { { - Mana::Event event(EVENT_STATECHANGE); - event.setInt("oldState", mOldState); - event.setInt("newState", mState); - Mana::Event::trigger(CHANNEL_CLIENT, event); + Mana::Event evt(EVENT_STATECHANGE); + evt.setInt("oldState", mOldState); + evt.setInt("newState", mState); + Mana::Event::trigger(CHANNEL_CLIENT, evt); } if (mOldState == STATE_GAME) @@ -1046,10 +1046,10 @@ int Client::exec() if (!BeingInfo::unknown) BeingInfo::unknown = new BeingInfo; - Mana::Event event(EVENT_STATECHANGE); - event.setInt("newState", STATE_LOAD_DATA); - event.setInt("oldState", mOldState); - Mana::Event::trigger(CHANNEL_CLIENT, event); + Mana::Event evt(EVENT_STATECHANGE); + evt.setInt("newState", STATE_LOAD_DATA); + evt.setInt("oldState", mOldState); + Mana::Event::trigger(CHANNEL_CLIENT, evt); // Load XML databases ColorDB::load(); @@ -1733,27 +1733,27 @@ void Client::initScreenshotDir() } } -void Client::accountLogin(LoginData *loginData) +void Client::accountLogin(LoginData *data) { - if (!loginData) + if (!data) return; - logger->log("Username is %s", loginData->username.c_str()); + logger->log("Username is %s", data->username.c_str()); // Send login infos - if (loginData->registerLogin) - Net::getLoginHandler()->registerAccount(loginData); + if (data->registerLogin) + Net::getLoginHandler()->registerAccount(data); else - Net::getLoginHandler()->loginAccount(loginData); + Net::getLoginHandler()->loginAccount(data); // Clear the password, avoids auto login when returning to login - loginData->password = ""; + data->password = ""; // TODO This is not the best place to save the config, but at least better // than the login gui window - if (loginData->remember) - serverConfig.setValue("username", loginData->username); - serverConfig.setValue("remember", loginData->remember); + if (data->remember) + serverConfig.setValue("username", data->username); + serverConfig.setValue("remember", data->remember); } bool Client::copyFile(std::string &configPath, std::string &oldConfigPath) @@ -1805,7 +1805,7 @@ void Client::storeSafeParameters() int width; int height; std::string font; - std::string boldFont; + std::string bFont; std::string particleFont; std::string helpFont; std::string secureFont; @@ -1833,7 +1833,7 @@ void Client::storeSafeParameters() height = config.getIntValue("screenheight"); font = config.getStringValue("font"); - boldFont = config.getStringValue("boldFont"); + bFont = config.getStringValue("boldFont"); particleFont = config.getStringValue("particleFont"); helpFont = config.getStringValue("helpFont"); secureFont = config.getStringValue("secureFont"); @@ -1878,7 +1878,7 @@ void Client::storeSafeParameters() config.setValue("screenwidth", width); config.setValue("screenheight", height); config.setValue("font", font); - config.setValue("boldFont", boldFont); + config.setValue("boldFont", bFont); config.setValue("particleFont", particleFont); config.setValue("helpFont", helpFont); config.setValue("secureFont", secureFont); |