# HG changeset patch # User unc0rr # Date 1369853557 -14400 # Node ID 7f04ad2cda541aeac613c8e0d57968c80a40b0cd # Parent e095e3023682a12e29ee3016e2063e7dd5578ab7# Parent 387e440093b740ff872dbabb585b9e0ae4d781fa merge diff -r e095e3023682 -r 7f04ad2cda54 .hgignore --- a/.hgignore Sun Apr 21 01:36:08 2013 +0200 +++ b/.hgignore Wed May 29 22:52:37 2013 +0400 @@ -3,6 +3,7 @@ glob:moc_*.cxx glob:qrc_*.cxx glob:*.o +glob:*.a glob:*.qm glob:Makefile glob:bin @@ -54,8 +55,8 @@ glob:project_files/Android-build/SDL-android-project/.* glob:project_files/Android-build/out glob:project_files/Android-build/Makefile.android -glob:hedgewars-build-desktop-Qt_4_7_4_for_Desktop_-_MinGW_4_4__Qt_SDK__Debug -glob:hedgewars-build-desktop-Qt_4_7_4_for_Desktop_-_MinGW_4_4__Qt_SDK__Release +glob:hedgewars-build-desktop-Qt* +glob:hedgewars-build-desktop-Qt* glob:*.depends glob:tools/build_windows_koda.bat glob:share/hedgewars/Data/misc/hwengine.desktop @@ -63,3 +64,5 @@ glob:_CPack_Packages/ glob:version_info.txt glob:*.tar.* +glob:*.or +glob:*.res \ No newline at end of file diff -r e095e3023682 -r 7f04ad2cda54 CMakeLists.txt --- a/CMakeLists.txt Sun Apr 21 01:36:08 2013 +0200 +++ b/CMakeLists.txt Wed May 29 22:52:37 2013 +0400 @@ -211,6 +211,10 @@ #set default flags values for all projects (unless MINIMAL_FLAGS is true) if(NOT ${MINIMAL_FLAGS}) + if(WINDOWS) + #this flags prevents a few dll hell problems + set(CMAKE_C_FLAGS "-static-libgcc ${CMAKE_C_FLAGS}") + endif(WINDOWS) set(CMAKE_C_FLAGS "-pipe ${CMAKE_C_FLAGS}") set(CMAKE_C_FLAGS_RELEASE "-w -Os -fomit-frame-pointer ${CMAKE_C_FLAGS_RELEASE}") set(CMAKE_C_FLAGS_DEBUG "-Wall -O0 -g -DDEBUG ${CMAKE_C_FLAGS_DEBUG}") diff -r e095e3023682 -r 7f04ad2cda54 ChangeLog.txt --- a/ChangeLog.txt Sun Apr 21 01:36:08 2013 +0200 +++ b/ChangeLog.txt Wed May 29 22:52:37 2013 +0400 @@ -2,15 +2,39 @@ * bugfixes 0.9.18 -> 0.9.19: - + new icegun weapon - + main graphical user interface overhaul - + up and down keys navigate in chat history - + several commands from chat available - + support hwplay:// scheme syntax - + supply full revision and hash information in version tag - + better set of options for driving engine - * rope sliding - * forbid kicking on 1v1 matches + + New Freezer weapon - freezes terrain, water, hedgehogs, mines, cases, explosives + + Saucer can aim weapons and fire underwater + + Main graphical user interface overhaul + + Splashscreen on Windows *_* + + Up and down keys navigate in chat history + + Several commands from chat available + + Support hwplay:// scheme syntax + + Supply full revision and hash information in version tag + + Better set of options for driving engine + + Downloadable content can now be stored in packages for easy uninstall + + Lua scripts can load a sidecar overlay package of game resources + + Math improvements for better performance/reliability + + Smarter AI - now uses drill rocket accurately and is aware of barrels and dud mines. More aggressive in infinite attack, lua can tell to target specific hogs, such as in Mutant + + New fort, Steel Tower + + New theme, Fruit + + New hats - some national ones, Portal, harlequin, more animals... + + New maps based on StarBound. SB_Bones, SB_Crystal, SB_Grassy, SB_Grove, SB_Haunty, SB_Oaks, SB_Shrooms, SB_Tentacles + + Translation updates - Turkish, French, German, Japanese, Portuguese, Italian, Russian - Campaign french should work correctly now + + Theme object masks + + Easier weapon selection in shoppa. F1 will select from F5 if there are no weps in F1-F4 + + Cleaver radius shrunk to improve usability on horizontal throws + + Map hog limit is now just a suggestion, not enforced + + Static map theme is now just the default, can be changed + + Themeable static maps (provide a mask.png without a map.png) + + Split seed with '|' to keep the land shape but change the hog placement + * You can now move out of the way when throwing a sticky mine or cleaver straight up + * Rope sliding should behave more like pre-0.9.18 again + * Forbid kicking on 1v1 matches + * Desync fixes + * Fixed fort mode + * Making very large maps now works properly with targetted weapons + * ParseCommand should be safe to use in Lua now, at any time + * Fixes to many weapons. Mudball, blowtorch, explosives, cluster bomb spread, portal. 0.9.17 -> 0.9.18: diff -r e095e3023682 -r 7f04ad2cda54 QTfrontend/campaign.cpp --- a/QTfrontend/campaign.cpp Sun Apr 21 01:36:08 2013 +0200 +++ b/QTfrontend/campaign.cpp Wed May 29 22:52:37 2013 +0400 @@ -16,43 +16,12 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "campaign.h" + +#include "hwconsts.h" + #include -#include "campaign.h" -#include "gameuiconfig.h" -#include "hwconsts.h" -#include "gamecfgwidget.h" -#include "bgwidget.h" -#include "mouseoverfilter.h" -#include "tcpBase.h" - -#include "DataManager.h" - -extern QString campaign, campaignTeam; QStringList getCampMissionList(QString & campaign) { diff -r e095e3023682 -r 7f04ad2cda54 QTfrontend/campaign.h --- a/QTfrontend/campaign.h Sun Apr 21 01:36:08 2013 +0200 +++ b/QTfrontend/campaign.h Wed May 29 22:52:37 2013 +0400 @@ -19,21 +19,8 @@ #ifndef CAMPAIGN_H #define CAMPAIGN_H -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "netserver.h" -#include "game.h" -#include "ui_hwform.h" -#include "SDLInteraction.h" -#include "bgwidget.h" +#include +#include QStringList getCampMissionList(QString & campaign); unsigned int getCampProgress(QString & teamName, QString & campName); diff -r e095e3023682 -r 7f04ad2cda54 QTfrontend/gameuiconfig.cpp --- a/QTfrontend/gameuiconfig.cpp Sun Apr 21 01:36:08 2013 +0200 +++ b/QTfrontend/gameuiconfig.cpp Wed May 29 22:52:37 2013 +0400 @@ -112,7 +112,7 @@ Form->ui.pageOptions->CBFrontendMusic->setChecked(value("frontend/music", true).toBool()); Form->ui.pageOptions->SLVolume->setValue(value("audio/volume", 100).toUInt()); - QString netNick = value("net/nick", "").toString(); + QString netNick = value("net/nick", tr("Guest")+QString("%1").arg(rand())).toString(); Form->ui.pageOptions->editNetNick->setText(netNick); bool savePwd = value("net/savepassword",true).toBool(); Form->ui.pageOptions->CBSavePassword->setChecked(savePwd); @@ -521,14 +521,28 @@ setValue("net/passwordhash", QString()); setValue("net/passwordlength", 0); setValue("net/savepassword", false); //changes the savepassword value to false in order to not let the user save an empty password in PAGE_SETUP - reloadValues(); //reloads the values of PAGE_SETUP + Form->ui.pageOptions->editNetPassword->setEnabled(false); + Form->ui.pageOptions->editNetPassword->setText(""); } void GameUIConfig::setPasswordHash(const QString & passwordhash) { setValue("net/passwordhash", passwordhash); - setValue("net/passwordlength", passwordhash.size()/4); - setNetPasswordLength(passwordhash.size()/4); //the hash.size() is divided by 4 let PAGE_SETUP use a reasonable number of stars to display the PW + if (passwordhash!=NULL && passwordhash.size() > 0) + { + // WTF - the whole point of "password length" was to have the dots match what they typed. This is totally pointless, and all hashes are the same length for a given hash so might as well hardcode it. + // setValue("net/passwordlength", passwordhash.size()/4); + setValue("net/passwordlength", 8); + + // More WTF + //setNetPasswordLength(passwordhash.size()/4); //the hash.size() is divided by 4 let PAGE_SETUP use a reasonable number of stars to display the PW + setNetPasswordLength(8); + } + else + { + setValue("net/passwordlength", 0); + setNetPasswordLength(0); + } } QString GameUIConfig::passwordHash() diff -r e095e3023682 -r 7f04ad2cda54 QTfrontend/hwform.cpp --- a/QTfrontend/hwform.cpp Sun Apr 21 01:36:08 2013 +0200 +++ b/QTfrontend/hwform.cpp Wed May 29 22:52:37 2013 +0400 @@ -153,7 +153,7 @@ config = new GameUIConfig(this, DataManager::instance().settingsFileName()); frontendEffects = config->value("frontend/effects", true).toBool(); - playerHash = QString(QCryptographicHash::hash(config->value("net/nick","").toString().toUtf8(), QCryptographicHash::Md5).toHex()); + playerHash = QString(QCryptographicHash::hash(config->value("net/nick",tr("Guest")+QString("%1").arg(rand())).toString().toUtf8(), QCryptographicHash::Md5).toHex()); ui.pageRoomsList->setSettings(config); ui.pageNetGame->setSettings(config); @@ -319,8 +319,6 @@ connect(ui.pageMain->BtnNetLocal, SIGNAL(clicked()), this, SLOT(GoToNet())); connect(ui.pageMain->BtnNetOfficial, SIGNAL(clicked()), this, SLOT(NetConnectOfficialServer())); - connect(ui.pageConnecting, SIGNAL(cancelConnection()), this, SLOT(GoBack())); - connect(ui.pageVideos, SIGNAL(goBack()), config, SLOT(SaveVideosOptions())); ammoSchemeModel = new AmmoSchemeModel(this, cfgdir->absolutePath() + "/schemes.ini"); @@ -472,7 +470,7 @@ if(teamslist.empty()) { - QString currentNickName = config->value("net/nick","").toString().toUtf8(); + QString currentNickName = config->value("net/nick",tr("Guest")+QString("%1").arg(rand())).toString().toUtf8(); QString teamName; if (currentNickName.isEmpty()) @@ -598,6 +596,10 @@ #endif qDebug("Leaving %s, entering %s", qPrintable(stringifyPageId(lastid)), qPrintable(stringifyPageId(id))); + if (lastid == ID_PAGE_MAIN) + { + ui.pageMain->resetNetworkChoice(); + } // pageEnter and pageLeave events ((AbstractPage*)ui.Pages->widget(lastid))->triggerPageLeave(); @@ -1373,13 +1375,11 @@ connect(hwnet, SIGNAL(configAsked()), ui.pageNetGame->pGameCFG, SLOT(fullNetConfig())); //nick and pass stuff - QString nickname = config->value("net/nick", "").toString(); + hwnet->m_private_game = !(hostName == NETGAME_DEFAULT_SERVER && port == NETGAME_DEFAULT_PORT); + if (hwnet->m_private_game == false && AskForNickAndPwd() != 0) + return; - hwnet->m_private_game = !(hostName == NETGAME_DEFAULT_SERVER && port == NETGAME_DEFAULT_PORT); - if (hwnet->m_private_game == false) - if (AskForNickAndPwd() != 0) - return; - + QString nickname = config->value("net/nick",tr("Guest")+QString("%1").arg(rand())).toString(); ui.pageRoomsList->setUser(nickname); ui.pageNetGame->setUser(nickname); @@ -1392,16 +1392,18 @@ config->clearTempHash(); //initialize - QString hash = config->passwordHash(); - QString temphash = config->tempHash(); - QString nickname = config->value("net/nick", "").toString(); + QString hash; + QString temphash; + QString nickname; QString password; - //if something from login is missing, start dialog loop - if (nickname.isEmpty() || hash.isEmpty()) - { - while (nickname.isEmpty() || (hash.isEmpty() && temphash.isEmpty())) //while a nickname, or both hashes are missing - { + do { + nickname = config->value("net/nick",tr("Guest")+QString("%1").arg(rand())).toString(); + hash = config->passwordHash(); + temphash = config->tempHash(); + + //if something from login is missing, start dialog loop + if (nickname.isEmpty() || hash.isEmpty()) { //open dialog HWPasswordDialog * pwDialog = new HWPasswordDialog(this); // make the "new account" button dialog open a browser with the registration page @@ -1418,62 +1420,54 @@ if (pwDialog->exec() != QDialog::Accepted) { delete pwDialog; GoBack(); - return -1; + break; } //set nick and pass from the dialog nickname = pwDialog->leNickname->text(); password = pwDialog->lePassword->text(); + bool save = pwDialog->cbSave->isChecked(); + //clean up + delete pwDialog; //check the nickname variable if (nickname.isEmpty()) { int retry = RetryDialog(tr("Hedgewars - Empty nickname"), tr("No nickname supplied.")); GoBack(); - delete pwDialog; if (retry) { if (hwnet->m_private_game) { QStringList list = hwnet->getHost().split(":"); NetConnectServer(list.at(0), list.at(1).toShort()); } else NetConnectOfficialServer(); - } - return -1; + } + break; //loop restart + } else { + //update nickname if it's fine + config->setValue("net/nick", nickname); + config->updNetNick(); } - if (!password.isEmpty()) { + //check the password variable + if (password.isEmpty()) { + config->clearPasswordHash(); + break; + } else { //calculate temphash and set it into config temphash = QCryptographicHash::hash(password.toUtf8(), QCryptographicHash::Md5).toHex(); config->setTempHash(temphash); //if user wants to save password - bool save = pwDialog->cbSave->isChecked(); config->setValue("net/savepassword", save); - if (save) // user wants to save password - { + if (save) { + // user wants to save password ui.pageOptions->CBSavePassword->setChecked(true); config->setPasswordHash(temphash); } } - else { - delete pwDialog; - config->setValue("net/nick", nickname); - config->updNetNick(); - config->clearPasswordHash(); - break; - } - - delete pwDialog; + } + } while (nickname.isEmpty() || (hash.isEmpty() && temphash.isEmpty())); //while a nickname, or both hashes are missing - //update nickname - config->setValue("net/nick", nickname); - config->updNetNick(); - - //and all the variables - hash = config->passwordHash(); - temphash = config->tempHash(); - nickname = config->value("net/nick", "").toString(); - } - } return 0; } @@ -1546,7 +1540,7 @@ if (retry) { if (hwnet->m_private_game) { QStringList list = hwnet->getHost().split(":"); - NetConnectServer(list.at(0), list.at(1).toShort()); + NetConnectServer(list.at(0), list.at(1).toUInt()); } else NetConnectOfficialServer(); } diff -r e095e3023682 -r 7f04ad2cda54 QTfrontend/main.cpp --- a/QTfrontend/main.cpp Sun Apr 21 01:36:08 2013 +0200 +++ b/QTfrontend/main.cpp Wed May 29 22:52:37 2013 +0400 @@ -268,8 +268,13 @@ QString cc = settings.value("misc/locale", QString()).toString(); if (cc.isEmpty()) - cc = HWApplication::keyboardInputLocale().name(); - // QLocale::system().name() returns only "C"... + { + cc = QLocale::system().name(); + + // Fallback to current input locale if "C" locale is returned + if(cc == "C") + cc = HWApplication::keyboardInputLocale().name(); + } // load locale file into translator if (!Translator.load(QString("physfs://Locale/hedgewars_%1").arg(cc))) diff -r e095e3023682 -r 7f04ad2cda54 QTfrontend/model/ammoSchemeModel.cpp --- a/QTfrontend/model/ammoSchemeModel.cpp Sun Apr 21 01:36:08 2013 +0200 +++ b/QTfrontend/model/ammoSchemeModel.cpp Wed May 29 22:52:37 2013 +0400 @@ -194,7 +194,7 @@ << QVariant(false) // place hog 14 << QVariant(true) // shared ammo 15 << QVariant(true) // disable girders 16 - << QVariant(false) // disable land objects 17 + << QVariant(true) // disable land objects 17 << QVariant(false) // AI survival 18 << QVariant(false) // inf. attack 19 << QVariant(true) // reset weps 20 diff -r e095e3023682 -r 7f04ad2cda54 QTfrontend/net/newnetclient.cpp --- a/QTfrontend/net/newnetclient.cpp Sun Apr 21 01:36:08 2013 +0200 +++ b/QTfrontend/net/newnetclient.cpp Wed May 29 22:52:37 2013 +0400 @@ -425,8 +425,7 @@ { if (nick == mynick) { - if (isChief && !setFlag) ToggleReady(); - else emit setMyReadyStatus(setFlag); + emit setMyReadyStatus(setFlag); } m_playersModel->setFlag(nick, PlayersListModel::Ready, setFlag); } diff -r e095e3023682 -r 7f04ad2cda54 QTfrontend/res/css/qt.css --- a/QTfrontend/res/css/qt.css Sun Apr 21 01:36:08 2013 +0200 +++ b/QTfrontend/res/css/qt.css Wed May 29 22:52:37 2013 +0400 @@ -176,9 +176,15 @@ height: 10px; } +QLabel { +overflow: hidden; +} + QComboBox { border-radius: 10px; padding: 3px; +height: 18px; +overflow: hidden; } QComboBox:pressed{ border-color: white; @@ -326,4 +332,8 @@ TeamSelWidget, #gameStackContainer, #GBoxOptions { border-radius: 10px; -} \ No newline at end of file +} + +PageMultiplayer TeamSelWidget { +min-height: 500px; +} diff -r e095e3023682 -r 7f04ad2cda54 QTfrontend/res/xml/tips.xml --- a/QTfrontend/res/xml/tips.xml Sun Apr 21 01:36:08 2013 +0200 +++ b/QTfrontend/res/xml/tips.xml Wed May 29 22:52:37 2013 +0400 @@ -46,6 +46,7 @@ Like Hedgewars? Become a fan on Facebook or follow us on Twitter Feel free to draw your own graves, hats, flags or even maps and themes! But note that you'll have to share them somewhere to use them online. Keep your video card drivers up to date to avoid issues playing the game. + Heads or tails? Type '/rnd' in lobby and you'll find out. Also '/rnd rock paper scissors' works! You're able to associate Hedgewars related files (savegames and demo recordings) with the game to launch them right from your favorite file or internet browser. The version of Hedgewars supports Xfire. Make sure to add Hedgewars to its game list so your friends can see you playing. diff -r e095e3023682 -r 7f04ad2cda54 QTfrontend/ui/page/pagegamestats.cpp --- a/QTfrontend/ui/page/pagegamestats.cpp Sun Apr 21 01:36:08 2013 +0200 +++ b/QTfrontend/ui/page/pagegamestats.cpp Wed May 29 22:52:37 2013 +0400 @@ -101,11 +101,22 @@ QLayout * PageGameStats::footerLayoutDefinition() { QHBoxLayout * bottomLayout = new QHBoxLayout(); + + mainNote = new QLabel(this); + mainNote->setAlignment(Qt::AlignHCenter | Qt::AlignVCenter); + mainNote->setWordWrap(true); + + bottomLayout->addWidget(mainNote, 0); + bottomLayout->setStretch(0,1); - btnRestart = addButton(":/res/Start.png", bottomLayout, 0, true); - btnSave = addButton(":/res/Save.png", bottomLayout, 0, true); + btnRestart = addButton(":/res/Start.png", bottomLayout, 1, true); + btnRestart->setWhatsThis(tr("Play again")); + btnRestart->setFixedWidth(58); + btnRestart->setFixedHeight(81); + btnRestart->setStyleSheet("QPushButton{margin-top:24px}"); + btnSave = addButton(":/res/Save.png", bottomLayout, 2, true); + btnSave->setWhatsThis(tr("Save")); btnSave->setStyleSheet("QPushButton{margin: 24px 0 0 0;}"); - bottomLayout->setAlignment(btnSave, Qt::AlignRight | Qt::AlignBottom); return bottomLayout; } diff -r e095e3023682 -r 7f04ad2cda54 QTfrontend/ui/page/pagegamestats.h --- a/QTfrontend/ui/page/pagegamestats.h Sun Apr 21 01:36:08 2013 +0200 +++ b/QTfrontend/ui/page/pagegamestats.h Wed May 29 22:52:37 2013 +0400 @@ -45,6 +45,7 @@ QPushButton *btnSave; QPushButton *btnRestart; + QLabel *mainNote; QLabel *labelGameStats; QLabel *labelGameWin; QLabel *labelGameRank; diff -r e095e3023682 -r 7f04ad2cda54 QTfrontend/ui/page/pagemain.cpp --- a/QTfrontend/ui/page/pagemain.cpp Sun Apr 21 01:36:08 2013 +0200 +++ b/QTfrontend/ui/page/pagemain.cpp Wed May 29 22:52:37 2013 +0400 @@ -120,8 +120,8 @@ void PageMain::connectSignals() { connect(BtnNet, SIGNAL(clicked()), this, SLOT(toggleNetworkChoice())); - connect(BtnNetLocal, SIGNAL(clicked()), this, SLOT(toggleNetworkChoice())); - connect(BtnNetOfficial, SIGNAL(clicked()), this, SLOT(toggleNetworkChoice())); + //connect(BtnNetLocal, SIGNAL(clicked()), this, SLOT(toggleNetworkChoice())); + //connect(BtnNetOfficial, SIGNAL(clicked()), this, SLOT(toggleNetworkChoice())); // TODO: add signal-forwarding required by (currently missing) encapsulation } @@ -189,3 +189,10 @@ if (visible) BtnNet->setIcon(originalNetworkIcon); else BtnNet->setIcon(disabledNetworkIcon); } + +void PageMain::resetNetworkChoice() +{ + BtnNetLocal->setVisible(false); + BtnNetOfficial->setVisible(false); + BtnNet->setIcon(originalNetworkIcon); +} diff -r e095e3023682 -r 7f04ad2cda54 QTfrontend/ui/page/pagemain.h --- a/QTfrontend/ui/page/pagemain.h Sun Apr 21 01:36:08 2013 +0200 +++ b/QTfrontend/ui/page/pagemain.h Wed May 29 22:52:37 2013 +0400 @@ -29,6 +29,7 @@ public: PageMain(QWidget * parent = 0); + void resetNetworkChoice(); QPushButton * BtnSinglePlayer; QPushButton * BtnNet; diff -r e095e3023682 -r 7f04ad2cda54 QTfrontend/ui/page/pageoptions.cpp --- a/QTfrontend/ui/page/pageoptions.cpp Sun Apr 21 01:36:08 2013 +0200 +++ b/QTfrontend/ui/page/pageoptions.cpp Wed May 29 22:52:37 2013 +0400 @@ -587,11 +587,12 @@ CBLanguage = new QComboBox(groupMisc); groupMisc->layout()->addWidget(CBLanguage, 0, 1); QStringList locs = DataManager::instance().entryList("Locale", QDir::Files, QStringList("hedgewars_*.qm")); - CBLanguage->addItem(QComboBox::tr("(System default)"), QString("")); + CBLanguage->addItem(QComboBox::tr("(System default)"), QString()); for(int i = 0; i < locs.count(); i++) { - QLocale loc(locs[i].replace(QRegExp("hedgewars_(.*)\\.qm"), "\\1")); - CBLanguage->addItem(QLocale::languageToString(loc.language()) + " (" + QLocale::countryToString(loc.country()) + ")", loc.name()); + QString lname = locs[i].replace(QRegExp("hedgewars_(.*)\\.qm"), "\\1"); + QLocale loc(lname); + CBLanguage->addItem(QLocale::languageToString(loc.language()) + " (" + QLocale::countryToString(loc.country()) + ")", lname); } QLabel *restartNoticeLabel = new QLabel(groupMisc); diff -r e095e3023682 -r 7f04ad2cda54 QTfrontend/ui/page/pageroomslist.cpp --- a/QTfrontend/ui/page/pageroomslist.cpp Sun Apr 21 01:36:08 2013 +0200 +++ b/QTfrontend/ui/page/pageroomslist.cpp Wed May 29 22:52:37 2013 +0400 @@ -28,6 +28,7 @@ #include #include #include +#include #include @@ -107,7 +108,18 @@ topLayout->setRowStretch(1, 0); topLayout->setColumnStretch(3, 1); + // Rooms list and chat with splitter + m_splitter = new QSplitter(); + m_splitter->setChildrenCollapsible(false); + pageLayout->addWidget(m_splitter, 100); + // Room list + QWidget * roomsListWidget = new QWidget(this); + m_splitter->setOrientation(Qt::Vertical); + m_splitter->addWidget(roomsListWidget); + + QVBoxLayout * roomsLayout = new QVBoxLayout(roomsListWidget); + roomsLayout->setMargin(0); roomsList = new RoomTableView(this); roomsList->setSelectionBehavior(QAbstractItemView::SelectRows); @@ -118,7 +130,7 @@ roomsList->setSelectionMode(QAbstractItemView::SingleSelection); roomsList->setStyleSheet("QTableView { border-top-left-radius: 0px; }"); roomsList->setFocusPolicy(Qt::NoFocus); - pageLayout->addWidget(roomsList, 200); + roomsLayout->addWidget(roomsList, 200); // Room filters container @@ -126,9 +138,9 @@ filtersContainer->setMaximumWidth(800); filtersContainer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); - pageLayout->addSpacing(7); - pageLayout->addWidget(filtersContainer, 0, Qt::AlignHCenter); - pageLayout->addSpacing(7); + roomsLayout->addSpacing(7); + roomsLayout->addWidget(filtersContainer, 0, Qt::AlignHCenter); + roomsLayout->addSpacing(7); QHBoxLayout * filterLayout = new QHBoxLayout(filtersContainer); filterLayout->setSpacing(0); @@ -194,7 +206,7 @@ // Lobby chat chatWidget = new HWChatWidget(this, false); - pageLayout->addWidget(chatWidget, 350); + m_splitter->addWidget(chatWidget); CBRules->addItem(QComboBox::tr("Any")); @@ -251,6 +263,8 @@ void PageRoomsList::roomSelectionChanged(const QModelIndex & current, const QModelIndex & previous) { + Q_UNUSED(previous); + BtnJoin->setEnabled(current.isValid()); } @@ -732,14 +746,24 @@ bool PageRoomsList::restoreHeaderState() { - if (!m_gameSettings->contains("frontend/roomslist_header")) - return false; - return roomsList->horizontalHeader()->restoreState(QByteArray::fromBase64( - (m_gameSettings->value("frontend/roomslist_header").toByteArray()))); + if (m_gameSettings->contains("frontend/roomslist_splitter")) + { + m_splitter->restoreState(QByteArray::fromBase64( + (m_gameSettings->value("frontend/roomslist_splitter").toByteArray()))); + } + + if (m_gameSettings->contains("frontend/roomslist_header")) + { + return roomsList->horizontalHeader()->restoreState(QByteArray::fromBase64( + (m_gameSettings->value("frontend/roomslist_header").toByteArray()))); + } else return false; } void PageRoomsList::saveHeaderState() { m_gameSettings->setValue("frontend/roomslist_header", QString(roomsList->horizontalHeader()->saveState().toBase64())); + + m_gameSettings->setValue("frontend/roomslist_splitter", + QString(m_splitter->saveState().toBase64())); } diff -r e095e3023682 -r 7f04ad2cda54 QTfrontend/ui/page/pageroomslist.h --- a/QTfrontend/ui/page/pageroomslist.h Sun Apr 21 01:36:08 2013 +0200 +++ b/QTfrontend/ui/page/pageroomslist.h Wed May 29 22:52:37 2013 +0400 @@ -27,6 +27,7 @@ class QTableView; class RoomsListModel; class QSortFilterProxyModel; +class QSplitter; class RoomTableView : public QTableView { @@ -101,6 +102,7 @@ QSortFilterProxyModel * weaponsFilteredModel; QAction * showGamesInLobby; QAction * showGamesInProgress; + QSplitter * m_splitter; AmmoSchemeModel * ammoSchemeModel; diff -r e095e3023682 -r 7f04ad2cda54 QTfrontend/ui/widget/feedbackdialog.cpp --- a/QTfrontend/ui/widget/feedbackdialog.cpp Sun Apr 21 01:36:08 2013 +0200 +++ b/QTfrontend/ui/widget/feedbackdialog.cpp Wed May 29 22:52:37 2013 +0400 @@ -286,7 +286,7 @@ delete process; #endif -#if defined(__i386__) || defined(__x86_64__) +#if (!defined(Q_WS_MACX) && defined(__i386__)) || defined(__x86_64__) // cpu info quint32 registers[4]; quint32 i; diff -r e095e3023682 -r 7f04ad2cda54 QTfrontend/ui/widget/mapContainer.cpp --- a/QTfrontend/ui/widget/mapContainer.cpp Sun Apr 21 01:36:08 2013 +0200 +++ b/QTfrontend/ui/widget/mapContainer.cpp Wed May 29 22:52:37 2013 +0400 @@ -801,7 +801,7 @@ btnTheme->setFixedHeight(64); btnTheme->setIconSize(iconSize); btnTheme->setIcon(icon); - btnTheme->setText(tr("Theme: ") + current.data(Qt::DisplayRole).toString()); + btnTheme->setText(tr("Theme: %1").arg(current.data(Qt::DisplayRole).toString())); updateThemeButtonSize(); } @@ -932,5 +932,5 @@ m_theme = name; btnTheme->setIcon(QIcon()); - btnTheme->setText(tr("Theme: ") + name); + btnTheme->setText(tr("Theme: %1").arg(name)); } diff -r e095e3023682 -r 7f04ad2cda54 gameServer/Actions.hs --- a/gameServer/Actions.hs Sun Apr 21 01:36:08 2013 +0200 +++ b/gameServer/Actions.hs Wed May 29 22:52:37 2013 +0400 @@ -20,6 +20,7 @@ import Control.Exception import System.Process import Network.Socket +import System.Random ----------------------------- #if defined(OFFICIAL_SERVER) import OfficialServer.GameReplayStore @@ -206,8 +207,9 @@ rnc <- gets roomsClients newMasterId <- liftM (\ids -> fromMaybe (last . filter (/= ci) $ ids) delegateId) . io $ roomClientsIndicesM rnc ri newMaster <- io $ client'sM rnc id newMasterId + oldMasterId <- io $ room'sM rnc masterID ri + oldMaster <- io $ client'sM rnc id oldMasterId oldRoomName <- io $ room'sM rnc name ri - oldMaster <- client's nick kicked <- client's isKickedFromServer thisRoomChans <- liftM (map sendChan) $ roomClientsS ri let newRoomName = if (proto < 42) || kicked then nick newMaster else oldRoomName @@ -216,12 +218,13 @@ , name = newRoomName , isRestrictedJoins = False , isRestrictedTeams = False - , isRegisteredOnly = False - , readyPlayers = if isReady newMaster then readyPlayers r else readyPlayers r + 1}) - , ModifyClient2 newMasterId (\c -> c{isMaster = True, isReady = True}) + , isRegisteredOnly = False} + ) + , ModifyClient2 newMasterId (\c -> c{isMaster = True}) + , ModifyClient2 oldMasterId (\c -> c{isMaster = False}) , AnswerClients [sendChan newMaster] ["ROOM_CONTROL_ACCESS", "1"] - , AnswerClients thisRoomChans ["CLIENT_FLAGS", "-h", oldMaster] - , AnswerClients thisRoomChans ["CLIENT_FLAGS", "+hr", nick newMaster] + , AnswerClients thisRoomChans ["CLIENT_FLAGS", "-h", nick oldMaster] + , AnswerClients thisRoomChans ["CLIENT_FLAGS", "+h", nick newMaster] ] newRoom' <- io $ room'sM rnc id ri @@ -381,7 +384,7 @@ if p < 38 then processAction $ ByeClient $ loc "Nickname is already in use" else - processAction $ NoticeMessage NickAlreadyInUse + mapM_ processAction [NoticeMessage NickAlreadyInUse, ModifyClient $ \c -> c{nick = B.empty}] else do db <- gets (dbQueries . serverInfo) @@ -615,6 +618,12 @@ processAction $ Warning versionsStats +processAction (Random chans items) = do + let i = if null items then ["heads", "tails"] else items + n <- io $ randomRIO (0, length i - 1) + processAction $ AnswerClients chans ["CHAT", "[random]", i !! n] + + #if defined(OFFICIAL_SERVER) processAction SaveReplay = do ri <- clientRoomA diff -r e095e3023682 -r 7f04ad2cda54 gameServer/CoreTypes.hs --- a/gameServer/CoreTypes.hs Sun Apr 21 01:36:08 2013 +0200 +++ b/gameServer/CoreTypes.hs Wed May 29 22:52:37 2013 +0400 @@ -75,6 +75,7 @@ | CheckRecord | CheckFailed B.ByteString | CheckSuccess [B.ByteString] + | Random [ClientChan] [B.ByteString] type ClientChan = Chan [B.ByteString] diff -r e095e3023682 -r 7f04ad2cda54 gameServer/HWProtoCore.hs --- a/gameServer/HWProtoCore.hs Sun Apr 21 01:36:08 2013 +0200 +++ b/gameServer/HWProtoCore.hs Wed May 29 22:52:37 2013 +0400 @@ -43,12 +43,14 @@ where h ["DELEGATE", n] = handleCmd ["DELEGATE", n] h ["STATS"] = handleCmd ["STATS"] - h ["PART", msg] = handleCmd ["PART", msg] - h ["QUIT", msg] = handleCmd ["QUIT", msg] - h ["GLOBAL", msg] = do + h ("PART":m:ms) = handleCmd ["PART", B.unwords $ m:ms] + h ("QUIT":m:ms) = handleCmd ["QUIT", B.unwords $ m:ms] + h ("RND":rs) = handleCmd ("RND":rs) + h ("GLOBAL":m:ms) = do + cl <- thisClient rnc <- liftM snd ask let chans = map (sendChan . client rnc) $ allClients rnc - return [AnswerClients chans ["CHAT", "[global notice]", msg]] + return [AnswerClients chans ["CHAT", "[global notice]", B.unwords $ m:ms] | isAdministrator cl] h c = return [Warning . B.concat . L.intersperse " " $ "Unknown cmd" : c] handleCmd cmd = do @@ -72,9 +74,9 @@ let cl = rnc `client` fromJust maybeClientId let roomId = clientRoom rnc clientId let clRoom = room rnc roomId - let roomMasterSign = if isMaster cl then "@" else "" + let roomMasterSign = if isMaster cl then "+" else "" let adminSign = if isAdministrator cl then "@" else "" - let rInfo = if roomId /= lobbyId then B.concat [roomMasterSign, "room ", name clRoom] else adminSign `B.append` "lobby" + let rInfo = if roomId /= lobbyId then B.concat [adminSign, roomMasterSign, "room ", name clRoom] else adminSign `B.append` "lobby" let roomStatus = if isJust $ gameInfo clRoom then if teamsInGame cl > 0 then "(playing)" else "(spectating)" else diff -r e095e3023682 -r 7f04ad2cda54 gameServer/HWProtoInRoomState.hs --- a/gameServer/HWProtoInRoomState.hs Sun Apr 21 01:36:08 2013 +0200 +++ b/gameServer/HWProtoInRoomState.hs Wed May 29 22:52:37 2013 +0400 @@ -169,17 +169,15 @@ handleCmd_inRoom ["TOGGLE_READY"] = do cl <- thisClient chans <- roomClientsChans - if isMaster cl then - return [] - else - return [ - ModifyRoom (\r -> r{readyPlayers = readyPlayers r + (if isReady cl then -1 else 1)}), - ModifyClient (\c -> c{isReady = not $ isReady cl}), - AnswerClients chans $ if clientProto cl < 38 then - [if isReady cl then "NOT_READY" else "READY", nick cl] - else - ["CLIENT_FLAGS", if isReady cl then "-r" else "+r", nick cl] - ] + + return [ + ModifyRoom (\r -> r{readyPlayers = readyPlayers r + (if isReady cl then -1 else 1)}), + ModifyClient (\c -> c{isReady = not $ isReady cl}), + AnswerClients chans $ if clientProto cl < 38 then + [if isReady cl then "NOT_READY" else "READY", nick cl] + else + ["CLIENT_FLAGS", if isReady cl then "-r" else "+r", nick cl] + ] handleCmd_inRoom ["START_GAME"] = do @@ -350,6 +348,10 @@ else return [] +handleCmd_inRoom ("RND":rs) = do + n <- clientNick + s <- roomClientsChans + return [AnswerClients s ["CHAT", n, B.unwords $ "/rnd" : rs], Random s rs] handleCmd_inRoom ["LIST"] = return [] -- for old clients (<= 0.9.17) diff -r e095e3023682 -r 7f04ad2cda54 gameServer/HWProtoLobbyState.hs --- a/gameServer/HWProtoLobbyState.hs Sun Apr 21 01:36:08 2013 +0200 +++ b/gameServer/HWProtoLobbyState.hs Wed May 29 22:52:37 2013 +0400 @@ -144,6 +144,11 @@ else liftM ((:) (AnswerClients [clChan] ["JOINING", roomName])) $ handleCmd_lobby ["JOIN_ROOM", roomName] + +handleCmd_lobby ("RND":rs) = do + c <- liftM sendChan thisClient + return [Random [c] rs] + --------------------------- -- Administrator's stuff -- diff -r e095e3023682 -r 7f04ad2cda54 gameServer/hedgewars-server.cabal --- a/gameServer/hedgewars-server.cabal Sun Apr 21 01:36:08 2013 +0200 +++ b/gameServer/hedgewars-server.cabal Wed May 29 22:52:37 2013 +0400 @@ -22,6 +22,7 @@ bytestring, bytestring-show, network >= 2.3, + random, time, mtl >= 2, dataenc, diff -r e095e3023682 -r 7f04ad2cda54 hedgewars/ArgParsers.inc --- a/hedgewars/ArgParsers.inc Sun Apr 21 01:36:08 2013 +0200 +++ b/hedgewars/ArgParsers.inc Wed May 29 22:52:37 2013 +0400 @@ -189,12 +189,12 @@ {--prefix} 0 : PathPrefix := getStringParameter (arg, paramIndex, parseParameter); {--user-prefix} 1 : UserPathPrefix := getStringParameter (arg, paramIndex, parseParameter); {--locale} 2 : cLocaleFName := getStringParameter (arg, paramIndex, parseParameter); - {--fullscreen-width} 3 : cFullscreenWidth := getLongIntParameter(arg, paramIndex, parseParameter); - {--fullscreen-height} 4 : cFullscreenHeight := getLongIntParameter(arg, paramIndex, parseParameter); + {--fullscreen-width} 3 : cFullscreenWidth := max(getLongIntParameter(arg, paramIndex, parseParameter), cMinScreenWidth); + {--fullscreen-height} 4 : cFullscreenHeight := max(getLongIntParameter(arg, paramIndex, parseParameter), cMinScreenHeight); {--width} 5 : cWindowedWidth := max(2 * (getLongIntParameter(arg, paramIndex, parseParameter) div 2), cMinScreenWidth); {--height} 6 : cWindowedHeight := max(2 * (getLongIntParameter(arg, paramIndex, parseParameter) div 2), cMinScreenHeight); {--frame-interval} 7 : cTimerInterval := getLongIntParameter(arg, paramIndex, parseParameter); - {--volume} 8 : SetVolume ( getLongIntParameter(arg, paramIndex, parseParameter) ); + {--volume} 8 : SetVolume ( max(getLongIntParameter(arg, paramIndex, parseParameter), 0) ); {--nomusic} 9 : SetMusic ( false ); {--nosound} 10 : SetSound ( false ); {--fullscreen} 11 : cFullScreen := true; diff -r e095e3023682 -r 7f04ad2cda54 hedgewars/GSHandlers.inc --- a/hedgewars/GSHandlers.inc Sun Apr 21 01:36:08 2013 +0200 +++ b/hedgewars/GSHandlers.inc Wed May 29 22:52:37 2013 +0400 @@ -178,6 +178,12 @@ if Gear^.dY.Round > 2 then Gear^.dY.QWordValue:= 8589934592; + if (Gear^.State and gstSubmersible <> 0) and (hwRound(Gear^.Y) > cWaterLine) then + begin + Gear^.dX:= Gear^.dX * _0_999; + Gear^.dY:= Gear^.dY * _0_999 + end; + Gear^.State := Gear^.State and (not gstCollision); collV := 0; collH := 0; @@ -185,6 +191,7 @@ tdY := Gear^.dY; + // might need some testing/adjustments - just to avoid projectiles to fly forever (accelerated by wind/skips) if (hwRound(Gear^.X) < min(LAND_WIDTH div -2, -2048)) or (hwRound(Gear^.X) > max(LAND_WIDTH * 3 div 2, 6144)) then @@ -491,7 +498,11 @@ or (Gear^.Kind = gtBall) then CalcRotationDirAngle(Gear) else if (GameTicks and $1F) = 0 then - AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtSmokeTrace) + begin + if hwRound(Gear^.Y) > cWaterLine then + AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtBubble) + else AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtSmokeTrace) + end end; //////////////////////////////////////////////////////////////////////////////// @@ -508,24 +519,31 @@ exit end; if (GameTicks and $3F) = 0 then - AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtSmokeTrace); + begin + if hwRound(Gear^.Y) > cWaterLine then + AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtBubble) + else AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtSmokeTrace) + end end; //////////////////////////////////////////////////////////////////////////////// procedure doStepSnowball(Gear: PGear); var kick, i: LongInt; particle: PVisualGear; + gdX, gdY: hwFloat; begin AllInactive := false; if (GameFlags and gfMoreWind) = 0 then Gear^.dX := Gear^.dX + cWindSpeed; + gdX := Gear^.dX; + gdY := Gear^.dY; doStepFallingGear(Gear); CalcRotationDirAngle(Gear); if (Gear^.State and gstCollision) <> 0 then begin - kick:= hwRound((hwAbs(Gear^.dX)+hwAbs(Gear^.dY)) * _20); - Gear^.dY.isNegative:= not Gear^.dY.isNegative; - Gear^.dX.isNegative:= not Gear^.dX.isNegative; + kick:= hwRound((hwAbs(gdX)+hwAbs(gdY)) * _20); + Gear^.dX:= gdX; + Gear^.dY:= gdY; AmmoShove(Gear, 0, kick); for i:= 15 + kick div 10 downto 0 do begin @@ -1404,7 +1422,9 @@ //////////////////////////////////////////////////////////////////////////////// procedure doStepMine(Gear: PGear); var vg: PVisualGear; + dxdy: hwFloat; begin + if Gear^.Health = 0 then dxdy:= hwAbs(Gear^.dX)+hwAbs(Gear^.dY); if (Gear^.State and gstMoving) <> 0 then begin DeleteCI(Gear); @@ -1422,14 +1442,8 @@ doStepFallingGear(Gear); if (Gear^.Health = 0) then begin - if not Gear^.dY.isNegative and (Gear^.dY > _0_2) and (TestCollisionYwithGear(Gear, 1) <> 0) then - inc(Gear^.Damage, hwRound(Gear^.dY * _70)) - else if not Gear^.dX.isNegative and (Gear^.dX > _0_2) and TestCollisionXwithGear(Gear, 1) then - inc(Gear^.Damage, hwRound(Gear^.dX * _70)) - else if Gear^.dY.isNegative and (Gear^.dY < -_0_2) and (TestCollisionYwithGear(Gear, -1) <> 0) then - inc(Gear^.Damage, hwRound(Gear^.dY * -_70)) - else if Gear^.dX.isNegative and (Gear^.dX < -_0_2) and TestCollisionXwithGear(Gear, -1) then - inc(Gear^.Damage, hwRound(Gear^.dX * -_70)); + if (dxdy > _0_4) and (Gear^.State and gstCollision <> 0) then + inc(Gear^.Damage, hwRound(dxdy * _50)); if ((GameTicks and $FF) = 0) and (Gear^.Damage > random(30)) then begin @@ -1563,46 +1577,38 @@ /////////////////////////////////////////////////////////////////////////////// -(* -TODO -Increase damage as barrel smokes? -Try tweaking friction some more -*) procedure doStepRollingBarrel(Gear: PGear); var i: LongInt; particle: PVisualGear; + dxdy: hwFloat; begin if (Gear^.dY.QWordValue = 0) and (Gear^.dY.QWordValue = 0) and (TestCollisionYwithGear(Gear, 1) = 0) then SetLittle(Gear^.dY); Gear^.State := Gear^.State or gstAnimation; + if Gear^.Health < cBarrelHealth then Gear^.State:= Gear^.State and not gstFrozen; if ((Gear^.dX.QWordValue <> 0) or (Gear^.dY.QWordValue <> 0)) then begin DeleteCI(Gear); AllInactive := false; - if not Gear^.dY.isNegative and (Gear^.dY > _0_2) and (TestCollisionYwithGear(Gear, 1) <> 0) then + dxdy:= hwAbs(Gear^.dX)+hwAbs(Gear^.dY); + doStepFallingGear(Gear); + if (Gear^.State and gstCollision <> 0) and(dxdy > _0_4) then begin - Gear^.State := Gear^.State or gsttmpFlag; - inc(Gear^.Damage, hwRound(Gear^.dY * _70)); - for i:= min(12, hwRound(Gear^.dY*_10)) downto 0 do + if (TestCollisionYwithGear(Gear, 1) <> 0) then begin - particle := AddVisualGear(hwRound(Gear^.X) - 5 + Random(10), hwRound(Gear^.Y) + 12,vgtDust); - if particle <> nil then - particle^.dX := particle^.dX + (Gear^.dX.QWordValue / 21474836480) - end - end - else if not Gear^.dX.isNegative and (Gear^.dX > _0_2) and TestCollisionXwithGear(Gear, 1) then - inc(Gear^.Damage, hwRound(Gear^.dX * _70)) - - else if Gear^.dY.isNegative and (Gear^.dY < -_0_2) and (TestCollisionYwithGear(Gear, -1) <> 0) then - inc(Gear^.Damage, hwRound(Gear^.dY * -_70)) - - else if Gear^.dX.isNegative and (Gear^.dX < -_0_2) and TestCollisionXwithGear(Gear, -1) then - inc(Gear^.Damage, hwRound(Gear^.dX * -_70)); - - doStepFallingGear(Gear); + Gear^.State := Gear^.State or gsttmpFlag; + for i:= min(12, hwRound(dxdy*_10)) downto 0 do + begin + particle := AddVisualGear(hwRound(Gear^.X) - 5 + Random(10), hwRound(Gear^.Y) + 12,vgtDust); + if particle <> nil then + particle^.dX := particle^.dX + (Gear^.dX.QWordValue / 21474836480) + end + end; + inc(Gear^.Damage, hwRound(dxdy * _50)) + end; CalcRotationDirAngle(Gear); //CheckGearDrowning(Gear) end @@ -1641,23 +1647,19 @@ dec(Gear^.Health, Gear^.Damage); Gear^.Damage := 0; if Gear^.Health <= 0 then - Gear^.doStep := @doStepCase; - // Hand off to doStepCase for the explosion - + doStepCase(Gear); end; procedure doStepCase(Gear: PGear); var i, x, y: LongInt; k: TGearType; - exBoom: boolean; dX, dY: HWFloat; hog: PHedgehog; sparkles: PVisualGear; gi: PGear; begin k := Gear^.Kind; - exBoom := false; if (Gear^.Message and gmDestroy) > 0 then begin @@ -1670,22 +1672,54 @@ Gear^.Message := Gear^.Message and (not (gmLJump or gmHJump)); exit end; + if (k = gtExplosives) and (Gear^.Health < cBarrelHealth) then Gear^.State:= Gear^.State and not gstFrozen; + + if ((k <> gtExplosives) and (Gear^.Damage > 0)) or ((k = gtExplosives) and (Gear^.Health<=0)) then + begin + x := hwRound(Gear^.X); + y := hwRound(Gear^.Y); + hog:= Gear^.Hedgehog; + + DeleteGear(Gear); + // <-- delete gear! + + if k = gtCase then + begin + doMakeExplosion(x, y, 25, hog, EXPLAutoSound); + for i:= 0 to 63 do + AddGear(x, y, gtFlame, 0, _0, _0, 0); + end + else if k = gtExplosives then + begin + doMakeExplosion(x, y, 75, hog, EXPLAutoSound); + for i:= 0 to 31 do + begin + dX := AngleCos(i * 64) * _0_5 * (getrandomf + _1); + dY := AngleSin(i * 64) * _0_5 * (getrandomf + _1); + AddGear(x, y, gtFlame, 0, dX, dY, 0); + AddGear(x, y, gtFlame, gstTmpFlag, -dX, -dY, 0); + end + end; + exit + end; if k = gtExplosives then begin //if V > _0_03 then Gear^.State:= Gear^.State or gstAnimation; if (hwAbs(Gear^.dX) > _0_15) or ((hwAbs(Gear^.dY) > _0_15) and (hwAbs(Gear^.dX) > _0_02)) then + begin Gear^.doStep := @doStepRollingBarrel; - - if (Gear^.Health > 0) and ((Gear^.Health * 100 div cBarrelHealth) < random(90)) and ((GameTicks and $FF) = 0) then + exit; + end + else Gear^.dX:= _0; + + if ((Gear^.Health * 100 div cBarrelHealth) < random(90)) and ((GameTicks and $FF) = 0) then if (cBarrelHealth div Gear^.Health) > 2 then AddVisualGear(hwRound(Gear^.X) - 16 + Random(32), hwRound(Gear^.Y) - 2, vgtSmoke) - else - AddVisualGear(hwRound(Gear^.X) - 16 + Random(32), hwRound(Gear^.Y) - 2, vgtSmokeWhite); + else + AddVisualGear(hwRound(Gear^.X) - 16 + Random(32), hwRound(Gear^.Y) - 2, vgtSmokeWhite); dec(Gear^.Health, Gear^.Damage); Gear^.Damage := 0; - if Gear^.Health <= 0 then - exBoom := true; end else begin @@ -1737,34 +1771,6 @@ end end; - if (Gear^.Damage > 0) or exBoom then - begin - x := hwRound(Gear^.X); - y := hwRound(Gear^.Y); - hog:= Gear^.Hedgehog; - - DeleteGear(Gear); - // <-- delete gear! - - if k = gtCase then - begin - doMakeExplosion(x, y, 25, hog, EXPLAutoSound); - for i:= 0 to 63 do - AddGear(x, y, gtFlame, 0, _0, _0, 0); - end - else if k = gtExplosives then - begin - doMakeExplosion(x, y, 75, hog, EXPLAutoSound); - for i:= 0 to 31 do - begin - dX := AngleCos(i * 64) * _0_5 * (getrandomf + _1); - dY := AngleSin(i * 64) * _0_5 * (getrandomf + _1); - AddGear(x, y, gtFlame, 0, dX, dY, 0); - AddGear(x, y, gtFlame, gstTmpFlag, -dX, -dY, 0); - end - end; - exit - end; if (Gear^.dY.QWordValue <> 0) or (TestCollisionYwithGear(Gear, 1) = 0) then @@ -2416,25 +2422,24 @@ var dX, dY, gdX, gdY: hwFloat; i: LongInt; - dxn, dyn: boolean; begin AllInactive := false; - dxn := Gear^.dX.isNegative; - dyn := Gear^.dY.isNegative; + gdX := Gear^.dX; + gdY := Gear^.dY; doStepFallingGear(Gear); if (Gear^.State and gstCollision) <> 0 then begin - gdX := Gear^.dX; - gdY := Gear^.dY; doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 20, Gear^.Hedgehog, EXPLAutoSound); - - gdX.isNegative := not dxn; - gdY.isNegative := not dyn; + gdX.isNegative := not gdX.isNegative; + gdY.isNegative := not gdY.isNegative; + gdX:= gdX*_0_2; + gdY:= gdY*_0_2; + for i:= 0 to 4 do begin - dX := gdX + (GetRandomf - _0_5) * _0_03; - dY := gdY + (GetRandomf - _0_5) * _0_03; + dX := gdX + rndSign(GetRandomf) * _0_03; + dY := gdY + rndSign(GetRandomf) * _0_03; AddGear(hwRound(Gear^.X), hwRound(Gear^.Y), gtCluster, 0, dX, dY, 25); end; @@ -2443,7 +2448,11 @@ end; if (GameTicks and $3F) = 0 then - AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtSmokeTrace) + begin + if hwRound(Gear^.Y) > cWaterLine then + AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtBubble) + else AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtSmokeTrace) + end end; //////////////////////////////////////////////////////////////////////////////// @@ -2943,7 +2952,11 @@ doStepFallingGear(Gear); if (GameTicks and $3F) = 0 then - AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtSmokeTrace); + begin + if hwRound(Gear^.Y) > cWaterLine then + AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtBubble) + else AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtSmokeTrace) + end; if ((Gear^.State and gstCollision) <> 0) then begin @@ -3193,10 +3206,11 @@ move:= _0_02; fuel:= 5; end;*) - - if Gear^.Health > 0 then - begin - if (HHGear^.Message and gmUp) <> 0 then + if HHGear^.Message and gmPrecise <> 0 then + HedgehogChAngle(HHGear) + else if Gear^.Health > 0 then + begin + if HHGear^.Message and gmUp <> 0 then begin if (not HHGear^.dY.isNegative) or (HHGear^.Y > -_256) then begin @@ -3263,10 +3277,12 @@ Gear^.Tex := RenderStringTex(trmsg[sidFuel] + ': ' + inttostr(i) + '%', cWhiteColor, fntSmall) end; - if HHGear^.Message and (gmAttack or gmUp or gmPrecise or gmLeft or gmRight) <> 0 then + if (HHGear^.Message and (gmAttack or gmUp or gmLeft or gmRight) <> 0) and + (HHGear^.Message and gmPrecise = 0) then Gear^.State := Gear^.State and (not gsttmpFlag); - HHGear^.Message := HHGear^.Message and (not (gmUp or gmPrecise or gmLeft or gmRight)); + if HHGear^.Message and gmPrecise = 0 then + HHGear^.Message := HHGear^.Message and (not (gmUp or gmLeft or gmRight)); HHGear^.State := HHGear^.State or gstMoving; Gear^.X := HHGear^.X; @@ -3283,7 +3299,7 @@ if // (Gear^.Health = 0) (HHGear^.Damage <> 0) //or CheckGearDrowning(HHGear) - or (cWaterLine + 512 < hwRound(HHGear^.Y)) + or (cWaterLine + cVisibleWater * 4 < hwRound(HHGear^.Y)) or (TurnTimeLeft = 0) // allow brief ground touches - to be fair on this, might need another counter or (((GameTicks and $1FF) = 0) and (not HHGear^.dY.isNegative) and (TestCollisionYwithGear(HHGear, 1) <> 0)) @@ -5074,7 +5090,18 @@ Gear^.Tex := RenderStringTex(trmsg[sidFuel] + ': ' + inttostr(t) + '%', cWhiteColor, fntSmall) end; - if GameTicks mod 10 = 0 then dec(Gear^.Health); + if Gear^.Message and (gmUp or gmDown) <> 0 then + begin + StopSoundChan(Gear^.SoundChannel); + Gear^.SoundChannel:= -1; + if GameTicks mod 40 = 0 then dec(Gear^.Health) + end + else + begin + if Gear^.SoundChannel = -1 then + Gear^.SoundChannel := LoopSound(sndIceBeam); + if GameTicks mod 10 = 0 then dec(Gear^.Health) + end end; @@ -5091,17 +5118,6 @@ LastDamage:= nil; X:= Hedgehog^.Gear^.X; Y:= Hedgehog^.Gear^.Y; - //unfreeze all semifrozen hogs - make this generic hog cleanup -(* - iter := GearsList; - while iter <> nil do - begin - if (iter^.Kind = gtHedgehog) and - (iter^.Hedgehog^.Effects[heFrozen] and $FF = 0) then - iter^.Hedgehog^.Effects[heFrozen]:= 0; - iter:= iter^.NextGear - end -*) end; end; @@ -5116,20 +5132,22 @@ const iceRadius = 32; const iceHeight = 40; var - HHGear: PGear; + HHGear, iter: PGear; landRect: TSDL_Rect; ndX, ndY: hwFloat; - i, t, gX, gY: LongInt; + i, j, t, gX, gY: LongInt; hogs: PGearArrayS; + vg: PVisualGear; begin HHGear := Gear^.Hedgehog^.Gear; - if (Gear^.Message and gmAttack <> 0) or (Gear^.Health = 0) or (HHGear = nil) or (HHGear^.Damage <> 0) then - begin + if (Gear^.Message and gmAttack <> 0) or (Gear^.Health = 0) or (HHGear = nil) or (HHGear^.Damage <> 0) or (HHGear^.dX.QWordValue > 4294967) then + begin + StopSoundChan(Gear^.SoundChannel); DeleteGear(Gear); AfterAttack; exit - end - else if Gear^.Message and (gmUp or gmDown) = 0 then updateFuel(Gear); + end; + updateFuel(Gear); with Gear^ do begin @@ -5153,7 +5171,7 @@ if Target.X <> NoPointX then begin - CheckCollisionWithLand(Gear); + CheckCollision(Gear); if (State and gstCollision) <> 0 then begin if Timer = iceWaitCollision then @@ -5185,6 +5203,49 @@ landRect.w := min(2*iceRadius, LAND_WIDTH - landRect.x - 1); landRect.h := min(2*iceRadius, LAND_HEIGHT - landRect.y - 1); UpdateLandTexture(landRect.x, landRect.w, landRect.y, landRect.h, true); + + // Freeze nearby mines/explosives/cases too + iter := GearsList; + while iter <> nil do + begin + if (iter^.State and gstFrozen = 0) and + ((iter^.Kind = gtExplosives) or (iter^.Kind = gtCase) or (iter^.Kind = gtMine)) and + (abs(iter^.X.Round-target.x)+abs(iter^.Y.Round-target.y)+2<2*iceRadius) and (Distance(iter^.X-int2hwFloat(target.x),iter^.Y-int2hwFloat(target.y)) nil then + begin + i:= random(100) + 155; + vg^.Tint:= i shl 24 or i shl 16 or $FF shl 8 or Longword(random(200) + 55); + vg^.Angle:= random(360); + vg^.dx:= 0.001 * random(80); + vg^.dy:= 0.001 * random(80) + end + end; + PlaySound(sndHogFreeze); + iter^.State:= iter^.State or gstFrozen; + if iter^.Kind = gtMine then // dud mine block + begin + vg:= AddVisualGear(hwRound(iter^.X) - 4 + Random(8), hwRound(iter^.Y) - 4 - Random(4), vgtSmoke); + if vg <> nil then + vg^.Scale:= 0.5; + PlaySound(sndVaporize); + iter^.Health := 0; + iter^.Damage := 0; + iter^.State := iter^.State and (not gstAttacking) + end + else if iter^.Kind = gtCase then + begin + DeleteCI(iter); + AddGearCI(iter) + end + else // gtExplosives + iter^.Health:= iter^.Health + cBarrelHealth + end; + iter:= iter^.NextGear + end; // FillRoundInLandWithIce(Target.X, Target.Y, iceRadius); SetAllHHToActive; @@ -5193,10 +5254,26 @@ if (Timer = iceCollideWithWater) and ((GameTicks - Power) > groundFreezingTime) then begin + PlaySound(sndHogFreeze); DrawIceBreak(Target.X, cWaterLine - iceHeight, iceRadius, iceHeight); SetAllHHToActive; Timer := iceWaitCollision; end; +(* + Any ideas for something that would look good here? + if (Target.X <> NoPointX) and ((Timer = iceCollideWithGround) or (Timer = iceCollideWithWater)) and (GameTicks mod max((groundFreezingTime-((GameTicks - Power)*2)),2) = 0) then //and CheckLandValue(Target.X, Target.Y, lfIce) then + begin + vg:= AddVisualGear(Target.X+random(20)-10, Target.Y+random(40)-10, vgtDust, 1); + if vg <> nil then + begin + i:= random(100) + 155; + vg^.Tint:= IceColor or $FF; + vg^.Angle:= random(360); + vg^.dx:= 0.001 * random(80); + vg^.dy:= 0.001 * random(80) + end + end; +*) // freeze nearby hogs hogs := GearsNear(int2hwFloat(Target.X), int2hwFloat(Target.Y), gtHedgehog, Gear^.Radius*2); @@ -5209,7 +5286,10 @@ if hogs.ar^[i]^.Hedgehog^.Effects[heFrozen] < 256 then hogs.ar^[i]^.Hedgehog^.Effects[heFrozen] := hogs.ar^[i]^.Hedgehog^.Effects[heFrozen] + 1 else if hogs.ar^[i]^.Hedgehog^.Effects[heFrozen] = 256 then - hogs.ar^[i]^.Hedgehog^.Effects[heFrozen]:= 200000;//cHedgehogTurnTime + cReadyDelay + begin + hogs.ar^[i]^.Hedgehog^.Effects[heFrozen]:= 200000-1;//cHedgehogTurnTime + cReadyDelay + PlaySound(sndHogFreeze); + end; end; inc(Pos) end @@ -5222,14 +5302,16 @@ X:= HHGear^.X; Y:= HHGear^.Y end; - {if (gX > max(LAND_WIDTH,4096)*2) or + if (gX > max(LAND_WIDTH,4096)*2) or (gX < -max(LAND_WIDTH,4096)) or (gY < -max(LAND_HEIGHT,4096)) or (gY > max(LAND_HEIGHT,4096)+512) then - begin - X:= HHGear^.X; - Y:= HHGear^.Y - end} + begin + //X:= HHGear^.X; + //Y:= HHGear^.Y + Target.X:= gX; + Target.Y:= gY; + end end end; end; diff -r e095e3023682 -r 7f04ad2cda54 hedgewars/hwengine.pas --- a/hedgewars/hwengine.pas Sun Apr 21 01:36:08 2013 +0200 +++ b/hedgewars/hwengine.pas Wed May 29 22:52:37 2013 +0400 @@ -93,13 +93,7 @@ ScriptCall('onGameStart'); GameState:= gsGame; end; - gsConfirm, gsGame: - begin - if not cOnlyStats then DrawWorld(Lag); - DoGameTick(Lag); - if not cOnlyStats then ProcessVisualGears(Lag); - end; - gsChat: + gsConfirm, gsGame, gsChat: begin if not cOnlyStats then DrawWorld(Lag); DoGameTick(Lag); @@ -168,10 +162,10 @@ // sdl on iphone supports only ashii keyboards and the unicode field is deprecated in sdl 1.3 KeyPressChat(SDL_GetKeyFromScancode(event.key.keysym.sym), event.key.keysym.sym); //TODO correct for keymodifiers end - else - ProcessKey(event.key); + else + if GameState >= gsGame then ProcessKey(event.key); SDL_KEYUP: - if GameState <> gsChat then + if (GameState <> gsChat) and (GameState >= gsGame) then ProcessKey(event.key); SDL_WINDOWEVENT: @@ -213,22 +207,19 @@ if GameState = gsChat then KeyPressChat(event.key.keysym.unicode, event.key.keysym.sym) else - ProcessKey(event.key); + if GameState >= gsGame then ProcessKey(event.key); SDL_KEYUP: - if GameState <> gsChat then + if (GameState <> gsChat) and (GameState >= gsGame) then ProcessKey(event.key); SDL_MOUSEBUTTONDOWN: if GameState = gsConfirm then - begin - resetPosition(); - ParseCommand('quit', true); - end + ParseCommand('quit', true) else - ProcessMouse(event.button, true); + if (GameState >= gsGame) then ProcessMouse(event.button, true); SDL_MOUSEBUTTONUP: - ProcessMouse(event.button, false); + if (GameState >= gsGame) then ProcessMouse(event.button, false); SDL_ACTIVEEVENT: if (event.active.state and SDL_APPINPUTFOCUS) <> 0 then diff -r e095e3023682 -r 7f04ad2cda54 hedgewars/uAI.pas --- a/hedgewars/uAI.pas Sun Apr 21 01:36:08 2013 +0200 +++ b/hedgewars/uAI.pas Wed May 29 22:52:37 2013 +0400 @@ -126,10 +126,10 @@ then begin {$HINTS OFF} - Score:= AmmoTests[a].proc(Me, Targets.ar[i].Point, BotLevel, ap); + Score:= AmmoTests[a].proc(Me, Targets.ar[i], BotLevel, ap); {$HINTS ON} if Actions.Score + Score > BestActions.Score then - if (BestActions.Score < 0) or (Actions.Score + Score > BestActions.Score + Byte(BotLevel) * 2048) then + if (BestActions.Score < 0) or (Actions.Score + Score > BestActions.Score + Byte(BotLevel - 1) * 2048) then begin BestActions:= Actions; inc(BestActions.Score, Score); @@ -366,7 +366,6 @@ switchImmediatelyAvailable: boolean; Actions: TActions; begin -AddFileLog('Think thread started'); dmgMod:= 0.01 * hwFloat2Float(cDamageModifier) * cDamagePercent; StartTicks:= GameTicks; currHedgehogIndex:= CurrentTeam^.CurrHedgehog; @@ -378,7 +377,7 @@ switchCount:= HHHasAmmo(PGear(Me)^.Hedgehog^, amSwitch) else switchCount:= 0; -if (Me^.State and gstAttacked) = 0 then +if ((Me^.State and gstAttacked) = 0) or isInMultiShoot then if Targets.Count > 0 then begin // iterate over current team hedgehogs @@ -427,7 +426,8 @@ else begin BackMe:= Me^; - while (not StopThinking) and (BestActions.Count = 0) do + i:= 12; + while (not StopThinking) and (BestActions.Count = 0) and (i > 0) do begin (* // Maybe this would get a bit of movement out of them? Hopefully not *toward* water. Need to check how often he'd choose that strategy @@ -440,6 +440,7 @@ Actions.Pos:= 0; Actions.Score:= 0; Walk(@WalkMe, Actions); + dec(i); if not StopThinking then SDL_Delay(100) end @@ -478,14 +479,16 @@ exit end; -FillBonuses((Me^.State and gstAttacked) <> 0); +FillBonuses(((Me^.State and gstAttacked) <> 0) and (not isInMultiShoot)); SDL_LockMutex(ThreadLock); ThinkThread:= SDL_CreateThread(@Think{$IFDEF SDL13}, 'think'{$ENDIF}, Me); SDL_UnlockMutex(ThreadLock); end; -//var scoreShown: boolean = false; +{$IFDEF DEBUGAI} +var scoreShown: boolean = false; +{$ENDIF} procedure ProcessBot; const cStopThinkTime = 40; @@ -507,17 +510,21 @@ if Gear^.Message <> 0 then exit; - //scoreShown:= false; +{$IFDEF DEBUGAI} + scoreShown:= false; +{$ENDIF} StartThink(Gear); StartTicks:= GameTicks end else begin - {if not scoreShown then +{$IFDEF DEBUGAI} + if not scoreShown then begin if BestActions.Score > 0 then ParseCommand('/say Expected score = ' + inttostr(BestActions.Score div 1024), true); scoreShown:= true - end;} + end; +{$ENDIF} ProcessAction(BestActions, Gear) end else if ((GameTicks - StartTicks) > cMaxAIThinkTime) diff -r e095e3023682 -r 7f04ad2cda54 hedgewars/uAIAmmoTests.pas --- a/hedgewars/uAIAmmoTests.pas Sun Apr 21 01:36:08 2013 +0200 +++ b/hedgewars/uAIAmmoTests.pas Wed May 29 22:52:37 2013 +0400 @@ -20,7 +20,7 @@ unit uAIAmmoTests; interface -uses SDLh, uConsts, uFloat, uTypes; +uses SDLh, uConsts, uFloat, uTypes, uAIMisc; const amtest_Rare = $00000001; // check only several positions amtest_NoTarget = $00000002; // each pos, but no targetting @@ -34,27 +34,27 @@ AttackPutX, AttackPutY: LongInt; end; -function TestBazooka(Me: PGear; Targ: TPoint; Level: LongInt; var ap: TAttackParams): LongInt; -function TestSnowball(Me: PGear; Targ: TPoint; Level: LongInt; var ap: TAttackParams): LongInt; -function TestGrenade(Me: PGear; Targ: TPoint; Level: LongInt; var ap: TAttackParams): LongInt; -function TestMolotov(Me: PGear; Targ: TPoint; Level: LongInt; var ap: TAttackParams): LongInt; -function TestClusterBomb(Me: PGear; Targ: TPoint; Level: LongInt; var ap: TAttackParams): LongInt; -function TestWatermelon(Me: PGear; Targ: TPoint; Level: LongInt; var ap: TAttackParams): LongInt; -function TestDrillRocket(Me: PGear; Targ: TPoint; Level: LongInt; var ap: TAttackParams): LongInt; -function TestMortar(Me: PGear; Targ: TPoint; Level: LongInt; var ap: TAttackParams): LongInt; -function TestShotgun(Me: PGear; Targ: TPoint; Level: LongInt; var ap: TAttackParams): LongInt; -function TestDesertEagle(Me: PGear; Targ: TPoint; Level: LongInt; var ap: TAttackParams): LongInt; -function TestSniperRifle(Me: PGear; Targ: TPoint; Level: LongInt; var ap: TAttackParams): LongInt; -function TestBaseballBat(Me: PGear; Targ: TPoint; Level: LongInt; var ap: TAttackParams): LongInt; -function TestFirePunch(Me: PGear; Targ: TPoint; Level: LongInt; var ap: TAttackParams): LongInt; -function TestWhip(Me: PGear; Targ: TPoint; Level: LongInt; var ap: TAttackParams): LongInt; -function TestKamikaze(Me: PGear; Targ: TPoint; Level: LongInt; var ap: TAttackParams): LongInt; -function TestAirAttack(Me: PGear; Targ: TPoint; Level: LongInt; var ap: TAttackParams): LongInt; -function TestTeleport(Me: PGear; Targ: TPoint; Level: LongInt; var ap: TAttackParams): LongInt; -function TestHammer(Me: PGear; Targ: TPoint; Level: LongInt; var ap: TAttackParams): LongInt; -function TestCake(Me: PGear; Targ: TPoint; Level: LongInt; var ap: TAttackParams): LongInt; +function TestBazooka(Me: PGear; Targ: TTarget; Level: LongInt; var ap: TAttackParams): LongInt; +function TestSnowball(Me: PGear; Targ: TTarget; Level: LongInt; var ap: TAttackParams): LongInt; +function TestGrenade(Me: PGear; Targ: TTarget; Level: LongInt; var ap: TAttackParams): LongInt; +function TestMolotov(Me: PGear; Targ: TTarget; Level: LongInt; var ap: TAttackParams): LongInt; +function TestClusterBomb(Me: PGear; Targ: TTarget; Level: LongInt; var ap: TAttackParams): LongInt; +function TestWatermelon(Me: PGear; Targ: TTarget; Level: LongInt; var ap: TAttackParams): LongInt; +function TestDrillRocket(Me: PGear; Targ: TTarget; Level: LongInt; var ap: TAttackParams): LongInt; +function TestMortar(Me: PGear; Targ: TTarget; Level: LongInt; var ap: TAttackParams): LongInt; +function TestShotgun(Me: PGear; Targ: TTarget; Level: LongInt; var ap: TAttackParams): LongInt; +function TestDesertEagle(Me: PGear; Targ: TTarget; Level: LongInt; var ap: TAttackParams): LongInt; +function TestSniperRifle(Me: PGear; Targ: TTarget; Level: LongInt; var ap: TAttackParams): LongInt; +function TestBaseballBat(Me: PGear; Targ: TTarget; Level: LongInt; var ap: TAttackParams): LongInt; +function TestFirePunch(Me: PGear; Targ: TTarget; Level: LongInt; var ap: TAttackParams): LongInt; +function TestWhip(Me: PGear; Targ: TTarget; Level: LongInt; var ap: TAttackParams): LongInt; +function TestKamikaze(Me: PGear; Targ: TTarget; Level: LongInt; var ap: TAttackParams): LongInt; +function TestAirAttack(Me: PGear; Targ: TTarget; Level: LongInt; var ap: TAttackParams): LongInt; +function TestTeleport(Me: PGear; Targ: TTarget; Level: LongInt; var ap: TAttackParams): LongInt; +function TestHammer(Me: PGear; Targ: TTarget; Level: LongInt; var ap: TAttackParams): LongInt; +function TestCake(Me: PGear; Targ: TTarget; Level: LongInt; var ap: TAttackParams): LongInt; -type TAmmoTestProc = function (Me: PGear; Targ: TPoint; Level: LongInt; var ap: TAttackParams): LongInt; +type TAmmoTestProc = function (Me: PGear; Targ: TTarget; Level: LongInt; var ap: TAttackParams): LongInt; TAmmoTest = record proc: TAmmoTestProc; flags: Longword; @@ -123,14 +123,14 @@ ); implementation -uses uAIMisc, uVariables, uUtils, uGearsHandlers; +uses uVariables, uUtils, uGearsHandlers; function Metric(x1, y1, x2, y2: LongInt): LongInt; inline; begin Metric:= abs(x1 - x2) + abs(y1 - y2) end; -function TestBazooka(Me: PGear; Targ: TPoint; Level: LongInt; var ap: TAttackParams): LongInt; +function TestBazooka(Me: PGear; Targ: TTarget; Level: LongInt; var ap: TAttackParams): LongInt; var Vx, Vy, r, mX, mY: real; rTime: LongInt; EX, EY: LongInt; @@ -147,8 +147,8 @@ valueResult:= BadTurn; repeat rTime:= rTime + 300 + Level * 50 + random(300); - Vx:= - windSpeed * rTime * 0.5 + (Targ.X + AIrndSign(2) - mX) / rTime; - Vy:= cGravityf * rTime * 0.5 - (Targ.Y + 1 - mY) / rTime; + Vx:= - windSpeed * rTime * 0.5 + (Targ.Point.X + AIrndSign(2) - mX) / rTime; + Vy:= cGravityf * rTime * 0.5 - (Targ.Point.Y + 1 - mY) / rTime; r:= sqr(Vx) + sqr(Vy); if not (r > 1) then begin @@ -171,8 +171,8 @@ if Level = 1 then value:= RateExplosion(Me, EX, EY, 101, afTrackFall or afErasesLand) else value:= RateExplosion(Me, EX, EY, 101); - if value = 0 then - value:= 1024 - Metric(Targ.X, Targ.Y, EX, EY) div 64; + if (value = 0) and (Targ.Kind = gtHedgehog) and (Targ.Score > 0) then + value:= 1024 - Metric(Targ.Point.X, Targ.Point.Y, EX, EY) div 64; if valueResult <= value then begin ap.Angle:= DxDy2AttackAnglef(Vx, Vy) + AIrndSign(random((Level - 1) * 9)); @@ -189,7 +189,7 @@ end; -function TestDrillRocket(Me: PGear; Targ: TPoint; Level: LongInt; var ap: TAttackParams): LongInt; +function TestDrillRocket(Me: PGear; Targ: TTarget; Level: LongInt; var ap: TAttackParams): LongInt; var Vx, Vy, r, mX, mY: real; rTime: LongInt; EX, EY: LongInt; @@ -210,8 +210,8 @@ valueResult:= BadTurn; repeat rTime:= rTime + 300 + Level * 50 + random(300); - Vx:= - windSpeed * rTime * 0.5 + (Targ.X + AIrndSign(2) - mX) / rTime; - Vy:= cGravityf * rTime * 0.5 - (Targ.Y - 35 - mY) / rTime; + Vx:= - windSpeed * rTime * 0.5 + (Targ.Point.X + AIrndSign(2) - mX) / rTime; + Vy:= cGravityf * rTime * 0.5 - (Targ.Point.Y - 35 - mY) / rTime; r:= sqr(Vx) + sqr(Vy); if not (r > 1) then begin @@ -229,7 +229,7 @@ until (((Me = CurrentHedgehog^.Gear) and TestColl(trunc(x), trunc(y), 5)) or ((Me <> CurrentHedgehog^.Gear) and TestCollExcludingMe(Me^.Hedgehog^.Gear, trunc(x), trunc(y), 5))) or (y > cWaterLine); - if TestCollExcludingObjects(trunc(x), trunc(y), 5) and (Abs(Targ.X - trunc(x)) + Abs(Targ.Y - trunc(y)) > 21) then + if TestCollExcludingObjects(trunc(x), trunc(y), 5) and (Abs(Targ.Point.X - trunc(x)) + Abs(Targ.Point.Y - trunc(y)) > 21) then begin timer := 500; t2 := 0.5 / sqrt(sqr(dX) + sqr(dY)); @@ -239,7 +239,7 @@ x:= x + dX; y:= y + dY; dec(timer); - until (Abs(Targ.X - trunc(x)) + Abs(Targ.Y - trunc(y)) < 22) + until (Abs(Targ.Point.X - trunc(x)) + Abs(Targ.Point.Y - trunc(y)) < 22) or (x < 0) or (y < 0) or (trunc(x) > LAND_WIDTH) @@ -250,7 +250,7 @@ EX:= trunc(x); EY:= trunc(y); // Try to prevent AI from thinking firing into water will cause a drowning - if (EY < cWaterLine-5) and (Timer > 0) and (Abs(Targ.X - trunc(x)) + Abs(Targ.Y - trunc(y)) > 21) then exit(BadTurn); + if (EY < cWaterLine-5) and (Timer > 0) and (Abs(Targ.Point.X - trunc(x)) + Abs(Targ.Point.Y - trunc(y)) > 21) then exit(BadTurn); if Level = 1 then value:= RateExplosion(Me, EX, EY, 101, afTrackFall or afErasesLand) else value:= RateExplosion(Me, EX, EY, 101); @@ -269,7 +269,7 @@ end; -function TestSnowball(Me: PGear; Targ: TPoint; Level: LongInt; var ap: TAttackParams): LongInt; +function TestSnowball(Me: PGear; Targ: TTarget; Level: LongInt; var ap: TAttackParams): LongInt; var Vx, Vy, r: real; rTime: LongInt; EX, EY: LongInt; @@ -287,8 +287,8 @@ valueResult:= BadTurn; repeat rTime:= rTime + 300 + Level * 50 + random(1000); - Vx:= - windSpeed * rTime * 0.5 + ((Targ.X + AIrndSign(2)) - meX) / rTime; - Vy:= cGravityf * rTime * 0.5 - (Targ.Y - meY) / rTime; + Vx:= - windSpeed * rTime * 0.5 + ((Targ.Point.X + AIrndSign(2)) - meX) / rTime; + Vy:= cGravityf * rTime * 0.5 - (Targ.Point.Y - meY) / rTime; r:= sqr(Vx) + sqr(Vy); if not (r > 1) then begin @@ -308,10 +308,10 @@ EX:= trunc(x); EY:= trunc(y); - value:= RateShove(trunc(x), trunc(y), 5, 1, trunc((abs(dX)+abs(dY))*20), -dX, -dY, afTrackFall); + value:= RateShove(Me, trunc(x), trunc(y), 5, 1, trunc((abs(dX)+abs(dY))*20), -dX, -dY, afTrackFall); // LOL copypasta: this is score for digging with... snowball //if value = 0 then - // value:= - Metric(Targ.X, Targ.Y, EX, EY) div 64; + // value:= - Metric(Targ.Point.X, Targ.Point.Y, EX, EY) div 64; if valueResult <= value then begin @@ -327,7 +327,7 @@ TestSnowball:= valueResult end; -function TestMolotov(Me: PGear; Targ: TPoint; Level: LongInt; var ap: TAttackParams): LongInt; +function TestMolotov(Me: PGear; Targ: TTarget; Level: LongInt; var ap: TAttackParams): LongInt; var Vx, Vy, r: real; Score, EX, EY, valueResult: LongInt; TestTime: Longword; @@ -341,8 +341,8 @@ ap.ExplR:= 0; repeat inc(TestTime, 300); - Vx:= (Targ.X - meX) / TestTime; - Vy:= cGravityf * (TestTime div 2) - Targ.Y - meY / TestTime; + Vx:= (Targ.Point.X - meX) / TestTime; + Vy:= cGravityf * (TestTime div 2) - Targ.Point.Y - meY / TestTime; r:= sqr(Vx) + sqr(Vy); if not (r > 1) then begin @@ -378,7 +378,7 @@ TestMolotov:= valueResult end; -function TestGrenade(Me: PGear; Targ: TPoint; Level: LongInt; var ap: TAttackParams): LongInt; +function TestGrenade(Me: PGear; Targ: TTarget; Level: LongInt; var ap: TAttackParams): LongInt; const tDelta = 24; var Vx, Vy, r: real; Score, EX, EY, valueResult: LongInt; @@ -393,8 +393,8 @@ meY:= hwFloat2Float(Me^.Y); repeat inc(TestTime, 1000); - Vx:= (Targ.X - meX) / (TestTime + tDelta); - Vy:= cGravityf * ((TestTime + tDelta) div 2) - (Targ.Y - meY) / (TestTime + tDelta); + Vx:= (Targ.Point.X - meX) / (TestTime + tDelta); + Vy:= cGravityf * ((TestTime + tDelta) div 2) - (Targ.Point.Y - meY) / (TestTime + tDelta); r:= sqr(Vx) + sqr(Vy); if not (r > 1) then begin @@ -434,7 +434,7 @@ TestGrenade:= valueResult end; -function TestClusterBomb(Me: PGear; Targ: TPoint; Level: LongInt; var ap: TAttackParams): LongInt; +function TestClusterBomb(Me: PGear; Targ: TTarget; Level: LongInt; var ap: TAttackParams): LongInt; const tDelta = 24; var Vx, Vy, r: real; Score, EX, EY, valueResult: LongInt; @@ -450,11 +450,11 @@ repeat inc(TestTime, 900); // Try to overshoot slightly, seems to pay slightly better dividends in terms of hitting cluster - if meX 1) then begin @@ -476,7 +476,7 @@ else Score:= BadTurn; - if valueResult < Score then + if Score > 0 then begin ap.Angle:= DxDy2AttackAnglef(Vx, Vy) + AIrndSign(random(Level * 2)); ap.Power:= trunc(sqrt(r) * cMaxPower) + AIrndSign(random(Level) * 15); @@ -491,7 +491,7 @@ TestClusterBomb:= valueResult end; -function TestWatermelon(Me: PGear; Targ: TPoint; Level: LongInt; var ap: TAttackParams): LongInt; +function TestWatermelon(Me: PGear; Targ: TTarget; Level: LongInt; var ap: TAttackParams): LongInt; const tDelta = 24; var Vx, Vy, r: real; Score, EX, EY, valueResult: LongInt; @@ -506,8 +506,8 @@ meY:= hwFloat2Float(Me^.Y); repeat inc(TestTime, 900); - Vx:= (Targ.X - meX) / (TestTime + tDelta); - Vy:= cGravityf * ((TestTime + tDelta) div 2) - ((Targ.Y-50) - meY) / (TestTime + tDelta); + Vx:= (Targ.Point.X - meX) / (TestTime + tDelta); + Vy:= cGravityf * ((TestTime + tDelta) div 2) - ((Targ.Point.Y-50) - meY) / (TestTime + tDelta); r:= sqr(Vx)+sqr(Vy); if not (r > 1) then begin @@ -567,7 +567,7 @@ Solve:= 0 end; -function TestMortar(Me: PGear; Targ: TPoint; Level: LongInt; var ap: TAttackParams): LongInt; +function TestMortar(Me: PGear; Targ: TTarget; Level: LongInt; var ap: TAttackParams): LongInt; //const tDelta = 24; var Vx, Vy: real; Score, EX, EY: LongInt; @@ -583,13 +583,13 @@ if (Level > 2) then exit(BadTurn); - TestTime:= Solve(Targ.X, Targ.Y, trunc(meX), trunc(meY)); + TestTime:= Solve(Targ.Point.X, Targ.Point.Y, trunc(meX), trunc(meY)); if TestTime = 0 then exit(BadTurn); - Vx:= (Targ.X - meX) / TestTime; - Vy:= cGravityf * (TestTime div 2) - (Targ.Y - meY) / TestTime; + Vx:= (Targ.Point.X - meX) / TestTime; + Vy:= cGravityf * (TestTime div 2) - (Targ.Point.Y - meY) / TestTime; x:= meX; y:= meY; @@ -608,8 +608,8 @@ begin Score:= RateExplosion(Me, EX, EY, 91); if (Score = 0) then - if (dY > 0.15) then - Score:= - abs(Targ.Y - EY) div 32 + if (dY > 0.15) and (Targ.Kind = gtHedgehog) and (Targ.Score > 0) then + Score:= - abs(Targ.Point.Y - EY) div 32 else Score:= BadTurn else if (Score < 0) then @@ -618,7 +618,7 @@ else Score:= BadTurn; - if BadTurn < Score then + if Score > 0 then begin ap.Angle:= DxDy2AttackAnglef(Vx, Vy) + AIrndSign(random(Level)); ap.Power:= 1; @@ -629,7 +629,7 @@ end; end; -function TestShotgun(Me: PGear; Targ: TPoint; Level: LongInt; var ap: TAttackParams): LongInt; +function TestShotgun(Me: PGear; Targ: TTarget; Level: LongInt; var ap: TAttackParams): LongInt; const MIN_RANGE = 80; MAX_RANGE = 400; @@ -643,12 +643,12 @@ ap.Power:= 1; x:= hwFloat2Float(Me^.X); y:= hwFloat2Float(Me^.Y); -range:= Metric(trunc(x), trunc(y), Targ.X, Targ.Y); +range:= Metric(trunc(x), trunc(y), Targ.Point.X, Targ.Point.Y); if ( range < MIN_RANGE ) or ( range > MAX_RANGE ) then exit(BadTurn); -Vx:= (Targ.X - x) * 1 / 1024; -Vy:= (Targ.Y - y) * 1 / 1024; +Vx:= (Targ.Point.X - x) * 1 / 1024; +Vy:= (Targ.Point.Y - y) * 1 / 1024; ap.Angle:= DxDy2AttackAnglef(Vx, -Vy); repeat x:= x + vX; @@ -662,14 +662,14 @@ y:= y + vY * 8; valueResult:= RateShotgun(Me, vX, vY, rx, ry); - if valueResult = 0 then - valueResult:= 1024 - Metric(Targ.X, Targ.Y, rx, ry) div 64 + if (valueResult = 0) and (Targ.Kind = gtHedgehog) and (Targ.Score > 0) then + valueResult:= 1024 - Metric(Targ.Point.X, Targ.Point.Y, rx, ry) div 64 else dec(valueResult, Level * 4000); // 27/20 is reuse bonus exit(valueResult * 27 div 20) end -until (Abs(Targ.X - trunc(x)) + Abs(Targ.Y - trunc(y)) < 4) +until (Abs(Targ.Point.X - trunc(x)) + Abs(Targ.Point.Y - trunc(y)) < 4) or (x < 0) or (y < 0) or (trunc(x) > LAND_WIDTH) @@ -678,27 +678,26 @@ TestShotgun:= BadTurn end; -function TestDesertEagle(Me: PGear; Targ: TPoint; Level: LongInt; var ap: TAttackParams): LongInt; -var Vx, Vy, x, y, t, dmgMod: real; +function TestDesertEagle(Me: PGear; Targ: TTarget; Level: LongInt; var ap: TAttackParams): LongInt; +var Vx, Vy, x, y, t: real; d: Longword; fallDmg, valueResult: LongInt; begin -if Level > 4 then exit(BadTurn); -dmgMod:= 0.01 * hwFloat2Float(cDamageModifier) * cDamagePercent; +if (Level > 4) or (Targ.Score < 0) or (Targ.Kind <> gtHedgehog) then exit(BadTurn); Level:= Level; // avoid compiler hint -ap.ExplR:= 0; +ap.ExplR:= 1; ap.Time:= 0; ap.Power:= 1; x:= hwFloat2Float(Me^.X); y:= hwFloat2Float(Me^.Y); -if Abs(trunc(x) - Targ.X) + Abs(trunc(y) - Targ.Y) < 20 then +if Abs(trunc(x) - Targ.Point.X) + Abs(trunc(y) - Targ.Point.Y) < 20 then exit(BadTurn); -t:= 2 / sqrt(sqr(Targ.X - x)+sqr(Targ.Y-y)); -Vx:= (Targ.X - x) * t; -Vy:= (Targ.Y - y) * t; +t:= 2 / sqrt(sqr(Targ.Point.X - x)+sqr(Targ.Point.Y-y)); +Vx:= (Targ.Point.X - x) * t; +Vy:= (Targ.Point.Y - y) * t; ap.Angle:= DxDy2AttackAnglef(Vx, -Vy); d:= 0; @@ -708,47 +707,40 @@ if ((trunc(x) and LAND_WIDTH_MASK) = 0)and((trunc(y) and LAND_HEIGHT_MASK) = 0) and (Land[trunc(y), trunc(x)] <> 0) then inc(d); -until (Abs(Targ.X - trunc(x)) + Abs(Targ.Y - trunc(y)) < 5) +until (Abs(Targ.Point.X - trunc(x)) + Abs(Targ.Point.Y - trunc(y)) < 5) or (x < 0) or (y < 0) or (trunc(x) > LAND_WIDTH) or (trunc(y) > LAND_HEIGHT) or (d > 48); -if Abs(Targ.X - trunc(x)) + Abs(Targ.Y - trunc(y)) < 5 then - begin - fallDmg:= TraceShoveFall(Targ.X, Targ.Y, vX * 0.00125 * 20, vY * 0.00125 * 20); - if fallDmg < 0 then - valueResult:= 204800 - else valueResult:= Max(0, (4 - d div 12) * trunc((7 + fallDmg) * dmgMod) * 1024) - end -else - valueResult:= BadTurn; +if Abs(Targ.Point.X - trunc(x)) + Abs(Targ.Point.Y - trunc(y)) < 5 then + valueResult:= RateShove(Me, Targ.Point.X, Targ.Point.Y, 1, 7, 20, vX*0.125, vY*0.125, afTrackFall) +else valueResult:= BadTurn; TestDesertEagle:= valueResult end; -function TestSniperRifle(Me: PGear; Targ: TPoint; Level: LongInt; var ap: TAttackParams): LongInt; -var Vx, Vy, x, y, t, dmg, dmgMod: real; +function TestSniperRifle(Me: PGear; Targ: TTarget; Level: LongInt; var ap: TAttackParams): LongInt; +var Vx, Vy, x, y, t, dmg: real; d: Longword; fallDmg: LongInt; begin -if Level > 3 then exit(BadTurn); -dmgMod:= 0.01 * hwFloat2Float(cDamageModifier) * cDamagePercent; +if (Level > 3) or (Targ.Score < 0) or (Targ.Kind <> gtHedgehog) then exit(BadTurn); Level:= Level; // avoid compiler hint ap.ExplR:= 0; ap.Time:= 0; ap.Power:= 1; x:= hwFloat2Float(Me^.X); y:= hwFloat2Float(Me^.Y); -if Abs(trunc(x) - Targ.X) + Abs(trunc(y) - Targ.Y) < 40 then +if Abs(trunc(x) - Targ.Point.X) + Abs(trunc(y) - Targ.Point.Y) < 40 then exit(BadTurn); -dmg:= sqrt(sqr(Targ.X - x)+sqr(Targ.Y-y)); +dmg:= sqrt(sqr(Targ.Point.X - x)+sqr(Targ.Point.Y-y)); t:= 1.5 / dmg; dmg:= dmg * 0.025; // div 40 -Vx:= (Targ.X - x) * t; -Vy:= (Targ.Y - y) * t; +Vx:= (Targ.Point.X - x) * t; +Vy:= (Targ.Point.Y - y) * t; ap.Angle:= DxDy2AttackAnglef(Vx, -Vy); d:= 0; @@ -758,27 +750,20 @@ if ((trunc(x) and LAND_WIDTH_MASK) = 0)and((trunc(y) and LAND_HEIGHT_MASK) = 0) and (Land[trunc(y), trunc(x)] <> 0) then inc(d); -until (Abs(Targ.X - trunc(x)) + Abs(Targ.Y - trunc(y)) < 4) +until (Abs(Targ.Point.X - trunc(x)) + Abs(Targ.Point.Y - trunc(y)) < 4) or (x < 0) or (y < 0) or (trunc(x) > LAND_WIDTH) or (trunc(y) > LAND_HEIGHT) or (d > 22); -if Abs(Targ.X - trunc(x)) + Abs(Targ.Y - trunc(y)) < 4 then - begin - fallDmg:= TraceShoveFall(Targ.X, Targ.Y, vX * 0.00166 * dmg, vY * 0.00166 * dmg); - if fallDmg < 0 then - TestSniperRifle:= BadTurn - else - TestSniperRifle:= Max(0, trunc((dmg + fallDmg) * dmgMod) * 1024) - end -else - TestSniperRifle:= BadTurn +if Abs(Targ.Point.X - trunc(x)) + Abs(Targ.Point.Y - trunc(y)) < 4 then + TestSniperRifle:= RateShove(Me, Targ.Point.X, Targ.Point.Y, 1, trunc(dmg), 20, vX*0.166, vY*0.166, afTrackFall) +else TestSniperRifle:= BadTurn; end; -function TestBaseballBat(Me: PGear; Targ: TPoint; Level: LongInt; var ap: TAttackParams): LongInt; +function TestBaseballBat(Me: PGear; Targ: TTarget; Level: LongInt; var ap: TAttackParams): LongInt; var valueResult, a, v1, v2: LongInt; x, y, trackFall: LongInt; dx, dy: real; @@ -802,10 +787,10 @@ dx:= sin(a / cMaxAngle * pi) * 0.5; dy:= cos(a / cMaxAngle * pi) * 0.5; - v1:= RateShove(x - 10, y + 2 + v1:= RateShove(Me, x - 10, y + 2 , 32, 30, 115 , -dx, -dy, trackFall); - v2:= RateShove(x + 10, y + 2 + v2:= RateShove(Me, x + 10, y + 2 , 32, 30, 115 , dx, -dy, trackFall); if (v1 > valueResult) or (v2 > valueResult) then @@ -830,7 +815,7 @@ TestBaseballBat:= valueResult; end; -function TestFirePunch(Me: PGear; Targ: TPoint; Level: LongInt; var ap: TAttackParams): LongInt; +function TestFirePunch(Me: PGear; Targ: TTarget; Level: LongInt; var ap: TAttackParams): LongInt; var valueResult, v1, v2, i: LongInt; x, y, trackFall: LongInt; begin @@ -848,11 +833,11 @@ v1:= 0; for i:= 0 to 8 do begin - v1:= v1 + RateShove(x - 5, y - 10 * i + v1:= v1 + RateShove(Me, x - 5, y - 10 * i , 19, 30, 40 , -0.45, -0.9, trackFall or afSetSkip); end; - v1:= v1 + RateShove(x - 5, y - 90 + v1:= v1 + RateShove(Me, x - 5, y - 90 , 19, 30, 40 , -0.45, -0.9, trackFall); @@ -861,11 +846,11 @@ v2:= 0; for i:= 0 to 8 do begin - v2:= v2 + RateShove(x + 5, y - 10 * i + v2:= v2 + RateShove(Me, x + 5, y - 10 * i , 19, 30, 40 , 0.45, -0.9, trackFall or afSetSkip); end; - v2:= v2 + RateShove(x + 5, y - 90 + v2:= v2 + RateShove(Me, x + 5, y - 90 , 19, 30, 40 , 0.45, -0.9, trackFall); @@ -888,7 +873,7 @@ end; -function TestWhip(Me: PGear; Targ: TPoint; Level: LongInt; var ap: TAttackParams): LongInt; +function TestWhip(Me: PGear; Targ: TTarget; Level: LongInt; var ap: TAttackParams): LongInt; var valueResult, v1, v2: LongInt; x, y, trackFall: LongInt; begin @@ -907,19 +892,19 @@ {first RateShove checks farthermost of two whip's AmmoShove attacks to encourage distant attacks (damaged hog is excluded from view of second RateShove call)} - v1:= RateShove(x - 13, y + v1:= RateShove(Me, x - 13, y , 30, 30, 25 , -1, -0.8, trackFall or afSetSkip); v1:= v1 + - RateShove(x - 2, y + RateShove(Me, x - 2, y , 30, 30, 25 , -1, -0.8, trackFall); // now try opposite direction - v2:= RateShove(x + 13, y + v2:= RateShove(Me, x + 13, y , 30, 30, 25 , 1, -0.8, trackFall or afSetSkip); v2:= v2 + - RateShove(x + 2, y + RateShove(Me, x + 2, y , 30, 30, 25 , 1, -0.8, trackFall); @@ -943,7 +928,7 @@ TestWhip:= valueResult; end; -function TestKamikaze(Me: PGear; Targ: TPoint; Level: LongInt; var ap: TAttackParams): LongInt; +function TestKamikaze(Me: PGear; Targ: TTarget; Level: LongInt; var ap: TAttackParams): LongInt; const step = 8; var valueResult, i, v, tx: LongInt; trackFall: LongInt; @@ -965,7 +950,7 @@ x:= hwFloat2Float(Me^.X); y:= hwFloat2Float(Me^.Y); - d:= sqrt(sqr(Targ.X - x) + sqr(Targ.Y - y)); + d:= sqrt(sqr(Targ.Point.X - x) + sqr(Targ.Point.Y - y)); if d < 10 then begin dx:= 0; @@ -975,8 +960,8 @@ else begin t:= step / d; - dx:= (Targ.X - x) * t; - dy:= (Targ.Y - y) * t; + dx:= (Targ.Point.X - x) * t; + dy:= (Targ.Point.Y - y) * t; ap.Angle:= DxDy2AttackAnglef(dx, -dy) end; @@ -986,7 +971,7 @@ for i:= 0 to 512 div step - 2 do begin valueResult:= valueResult + - RateShove(trunc(x), trunc(y) + RateShove(Me, trunc(x), trunc(y) , 30, 30, 25 , cx, -0.9, trackFall or afSetSkip); @@ -998,14 +983,14 @@ x:= hwFloat2Float(Me^.X); y:= hwFloat2Float(Me^.Y); tx:= trunc(x); - v:= RateShove(tx, trunc(y) + v:= RateShove(Me, tx, trunc(y) , 30, 30, 25 , -cx, -0.9, trackFall); for i:= 1 to 512 div step - 2 do begin y:= y + dy; v:= v + - RateShove(tx, trunc(y) + RateShove(Me, tx, trunc(y) , 30, 30, 25 , -cx, -0.9, trackFall or afSetSkip); end @@ -1016,7 +1001,7 @@ valueResult:= v end; - v:= RateShove(trunc(x), trunc(y) + v:= RateShove(Me, trunc(x), trunc(y) , 30, 30, 25 , cx, -0.9, trackFall); valueResult:= valueResult + v - KillScore * friendlyfactor div 100 * 1024; @@ -1027,7 +1012,7 @@ TestKamikaze:= valueResult; end; -function TestHammer(Me: PGear; Targ: TPoint; Level: LongInt; var ap: TAttackParams): LongInt; +function TestHammer(Me: PGear; Targ: TTarget; Level: LongInt; var ap: TAttackParams): LongInt; var rate: LongInt; begin Level:= Level; // avoid compiler hint @@ -1044,7 +1029,7 @@ TestHammer:= rate; end; -function TestAirAttack(Me: PGear; Targ: TPoint; Level: LongInt; var ap: TAttackParams): LongInt; +function TestAirAttack(Me: PGear; Targ: TTarget; Level: LongInt; var ap: TAttackParams): LongInt; const cShift = 4; var bombsSpeed, X, Y, dY: real; b: array[0..9] of boolean; @@ -1058,12 +1043,12 @@ exit(BadTurn); ap.Angle:= 0; -ap.AttackPutX:= Targ.X; -ap.AttackPutY:= Targ.Y; +ap.AttackPutX:= Targ.Point.X; +ap.AttackPutY:= Targ.Point.Y; bombsSpeed:= hwFloat2Float(cBombsSpeed); -X:= Targ.X - 135 - cShift; // hh center - cShift -X:= X - bombsSpeed * sqrt(((Targ.Y + 128) * 2) / cGravityf); +X:= Targ.Point.X - 135 - cShift; // hh center - cShift +X:= X - bombsSpeed * sqrt(((Targ.Point.Y + 128) * 2) / cGravityf); Y:= -128; dY:= 0; @@ -1095,7 +1080,7 @@ for i:= 0 to 5 do inc(valueResult, dmg[i]); t:= valueResult; -ap.AttackPutX:= Targ.X - 60; +ap.AttackPutX:= Targ.Point.X - 60; for i:= 0 to 3 do begin @@ -1104,7 +1089,7 @@ if t > valueResult then begin valueResult:= t; - ap.AttackPutX:= Targ.X - 30 - cShift + i * 30 + ap.AttackPutX:= Targ.Point.X - 30 - cShift + i * 30 end end; @@ -1114,7 +1099,7 @@ end; -function TestTeleport(Me: PGear; Targ: TPoint; Level: LongInt; var ap: TAttackParams): LongInt; +function TestTeleport(Me: PGear; Targ: TTarget; Level: LongInt; var ap: TAttackParams): LongInt; var i, failNum: longword; maxTop: longword; @@ -1127,15 +1112,15 @@ begin if Me^.Health <= 100 then begin - maxTop := Targ.Y - cHHRadius * 2; + maxTop := Targ.Point.Y - cHHRadius * 2; - while not TestColl(Targ.X, maxTop, cHHRadius) and (maxTop > topY + cHHRadius * 2 + 1) do + while not TestColl(Targ.Point.X, maxTop, cHHRadius) and (maxTop > topY + cHHRadius * 2 + 1) do dec(maxTop, cHHRadius*2); - if not TestColl(Targ.X, maxTop + cHHRadius, cHHRadius) then + if not TestColl(Targ.Point.X, maxTop + cHHRadius, cHHRadius) then begin - ap.AttackPutX := Targ.X; + ap.AttackPutX := Targ.Point.X; ap.AttackPutY := maxTop + cHHRadius; - TestTeleport := Targ.Y - maxTop; + TestTeleport := Targ.Point.Y - maxTop; end; end; end @@ -1178,7 +1163,7 @@ end; end; -function TestCake(Me: PGear; Targ: TPoint; Level: LongInt; var ap: TAttackParams): LongInt; +function TestCake(Me: PGear; Targ: TTarget; Level: LongInt; var ap: TAttackParams): LongInt; var valueResult, v1, v2: LongInt; cake: TGear; begin diff -r e095e3023682 -r 7f04ad2cda54 hedgewars/uAIMisc.pas --- a/hedgewars/uAIMisc.pas Sun Apr 21 01:36:08 2013 +0200 +++ b/hedgewars/uAIMisc.pas Wed May 29 22:52:37 2013 +0400 @@ -30,14 +30,18 @@ BadTurn = Low(LongInt) div 4; -type TTarget = record +type TTarget = record // starting to look more and more like a gear Point: TPoint; - Score: LongInt; - skip, matters: boolean; + Score, Radius: LongInt; + State: LongWord; + Density: real; + skip, matters, dead: boolean; + Kind: TGearType; end; TTargets = record Count: Longword; - ar: array[0..Pred(cMaxHHs)] of TTarget; + ar: array[0..Pred(256)] of TTarget; + reset: boolean; end; TJumpType = (jmpNone, jmpHJump, jmpLJump); TGoInfo = record @@ -55,6 +59,7 @@ procedure freeModule; procedure FillTargets; +procedure ResetTargets; inline; procedure AddBonus(x, y: LongInt; r: Longword; s: LongInt); inline; procedure FillBonuses(isAfterAttack: boolean); procedure AwareOfExplosion(x, y, r: LongInt); inline; @@ -63,11 +68,11 @@ function TestColl(x, y, r: LongInt): boolean; inline; function TestCollExcludingObjects(x, y, r: LongInt): boolean; inline; function TestCollExcludingMe(Me: PGear; x, y, r: LongInt): boolean; inline; -function TraceShoveFall(x, y, dX, dY: Real): LongInt; function RateExplosion(Me: PGear; x, y, r: LongInt): LongInt; inline; -function RateExplosion(Me: PGear; x, y, r: LongInt; Flags: LongWord): LongInt; -function RateShove(x, y, r, power, kick: LongInt; gdX, gdY: real; Flags: LongWord): LongInt; +function RateExplosion(Me: PGear; x, y, r: LongInt; Flags: LongWord): LongInt; inline; +function RealRateExplosion(Me: PGear; x, y, r: LongInt; Flags: LongWord): LongInt; +function RateShove(Me: PGear; x, y, r, power, kick: LongInt; gdX, gdY: real; Flags: LongWord): LongInt; function RateShotgun(Me: PGear; gdX, gdY: real; x, y: LongInt): LongInt; function RateHammer(Me: PGear): LongInt; @@ -99,43 +104,72 @@ X, Y, Radius: LongInt end = (X: 0; Y: 0; Radius: 0); +procedure ResetTargets; inline; +var i: LongWord; +begin +if Targets.reset then + for i:= 0 to Targets.Count do + Targets.ar[i].dead:= false; +Targets.reset:= false; +end; procedure FillTargets; var i, t: Longword; f, e: LongInt; + Gear: PGear; begin Targets.Count:= 0; +Targets.reset:= false; f:= 0; e:= 0; -for t:= 0 to Pred(TeamsCount) do - with TeamsArray[t]^ do - if not hasGone then +Gear:= GearsList; +while Gear <> nil do + begin + if (((Gear^.Kind = gtHedgehog) and + (Gear <> ThinkingHH) and + (Gear^.Health > Gear^.Damage) and + not(Gear^.Hedgehog^.Team^.hasgone)) or + ((Gear^.Kind = gtExplosives) and + (Gear^.Health > Gear^.Damage)) or + ((Gear^.Kind = gtMine) and + (Gear^.Health = 0) and + (Gear^.Damage < 35)) + ) and + (Targets.Count < 256) then + begin + with Targets.ar[Targets.Count] do begin - for i:= 0 to cMaxHHIndex do - if (Hedgehogs[i].Gear <> nil) - and (Hedgehogs[i].Gear <> ThinkingHH) - and (Hedgehogs[i].Gear^.Health > Hedgehogs[i].Gear^.Damage) - then - begin - with Targets.ar[Targets.Count], Hedgehogs[i] do - begin - skip:= false; - matters:= (Hedgehogs[i].Gear^.AIHints and aihDoesntMatter) = 0; + skip:= false; + dead:= false; + Kind:= Gear^.Kind; + Radius:= Gear^.Radius; + Density:= hwFloat2Float(Gear^.Density)/3; + State:= Gear^.State; + matters:= (Gear^.AIHints and aihDoesntMatter) = 0; - Point.X:= hwRound(Gear^.X); - Point.Y:= hwRound(Gear^.Y); - if Clan <> CurrentTeam^.Clan then - begin - Score:= Gear^.Health - Gear^.Damage; - inc(e) - end else - begin - Score:= Gear^.Damage - Gear^.Health; - inc(f) - end - end; - inc(Targets.Count) + Point.X:= hwRound(Gear^.X); + Point.Y:= hwRound(Gear^.Y); + if (Gear^.Kind = gtHedgehog) then + begin + if (Gear^.Hedgehog^.Team^.Clan = CurrentTeam^.Clan) then + begin + Score:= Gear^.Damage - Gear^.Health; + inc(f) + end + else + begin + Score:= Gear^.Health - Gear^.Damage; + inc(e) end; + end + else if Gear^.Kind = gtExplosives then + Score:= Gear^.Health - Gear^.Damage + else if Gear^.Kind = gtMine then + Score:= max(0,35-Gear^.Damage); end; + inc(Targets.Count) + end; + Gear:= Gear^.NextGear + end; if e > f then friendlyfactor:= 300 + (e - f) * 30 else friendlyfactor:= max(30, 300 - f * 80 div max(1,e)) @@ -286,7 +320,7 @@ if (Land[y-r, x-r] > lfAllObjMask) or (Land[y+r, x-r] > lfAllObjMask) or - (Land[y-r, x+r] > lfAllObjMask) or + (Land[y-r, x-r] > lfAllObjMask) or (Land[y+r, x+r] > lfAllObjMask) then exit(true); @@ -300,7 +334,7 @@ if (Land[y-r, x-r] and lfNotCurrentMask <> 0) or (Land[y+r, x-r] and lfNotCurrentMask <> 0) or - (Land[y-r, x+r] and lfNotCurrentMask <> 0) or + (Land[y+r, x-r] and lfNotCurrentMask <> 0) or (Land[y+r, x+r] and lfNotCurrentMask <> 0) then exit(true); @@ -326,43 +360,64 @@ -function TraceFall(eX, eY: LongInt; x, y, dX, dY: Real; r: LongWord): LongInt; +function TraceFall(eX, eY: LongInt; var x, y: Real; dX, dY: Real; r: LongWord; Target: TTarget): LongInt; var skipLandCheck: boolean; - rCorner: real; + rCorner, dxdy, odX, odY: real; dmg: LongInt; begin + odX:= dX; + odY:= dY; skipLandCheck:= true; - if x - eX < 0 then dX:= -dX; - if y - eY < 0 then dY:= -dY; // ok. attempt approximate search for an unbroken trajectory into water. if it continues far enough, assume out of map rCorner:= r * 0.75; while true do - begin + begin x:= x + dX; y:= y + dY; dY:= dY + cGravityf; skipLandCheck:= skipLandCheck and (r <> 0) and (abs(eX-x) + abs(eY-y) < r) and ((abs(eX-x) < rCorner) or (abs(eY-y) < rCorner)); - if not skipLandCheck and TestCollExcludingObjects(trunc(x), trunc(y), cHHRadius) then - begin - if 0.4 < dY then - begin - dmg := 1 + trunc((abs(dY) - 0.4) * 70); - if dmg >= 1 then - exit(dmg); + if not skipLandCheck and TestCollExcludingObjects(trunc(x), trunc(y), Target.Radius) then + with Target do + begin + if (Kind = gtHedgehog) and (0.4 < dY) then + begin + dmg := 1 + trunc((dY - 0.4) * 70); + exit(dmg) + end + else + begin + dxdy:= abs(dX)+abs(dY); + if ((Kind = gtMine) and (dxdy > 0.35)) or + ((Kind = gtExplosives) and + (((State and gstTmpFlag <> 0) and (dxdy > 0.35)) or + ((State and gstTmpFlag = 0) and + ((abs(odX) > 0.15) or ((abs(odY) > 0.15) and + (abs(odX) > 0.02))) and (dxdy > 0.35)))) then + begin + dmg := trunc(dxdy * 25); + exit(dmg) + end + else if (Kind = gtExplosives) and not((abs(odX) > 0.15) or ((abs(odY) > 0.15) and (abs(odX) > 0.02))) and (dY > 0.2) then + begin + dmg := trunc(dy * 70); + exit(dmg) + end + end; + exit(0) end; - exit(0) - end; - if (y > cWaterLine) or (x > 4096) or (x < 0) then - exit(-1); - end; + if (y > cWaterLine) or (x > rightX) or (x < leftX) then exit(-1) + end end; -function TraceShoveFall(x, y, dX, dY: Real): LongInt; +function TraceShoveFall(var x, y: Real; dX, dY: Real; Target: TTarget): LongInt; var dmg: LongInt; + dxdy, odX, odY: real; begin + odX:= dX; + odY:= dY; //v:= random($FFFFFFFF); while true do - begin + begin x:= x + dX; y:= y + dY; dY:= dY + cGravityf; @@ -373,32 +428,55 @@ UpdateLandTexture(trunc(X), 1, trunc(Y), 1, true); end;} - - // consider adding dX/dY calc here for fall damage - if TestCollExcludingObjects(trunc(x), trunc(y), cHHRadius) then - begin - if 0.4 < dY then - begin - dmg := 1 + trunc((abs(dY) - 0.4) * 70); - if dmg >= 1 then + if TestCollExcludingObjects(trunc(x), trunc(y), Target.Radius) then + with Target do + begin + if (Kind = gtHedgehog) and (0.4 < dY) then + begin + dmg := trunc((dY - 0.4) * 70); exit(dmg); - end; + end + else + begin + dxdy:= abs(dX)+abs(dY); + if ((Kind = gtMine) and (dxdy > 0.4)) or + ((Kind = gtExplosives) and + (((State and gstTmpFlag <> 0) and (dxdy > 0.4)) or + ((State and gstTmpFlag = 0) and + ((abs(odX) > 0.15) or ((abs(odY) > 0.15) and + (abs(odX) > 0.02))) and (dxdy > 0.35)))) then + begin + dmg := trunc(dxdy * 50); + exit(dmg) + end + else if (Kind = gtExplosives) and not((abs(odX) > 0.15) or ((abs(odY) > 0.15) and (abs(odX) > 0.02))) and (dY > 0.2) then + begin + dmg := trunc(dy * 70); + exit(dmg) + end + end; exit(0) end; - if (y > cWaterLine) or (x > 4096) or (x < 0) then + if (y > cWaterLine) or (x > rightX) or (x < leftX) then // returning -1 for drowning so it can be considered in the Rate routine exit(-1) end; end; -function RateExplosion(Me: PGear; x, y, r: LongInt): LongInt; +function RateExplosion(Me: PGear; x, y, r: LongInt): LongInt; inline; begin - RateExplosion:= RateExplosion(Me, x, y, r, 0); + RateExplosion:= RealRateExplosion(Me, x, y, r, 0); + ResetTargets; +end; +function RateExplosion(Me: PGear; x, y, r: LongInt; Flags: LongWord): LongInt; inline; +begin + RateExplosion:= RealRateExplosion(Me, x, y, r, Flags); + ResetTargets; end; -function RateExplosion(Me: PGear; x, y, r: LongInt; Flags: LongWord): LongInt; -var i, fallDmg, dmg, dmgBase, rate, erasure: LongInt; - dX, dY: real; +function RealRateExplosion(Me: PGear; x, y, r: LongInt; Flags: LongWord): LongInt; +var i, fallDmg, dmg, dmgBase, rate, subrate, erasure: LongInt; + pX, pY, dX, dY: real; hadSkips: boolean; begin fallDmg:= 0; @@ -410,10 +488,12 @@ Point.y:= hwRound(Me^.Y); skip:= false; matters:= true; + Kind:= gtHedgehog; + Density:= 1; + Radius:= cHHRadius; Score:= - ThinkingHH^.Health end; // rate explosion -dmgBase:= r + cHHRadius div 2; if (Flags and afErasesLand <> 0) and (GameFlags and gfSolidLand = 0) then erasure:= r else erasure:= 0; @@ -421,51 +501,88 @@ hadSkips:= false; for i:= 0 to Targets.Count do - with Targets.ar[i] do - if not matters then hadSkips:= true - else - begin - dmg:= 0; - if abs(Point.x - x) + abs(Point.y - y) < dmgBase then - dmg:= trunc(dmgMod * min((dmgBase - trunc(sqrt(sqr(Point.x - x)+sqr(Point.y - y)))) div 2, r)); + if not Targets.ar[i].dead then + with Targets.ar[i] do + if not matters then hadSkips:= true + else + begin + dmg:= 0; + dmgBase:= r + Radius div 2; + if abs(Point.x - x) + abs(Point.y - y) < dmgBase then + dmg:= trunc(dmgMod * min((dmgBase - trunc(sqrt(sqr(Point.x - x)+sqr(Point.y - y)))) div 2, r)); - if dmg > 0 then - begin - if (Flags and afTrackFall <> 0) and (dmg < abs(Score)) then + if dmg > 0 then begin - dX:= 0.005 * dmg + 0.01; - dY:= dX; - if (x and LAND_WIDTH_MASK = 0) and ((y+cHHRadius+2) and LAND_HEIGHT_MASK = 0) and - (Land[y+cHHRadius+2, x] and lfIndestructible <> 0) then - fallDmg:= trunc(TraceFall(x, y, Point.x, Point.y, dX, dY, 0) * dmgMod) - else fallDmg:= trunc(TraceFall(x, y, Point.x, Point.y, dX, dY, erasure) * dmgMod) - end; - if fallDmg < 0 then // drowning. score healthier hogs higher, since their death is more likely to benefit the AI - if Score > 0 then - inc(rate, (KillScore + Score div 10) * 1024) // Add a bit of a bonus for bigger hog drownings - else - dec(rate, (KillScore * friendlyfactor div 100 - Score div 10) * 1024) // and more of a punishment for drowning bigger friendly hogs - else if (dmg+fallDmg) >= abs(Score) then - if Score > 0 then - inc(rate, KillScore * 1024 + (dmg + fallDmg)) // tiny bonus for dealing more damage than needed to kill - else - dec(rate, KillScore * friendlyfactor div 100 * 1024) - else - if Score > 0 then - inc(rate, (dmg + fallDmg) * 1024) - else dec(rate, (dmg + fallDmg) * friendlyfactor div 100 * 1024) + pX:= Point.x; + pY:= Point.y; + fallDmg:= 0; + if (Flags and afTrackFall <> 0) and (Score > 0) and (dmg < Score) then + begin + dX:= (0.005 * dmg + 0.01) / Density; + dY:= dX; + if (Kind = gtExplosives) and (State and gstTmpFlag = 0) and + (((abs(dY) > 0.15) and (abs(dX) < 0.02)) or + ((abs(dY) < 0.15) and (abs(dX) < 0.15))) then + dX:= 0; + + if pX - x < 0 then dX:= -dX; + if pY - y < 0 then dY:= -dY; + + if (x and LAND_WIDTH_MASK = 0) and ((y+cHHRadius+2) and LAND_HEIGHT_MASK = 0) and + (Land[y+cHHRadius+2, x] and lfIndestructible <> 0) then + fallDmg:= trunc(TraceFall(x, y, pX, pY, dX, dY, 0, Targets.ar[i]) * dmgMod) + else fallDmg:= trunc(TraceFall(x, y, pX, pY, dX, dY, erasure, Targets.ar[i]) * dmgMod) + end; + if Kind = gtHedgehog then + begin + if fallDmg < 0 then // drowning. score healthier hogs higher, since their death is more likely to benefit the AI + begin + if Score > 0 then + inc(rate, (KillScore + Score div 10) * 1024) // Add a bit of a bonus for bigger hog drownings + else + dec(rate, (KillScore * friendlyfactor div 100 - Score div 10) * 1024) // and more of a punishment for drowning bigger friendly hogs + end + else if (dmg+fallDmg) >= abs(Score) then + begin + dead:= true; + Targets.reset:= true; + if dX < 0.035 then + begin + subrate:= RealRateExplosion(Me, round(pX), round(pY), 61, afErasesLand or (Flags and afTrackFall)); + if abs(subrate) > 2000 then inc(Rate,subrate) + end; + if Score > 0 then + inc(rate, KillScore * 1024 + (dmg + fallDmg)) // tiny bonus for dealing more damage than needed to kill + else dec(rate, KillScore * friendlyfactor div 100 * 1024) + end + else + begin + if Score > 0 then + inc(rate, (dmg + fallDmg) * 1024) + else dec(rate, (dmg + fallDmg) * friendlyfactor div 100 * 1024) + end + end + else if (fallDmg >= 0) and ((dmg+fallDmg) >= Score) then + begin + dead:= true; + Targets.reset:= true; + if Kind = gtExplosives then + subrate:= RealRateExplosion(Me, round(pX), round(pY), 151, afErasesLand or (Flags and afTrackFall)) + else subrate:= RealRateExplosion(Me, round(pX), round(pY), 101, afErasesLand or (Flags and afTrackFall)); + if abs(subrate) > 2000 then inc(Rate,subrate); + end + end end; - end; if hadSkips and (rate = 0) then - RateExplosion:= BadTurn + RealRateExplosion:= BadTurn else - RateExplosion:= rate; + RealRateExplosion:= rate; end; -function RateShove(x, y, r, power, kick: LongInt; gdX, gdY: real; Flags: LongWord): LongInt; -var i, fallDmg, dmg, rate: LongInt; - dX, dY: real; +function RateShove(Me: PGear; x, y, r, power, kick: LongInt; gdX, gdY: real; Flags: LongWord): LongInt; +var i, fallDmg, dmg, rate, subrate: LongInt; + dX, dY, pX, pY: real; begin fallDmg:= 0; dX:= gdX * 0.01 * kick; @@ -473,42 +590,78 @@ rate:= 0; for i:= 0 to Pred(Targets.Count) do with Targets.ar[i] do - if skip then - if (Flags and afSetSkip = 0) then skip:= false else {still skip} - else if matters then - begin - dmg:= 0; - if abs(Point.x - x) + abs(Point.y - y) < r then - dmg:= r - trunc(sqrt(sqr(Point.x - x)+sqr(Point.y - y))); - - if dmg > 0 then + if skip then + begin + if Flags and afSetSkip = 0 then skip:= false + end + else if matters then begin - if (Flags and afSetSkip <> 0) then skip:= true; - if (Flags and afTrackFall <> 0) and (Score > 0) then - fallDmg:= trunc(TraceShoveFall(Point.x, Point.y - 2, dX, dY) * dmgMod); - if fallDmg < 0 then // drowning. score healthier hogs higher, since their death is more likely to benefit the AI - if Score > 0 then - inc(rate, KillScore + Score div 10) // Add a bit of a bonus for bigger hog drownings - else - dec(rate, KillScore * friendlyfactor div 100 - Score div 10) // and more of a punishment for drowning bigger friendly hogs - else if power+fallDmg >= abs(Score) then - if Score > 0 then - inc(rate, KillScore) - else - dec(rate, KillScore * friendlyfactor div 100) - else - if Score > 0 then - inc(rate, power+fallDmg) - else - dec(rate, (power+fallDmg) * friendlyfactor div 100) + dmg:= 0; + if abs(Point.x - x) + abs(Point.y - y) < r then + dmg:= r - trunc(sqrt(sqr(Point.x - x)+sqr(Point.y - y))); + + if dmg > 0 then + begin + pX:= Point.x; + pY:= Point.y-2; + fallDmg:= 0; + if (Flags and afSetSkip <> 0) then skip:= true; + if not(dead) and (Flags and afTrackFall <> 0) and (Score > 0) and (power < Score) then + if (Kind = gtExplosives) and (State and gstTmpFlag = 0) and + (((abs(dY) > 0.15) and (abs(dX) < 0.02)) or + ((abs(dY) < 0.15) and (abs(dX) < 0.15))) then + fallDmg:= trunc(TraceShoveFall(pX, pY, 0, dY, Targets.ar[i]) * dmgMod) + else + fallDmg:= trunc(TraceShoveFall(pX, pY, dX, dY, Targets.ar[i]) * dmgMod); + if Kind = gtHedgehog then + begin + if fallDmg < 0 then // drowning. score healthier hogs higher, since their death is more likely to benefit the AI + begin + if Score > 0 then + inc(rate, KillScore + Score div 10) // Add a bit of a bonus for bigger hog drownings + else + dec(rate, KillScore * friendlyfactor div 100 - Score div 10) // and more of a punishment for drowning bigger friendly hogs + end + else if power+fallDmg >= abs(Score) then + begin + dead:= true; + Targets.reset:= true; + if dX < 0.035 then + begin + subrate:= RealRateExplosion(Me, round(pX), round(pY), 61, afErasesLand or afTrackFall); + if abs(subrate) > 2000 then inc(Rate,subrate div 1024) + end; + if Score > 0 then + inc(rate, KillScore) + else + dec(rate, KillScore * friendlyfactor div 100) + end + else + begin + if Score > 0 then + inc(rate, power+fallDmg) + else + dec(rate, (power+fallDmg) * friendlyfactor div 100) + end + end + else if (fallDmg >= 0) and ((dmg+fallDmg) >= Score) then + begin + dead:= true; + Targets.reset:= true; + if Kind = gtExplosives then + subrate:= RealRateExplosion(Me, round(pX), round(pY), 151, afErasesLand or (Flags and afTrackFall)) + else subrate:= RealRateExplosion(Me, round(pX), round(pY), 101, afErasesLand or (Flags and afTrackFall)); + if abs(subrate) > 2000 then inc(Rate,subrate div 1024); + end + end end; - end; -RateShove:= rate * 1024 +RateShove:= rate * 1024; +ResetTargets end; function RateShotgun(Me: PGear; gdX, gdY: real; x, y: LongInt): LongInt; -var i, dmg, fallDmg, baseDmg, rate, erasure: LongInt; - dX, dY: real; +var i, dmg, fallDmg, baseDmg, rate, subrate, erasure: LongInt; + pX, pY, dX, dY: real; hadSkips: boolean; begin rate:= 0; @@ -521,6 +674,9 @@ Point.y:= hwRound(Me^.Y); skip:= false; matters:= true; + Kind:= gtHedgehog; + Density:= 1; + Radius:= cHHRadius; Score:= - ThinkingHH^.Health end; // rate shot @@ -532,48 +688,80 @@ hadSkips:= false; for i:= 0 to Targets.Count do - with Targets.ar[i] do - if not matters then hadSkips:= true - else - begin - dmg:= 0; - if abs(Point.x - x) + abs(Point.y - y) < baseDmg then - begin - dmg:= min(baseDmg - trunc(sqrt(sqr(Point.x - x)+sqr(Point.y - y))), 25); - dmg:= trunc(dmg * dmgMod); - end; - if dmg > 0 then + if not Targets.ar[i].dead then + with Targets.ar[i] do + if not matters then hadSkips:= true + else begin - dX:= gdX * dmg; - dY:= gdY * dmg; - if dX < 0 then dX:= dX - 0.01 - else dX:= dX + 0.01; - if (x and LAND_WIDTH_MASK = 0) and ((y+cHHRadius+2) and LAND_HEIGHT_MASK = 0) and - (Land[y+cHHRadius+2, x] and lfIndestructible <> 0) then - fallDmg:= trunc(TraceFall(x, y, Point.x, Point.y, dX, dY, 0) * dmgMod) - else fallDmg:= trunc(TraceFall(x, y, Point.x, Point.y, dX, dY, erasure) * dmgMod); - if fallDmg < 0 then // drowning. score healthier hogs higher, since their death is more likely to benefit the AI - if Score > 0 then - inc(rate, KillScore + Score div 10) // Add a bit of a bonus for bigger hog drownings - else - dec(rate, KillScore * friendlyfactor div 100 - Score div 10) // and more of a punishment for drowning bigger friendly hogs - else if (dmg+fallDmg) >= abs(Score) then - if Score > 0 then - inc(rate, KillScore) - else - dec(rate, KillScore * friendlyfactor div 100) - else - if Score > 0 then - inc(rate, dmg+fallDmg) - else - dec(rate, (dmg+fallDmg) * friendlyfactor div 100) + dmg:= 0; + if abs(Point.x - x) + abs(Point.y - y) < baseDmg then + begin + dmg:= min(baseDmg - trunc(sqrt(sqr(Point.x - x)+sqr(Point.y - y))), 25); + dmg:= trunc(dmg * dmgMod); + end; + if dmg > 0 then + begin + if not(dead) and (Score > 0) and (dmg < Score) then + begin + pX:= Point.x; + pY:= Point.y; + dX:= gdX * dmg / Density; + dY:= gdY * dmg / Density; + if dX < 0 then dX:= dX - 0.01 + else dX:= dX + 0.01; + if (Kind = gtExplosives) and (State and gstTmpFlag = 0) and + (((abs(dY) > 0.15) and (abs(dX) < 0.02)) or + ((abs(dY) < 0.15) and (abs(dX) < 0.15))) then + dX:= 0; + if (x and LAND_WIDTH_MASK = 0) and ((y+cHHRadius+2) and LAND_HEIGHT_MASK = 0) and + (Land[y+cHHRadius+2, x] and lfIndestructible <> 0) then + fallDmg:= trunc(TraceFall(x, y, pX, pY, dX, dY, 0, Targets.ar[i]) * dmgMod) + else fallDmg:= trunc(TraceFall(x, y, pX, pY, dX, dY, erasure, Targets.ar[i]) * dmgMod) + end; + if Kind = gtHedgehog then + begin + if fallDmg < 0 then // drowning. score healthier hogs higher, since their death is more likely to benefit the AI + begin + if Score > 0 then + inc(rate, KillScore + Score div 10) // Add a bit of a bonus for bigger hog drownings + else + dec(rate, KillScore * friendlyfactor div 100 - Score div 10) // and more of a punishment for drowning bigger friendly hogs + end + else if (dmg+fallDmg) >= abs(Score) then + begin + dead:= true; + Targets.reset:= true; + if dX < 0.035 then + begin + subrate:= RealRateExplosion(Me, round(pX), round(pY), 61, afErasesLand or afTrackFall); + if abs(subrate) > 2000 then inc(Rate,subrate div 1024) + end; + if Score > 0 then + inc(rate, KillScore) + else + dec(rate, KillScore * friendlyfactor div 100) + end + else if Score > 0 then + inc(rate, dmg+fallDmg) + else dec(rate, (dmg+fallDmg) * friendlyfactor div 100) + end + else if (fallDmg >= 0) and ((dmg+fallDmg) >= Score) then + begin + dead:= true; + Targets.reset:= true; + if Kind = gtExplosives then + subrate:= RealRateExplosion(Me, round(pX), round(pY), 151, afErasesLand or afTrackFall) + else subrate:= RealRateExplosion(Me, round(pX), round(pY), 101, afErasesLand or afTrackFall); + if abs(subrate) > 2000 then inc(Rate,subrate div 1024); + end + end end; - end; if hadSkips and (rate = 0) then RateShotgun:= BadTurn else RateShotgun:= rate * 1024; + ResetTargets; end; function RateHammer(Me: PGear): LongInt; @@ -586,9 +774,8 @@ for i:= 0 to Pred(Targets.Count) do with Targets.ar[i] do - if matters then // hammer hit radius is 8, shift is 10 - if abs(Point.x - x) + abs(Point.y - y) < 18 then + if matters and (Kind = gtHedgehog) and (abs(Point.x - x) + abs(Point.y - y) < 18) then begin r:= trunc(sqrt(sqr(Point.x - x)+sqr(Point.y - y))); diff -r e095e3023682 -r 7f04ad2cda54 hedgewars/uAmmos.pas diff -r e095e3023682 -r 7f04ad2cda54 hedgewars/uCollisions.pas --- a/hedgewars/uCollisions.pas Sun Apr 21 01:36:08 2013 +0200 +++ b/hedgewars/uCollisions.pas Wed May 29 22:52:37 2013 +0400 @@ -83,7 +83,7 @@ X:= hwRound(Gear^.X); Y:= hwRound(Gear^.Y); Radius:= Gear^.Radius; - ChangeRoundInLand(X, Y, Radius - 1, true, (Gear = CurrentHedgehog^.Gear) or (Gear^.Kind = gtCase)); + ChangeRoundInLand(X, Y, Radius - 1, true, (Gear = CurrentHedgehog^.Gear) or ((Gear^.Kind = gtCase) and (Gear^.State and gstFrozen <> 0))); cGear:= Gear end; Gear^.CollisionIndex:= Count; @@ -104,7 +104,7 @@ if Gear^.CollisionIndex >= 0 then begin with cinfos[Gear^.CollisionIndex] do - ChangeRoundInLand(X, Y, Radius - 1, false, (Gear = CurrentHedgehog^.Gear) or (Gear^.Kind = gtCase)); + ChangeRoundInLand(X, Y, Radius - 1, false, (Gear = CurrentHedgehog^.Gear) or ((Gear^.Kind = gtCase) and (Gear^.State and gstFrozen <> 0))); cinfos[Gear^.CollisionIndex]:= cinfos[Pred(Count)]; cinfos[Gear^.CollisionIndex].cGear^.CollisionIndex:= Gear^.CollisionIndex; Gear^.CollisionIndex:= -1; diff -r e095e3023682 -r 7f04ad2cda54 hedgewars/uConsts.pas --- a/hedgewars/uConsts.pas Sun Apr 21 01:36:08 2013 +0200 +++ b/hedgewars/uConsts.pas Wed May 29 22:52:37 2013 +0400 @@ -212,6 +212,8 @@ gstLoser = $00080000; gstHHGone = $00100000; gstInvisible = $00200000; + gstSubmersible = $00400000; + gstFrozen = $00800000; // gear messages gmLeft = $00000001; diff -r e095e3023682 -r 7f04ad2cda54 hedgewars/uGearsHedgehog.pas --- a/hedgewars/uGearsHedgehog.pas Sun Apr 21 01:36:08 2013 +0200 +++ b/hedgewars/uGearsHedgehog.pas Wed May 29 22:52:37 2013 +0400 @@ -257,8 +257,16 @@ and ((Gear^.Message and gmLJump) <> 0) and ((Ammoz[CurAmmoType].Ammo.Propz and ammoprop_AltUse) <> 0) then begin - newDx:= dX; - newDy:= dY; + if (CurAmmoGear^.AmmoType = amJetpack) and (Gear^.Message and gmPrecise <> 0) then + begin + newDx:= xx*cMaxPower/cPowerDivisor; + newDy:= yy*cMaxPower/cPowerDivisor + end + else + begin + newDx:= dX; + newDy:= dY + end; altUse:= true end else @@ -385,11 +393,15 @@ amTardis: newGear:= AddGear(hwRound(X), hwRound(Y), gtTardis, 0, _0, _0, 5000); amIceGun: newGear:= AddGear(hwRound(X), hwRound(Y), gtIceGun, 0, _0, _0, 0); end; - if altUse and (newGear <> nil) then + if altUse and (newGear <> nil) and + ((CurAmmoGear = nil) or (CurAmmoGear^.AmmoType <> amJetpack) or (Gear^.Message and gmPrecise = 0)) then begin newGear^.dX:= newDx / newGear^.Density; newGear^.dY:= newDY / newGear^.Density end; + if (CurAmmoGear <> nil) and (CurAmmoGear^.AmmoType = amJetpack) and + (Gear^.Message and gmPrecise <> 0) and (hwRound(Y) > cWaterLine) then + newGear^.State:= newGear^.State or gstSubmersible; case CurAmmoType of amGrenade, amMolotov, @@ -514,7 +526,9 @@ begin if TagTurnTimeLeft = 0 then TagTurnTimeLeft:= TurnTimeLeft; - TurnTimeLeft:=(Ammoz[a].TimeAfterTurn * cGetAwayTime) div 100; + if (CurAmmoGear <> nil) and (CurAmmoGear^.State and gstSubmersible <> 0) and (hwRound(CurAmmoGear^.Y) > cWaterLine) then + TurnTimeLeft:=(Ammoz[a].TimeAfterTurn * cGetAwayTime) div 25 + else TurnTimeLeft:=(Ammoz[a].TimeAfterTurn * cGetAwayTime) div 100; end; if ((Ammoz[a].Ammo.Propz and ammoprop_NoRoundEnd) = 0) and (HHGear <> nil) then HHGear^.State:= HHGear^.State or gstAttacked; @@ -547,6 +561,7 @@ end else if Gear^.Timer = 1 then begin + Gear^.Hedgehog^.Effects[heFrozen]:= 0; Gear^.State:= Gear^.State or gstNoDamage; doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 30, CurrentHedgehog, EXPLAutoSound); AddGear(hwRound(Gear^.X), hwRound(Gear^.Y), gtGrave, 0, _0, _0, 0)^.Hedgehog:= Gear^.Hedgehog; @@ -798,7 +813,7 @@ da:= 2 else da:= 1; -if (((HHGear^.Message and gmPrecise) = 0) or ((GameTicks mod 5) = 1)) then +if ((HHGear^.Message and gmPrecise = 0) or ((CurAmmoGear <> nil) and (CurAmmoGear^.AmmoType = amJetpack))) or (GameTicks mod 5 = 1) then if ((HHGear^.Message and gmUp) <> 0) and (HHGear^.Angle >= CurMinAngle + da) then dec(HHGear^.Angle, da) else @@ -961,8 +976,11 @@ begin Gear^.State:= Gear^.State and (not gstWinner); Gear^.State:= Gear^.State and (not gstMoving); - while (TestCollisionYWithGear(Gear,1) = 0) and (not CheckGearDrowning(Gear)) do - Gear^.Y:= Gear^.Y+_1; + while (TestCollisionYWithGear(Gear,1) = 0) and (not CheckGearDrowning(Gear)) and (Gear <> nil) do + Gear^.Y:= Gear^.Y + _1; + + // could become nil in CheckGearDrowning if ai's hog fails to respawn in ai survival + if Gear = nil then exit; SetLittle(Gear^.dX); Gear^.dY:= _0 end @@ -982,7 +1000,10 @@ Gear^.dY:= _0; Gear^.Y:= Gear^.Y + _1 end; + CheckGearDrowning(Gear); + // could become nil if ai's hog fails to respawn in ai survival + if Gear = nil then exit; // hide target cursor if current hog is drowning if (Gear^.State and gstDrowning) <> 0 then if (CurrentHedgehog^.Gear = Gear) then @@ -1059,7 +1080,7 @@ HHGear^.Message:= HHGear^.Message or gmAttack; // check for case with ammo t:= CheckGearNear(HHGear, gtCase, 36, 36); - if t <> nil then + if (t <> nil) and (t^.State and gstFrozen = 0) then PickUp(HHGear, t) end; diff -r e095e3023682 -r 7f04ad2cda54 hedgewars/uGearsList.pas --- a/hedgewars/uGearsList.pas Sun Apr 21 01:36:08 2013 +0200 +++ b/hedgewars/uGearsList.pas Wed May 29 22:52:37 2013 +0400 @@ -469,7 +469,8 @@ end; gtJetpack: begin gear^.Health:= 2000; - gear^.Damage:= 100 + gear^.Damage:= 100; + gear^.State:= gstSubmersible end; gtMolotov: begin gear^.Radius:= 6; diff -r e095e3023682 -r 7f04ad2cda54 hedgewars/uGearsRender.pas --- a/hedgewars/uGearsRender.pas Sun Apr 21 01:36:08 2013 +0200 +++ b/hedgewars/uGearsRender.pas Wed May 29 22:52:37 2013 +0400 @@ -979,6 +979,8 @@ aAngle: real; startX, endX, startY, endY: LongInt; begin + if Gear^.State and gstFrozen <> 0 then Tint($A0, $A0, $FF, $FF); + //if Gear^.State and gstFrozen <> 0 then Tint(IceColor or $FF); if Gear^.Target.X <> NoPointX then if Gear^.AmmoType = amBee then DrawSpriteRotatedF(sprTargetBee, Gear^.Target.X + WorldDx, Gear^.Target.Y + WorldDy, 0, 0, (RealTicks shr 3) mod 360) @@ -1038,11 +1040,13 @@ gtPickHammer: DrawSprite(sprPHammer, x - 16, y - 50 + LongInt(((GameTicks shr 5) and 1) * 2), 0); gtRope: DrawRope(Gear); - gtMine: if (((Gear^.State and gstAttacking) = 0)or((Gear^.Timer and $3FF) < 420)) and (Gear^.Health <> 0) then + gtMine: begin + if (((Gear^.State and gstAttacking) = 0)or((Gear^.Timer and $3FF) < 420)) and (Gear^.Health <> 0) then DrawSpriteRotated(sprMineOff, x, y, 0, Gear^.DirAngle) - else if Gear^.Health <> 0 then - DrawSpriteRotated(sprMineOn, x, y, 0, Gear^.DirAngle) - else DrawSpriteRotated(sprMineDead, x, y, 0, Gear^.DirAngle); + else if Gear^.Health <> 0 then + DrawSpriteRotated(sprMineOn, x, y, 0, Gear^.DirAngle) + else DrawSpriteRotated(sprMineDead, x, y, 0, Gear^.DirAngle); + end; gtSMine: if (((Gear^.State and gstAttacking) = 0)or((Gear^.Timer and $3FF) < 420)) and (Gear^.Health <> 0) then DrawSpriteRotated(sprSMineOff, x, y, 0, Gear^.DirAngle) @@ -1056,26 +1060,38 @@ begin if ((Gear^.Pos and posCaseAmmo) <> 0) then begin - i:= (GameTicks shr 6) mod 64; - if i > 18 then - i:= 0; - DrawSprite(sprCase, x - 24, y - 24, i); + if Gear^.State and gstFrozen <> 0 then + DrawSprite(sprCase, x - 24, y - 28, 0) + else + begin + i:= (GameTicks shr 6) mod 64; + if i > 18 then i:= 0; + DrawSprite(sprCase, x - 24, y - 24, i) + end end else if ((Gear^.Pos and posCaseHealth) <> 0) then begin - i:= ((GameTicks shr 6) + 38) mod 64; - if i > 13 then - i:= 0; - DrawSprite(sprFAid, x - 24, y - 24, i); + if Gear^.State and gstFrozen <> 0 then + DrawSprite(sprFAid, x - 24, y - 28, 0) + else + begin + i:= ((GameTicks shr 6) + 38) mod 64; + if i > 13 then i:= 0; + DrawSprite(sprFAid, x - 24, y - 24, i) + end end else if ((Gear^.Pos and posCaseUtility) <> 0) then begin - i:= (GameTicks shr 6) mod 70; - if i > 23 then - i:= 0; - i:= i mod 12; - DrawSprite(sprUtility, x - 24, y - 24, i); - end; + if Gear^.State and gstFrozen <> 0 then + DrawSprite(sprUtility, x - 24, y - 28, 0) + else + begin + i:= (GameTicks shr 6) mod 70; + if i > 23 then i:= 0; + i:= i mod 12; + DrawSprite(sprUtility, x - 24, y - 24, i) + end + end end; if Gear^.Timer < 1833 then begin @@ -1096,7 +1112,7 @@ else if Gear^.State and gsttmpFlag = 0 then DrawSpriteRotatedF(sprExplosivesRoll, x, y + 4, 0, 0, Gear^.DirAngle) else - DrawSpriteRotatedF(sprExplosivesRoll, x, y + 4, 1, 0, Gear^.DirAngle); + DrawSpriteRotatedF(sprExplosivesRoll, x, y + 4, 1, 0, Gear^.DirAngle) end; gtDynamite: DrawSprite(sprDynamite, x - 16, y - 25, Gear^.Tag and 1, Gear^.Tag shr 1); gtClusterBomb: DrawSpriteRotated(sprClusterBomb, x, y, 0, Gear^.DirAngle); @@ -1285,6 +1301,7 @@ end; if Gear^.RenderTimer and (Gear^.Tex <> nil) then DrawTextureCentered(x + 8, y + 8, Gear^.Tex); + if Gear^.State and gstFrozen <> 0 then Tint($FF, $FF, $FF, $FF) end; end. diff -r e095e3023682 -r 7f04ad2cda54 hedgewars/uGearsUtils.pas --- a/hedgewars/uGearsUtils.pas Sun Apr 21 01:36:08 2013 +0200 +++ b/hedgewars/uGearsUtils.pas Wed May 29 22:52:37 2013 +0400 @@ -31,13 +31,13 @@ procedure HHHurt(Hedgehog: PHedgehog; Source: TDamageSource); procedure CheckHHDamage(Gear: PGear); procedure CalcRotationDirAngle(Gear: PGear); -procedure ResurrectHedgehog(gear: PGear); +procedure ResurrectHedgehog(var gear: PGear); procedure FindPlace(var Gear: PGear; withFall: boolean; Left, Right: LongInt); inline; procedure FindPlace(var Gear: PGear; withFall: boolean; Left, Right: LongInt; skipProximity: boolean); function CheckGearNear(Gear: PGear; Kind: TGearType; rX, rY: LongInt): PGear; -function CheckGearDrowning(Gear: PGear): boolean; +function CheckGearDrowning(var Gear: PGear): boolean; procedure CheckCollision(Gear: PGear); inline; procedure CheckCollisionWithLand(Gear: PGear); inline; @@ -263,6 +263,7 @@ procedure HHHurt(Hedgehog: PHedgehog; Source: TDamageSource); begin +if Hedgehog^.Effects[heFrozen] <> 0 then exit; if (Source = dsFall) or (Source = dsExplosion) then case random(3) of 0: PlaySoundV(sndOoff1, Hedgehog^.Team^.voicepack); @@ -289,32 +290,34 @@ i: LongWord; particle: PVisualGear; begin - if _0_4 < Gear^.dY then - begin - dmg := ModifyDamage(1 + hwRound((hwAbs(Gear^.dY) - _0_4) * 70), Gear); - PlaySound(sndBump); - if dmg < 1 then - exit; +if _0_4 < Gear^.dY then + begin + dmg := ModifyDamage(1 + hwRound((Gear^.dY - _0_4) * 70), Gear); + if Gear^.Hedgehog^.Effects[heFrozen] = 0 then + PlaySound(sndBump) + else PlaySound(sndFrozenHogImpact); + if dmg < 1 then + exit; - for i:= min(12, (3 + dmg div 10)) downto 0 do - begin - particle := AddVisualGear(hwRound(Gear^.X) - 5 + Random(10), hwRound(Gear^.Y) + 12, vgtDust); - if particle <> nil then - particle^.dX := particle^.dX + (Gear^.dX.QWordValue / 21474836480); - end; + for i:= min(12, (3 + dmg div 10)) downto 0 do + begin + particle := AddVisualGear(hwRound(Gear^.X) - 5 + Random(10), hwRound(Gear^.Y) + 12, vgtDust); + if particle <> nil then + particle^.dX := particle^.dX + (Gear^.dX.QWordValue / 21474836480); + end; - if (Gear^.Invulnerable) then - exit; + if (Gear^.Invulnerable) then + exit; - //if _0_6 < Gear^.dY then - // PlaySound(sndOw4, Gear^.Hedgehog^.Team^.voicepack) - //else - // PlaySound(sndOw1, Gear^.Hedgehog^.Team^.voicepack); + //if _0_6 < Gear^.dY then + // PlaySound(sndOw4, Gear^.Hedgehog^.Team^.voicepack) + //else + // PlaySound(sndOw1, Gear^.Hedgehog^.Team^.voicepack); - if Gear^.LastDamage <> nil then - ApplyDamage(Gear, Gear^.LastDamage, dmg, dsFall) - else - ApplyDamage(Gear, CurrentHedgehog, dmg, dsFall); + if Gear^.LastDamage <> nil then + ApplyDamage(Gear, Gear^.LastDamage, dmg, dsFall) + else + ApplyDamage(Gear, CurrentHedgehog, dmg, dsFall); end end; @@ -337,7 +340,7 @@ Gear^.DirAngle := Gear^.DirAngle - 360 end; -function CheckGearDrowning(Gear: PGear): boolean; +function CheckGearDrowning(var Gear: PGear): boolean; var skipSpeed, skipAngle, skipDecay: hwFloat; i, maxDrops, X, Y: LongInt; @@ -361,7 +364,7 @@ else DeleteGear(Gear); exit end; - isSubmersible:= (Gear = CurrentHedgehog^.Gear) and (CurAmmoGear <> nil) and (CurAmmoGear^.AmmoType = amJetpack); + isSubmersible:= ((Gear = CurrentHedgehog^.Gear) and (CurAmmoGear <> nil) and (CurAmmoGear^.State and gstSubmersible <> 0)) or (Gear^.State and gstSubmersible <> 0); skipSpeed := _0_25; skipAngle := _1_9; skipDecay := _0_87; @@ -369,7 +372,7 @@ vdX:= hwFloat2Float(Gear^.dX); vdY:= hwFloat2Float(Gear^.dY); // this could perhaps be a tiny bit higher. - if (hwSqr(Gear^.dX) + hwSqr(Gear^.dY) > skipSpeed) + if (cWaterLine + 64 + Gear^.Radius > Y) and (hwSqr(Gear^.dX) + hwSqr(Gear^.dY) > skipSpeed) and (hwAbs(Gear^.dX) > skipAngle * hwAbs(Gear^.dY)) then begin Gear^.dY.isNegative := true; @@ -390,7 +393,11 @@ if Gear^.Kind = gtHedgehog then begin if Gear^.Hedgehog^.Effects[heResurrectable] <> 0 then - ResurrectHedgehog(Gear) + begin + // Gear could become nil after this, just exit to skip splashes + ResurrectHedgehog(Gear); + exit + end else begin Gear^.doStep := @doStepDrowningGear; @@ -402,9 +409,12 @@ Gear^.doStep := @doStepDrowningGear; if Gear^.Kind = gtFlake then exit // skip splashes - end; + end + else if (Y > cWaterLine + cVisibleWater*4) and + ((Gear <> CurrentHedgehog^.Gear) or (CurAmmoGear = nil) or (CurAmmoGear^.State and gstSubmersible = 0)) then + Gear^.doStep:= @doStepDrowningGear; if ((not isSubmersible) and (Y < cWaterLine + 64 + Gear^.Radius)) - or (isSubmersible and (Y < cWaterLine + 2 + Gear^.Radius) and ((CurAmmoGear^.Pos = 0) + or (isSubmersible and (Y < cWaterLine + 2 + Gear^.Radius) and (Gear = CurAmmoGear) and ((CurAmmoGear^.Pos = 0) and (CurAmmoGear^.dY < _0_01))) then if Gear^.Density * Gear^.dY > _1 then PlaySound(sndSplash) @@ -416,7 +426,7 @@ if ((cReducedQuality and rqPlainSplash) = 0) and (((not isSubmersible) and (Y < cWaterLine + 64 + Gear^.Radius)) - or (isSubmersible and (Y < cWaterLine + 2 + Gear^.Radius) and ((CurAmmoGear^.Pos = 0) + or (isSubmersible and (Y < cWaterLine + 2 + Gear^.Radius) and (Gear = CurAmmoGear) and ((CurAmmoGear^.Pos = 0) and (CurAmmoGear^.dY < _0_01)))) then begin splash:= AddVisualGear(X, cWaterLine, vgtSplash); @@ -457,7 +467,7 @@ end end end; - if isSubmersible and (CurAmmoGear^.Pos = 0) then + if isSubmersible and (Gear = CurAmmoGear) and (CurAmmoGear^.Pos = 0) then CurAmmoGear^.Pos := 1000 end else @@ -465,7 +475,7 @@ end; -procedure ResurrectHedgehog(gear: PGear); +procedure ResurrectHedgehog(var gear: PGear); var tempTeam : PTeam; sparkles: PVisualGear; gX, gY: LongInt; @@ -507,7 +517,7 @@ RenderHealth(gear^.Hedgehog^); ScriptCall('onGearResurrect', gear^.uid); gear^.State := gstWait; - end; + end; RecountTeamHealth(tempTeam); end; diff -r e095e3023682 -r 7f04ad2cda54 hedgewars/uLandGenMaze.pas --- a/hedgewars/uLandGenMaze.pas Sun Apr 21 01:36:08 2013 +0200 +++ b/hedgewars/uLandGenMaze.pas Wed May 29 22:52:37 2013 +0400 @@ -1,3 +1,5 @@ +{$INCLUDE "options.inc"} + unit uLandGenMaze; interface diff -r e095e3023682 -r 7f04ad2cda54 hedgewars/uLandTemplates.pas --- a/hedgewars/uLandTemplates.pas Sun Apr 21 01:36:08 2013 +0200 +++ b/hedgewars/uLandTemplates.pas Wed May 29 22:52:37 2013 +0400 @@ -1815,7 +1815,7 @@ FillPointsCount: Succ(High(Template0FPoints)); BezierizeCount: 3; RandPassesCount: 8; - TemplateHeight: 1424; TemplateWidth: 2848; + TemplateHeight: 1424; TemplateWidth: 3072; canMirror: true; canFlip: false; isNegative: false; canInvert: false; hasGirders: true; MaxHedgeHogs: 18; @@ -1826,7 +1826,7 @@ FillPointsCount: Succ(High(Template1FPoints)); BezierizeCount: 3; RandPassesCount: 7; - TemplateHeight: 1424; TemplateWidth: 2848; + TemplateHeight: 1424; TemplateWidth: 3072; canMirror: true; canFlip: false; isNegative: false; canInvert: false; hasGirders: true; MaxHedgeHogs: 18; @@ -1837,7 +1837,7 @@ FillPointsCount: Succ(High(Template2FPoints)); BezierizeCount: 2; RandPassesCount: 6; - TemplateHeight: 1424; TemplateWidth: 2848; + TemplateHeight: 1424; TemplateWidth: 3072; canMirror: true; canFlip: false; isNegative: false; canInvert: false; hasGirders: true; MaxHedgeHogs: 18; @@ -1848,7 +1848,7 @@ FillPointsCount: Succ(High(Template3FPoints)); BezierizeCount: 3; RandPassesCount: 4; - TemplateHeight: 1424; TemplateWidth: 2848; + TemplateHeight: 1424; TemplateWidth: 3072; canMirror: true; canFlip: false; isNegative: false; canInvert: false; hasGirders: true; MaxHedgeHogs: 18; @@ -1859,7 +1859,7 @@ FillPointsCount: Succ(High(Template4FPoints)); BezierizeCount: 3; RandPassesCount: 4; - TemplateHeight: 1424; TemplateWidth: 2848; + TemplateHeight: 1424; TemplateWidth: 3072; canMirror: true; canFlip: false; isNegative: false; canInvert: false; hasGirders: true; MaxHedgeHogs: 18; @@ -1870,7 +1870,7 @@ FillPointsCount: Succ(High(Template5FPoints)); BezierizeCount: 2; RandPassesCount: 8; - TemplateHeight: 1424; TemplateWidth: 2848; + TemplateHeight: 1424; TemplateWidth: 3072; canMirror: true; canFlip: false; isNegative: false; canInvert: false; hasGirders: true; MaxHedgeHogs: 18; @@ -1881,7 +1881,7 @@ FillPointsCount: Succ(High(Template6FPoints)); BezierizeCount: 2; RandPassesCount: 5; - TemplateHeight: 1424; TemplateWidth: 2848; + TemplateHeight: 1424; TemplateWidth: 3072; canMirror: true; canFlip: false; isNegative: false; canInvert: false; hasGirders: true; MaxHedgeHogs: 18; @@ -1892,7 +1892,7 @@ FillPointsCount: Succ(High(Template7FPoints)); BezierizeCount: 4; RandPassesCount: 4; - TemplateHeight: 1424; TemplateWidth: 2848; + TemplateHeight: 1424; TemplateWidth: 3072; canMirror: true; canFlip: false; isNegative: false; canInvert: false; hasGirders: true; MaxHedgeHogs: 18; @@ -1903,7 +1903,7 @@ FillPointsCount: Succ(High(Template8FPoints)); BezierizeCount: 2; RandPassesCount: 7; - TemplateHeight: 1424; TemplateWidth: 2848; + TemplateHeight: 1424; TemplateWidth: 3072; canMirror: true; canFlip: false; isNegative: false; canInvert: false; hasGirders: true; MaxHedgeHogs: 18; @@ -1914,7 +1914,7 @@ FillPointsCount: Succ(High(Template9FPoints)); BezierizeCount: 1; RandPassesCount: 5; - TemplateHeight: 1424; TemplateWidth: 2848; + TemplateHeight: 1424; TemplateWidth: 3072; canMirror: true; canFlip: false; isNegative: false; canInvert: false; hasGirders: true; MaxHedgeHogs: 18; @@ -1925,7 +1925,7 @@ FillPointsCount: Succ(High(Template10FPoints)); BezierizeCount: 2; RandPassesCount: 6; - TemplateHeight: 1424; TemplateWidth: 2848; + TemplateHeight: 1424; TemplateWidth: 3072; canMirror: true; canFlip: false; isNegative: false; canInvert: false; hasGirders: true; MaxHedgeHogs: 18; @@ -1936,7 +1936,7 @@ FillPointsCount: Succ(High(Template11FPoints)); BezierizeCount: 1; RandPassesCount: 8; - TemplateHeight: 1424; TemplateWidth: 2848; + TemplateHeight: 1424; TemplateWidth: 3072; canMirror: true; canFlip: false; isNegative: false; canInvert: false; hasGirders: true; MaxHedgeHogs: 18; @@ -1947,7 +1947,7 @@ FillPointsCount: Succ(High(Template12FPoints)); BezierizeCount: 3; RandPassesCount: 8; - TemplateHeight: 1424; TemplateWidth: 2848; + TemplateHeight: 1424; TemplateWidth: 3072; canMirror: true; canFlip: false; isNegative: false; canInvert: false; hasGirders: true; MaxHedgeHogs: 18; @@ -1958,7 +1958,7 @@ FillPointsCount: Succ(High(Template13FPoints)); BezierizeCount: 3; RandPassesCount: 5; - TemplateHeight: 1424; TemplateWidth: 2848; + TemplateHeight: 1424; TemplateWidth: 3072; canMirror: true; canFlip: false; isNegative: false; canInvert: false; hasGirders: true; MaxHedgeHogs: 18; @@ -1969,7 +1969,7 @@ FillPointsCount: Succ(High(Template14FPoints)); BezierizeCount: 3; RandPassesCount: 7; - TemplateHeight: 1424; TemplateWidth: 2848; + TemplateHeight: 1424; TemplateWidth: 3072; canMirror: true; canFlip: false; isNegative: false; canInvert: false; hasGirders: true; MaxHedgeHogs: 18; @@ -1980,7 +1980,7 @@ FillPointsCount: Succ(High(Template15FPoints)); BezierizeCount: 2; RandPassesCount: 6; - TemplateHeight: 1424; TemplateWidth: 2848; + TemplateHeight: 1424; TemplateWidth: 3072; canMirror: true; canFlip: false; isNegative: false; canInvert: false; hasGirders: true; MaxHedgeHogs: 18; @@ -1991,7 +1991,7 @@ FillPointsCount: Succ(High(Template16FPoints)); BezierizeCount: 2; RandPassesCount: 6; - TemplateHeight: 1424; TemplateWidth: 2848; + TemplateHeight: 1424; TemplateWidth: 3072; canMirror: true; canFlip: false; isNegative: false; canInvert: false; hasGirders: true; MaxHedgeHogs: 18; @@ -2002,7 +2002,7 @@ FillPointsCount: Succ(High(Template17FPoints)); BezierizeCount: 3; RandPassesCount: 7; - TemplateHeight: 1424; TemplateWidth: 2848; + TemplateHeight: 1424; TemplateWidth: 3072; canMirror: true; canFlip: false; isNegative: false; canInvert: false; hasGirders: true; MaxHedgeHogs: 18; @@ -2013,7 +2013,7 @@ FillPointsCount: Succ(High(Template18FPoints)); BezierizeCount: 3; RandPassesCount: 8; - TemplateHeight: 1424; TemplateWidth: 3900; + TemplateHeight: 1424; TemplateWidth: 4096; canMirror: true; canFlip: false; isNegative: false; canInvert: false; hasGirders: true; MaxHedgeHogs: 36; @@ -2024,7 +2024,7 @@ FillPointsCount: Succ(High(Template19FPoints)); BezierizeCount: 3; RandPassesCount: 7; - TemplateHeight: 1424; TemplateWidth: 3900; + TemplateHeight: 1424; TemplateWidth: 4096; canMirror: true; canFlip: false; isNegative: false; canInvert: false; hasGirders: true; MaxHedgeHogs: 36; @@ -2035,7 +2035,7 @@ FillPointsCount: Succ(High(Template20FPoints)); BezierizeCount: 2; RandPassesCount: 6; - TemplateHeight: 1424; TemplateWidth: 3900; + TemplateHeight: 1424; TemplateWidth: 4096; canMirror: true; canFlip: false; isNegative: false; canInvert: false; hasGirders: true; MaxHedgeHogs: 36; @@ -2046,7 +2046,7 @@ FillPointsCount: Succ(High(Template21FPoints)); BezierizeCount: 3; RandPassesCount: 4; - TemplateHeight: 1424; TemplateWidth: 3900; + TemplateHeight: 1424; TemplateWidth: 4096; canMirror: true; canFlip: false; isNegative: false; canInvert: false; hasGirders: true; MaxHedgeHogs: 36; @@ -2057,7 +2057,7 @@ FillPointsCount: Succ(High(Template22FPoints)); BezierizeCount: 3; RandPassesCount: 4; - TemplateHeight: 1424; TemplateWidth: 3900; + TemplateHeight: 1424; TemplateWidth: 4096; canMirror: true; canFlip: false; isNegative: false; canInvert: false; hasGirders: true; MaxHedgeHogs: 36; @@ -2068,7 +2068,7 @@ FillPointsCount: Succ(High(Template23FPoints)); BezierizeCount: 2; RandPassesCount: 8; - TemplateHeight: 1424; TemplateWidth: 3900; + TemplateHeight: 1424; TemplateWidth: 4096; canMirror: true; canFlip: false; isNegative: false; canInvert: false; hasGirders: true; MaxHedgeHogs: 36; @@ -2079,7 +2079,7 @@ FillPointsCount: Succ(High(Template24FPoints)); BezierizeCount: 2; RandPassesCount: 5; - TemplateHeight: 1424; TemplateWidth: 3900; + TemplateHeight: 1424; TemplateWidth: 4096; canMirror: true; canFlip: false; isNegative: false; canInvert: false; hasGirders: true; MaxHedgeHogs: 36; @@ -2090,7 +2090,7 @@ FillPointsCount: Succ(High(Template25FPoints)); BezierizeCount: 4; RandPassesCount: 4; - TemplateHeight: 1424; TemplateWidth: 3900; + TemplateHeight: 1424; TemplateWidth: 4096; canMirror: true; canFlip: false; isNegative: false; canInvert: false; hasGirders: true; MaxHedgeHogs: 36; @@ -2101,7 +2101,7 @@ FillPointsCount: Succ(High(Template26FPoints)); BezierizeCount: 2; RandPassesCount: 7; - TemplateHeight: 1424; TemplateWidth: 3900; + TemplateHeight: 1424; TemplateWidth: 4096; canMirror: true; canFlip: false; isNegative: false; canInvert: false; hasGirders: true; MaxHedgeHogs: 36; @@ -2112,7 +2112,7 @@ FillPointsCount: Succ(High(Template27FPoints)); BezierizeCount: 1; RandPassesCount: 5; - TemplateHeight: 1424; TemplateWidth: 3900; + TemplateHeight: 1424; TemplateWidth: 4096; canMirror: true; canFlip: false; isNegative: false; canInvert: false; hasGirders: true; MaxHedgeHogs: 36; @@ -2123,7 +2123,7 @@ FillPointsCount: Succ(High(Template28FPoints)); BezierizeCount: 2; RandPassesCount: 6; - TemplateHeight: 1424; TemplateWidth: 3900; + TemplateHeight: 1424; TemplateWidth: 4096; canMirror: true; canFlip: false; isNegative: false; canInvert: false; hasGirders: true; MaxHedgeHogs: 36; @@ -2134,7 +2134,7 @@ FillPointsCount: Succ(High(Template29FPoints)); BezierizeCount: 1; RandPassesCount: 8; - TemplateHeight: 1424; TemplateWidth: 3900; + TemplateHeight: 1424; TemplateWidth: 4096; canMirror: true; canFlip: false; isNegative: false; canInvert: false; hasGirders: true; MaxHedgeHogs: 36; @@ -2145,7 +2145,7 @@ FillPointsCount: Succ(High(Template30FPoints)); BezierizeCount: 3; RandPassesCount: 8; - TemplateHeight: 1424; TemplateWidth: 3900; + TemplateHeight: 1424; TemplateWidth: 4096; canMirror: true; canFlip: false; isNegative: false; canInvert: false; hasGirders: true; MaxHedgeHogs: 36; @@ -2156,7 +2156,7 @@ FillPointsCount: Succ(High(Template31FPoints)); BezierizeCount: 3; RandPassesCount: 5; - TemplateHeight: 1424; TemplateWidth: 3900; + TemplateHeight: 1424; TemplateWidth: 4096; canMirror: true; canFlip: false; isNegative: false; canInvert: false; hasGirders: true; MaxHedgeHogs: 36; @@ -2167,7 +2167,7 @@ FillPointsCount: Succ(High(Template32FPoints)); BezierizeCount: 3; RandPassesCount: 7; - TemplateHeight: 1424; TemplateWidth: 3900; + TemplateHeight: 1424; TemplateWidth: 4096; canMirror: true; canFlip: false; isNegative: false; canInvert: false; hasGirders: true; MaxHedgeHogs: 36; @@ -2178,7 +2178,7 @@ FillPointsCount: Succ(High(Template33FPoints)); BezierizeCount: 2; RandPassesCount: 6; - TemplateHeight: 1424; TemplateWidth: 3900; + TemplateHeight: 1424; TemplateWidth: 4096; canMirror: true; canFlip: false; isNegative: false; canInvert: false; hasGirders: true; MaxHedgeHogs: 36; @@ -2189,7 +2189,7 @@ FillPointsCount: Succ(High(Template34FPoints)); BezierizeCount: 2; RandPassesCount: 6; - TemplateHeight: 1424; TemplateWidth: 3900; + TemplateHeight: 1424; TemplateWidth: 4096; canMirror: true; canFlip: false; isNegative: false; canInvert: false; hasGirders: true; MaxHedgeHogs: 36; @@ -2200,7 +2200,7 @@ FillPointsCount: Succ(High(Template35FPoints)); BezierizeCount: 3; RandPassesCount: 7; - TemplateHeight: 1424; TemplateWidth: 3900; + TemplateHeight: 1424; TemplateWidth: 4096; canMirror: true; canFlip: false; isNegative: false; canInvert: false; hasGirders: true; MaxHedgeHogs: 36; diff -r e095e3023682 -r 7f04ad2cda54 hedgewars/uPhysFSLayer.pas --- a/hedgewars/uPhysFSLayer.pas Sun Apr 21 01:36:08 2013 +0200 +++ b/hedgewars/uPhysFSLayer.pas Wed May 29 22:52:37 2013 +0400 @@ -46,6 +46,7 @@ function physfsReader(L: Plua_State; f: PFSFile; sz: Psize_t) : PChar; cdecl; external PhyslayerLibName; procedure physfsReaderSetBuffer(buf: pointer); cdecl; external PhyslayerLibName; +procedure hedgewarsMountPackage(filename: PChar); cdecl; external PhyslayerLibName; implementation uses uUtils, uVariables, sysutils; diff -r e095e3023682 -r 7f04ad2cda54 hedgewars/uScript.pas --- a/hedgewars/uScript.pas Sun Apr 21 01:36:08 2013 +0200 +++ b/hedgewars/uScript.pas Wed May 29 22:52:37 2013 +0400 @@ -2039,7 +2039,8 @@ // call the script file lua_pcall(luaState, 0, 0, 0); ScriptLoaded:= true - end + end; + hedgewarsMountPackage(Str2PChar(copy(s, 1, length(s)-4)+'.hwp')); end; procedure SetGlobals; @@ -2261,6 +2262,7 @@ ScriptSetInteger('gfMultiWeapon', gfMultiWeapon); ScriptSetInteger('gfSolidLand', gfSolidLand); ScriptSetInteger('gfBorder', gfBorder); +ScriptSetInteger('gfBottomBorder', gfBottomBorder); ScriptSetInteger('gfDivideTeams', gfDivideTeams); ScriptSetInteger('gfLowGravity', gfLowGravity); ScriptSetInteger('gfLaserSight', gfLaserSight); diff -r e095e3023682 -r 7f04ad2cda54 hedgewars/uSound.pas --- a/hedgewars/uSound.pas Sun Apr 21 01:36:08 2013 +0200 +++ b/hedgewars/uSound.pas Wed May 29 22:52:37 2013 +0400 @@ -155,7 +155,7 @@ (FileName: 'Yessir.ogg'; Path: ptVoices),// sndYesSir (FileName: 'Laugh.ogg'; Path: ptVoices),// sndLaugh (FileName: 'Illgetyou.ogg'; Path: ptVoices),// sndIllGetYou - (FileName: 'JustYouWait.ogg'; Path: ptVoices),// sndJustYouWait + (FileName: 'Justyouwait.ogg'; Path: ptVoices),// sndJustyouwait (FileName: 'Incoming.ogg'; Path: ptVoices),// sndIncoming (FileName: 'Missed.ogg'; Path: ptVoices),// sndMissed (FileName: 'Stupid.ogg'; Path: ptVoices),// sndStupid @@ -248,7 +248,10 @@ (FileName: 'bump.ogg'; Path: ptSounds),// sndBump (FileName: 'hogchant3.ogg'; Path: ptSounds),// sndResurrector (FileName: 'plane.ogg'; Path: ptSounds),// sndPlane - (FileName: 'TARDIS.ogg'; Path: ptSounds) // sndTardis + (FileName: 'TARDIS.ogg'; Path: ptSounds),// sndTardis + (FileName: 'frozen_hog_impact.ogg'; Path: ptSounds),// sndFrozenHogImpact + (FileName: 'ice_beam.ogg'; Path: ptSounds),// sndIceBeam + (FileName: 'hog_freeze.ogg'; Path: ptSounds) // sndHogFreeze ); diff -r e095e3023682 -r 7f04ad2cda54 hedgewars/uTeams.pas --- a/hedgewars/uTeams.pas Sun Apr 21 01:36:08 2013 +0200 +++ b/hedgewars/uTeams.pas Wed May 29 22:52:37 2013 +0400 @@ -110,7 +110,7 @@ end; procedure SwitchHedgehog; -var c, i, j: LongWord; +var c, i, t, j: LongWord; PrevHH, PrevTeam : LongWord; begin TargetPoint.X:= NoPointX; @@ -173,15 +173,7 @@ if c = ClansCount then begin if not PlacingHogs then - begin inc(TotalRounds); - for i:= 0 to Pred(TeamsCount) do - with TeamsArray[i]^ do - for j:= 0 to Pred(HedgehogsNumber) do - with Hedgehogs[j] do - if Effects[heFrozen] > 255 then - Effects[heFrozen]:= max(255,Effects[heFrozen]-50000) - end; c:= 0 end; @@ -196,11 +188,22 @@ PrevHH:= CurrHedgehog mod HedgehogsNumber; // prevent infinite loop when CurrHedgehog = 7, but HedgehogsNumber < 8 (team is destroyed before its first turn) repeat CurrHedgehog:= Succ(CurrHedgehog) mod HedgehogsNumber; - until ((Hedgehogs[CurrHedgehog].Gear <> nil) and (Hedgehogs[CurrHedgehog].Effects[heFrozen] = 0)) or (CurrHedgehog = PrevHH) + until ((Hedgehogs[CurrHedgehog].Gear <> nil) and (Hedgehogs[CurrHedgehog].Effects[heFrozen] < 256)) or (CurrHedgehog = PrevHH) end - until (CurrentTeam^.Hedgehogs[CurrentTeam^.CurrHedgehog].Gear <> nil) or (PrevTeam = CurrTeam) or ((CurrTeam = TagTeamIndex) and ((GameFlags and gfTagTeam) <> 0)); - end -until (CurrentTeam^.Hedgehogs[CurrentTeam^.CurrHedgehog].Gear <> nil) and (CurrentTeam^.Hedgehogs[CurrentTeam^.CurrHedgehog].Effects[heFrozen] = 0); + until ((CurrentTeam^.Hedgehogs[CurrentTeam^.CurrHedgehog].Gear <> nil) and (CurrentTeam^.Hedgehogs[CurrentTeam^.CurrHedgehog].Effects[heFrozen] < 50256)) or (PrevTeam = CurrTeam) or ((CurrTeam = TagTeamIndex) and ((GameFlags and gfTagTeam) <> 0)) + end; + if (CurrentTeam^.Hedgehogs[CurrentTeam^.CurrHedgehog].Gear = nil) or (CurrentTeam^.Hedgehogs[CurrentTeam^.CurrHedgehog].Effects[heFrozen] > 255) then + begin + inc(CurrentTeam^.Clan^.TurnNumber); + with CurrentTeam^.Clan^ do + for t:= 0 to Pred(TeamsNumber) do + with Teams[t]^ do + for i:= 0 to Pred(HedgehogsNumber) do + with Hedgehogs[i] do + if Effects[heFrozen] > 255 then + Effects[heFrozen]:= max(255,Effects[heFrozen]-50000) + end +until (CurrentTeam^.Hedgehogs[CurrentTeam^.CurrHedgehog].Gear <> nil) and (CurrentTeam^.Hedgehogs[CurrentTeam^.CurrHedgehog].Effects[heFrozen] < 256); SwitchCurrentHedgehog(@(CurrentTeam^.Hedgehogs[CurrentTeam^.CurrHedgehog])); {$IFDEF USE_TOUCH_INTERFACE} @@ -247,6 +250,13 @@ end; inc(CurrentTeam^.Clan^.TurnNumber); +with CurrentTeam^.Clan^ do + for t:= 0 to Pred(TeamsNumber) do + with Teams[t]^ do + for i:= 0 to Pred(HedgehogsNumber) do + with Hedgehogs[i] do + if Effects[heFrozen] > 255 then + Effects[heFrozen]:= max(255,Effects[heFrozen]-50000); CurWeapon:= GetCurAmmoEntry(CurrentHedgehog^); if CurWeapon^.Count = 0 then diff -r e095e3023682 -r 7f04ad2cda54 hedgewars/uTypes.pas --- a/hedgewars/uTypes.pas Sun Apr 21 01:36:08 2013 +0200 +++ b/hedgewars/uTypes.pas Wed May 29 22:52:37 2013 +0400 @@ -140,7 +140,8 @@ sndPoisonCough, sndPoisonMoan, sndBirdyLay, sndWhistle, sndBeeWater, sndPiano0, sndPiano1, sndPiano2, sndPiano3, sndPiano4, sndPiano5, sndPiano6, sndPiano7, sndPiano8, sndSkip, sndSineGun, sndOoff1, sndOoff2, sndOoff3, sndWhack, - sndComeonthen, sndParachute, sndBump, sndResurrector, sndPlane, sndTardis); + sndComeonthen, sndParachute, sndBump, sndResurrector, sndPlane, sndTardis, sndFrozenHogImpact, sndIceBeam, sndHogFreeze + ); // Available ammo types to be used by hedgehogs TAmmoType = (amNothing, amGrenade, amClusterBomb, amBazooka, amBee, amShotgun, amPickHammer, // 6 diff -r e095e3023682 -r 7f04ad2cda54 hedgewars/uVariables.pas --- a/hedgewars/uVariables.pas Sun Apr 21 01:36:08 2013 +0200 +++ b/hedgewars/uVariables.pas Wed May 29 22:52:37 2013 +0400 @@ -1765,7 +1765,6 @@ Ammo: (Propz: ammoprop_NoRoundEnd or ammoprop_ForwMsgs or ammoprop_AttackInMove or - ammoprop_NoCrosshair or ammoprop_DontHold or ammoprop_Utility or ammoprop_NeedUpDown or @@ -2100,7 +2099,7 @@ TimeAfterTurn: 3000; minAngle: 0; maxAngle: 0; - isDamaging: true; + isDamaging: false; SkipTurns: 0; PosCount: 1; PosSprite: sprWater; @@ -2177,7 +2176,7 @@ AmmoType: amLandGun; AttackVoice: sndNone; Bounciness: 1000); - Slot: 2; + Slot: 6; TimeAfterTurn: 0; minAngle: 0; maxAngle: 0; @@ -2202,11 +2201,11 @@ AmmoType: amIceGun; AttackVoice: sndNone; Bounciness: 1000); - Slot: 9; + Slot: 2; TimeAfterTurn: 0; minAngle: 0; maxAngle: 0; - isDamaging: true; + isDamaging: false; SkipTurns: 0; PosCount: 1; PosSprite: sprWater; diff -r e095e3023682 -r 7f04ad2cda54 hedgewars/uWorld.pas --- a/hedgewars/uWorld.pas Sun Apr 21 01:36:08 2013 +0200 +++ b/hedgewars/uWorld.pas Wed May 29 22:52:37 2013 +0400 @@ -1320,7 +1320,7 @@ // draw health bars right border inc(r.x, cTeamHealthWidth + 2); r.w:= 3; - DrawTextureFromRect(TeamHealthBarWidth + 16, cScreenHeight + DrawHealthY + smallScreenOffset, @r, HealthTex); + DrawTextureFromRect(TeamHealthBarWidth + 15, cScreenHeight + DrawHealthY + smallScreenOffset, @r, HealthTex); if not highlight and (not hasGone) then for i:= 0 to cMaxHHIndex do @@ -1357,7 +1357,7 @@ // draw health bar r.w:= TeamHealthBarWidth + 1; r.h:= HealthTex^.h - 4; - DrawTextureFromRect(16, cScreenHeight + DrawHealthY + smallScreenOffset + 2, @r, HealthTex); + DrawTextureFromRect(15, cScreenHeight + DrawHealthY + smallScreenOffset + 2, @r, HealthTex); if not hasGone and (TeamHealth > 1) then begin Tint(Clan^.Color shl 8 or $FF); diff -r e095e3023682 -r 7f04ad2cda54 misc/libphyslayer/hwpacksmounter.c --- a/misc/libphyslayer/hwpacksmounter.c Sun Apr 21 01:36:08 2013 +0200 +++ b/misc/libphyslayer/hwpacksmounter.c Wed May 29 22:52:37 2013 +0400 @@ -33,3 +33,24 @@ PHYSFS_freeList(filesList); } + +PHYSFS_DECL void hedgewarsMountPackage(char * fileName) +{ + int fileNameLength = strlen(fileName); + if (fileNameLength > 4) + if (strcmp(fileName + fileNameLength - 4, ".hwp") == 0) + { + const char * dir = PHYSFS_getRealDir(fileName); + if(dir) + { + char * fullPath = (char *)malloc(strlen(dir) + fileNameLength + 2); + strcpy(fullPath, dir); + strcat(fullPath, "/"); + strcat(fullPath, fileName); + + PHYSFS_mount(fullPath, NULL, 0); + + free(fullPath); + } + } +} diff -r e095e3023682 -r 7f04ad2cda54 misc/libphyslayer/hwpacksmounter.h --- a/misc/libphyslayer/hwpacksmounter.h Sun Apr 21 01:36:08 2013 +0200 +++ b/misc/libphyslayer/hwpacksmounter.h Wed May 29 22:52:37 2013 +0400 @@ -8,7 +8,7 @@ #endif PHYSFS_DECL void hedgewarsMountPackages(); - +PHYSFS_DECL void hedgewarsMountPackage(char * fileName); #ifdef __cplusplus } diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Graphics/AmmoMenu/Ammos.png Binary file share/hedgewars/Data/Graphics/AmmoMenu/Ammos.png has changed diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Graphics/AmmoMenu/Ammos_bw.png Binary file share/hedgewars/Data/Graphics/AmmoMenu/Ammos_bw.png has changed diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Graphics/Hats/SunWukong.png diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Locale/hedgewars_ar.ts --- a/share/hedgewars/Data/Locale/hedgewars_ar.ts Sun Apr 21 01:36:08 2013 +0200 +++ b/share/hedgewars/Data/Locale/hedgewars_ar.ts Wed May 29 22:52:37 2013 +0400 @@ -99,19 +99,19 @@ - Please give us feedback! - - - We are always happy about suggestions, ideas, or bug reports. - If you found a bug, you can see if it's already known here (english): - - - - Your email address is optional, but we may want to contact you. + Send us feedback! + + + + If you found a bug, you can see if it's already been reported here: + + + + Your email address is optional, but necessary if you want us to get back at you. @@ -255,6 +255,18 @@ Failed to save StyleSheet to %1 + + %1 has joined + + + + %1 has left + + + + %1 has left (%2) + + HWForm @@ -354,6 +366,10 @@ Please wait a few seconds and try again. + + This page requires an internet connection. + + HWGame @@ -473,10 +489,6 @@ - Theme: - - - Load drawn map @@ -492,6 +504,10 @@ Large tunnels + + Theme: %1 + + HWNetServersModel @@ -536,7 +552,7 @@ %1 *** %2 has joined - %1 *** %2 انضم + %1 *** %2 انضم %1 *** %2 has left (%3) @@ -730,6 +746,17 @@ + PageDataDownload + + Loading, please wait. + + + + This page requires an internet connection. + + + + PageDrawMap Undo @@ -871,6 +898,14 @@ + + Play again + + + + Save + + PageInGame @@ -1958,6 +1993,10 @@ This program is distributed under the %1 + + This setting will be effective at next restart. + + QLineEdit @@ -3059,119 +3098,4 @@ - - server - - No checker rights - - - - Authentication failed - - - - 60 seconds cooldown after kick - - - - kicked - - - - Ping timeout - - - - bye - - - - Empty config entry - - - - Not room master - - - - Corrupted hedgehogs info - - - - too many teams - - - - too many hedgehogs - - - - There's already a team with same name in the list - - - - round in progress - - - - restricted - - - - REMOVE_TEAM: no such team - - - - Not team owner! - - - - Less than two clans! - - - - Room with such name already exists - - - - Illegal room name - - - - No such room - - - - Joining restricted - - - - Registered users only - - - - You are banned in this room - - - - Nickname already chosen - - - - Illegal nickname - - - - Protocol already known - - - - Bad number - - - - Nickname is already in use - - - diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Locale/hedgewars_bg.ts --- a/share/hedgewars/Data/Locale/hedgewars_bg.ts Sun Apr 21 01:36:08 2013 +0200 +++ b/share/hedgewars/Data/Locale/hedgewars_bg.ts Wed May 29 22:52:37 2013 +0400 @@ -99,19 +99,19 @@ - Please give us feedback! - - - We are always happy about suggestions, ideas, or bug reports. - If you found a bug, you can see if it's already known here (english): - - - - Your email address is optional, but we may want to contact you. + Send us feedback! + + + + If you found a bug, you can see if it's already been reported here: + + + + Your email address is optional, but necessary if you want us to get back at you. @@ -254,6 +254,18 @@ Failed to save StyleSheet to %1 + + %1 has joined + + + + %1 has left + + + + %1 has left (%2) + + HWForm @@ -353,6 +365,10 @@ Please wait a few seconds and try again. + + This page requires an internet connection. + + HWGame @@ -472,10 +488,6 @@ - Theme: - - - Load drawn map Зареждане на начертана карта @@ -491,6 +503,10 @@ Large tunnels + + Theme: %1 + + HWNetServersModel @@ -535,7 +551,7 @@ %1 *** %2 has joined - %1 *** %2 се присъедини + %1 *** %2 се присъедини %1 *** %2 has left (%3) @@ -729,6 +745,17 @@ + PageDataDownload + + Loading, please wait. + + + + This page requires an internet connection. + + + + PageDrawMap Undo @@ -870,6 +897,14 @@ + + Play again + + + + Save + Запазване + PageInGame @@ -1973,6 +2008,10 @@ This program is distributed under the %1 + + This setting will be effective at next restart. + + QLineEdit @@ -3075,119 +3114,4 @@ - - server - - No checker rights - - - - Authentication failed - - - - 60 seconds cooldown after kick - - - - kicked - - - - Ping timeout - - - - bye - - - - Empty config entry - - - - Not room master - - - - Corrupted hedgehogs info - - - - too many teams - - - - too many hedgehogs - - - - There's already a team with same name in the list - - - - round in progress - - - - restricted - - - - REMOVE_TEAM: no such team - - - - Not team owner! - - - - Less than two clans! - - - - Room with such name already exists - - - - Illegal room name - - - - No such room - - - - Joining restricted - - - - Registered users only - - - - You are banned in this room - - - - Nickname already chosen - - - - Illegal nickname - - - - Protocol already known - - - - Bad number - - - - Nickname is already in use - - - diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Locale/hedgewars_cs.ts --- a/share/hedgewars/Data/Locale/hedgewars_cs.ts Sun Apr 21 01:36:08 2013 +0200 +++ b/share/hedgewars/Data/Locale/hedgewars_cs.ts Wed May 29 22:52:37 2013 +0400 @@ -99,19 +99,19 @@ - Please give us feedback! - - - We are always happy about suggestions, ideas, or bug reports. - If you found a bug, you can see if it's already known here (english): - - - - Your email address is optional, but we may want to contact you. + Send us feedback! + + + + If you found a bug, you can see if it's already been reported here: + + + + Your email address is optional, but necessary if you want us to get back at you. @@ -260,6 +260,18 @@ Failed to save StyleSheet to %1 + + %1 has joined + + + + %1 has left + + + + %1 has left (%2) + + HWForm @@ -359,6 +371,10 @@ Please wait a few seconds and try again. + + This page requires an internet connection. + + HWGame @@ -478,10 +494,6 @@ - Theme: - - - Load drawn map Nahrát nakreslenou mapu @@ -497,6 +509,10 @@ Large tunnels + + Theme: %1 + + HWNetServersModel @@ -541,7 +557,7 @@ %1 *** %2 has joined - %1 *** %2 se připojil + %1 *** %2 se připojil %1 *** %2 has left (%3) @@ -735,6 +751,17 @@ + PageDataDownload + + Loading, please wait. + + + + This page requires an internet connection. + + + + PageDrawMap Undo @@ -882,6 +909,14 @@ <b>%1</b> byl vystrašený a přeskočil tah <b>%2</b> krát. + + Play again + + + + Save + Uložit + PageInGame @@ -1987,6 +2022,10 @@ This program is distributed under the %1 + + This setting will be effective at next restart. + + QLineEdit @@ -3090,119 +3129,4 @@ - - server - - No checker rights - - - - Authentication failed - - - - 60 seconds cooldown after kick - - - - kicked - - - - Ping timeout - - - - bye - - - - Empty config entry - - - - Not room master - - - - Corrupted hedgehogs info - - - - too many teams - - - - too many hedgehogs - - - - There's already a team with same name in the list - - - - round in progress - - - - restricted - - - - REMOVE_TEAM: no such team - - - - Not team owner! - - - - Less than two clans! - - - - Room with such name already exists - - - - Illegal room name - - - - No such room - - - - Joining restricted - - - - Registered users only - - - - You are banned in this room - - - - Nickname already chosen - - - - Illegal nickname - - - - Protocol already known - - - - Bad number - - - - Nickname is already in use - - - diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Locale/hedgewars_da.ts --- a/share/hedgewars/Data/Locale/hedgewars_da.ts Sun Apr 21 01:36:08 2013 +0200 +++ b/share/hedgewars/Data/Locale/hedgewars_da.ts Wed May 29 22:52:37 2013 +0400 @@ -99,19 +99,19 @@ - Please give us feedback! - - - We are always happy about suggestions, ideas, or bug reports. - If you found a bug, you can see if it's already known here (english): + Send us feedback! - Your email address is optional, but we may want to contact you. + If you found a bug, you can see if it's already been reported here: + + + + Your email address is optional, but necessary if you want us to get back at you. @@ -258,6 +258,18 @@ Failed to save StyleSheet to %1 Mislykkedes at gemme typografiark til %1 + + %1 has joined + + + + %1 has left + + + + %1 has left (%2) + + HWForm @@ -357,6 +369,10 @@ Please wait a few seconds and try again. + + This page requires an internet connection. + + HWGame @@ -476,10 +492,6 @@ - Theme: - - - Load drawn map Indlæs tegnet bane @@ -495,6 +507,10 @@ Large tunnels + + Theme: %1 + + HWNetServersModel @@ -539,7 +555,7 @@ %1 *** %2 has joined - %1 *** %2 har tilsluttet sig + %1 *** %2 har tilsluttet sig %1 *** %2 has left (%3) @@ -733,6 +749,17 @@ + PageDataDownload + + Loading, please wait. + + + + This page requires an internet connection. + + + + PageDrawMap Undo @@ -874,6 +901,14 @@ <b>%1</b> blev bange og sprang over sin tur <b>%2</b> gange. + + Play again + + + + Save + Gem + PageInGame @@ -1981,6 +2016,10 @@ This program is distributed under the %1 + + This setting will be effective at next restart. + + QLineEdit @@ -3083,119 +3122,4 @@ DPad - - server - - No checker rights - - - - Authentication failed - - - - 60 seconds cooldown after kick - - - - kicked - - - - Ping timeout - - - - bye - - - - Empty config entry - - - - Not room master - - - - Corrupted hedgehogs info - - - - too many teams - - - - too many hedgehogs - - - - There's already a team with same name in the list - - - - round in progress - - - - restricted - - - - REMOVE_TEAM: no such team - - - - Not team owner! - - - - Less than two clans! - - - - Room with such name already exists - - - - Illegal room name - - - - No such room - - - - Joining restricted - - - - Registered users only - - - - You are banned in this room - - - - Nickname already chosen - - - - Illegal nickname - - - - Protocol already known - - - - Bad number - - - - Nickname is already in use - - - diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Locale/hedgewars_de.ts --- a/share/hedgewars/Data/Locale/hedgewars_de.ts Sun Apr 21 01:36:08 2013 +0200 +++ b/share/hedgewars/Data/Locale/hedgewars_de.ts Wed May 29 22:52:37 2013 +0400 @@ -99,19 +99,19 @@ - Please give us feedback! - - - We are always happy about suggestions, ideas, or bug reports. - If you found a bug, you can see if it's already known here (english): + Send us feedback! - Your email address is optional, but we may want to contact you. + If you found a bug, you can see if it's already been reported here: + + + + Your email address is optional, but necessary if you want us to get back at you. @@ -261,6 +261,18 @@ Failed to save StyleSheet to %1 Style-Sheet konnte nich nach %1 gesichert werden + + %1 has joined + + + + %1 has left + + + + %1 has left (%2) + + HWForm @@ -360,6 +372,10 @@ Please wait a few seconds and try again. + + This page requires an internet connection. + + HWGame @@ -479,10 +495,6 @@ - Theme: - - - Load drawn map Gezeichnete Karte laden @@ -498,6 +510,10 @@ Large tunnels + + Theme: %1 + + HWNetServersModel @@ -542,7 +558,7 @@ %1 *** %2 has joined - %1 *** %2 ist beigetreten + %1 *** %2 ist beigetreten %1 *** %2 has left (%3) @@ -736,6 +752,17 @@ + PageDataDownload + + Loading, please wait. + + + + This page requires an internet connection. + + + + PageDrawMap Undo @@ -877,6 +904,14 @@ <b>%1</b> hatte Angst und übersprang <b>%2</b> Runden. + + Play again + + + + Save + Sichern + PageInGame @@ -1986,6 +2021,10 @@ This program is distributed under the %1 + + This setting will be effective at next restart. + + QLineEdit @@ -3116,119 +3155,4 @@ Steuerkreuz - - server - - No checker rights - - - - Authentication failed - - - - 60 seconds cooldown after kick - - - - kicked - - - - Ping timeout - - - - bye - - - - Empty config entry - - - - Not room master - - - - Corrupted hedgehogs info - - - - too many teams - - - - too many hedgehogs - - - - There's already a team with same name in the list - - - - round in progress - - - - restricted - - - - REMOVE_TEAM: no such team - - - - Not team owner! - - - - Less than two clans! - - - - Room with such name already exists - - - - Illegal room name - - - - No such room - - - - Joining restricted - - - - Registered users only - - - - You are banned in this room - - - - Nickname already chosen - - - - Illegal nickname - - - - Protocol already known - - - - Bad number - - - - Nickname is already in use - - - diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Locale/hedgewars_el.ts --- a/share/hedgewars/Data/Locale/hedgewars_el.ts Sun Apr 21 01:36:08 2013 +0200 +++ b/share/hedgewars/Data/Locale/hedgewars_el.ts Wed May 29 22:52:37 2013 +0400 @@ -99,19 +99,19 @@ - Please give us feedback! - - - We are always happy about suggestions, ideas, or bug reports. - If you found a bug, you can see if it's already known here (english): - - - - Your email address is optional, but we may want to contact you. + Send us feedback! + + + + If you found a bug, you can see if it's already been reported here: + + + + Your email address is optional, but necessary if you want us to get back at you. @@ -254,6 +254,18 @@ Failed to save StyleSheet to %1 + + %1 has joined + + + + %1 has left + + + + %1 has left (%2) + + HWForm @@ -355,6 +367,10 @@ Please wait a few seconds and try again. + + This page requires an internet connection. + + HWGame @@ -474,10 +490,6 @@ - Theme: - - - Load drawn map @@ -493,6 +505,10 @@ Large tunnels + + Theme: %1 + + HWNetServersModel @@ -537,7 +553,7 @@ %1 *** %2 has joined - %1 *** %2 εισήλθε + %1 *** %2 εισήλθε %1 *** %2 has left (%3) @@ -731,6 +747,17 @@ + PageDataDownload + + Loading, please wait. + + + + This page requires an internet connection. + + + + PageDrawMap Eraser @@ -872,6 +899,14 @@ Ο <b>%1</b> φοβήθηκε και παραχώρησε τη σειρά του <b>%2</b> φορές. + + Play again + + + + Save + + PageInGame @@ -1975,6 +2010,10 @@ This program is distributed under the %1 + + This setting will be effective at next restart. + + QLineEdit @@ -3077,119 +3116,4 @@ DPad - - server - - No checker rights - - - - Authentication failed - - - - 60 seconds cooldown after kick - - - - kicked - - - - Ping timeout - - - - bye - - - - Empty config entry - - - - Not room master - - - - Corrupted hedgehogs info - - - - too many teams - - - - too many hedgehogs - - - - There's already a team with same name in the list - - - - round in progress - - - - restricted - - - - REMOVE_TEAM: no such team - - - - Not team owner! - - - - Less than two clans! - - - - Room with such name already exists - - - - Illegal room name - - - - No such room - - - - Joining restricted - - - - Registered users only - - - - You are banned in this room - - - - Nickname already chosen - - - - Illegal nickname - - - - Protocol already known - - - - Bad number - - - - Nickname is already in use - - - diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Locale/hedgewars_en.ts --- a/share/hedgewars/Data/Locale/hedgewars_en.ts Sun Apr 21 01:36:08 2013 +0200 +++ b/share/hedgewars/Data/Locale/hedgewars_en.ts Wed May 29 22:52:37 2013 +0400 @@ -99,19 +99,19 @@ - Please give us feedback! - - - We are always happy about suggestions, ideas, or bug reports. - If you found a bug, you can see if it's already known here (english): - - - - Your email address is optional, but we may want to contact you. + Send us feedback! + + + + If you found a bug, you can see if it's already been reported here: + + + + Your email address is optional, but necessary if you want us to get back at you. @@ -254,6 +254,18 @@ Failed to save StyleSheet to %1 + + %1 has joined + + + + %1 has left + + + + %1 has left (%2) + + HWForm @@ -353,6 +365,10 @@ Please wait a few seconds and try again. + + This page requires an internet connection. + + HWGame @@ -472,10 +488,6 @@ - Theme: - - - Load drawn map @@ -491,6 +503,10 @@ Large tunnels + + Theme: %1 + + HWNetServersModel @@ -535,7 +551,7 @@ %1 *** %2 has joined - %1 *** %2 has joined + %1 *** %2 has joined %1 *** %2 has left (%3) @@ -729,6 +745,17 @@ + PageDataDownload + + Loading, please wait. + + + + This page requires an internet connection. + + + + PageDrawMap Undo @@ -870,6 +897,14 @@ <b>%1</b> was scared and skipped turn <b>%2</b> times. + + Play again + + + + Save + + PageInGame @@ -1957,6 +1992,10 @@ This program is distributed under the %1 + + This setting will be effective at next restart. + + QLineEdit @@ -3059,119 +3098,4 @@ - - server - - No checker rights - - - - Authentication failed - - - - 60 seconds cooldown after kick - - - - kicked - - - - Ping timeout - - - - bye - - - - Empty config entry - - - - Not room master - - - - Corrupted hedgehogs info - - - - too many teams - - - - too many hedgehogs - - - - There's already a team with same name in the list - - - - round in progress - - - - restricted - - - - REMOVE_TEAM: no such team - - - - Not team owner! - - - - Less than two clans! - - - - Room with such name already exists - - - - Illegal room name - - - - No such room - - - - Joining restricted - - - - Registered users only - - - - You are banned in this room - - - - Nickname already chosen - - - - Illegal nickname - - - - Protocol already known - - - - Bad number - - - - Nickname is already in use - - - diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Locale/hedgewars_es.ts --- a/share/hedgewars/Data/Locale/hedgewars_es.ts Sun Apr 21 01:36:08 2013 +0200 +++ b/share/hedgewars/Data/Locale/hedgewars_es.ts Wed May 29 22:52:37 2013 +0400 @@ -99,19 +99,19 @@ - Please give us feedback! - - - We are always happy about suggestions, ideas, or bug reports. - If you found a bug, you can see if it's already known here (english): + Send us feedback! - Your email address is optional, but we may want to contact you. + If you found a bug, you can see if it's already been reported here: + + + + Your email address is optional, but necessary if you want us to get back at you. @@ -258,6 +258,18 @@ Failed to save StyleSheet to %1 + + %1 has joined + + + + %1 has left + + + + %1 has left (%2) + + HWForm @@ -357,6 +369,10 @@ Please wait a few seconds and try again. + + This page requires an internet connection. + + HWGame @@ -476,10 +492,6 @@ - Theme: - - - Load drawn map Cargar mapa @@ -495,6 +507,10 @@ Large tunnels + + Theme: %1 + + HWNetServersModel @@ -539,7 +555,7 @@ %1 *** %2 has joined - %1 *** %2 ha entrado + %1 *** %2 ha entrado %1 *** %2 has left (%3) @@ -733,6 +749,17 @@ + PageDataDownload + + Loading, please wait. + + + + This page requires an internet connection. + + + + PageDrawMap Undo @@ -874,6 +901,14 @@ <b>%1</b> tenía demasiado miedo y pasó <b>%2</b> turnos. + + Play again + + + + Save + Guardar + PageInGame @@ -1977,6 +2012,10 @@ This program is distributed under the %1 + + This setting will be effective at next restart. + + QLineEdit @@ -3079,119 +3118,4 @@ DPad - - server - - No checker rights - - - - Authentication failed - - - - 60 seconds cooldown after kick - - - - kicked - - - - Ping timeout - - - - bye - - - - Empty config entry - - - - Not room master - - - - Corrupted hedgehogs info - - - - too many teams - - - - too many hedgehogs - - - - There's already a team with same name in the list - - - - round in progress - - - - restricted - - - - REMOVE_TEAM: no such team - - - - Not team owner! - - - - Less than two clans! - - - - Room with such name already exists - - - - Illegal room name - - - - No such room - - - - Joining restricted - - - - Registered users only - - - - You are banned in this room - - - - Nickname already chosen - - - - Illegal nickname - - - - Protocol already known - - - - Bad number - - - - Nickname is already in use - - - diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Locale/hedgewars_fi.ts --- a/share/hedgewars/Data/Locale/hedgewars_fi.ts Sun Apr 21 01:36:08 2013 +0200 +++ b/share/hedgewars/Data/Locale/hedgewars_fi.ts Wed May 29 22:52:37 2013 +0400 @@ -99,19 +99,19 @@ - Please give us feedback! - - - We are always happy about suggestions, ideas, or bug reports. - If you found a bug, you can see if it's already known here (english): - - - - Your email address is optional, but we may want to contact you. + Send us feedback! + + + + If you found a bug, you can see if it's already been reported here: + + + + Your email address is optional, but necessary if you want us to get back at you. @@ -254,6 +254,18 @@ Failed to save StyleSheet to %1 + + %1 has joined + + + + %1 has left + + + + %1 has left (%2) + + HWForm @@ -353,6 +365,10 @@ Please wait a few seconds and try again. + + This page requires an internet connection. + + HWGame @@ -472,10 +488,6 @@ - Theme: - - - Load drawn map @@ -491,6 +503,10 @@ Large tunnels + + Theme: %1 + + HWNetServersModel @@ -535,7 +551,7 @@ %1 *** %2 has joined - %1 *** %2 liittyi + %1 *** %2 liittyi %1 *** %2 has left @@ -729,6 +745,17 @@ + PageDataDownload + + Loading, please wait. + + + + This page requires an internet connection. + + + + PageDrawMap Undo @@ -870,6 +897,14 @@ + + Play again + + + + Save + + PageInGame @@ -1973,6 +2008,10 @@ This program is distributed under the %1 + + This setting will be effective at next restart. + + QLineEdit @@ -3075,119 +3114,4 @@ Hiiri: Vasen nappi - - server - - No checker rights - - - - Authentication failed - - - - 60 seconds cooldown after kick - - - - kicked - - - - Ping timeout - - - - bye - - - - Empty config entry - - - - Not room master - - - - Corrupted hedgehogs info - - - - too many teams - - - - too many hedgehogs - - - - There's already a team with same name in the list - - - - round in progress - - - - restricted - - - - REMOVE_TEAM: no such team - - - - Not team owner! - - - - Less than two clans! - - - - Room with such name already exists - - - - Illegal room name - - - - No such room - - - - Joining restricted - - - - Registered users only - - - - You are banned in this room - - - - Nickname already chosen - - - - Illegal nickname - - - - Protocol already known - - - - Bad number - - - - Nickname is already in use - - - diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Locale/hedgewars_fr.ts --- a/share/hedgewars/Data/Locale/hedgewars_fr.ts Sun Apr 21 01:36:08 2013 +0200 +++ b/share/hedgewars/Data/Locale/hedgewars_fr.ts Wed May 29 22:52:37 2013 +0400 @@ -100,7 +100,7 @@ Please give us feedback! - Nous avons besoin de votre avis! + Nous avons besoin de votre avis! We are always happy about suggestions, ideas, or bug reports. @@ -108,11 +108,23 @@ If you found a bug, you can see if it's already known here (english): - Si vous trouvez un bug, vous pouvez vérifier si il est déjà connu ici (anglais): + Si vous trouvez un bug, vous pouvez vérifier si il est déjà connu ici (anglais): Your email address is optional, but we may want to contact you. - Votre adresse email est optionelle, mais il est possible que nous essayons de vous contacter. + Votre adresse email est optionelle, mais il est possible que nous essayons de vous contacter. + + + Send us feedback! + + + + If you found a bug, you can see if it's already been reported here: + + + + Your email address is optional, but necessary if you want us to get back at you. + @@ -227,11 +239,11 @@ %1 has been removed from your friends list - %1 a été retiré de votre liste d'amis + %1 a été retiré de votre liste d'amis %1 has been added to your friends list - %1 a été ajouté à votre liste d'amis + %1 a été ajouté à votre liste d'amis Stylesheet imported from %1 @@ -239,7 +251,7 @@ Enter %1 if you want to use the current StyleSheet in future, enter %2 to reset! - Entrez %1 si vous voulez utiliser cette Feuille de style (Stylesheet) à l'avenir, entrez %2 pour rétablir l'ancienne apparence! + Entrez %1 si vous voulez utiliser cette Feuille de style (Stylesheet) à l'avenir, entrez %2 pour rétablir l'ancienne apparence! Couldn't read %1 @@ -255,14 +267,26 @@ Failed to save StyleSheet to %1 - Impossible d'enregistrer la feuille de style (Stylesheet) dans %1 + Impossible d'enregistrer la feuille de style (Stylesheet) dans %1 + + + %1 has joined + + + + %1 has left + + + + %1 has left (%2) + HWForm Cannot save record to file %1 - Impossible de sauvegarder l'enregistrement dans le fichier %1 + Impossible de sauvegarder l'enregistrement dans le fichier %1 DefaultTeam @@ -301,7 +325,7 @@ Someone already uses your nickname %1 on the server. Please pick another nickname: - Quelqu'un utilise déjà le pseudo %1 sur le serveur + Quelqu'un utilise déjà le pseudo %1 sur le serveur Veuillez choisir un autre pseudo: @@ -318,9 +342,9 @@ If this nick isn't yours, please register your own nick at www.hedgewars.org Password: - Ce pseudo est enregistré, vous n'avez spécifié aucun mot de passe. + Ce pseudo est enregistré, vous n'avez spécifié aucun mot de passe. -Si ce pseudo n'est pas le votre, veuillez enregistrer votre propre pseudo sur www.hedgewars.org +Si ce pseudo n'est pas le votre, veuillez enregistrer votre propre pseudo sur www.hedgewars.org Mot de passe: @@ -328,9 +352,9 @@ Your nickname is not registered. To prevent someone else from using it, please register it at www.hedgewars.org - Votre pseudo n'est pas enregistré. -Pour éviter que d'autre joueurs l'utilisent, -veuillez l'enregistrer sur www.hedgewars.org + Votre pseudo n'est pas enregistré. +Pour éviter que d'autre joueurs l'utilisent, +veuillez l'enregistrer sur www.hedgewars.org @@ -338,7 +362,7 @@ Your password wasn't saved either. -Votre mot de passe non plus n'a pas été sauvegardé. +Votre mot de passe non plus n'a pas été sauvegardé. Hedgewars - Empty nickname @@ -358,7 +382,7 @@ Hedgewars - Connection error - Hedgewars - Erreur de connexion + Hedgewars - Erreur de connexion You reconnected too fast. @@ -366,6 +390,10 @@ Vous vous êtes reconnecté trop rapidement. Attendez quelques secondes et réessayez. + + This page requires an internet connection. + + HWGame @@ -450,11 +478,11 @@ Load map drawing - Charger un carte dessinée + Charger un dessin Edit map drawing - Editer un carte dessinée + Editer un dessin Small islands @@ -486,7 +514,7 @@ Theme: - Theme + Theme: Load drawn map @@ -504,6 +532,10 @@ Large tunnels Grands tunnels + + Theme: %1 + + HWNetServersModel @@ -548,7 +580,7 @@ %1 *** %2 has joined - %1 *** %2 vient d'arriver + %1 *** %2 vient d'arriver %1 *** %2 has left (%3) @@ -560,7 +592,7 @@ User quit - S'est déconnecté + S'est déconnecté Remote host has closed connection @@ -568,7 +600,7 @@ The server is too old. Disconnecting now. - La version du serveur n'est pas à jour. Déconnexion. + La version du serveur n'est pas à jour. Déconnexion. @@ -583,7 +615,7 @@ If you don't have an account on www.hedgewars.org, just enter your nickname. Pour vous connecter sur le serveur, veuillez entrer vos identifiants. -Si vous n'avez pas de compte sur www.hedgewars.org, +Si vous n'avez pas de compte sur www.hedgewars.org, entrez juste votre pseudo. @@ -655,7 +687,7 @@ %1 fps, - %1 fps + %1 fps, Audio: @@ -744,6 +776,17 @@ + PageDataDownload + + Loading, please wait. + + + + This page requires an internet connection. + + + + PageDrawMap Undo @@ -790,7 +833,7 @@ Select an action to choose a custom key bind for this team - Choisissez une action afin d'y attribuer une touche pour cette équipe + Choisissez une action afin d'y attribuer une touche pour cette équipe Use my default @@ -885,6 +928,14 @@ + + Play again + + + + Save + Enregistrer + PageInGame @@ -897,7 +948,7 @@ PageInfo Open the snapshot folder - Ouvrir le dossier de captures d'écran + Ouvrir le dossier de captures d'écran @@ -1088,7 +1139,7 @@ Select an action to change what key controls it - Choisissez une action afin d'y attribuer une touche + Choisissez une action afin d'y attribuer une touche Reset to default @@ -1148,7 +1199,7 @@ Frontend audio - Son de l'interface + Son de l'interface Account @@ -1172,7 +1223,7 @@ Video recording options - Option d'enregistrement vidéo + Option d'enregistrement vidéo @@ -1194,7 +1245,7 @@ Join - Rejoindre + Rejoindre Admin features @@ -1249,7 +1300,7 @@ Open server administration page - Ouvre la page d'administration du serveur + Ouvre la page d'administration du serveur @@ -1398,11 +1449,11 @@ PageSinglePlayer Play a quick game against the computer with random settings - Jouer une partie rapide contre l'ordinateur avec des règles aléatoires + Jouer une partie rapide contre l'ordinateur avec des règles aléatoires Play a hotseat game against your friends, or AI teams - Jouer une partie sur cet ordinateur contre vos amis ou l'IA + Jouer une partie sur cet ordinateur contre vos amis ou l'IA Campaign Mode @@ -1528,7 +1579,7 @@ Restrict Unregistered Players Join - Bloquer l'acces au joueurs non-enregistrés + Bloquer l'acces au joueurs non-enregistrés Show games in lobby @@ -1607,11 +1658,11 @@ Frontend sound effects - Effet sonores de l'interface + Effet sonores de l'interface Frontend music - Musique de l'interface + Musique de l'interface @@ -1638,11 +1689,11 @@ In lobby - En attente + En attente In progress - En cours + En cours Disabled @@ -1848,7 +1899,7 @@ Tip: - Conseil : + Conseil: Quality @@ -1952,7 +2003,7 @@ This development build is 'work in progress' and may not be compatible with other versions of the game, while some features might be broken or incomplete! - Cette version est "en cours de développement" il est possible qu'elle ne soit pas compatible avec les autres versions du jeu, des parties peuvent ne pas fonctionner ou être incompletes! + Cette version est "en cours de développement" il est possible qu'elle ne soit pas compatible avec les autres versions du jeu, des parties peuvent ne pas fonctionner ou être incompletes! Fullscreen @@ -1990,6 +2041,10 @@ This program is distributed under the %1 Ce programme est distribué par %1 + + This setting will be effective at next restart. + + QLineEdit @@ -2034,7 +2089,7 @@ Error while authenticating at google.com: - Erreur lors de l'authentification à google.com: + Erreur lors de l'authentification à google.com: @@ -2044,7 +2099,7 @@ Error while sending metadata to youtube.com: - Erreur lors de l'envoi des metadata à youtube.com: + Erreur lors de l'envoi des metadata à youtube.com: @@ -2053,11 +2108,11 @@ Do you really want to delete the team '%1'? - Voulez-vous vraiment supprimer l'équipe "%1" + Voulez-vous vraiment supprimer l'équipe "%1" Cannot delete default scheme '%1'! - Impossible de retirer la règle par défaut "%1" + Impossible de retirer la règle par défaut "%1" Please select a record from the list @@ -2077,7 +2132,7 @@ All file associations have been set - Les associations d'extensions de fichiers ont été effectuées + Les associations d'extensions de fichiers ont été effectuées Cannot create directory %1 @@ -2101,11 +2156,11 @@ Please enter room name - Veuillez saisir le nom d'une room + Veuillez saisir le nom d'une room Record Play - Error - Jouer l'enregistrement - Erreur + Jouer l'enregistrement - Erreur Please select record from the list @@ -2113,11 +2168,11 @@ Cannot rename to - Impossible de renommer en + Impossible de renommer en Cannot delete file - Impossible de supprimer le fichier + Impossible de supprimer le fichier Room Name - Error @@ -2147,7 +2202,7 @@ Do you really want to delete the game scheme '%1'? - Etes-vous sûr de vouloir supprimer cette règle : "%1" ? + Etes-vous sûr de vouloir supprimer cette règle : "%1" ? Videos - Are you sure? @@ -2155,7 +2210,7 @@ Do you really want to delete the video '%1'? - Etes-vous sûr de vouloir supprimer cette vidéo : "%1" ? + Etes-vous sûr de vouloir supprimer cette vidéo : "%1" ? Do you really want to remove %1 file(s)? @@ -2166,7 +2221,7 @@ Do you really want to cancel uploading %1? - Voulez-vous arreter l'importation de %1? + Voulez-vous arreter l'importation de %1? File error @@ -2174,7 +2229,7 @@ Cannot open '%1' for writing - Impossible d'écrire le fichier %1 + Impossible d'écrire le fichier %1 Cannot open '%1' for reading @@ -2182,7 +2237,7 @@ Cannot use the ammo '%1'! - Impossible d'utiliser cette arme : "%1" + Impossible d'utiliser cette arme : "%1" Weapons - Warning @@ -2190,11 +2245,11 @@ Cannot overwrite default weapon set '%1'! - Impossible de remplacer le set d'arme "%1" + Impossible de remplacer le set d'arme "%1" Cannot delete default weapon set '%1'! - Impossible de supprimer le set d'arme par défaut "%1" + Impossible de supprimer le set d'arme par défaut "%1" Weapons - Are you sure? @@ -2202,7 +2257,7 @@ Do you really want to delete the weapon set '%1'? - Etes-vous sûr de vouloir supprimer le set d'arme "%1"? + Etes-vous sûr de vouloir supprimer le set d'arme "%1"? Hedgewars - Nick not registered @@ -2303,7 +2358,7 @@ More info - Plus d'info + Plus d'info Set default options @@ -2323,7 +2378,7 @@ Cancel uploading - Annuler l'importation + Annuler l'importation Restore default coding parameters @@ -3099,116 +3154,112 @@ server - No checker rights - - - Authentication failed - Echec d'authentification + Echec d'authentification 60 seconds cooldown after kick - Bannis pour 60 sec après un kick + Bannis pour 60 sec après un kick kicked - Exclus (kick) + Exclus (kick) Ping timeout - Met trop de temps à répondre + Met trop de temps à répondre bye - Aurevoir + Aurevoir Empty config entry - Configuration vide + Configuration vide Not room master - Vous n'êtes pas le propriétaire de la room + Vous n'êtes pas le propriétaire de la room Corrupted hedgehogs info - Info hérisson corrompus + Info hérisson corrompus too many teams - trop d'équipes + trop d'équipes too many hedgehogs - trop de hérissons + trop de hérissons There's already a team with same name in the list - Il y a déja une équipe avec le même nom dans la liste + Il y a déja une équipe avec le même nom dans la liste round in progress - La partie est en cour + La partie est en cour restricted - Ajout interdis + Ajout interdis REMOVE_TEAM: no such team - REMOVE_TEAM: aucune équipe de ce nom + REMOVE_TEAM: aucune équipe de ce nom Not team owner! - Vous n'êtes pas le propriétaire de cette équipe! + Vous n'êtes pas le propriétaire de cette équipe! Less than two clans! - Il faut 2 clans minimum! + Il faut 2 clans minimum! Room with such name already exists - Ce nom de room existe déjà + Ce nom de room existe déjà Illegal room name - Nom de room invalide + Nom de room invalide No such room - Cette room n'existe pas + Cette room n'existe pas Joining restricted - Accès interdis + Accès interdis Registered users only - Accès réservé aux utilisateurs enregistré + Accès réservé aux utilisateurs enregistré You are banned in this room - Vous avez été bannis de cette room + Vous avez été bannis de cette room Nickname already chosen - Pseudo déjà choisis + Pseudo déjà choisis Illegal nickname - Pseudo invalide + Pseudo invalide Protocol already known - Protocole déjà connu + Protocole déjà connu Bad number - Mauvais numéro + Mauvais numéro Nickname is already in use - Ce pseudo est actuellement utilisé sur le serveur + Ce pseudo est actuellement utilisé sur le serveur diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Locale/hedgewars_gl.ts --- a/share/hedgewars/Data/Locale/hedgewars_gl.ts Sun Apr 21 01:36:08 2013 +0200 +++ b/share/hedgewars/Data/Locale/hedgewars_gl.ts Wed May 29 22:52:37 2013 +0400 @@ -99,19 +99,19 @@ - Please give us feedback! - - - We are always happy about suggestions, ideas, or bug reports. - If you found a bug, you can see if it's already known here (english): - - - - Your email address is optional, but we may want to contact you. + Send us feedback! + + + + If you found a bug, you can see if it's already been reported here: + + + + Your email address is optional, but necessary if you want us to get back at you. @@ -254,6 +254,18 @@ Failed to save StyleSheet to %1 + + %1 has joined + + + + %1 has left + + + + %1 has left (%2) + + HWForm @@ -353,6 +365,10 @@ Please wait a few seconds and try again. + + This page requires an internet connection. + + HWGame @@ -472,10 +488,6 @@ - Theme: - - - Load drawn map @@ -491,6 +503,10 @@ Large tunnels + + Theme: %1 + + HWNetServersModel @@ -535,7 +551,7 @@ %1 *** %2 has joined - %1 *** %2 uniuse + %1 *** %2 uniuse %1 *** %2 has left (%3) @@ -729,6 +745,17 @@ + PageDataDownload + + Loading, please wait. + + + + This page requires an internet connection. + + + + PageDrawMap Eraser @@ -870,6 +897,14 @@ + + Play again + + + + Save + + PageInGame @@ -1961,6 +1996,10 @@ This program is distributed under the %1 + + This setting will be effective at next restart. + + QLineEdit @@ -3062,119 +3101,4 @@ Mando - - server - - No checker rights - - - - Authentication failed - - - - 60 seconds cooldown after kick - - - - kicked - - - - Ping timeout - - - - bye - - - - Empty config entry - - - - Not room master - - - - Corrupted hedgehogs info - - - - too many teams - - - - too many hedgehogs - - - - There's already a team with same name in the list - - - - round in progress - - - - restricted - - - - REMOVE_TEAM: no such team - - - - Not team owner! - - - - Less than two clans! - - - - Room with such name already exists - - - - Illegal room name - - - - No such room - - - - Joining restricted - - - - Registered users only - - - - You are banned in this room - - - - Nickname already chosen - - - - Illegal nickname - - - - Protocol already known - - - - Bad number - - - - Nickname is already in use - - - diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Locale/hedgewars_hu.ts --- a/share/hedgewars/Data/Locale/hedgewars_hu.ts Sun Apr 21 01:36:08 2013 +0200 +++ b/share/hedgewars/Data/Locale/hedgewars_hu.ts Wed May 29 22:52:37 2013 +0400 @@ -99,19 +99,19 @@ - Please give us feedback! - - - We are always happy about suggestions, ideas, or bug reports. - If you found a bug, you can see if it's already known here (english): - - - - Your email address is optional, but we may want to contact you. + Send us feedback! + + + + If you found a bug, you can see if it's already been reported here: + + + + Your email address is optional, but necessary if you want us to get back at you. @@ -248,6 +248,18 @@ Failed to save StyleSheet to %1 + + %1 has joined + + + + %1 has left + + + + %1 has left (%2) + + HWForm @@ -347,6 +359,10 @@ Please wait a few seconds and try again. + + This page requires an internet connection. + + HWGame @@ -466,10 +482,6 @@ - Theme: - - - Load drawn map @@ -485,6 +497,10 @@ Large tunnels + + Theme: %1 + + HWNetServersModel @@ -529,7 +545,7 @@ %1 *** %2 has joined - %1 *** %2 csatlakozott + %1 *** %2 csatlakozott %1 *** %2 has left (%3) @@ -723,6 +739,17 @@ + PageDataDownload + + Loading, please wait. + + + + This page requires an internet connection. + + + + PageDrawMap Undo @@ -858,6 +885,14 @@ + + Play again + + + + Save + + PageInGame @@ -1947,6 +1982,10 @@ This program is distributed under the %1 + + This setting will be effective at next restart. + + QLineEdit @@ -3047,119 +3086,4 @@ DPad - - server - - No checker rights - - - - Authentication failed - - - - 60 seconds cooldown after kick - - - - kicked - - - - Ping timeout - - - - bye - - - - Empty config entry - - - - Not room master - - - - Corrupted hedgehogs info - - - - too many teams - - - - too many hedgehogs - - - - There's already a team with same name in the list - - - - round in progress - - - - restricted - - - - REMOVE_TEAM: no such team - - - - Not team owner! - - - - Less than two clans! - - - - Room with such name already exists - - - - Illegal room name - - - - No such room - - - - Joining restricted - - - - Registered users only - - - - You are banned in this room - - - - Nickname already chosen - - - - Illegal nickname - - - - Protocol already known - - - - Bad number - - - - Nickname is already in use - - - diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Locale/hedgewars_it.ts --- a/share/hedgewars/Data/Locale/hedgewars_it.ts Sun Apr 21 01:36:08 2013 +0200 +++ b/share/hedgewars/Data/Locale/hedgewars_it.ts Wed May 29 22:52:37 2013 +0400 @@ -100,7 +100,7 @@ Please give us feedback! - Per favore, inviaci un commento! + Per favore, inviaci un commento! We are always happy about suggestions, ideas, or bug reports. @@ -108,11 +108,23 @@ If you found a bug, you can see if it's already known here (english): - Se torvi u nbaco, puoi vedere se è già conosciuto qui (in inglese): + Se torvi u nbaco, puoi vedere se è già conosciuto qui (in inglese): Your email address is optional, but we may want to contact you. - Il tuo indirizzo di posta elettronica è opzionale, ma potremmo volerti contattare. + Il tuo indirizzo di posta elettronica è opzionale, ma potremmo volerti contattare. + + + Send us feedback! + + + + If you found a bug, you can see if it's already been reported here: + + + + Your email address is optional, but necessary if you want us to get back at you. + @@ -261,6 +273,18 @@ Failed to save StyleSheet to %1 Impossibile salvare la StyleSheet in %1! Errore interno! + + %1 has joined + + + + %1 has left + + + + %1 has left (%2) + + HWForm @@ -370,6 +394,10 @@ Ti sei ricollegato troppo velocemente. Per favore aspetta qualche secondo e prova di nuovo. + + This page requires an internet connection. + + HWGame @@ -490,7 +518,7 @@ Theme: - Tema: + Tema: Load drawn map @@ -508,6 +536,10 @@ Large tunnels + + Theme: %1 + + HWNetServersModel @@ -552,7 +584,7 @@ %1 *** %2 has joined - %1 *** %2 è entrato + %1 *** %2 è entrato %1 *** %2 has left (%3) @@ -749,6 +781,17 @@ + PageDataDownload + + Loading, please wait. + + + + This page requires an internet connection. + + + + PageDrawMap Undo @@ -890,6 +933,14 @@ <b>%1</b> aveva paura e ha passato il turno <b>%2</b> volte. + + Play again + + + + Save + Salva + PageInGame @@ -2001,6 +2052,10 @@ This program is distributed under the %1 Questo programma è distribuito secondo i termini di %1 + + This setting will be effective at next restart. + + QLineEdit @@ -3139,115 +3194,111 @@ server Not room master - Non proprietario della stanza + Non proprietario della stanza Corrupted hedgehogs info - Informazioni ricci corrotte + Informazioni ricci corrotte too many teams - troppe squadre + troppe squadre too many hedgehogs - troppi ricci + troppi ricci There's already a team with same name in the list - C'è già una quadra collo stesso nome in lista + C'è già una quadra collo stesso nome in lista round in progress - turno in corso + turno in corso restricted - proibito + proibito REMOVE_TEAM: no such team - CANCELLA_SQUADRA: squadra non presente + CANCELLA_SQUADRA: squadra non presente Not team owner! - Non proprietario della squadra! + Non proprietario della squadra! Less than two clans! - Meno di due clan! + Meno di due clan! Room with such name already exists - Esiste già una stanza con questo nome + Esiste già una stanza con questo nome Nickname already chosen - Nome già scelto + Nome già scelto Illegal nickname - Nome non valido + Nome non valido Protocol already known - Protocollo già conosciuto + Protocollo già conosciuto Bad number - Numero non valido + Numero non valido Nickname is already in use - Nome già in uso + Nome già in uso Authentication failed - Autenticazione fallita + Autenticazione fallita 60 seconds cooldown after kick - 60 secondi di raffreddamento prima dell'espulsione + 60 secondi di raffreddamento prima dell'espulsione kicked - espulso + espulso Ping timeout - Scadenza ping + Scadenza ping bye - ciao + ciao Illegal room name - Nome stanza non valido + Nome stanza non valido No such room - Stanza non esistente + Stanza non esistente Joining restricted - Ingresso riservato + Ingresso riservato Registered users only - Solo utenti registrati + Solo utenti registrati You are banned in this room - Sei stato espulso dalla stanza + Sei stato espulso dalla stanza Empty config entry - Configurazione vuota - - - No checker rights - + Configurazione vuota diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Locale/hedgewars_ja.ts --- a/share/hedgewars/Data/Locale/hedgewars_ja.ts Sun Apr 21 01:36:08 2013 +0200 +++ b/share/hedgewars/Data/Locale/hedgewars_ja.ts Wed May 29 22:52:37 2013 +0400 @@ -99,19 +99,19 @@ - Please give us feedback! - - - We are always happy about suggestions, ideas, or bug reports. - If you found a bug, you can see if it's already known here (english): - - - - Your email address is optional, but we may want to contact you. + Send us feedback! + + + + If you found a bug, you can see if it's already been reported here: + + + + Your email address is optional, but necessary if you want us to get back at you. @@ -248,6 +248,18 @@ Failed to save StyleSheet to %1 + + %1 has joined + + + + %1 has left + + + + %1 has left (%2) + + HWForm @@ -347,6 +359,10 @@ Please wait a few seconds and try again. + + This page requires an internet connection. + + HWGame @@ -466,10 +482,6 @@ - Theme: - - - Load drawn map @@ -485,6 +497,10 @@ Large tunnels + + Theme: %1 + + HWNetServersModel @@ -529,7 +545,7 @@ %1 *** %2 has joined - %1 *** %2 さんは参加 + %1 *** %2 さんは参加 %1 *** %2 has left (%3) @@ -723,6 +739,17 @@ + PageDataDownload + + Loading, please wait. + + + + This page requires an internet connection. + + + + PageDrawMap Undo @@ -858,6 +885,14 @@ + + Play again + + + + Save + セーブ + PageInGame @@ -1943,6 +1978,10 @@ This program is distributed under the %1 + + This setting will be effective at next restart. + + QLineEdit @@ -3043,119 +3082,4 @@ - - server - - No checker rights - - - - Authentication failed - - - - 60 seconds cooldown after kick - - - - kicked - - - - Ping timeout - - - - bye - - - - Empty config entry - - - - Not room master - - - - Corrupted hedgehogs info - - - - too many teams - - - - too many hedgehogs - - - - There's already a team with same name in the list - - - - round in progress - - - - restricted - - - - REMOVE_TEAM: no such team - - - - Not team owner! - - - - Less than two clans! - - - - Room with such name already exists - - - - Illegal room name - - - - No such room - - - - Joining restricted - - - - Registered users only - - - - You are banned in this room - - - - Nickname already chosen - - - - Illegal nickname - - - - Protocol already known - - - - Bad number - - - - Nickname is already in use - - - diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Locale/hedgewars_ko.ts --- a/share/hedgewars/Data/Locale/hedgewars_ko.ts Sun Apr 21 01:36:08 2013 +0200 +++ b/share/hedgewars/Data/Locale/hedgewars_ko.ts Wed May 29 22:52:37 2013 +0400 @@ -99,19 +99,19 @@ - Please give us feedback! - - - We are always happy about suggestions, ideas, or bug reports. - If you found a bug, you can see if it's already known here (english): - - - - Your email address is optional, but we may want to contact you. + Send us feedback! + + + + If you found a bug, you can see if it's already been reported here: + + + + Your email address is optional, but necessary if you want us to get back at you. @@ -248,6 +248,18 @@ Failed to save StyleSheet to %1 + + %1 has joined + + + + %1 has left + + + + %1 has left (%2) + + HWForm @@ -347,6 +359,10 @@ Please wait a few seconds and try again. + + This page requires an internet connection. + + HWGame @@ -466,10 +482,6 @@ - Theme: - - - Load drawn map @@ -485,6 +497,10 @@ Large tunnels + + Theme: %1 + + HWNetServersModel @@ -528,10 +544,6 @@ - %1 *** %2 has joined - - - %1 *** %2 has left (%3) @@ -723,6 +735,17 @@ + PageDataDownload + + Loading, please wait. + + + + This page requires an internet connection. + + + + PageDrawMap Undo @@ -858,6 +881,14 @@ + + Play again + + + + Save + + PageInGame @@ -1919,6 +1950,10 @@ This program is distributed under the %1 + + This setting will be effective at next restart. + + QLineEdit @@ -3011,119 +3046,4 @@ - - server - - No checker rights - - - - Authentication failed - - - - 60 seconds cooldown after kick - - - - kicked - - - - Ping timeout - - - - bye - - - - Empty config entry - - - - Not room master - - - - Corrupted hedgehogs info - - - - too many teams - - - - too many hedgehogs - - - - There's already a team with same name in the list - - - - round in progress - - - - restricted - - - - REMOVE_TEAM: no such team - - - - Not team owner! - - - - Less than two clans! - - - - Room with such name already exists - - - - Illegal room name - - - - No such room - - - - Joining restricted - - - - Registered users only - - - - You are banned in this room - - - - Nickname already chosen - - - - Illegal nickname - - - - Protocol already known - - - - Bad number - - - - Nickname is already in use - - - diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Locale/hedgewars_lt.ts --- a/share/hedgewars/Data/Locale/hedgewars_lt.ts Sun Apr 21 01:36:08 2013 +0200 +++ b/share/hedgewars/Data/Locale/hedgewars_lt.ts Wed May 29 22:52:37 2013 +0400 @@ -97,7 +97,7 @@ DataManager - + Use Default @@ -105,37 +105,37 @@ FeedbackDialog - - Please give us feedback! - - - - + We are always happy about suggestions, ideas, or bug reports. - - If you found a bug, you can see if it's already known here (english): - - - - Your email address is optional, but we may want to contact you. - - - - + Send us feedback! + + + + + If you found a bug, you can see if it's already been reported here: + + + + + Your email address is optional, but necessary if you want us to get back at you. + + + + View - + Cancel - + Send Feedback @@ -267,52 +267,67 @@ HWChatWidget - + + %1 has joined + + + + + %1 has left + + + + + %1 has left (%2) + + + + %1 has been removed from your ignore list - + %1 has been added to your ignore list - + %1 has been removed from your friends list - + %1 has been added to your friends list - + Stylesheet imported from %1 - + Enter %1 if you want to use the current StyleSheet in future, enter %2 to reset! - + Couldn't read %1 - + StyleSheet discarded - + StyleSheet saved to %1 - + Failed to save StyleSheet to %1 @@ -325,23 +340,23 @@ - + Game aborted - + Nickname - - + + No nickname supplied. - + Someone already uses your nickname %1 on the server. Please pick another nickname: @@ -352,12 +367,12 @@ - + Hedgewars - Nick registered - + This nick is registered, and you haven't specified a password. If this nick isn't yours, please register your own nick at www.hedgewars.org @@ -366,90 +381,95 @@ - + Your nickname is not registered. To prevent someone else from using it, please register it at www.hedgewars.org - + Your password wasn't saved either. - - + + Hedgewars - Empty nickname - + Hedgewars - Wrong password - + You entered a wrong password. - + Try Again - + Hedgewars - Connection error - + You reconnected too fast. Please wait a few seconds and try again. - - + + Cannot save record to file %1 - + Hedgewars Demo File File Types - + Hedgewars Save File File Types - + Demo name - + Demo name: + + + This page requires an internet connection. + + HWGame - + en.txt lt.txt - + Cannot open demofile %1 @@ -457,158 +477,158 @@ HWMapContainer - + Map type: - - Image map - - - - Mission map + Image map - Hand-drawn + Mission map - Randomly generated + Hand-drawn + Randomly generated + + + + Random maze - + Random - + Map preview: - + Load map drawing - + Edit map drawing - - All - - - - - Small - - - - - Medium - - - - Large + All - Cavern + Small + Medium + + + + + Large + + + + + Cavern + + + + Wacky - - Large tunnels - - - - - Small islands - - - - - Medium islands - - - + Large tunnels + + + + + Small islands + + + + + Medium islands + + + + Large islands - + Map size: - + Maze style: - + Mission: - + Map: - - - Theme: - - - - + + + Theme: %1 + + + + Load drawn map - + Drawn Maps - + All files - + Small tunnels - + Medium tunnels - + Seed @@ -659,40 +679,33 @@ - + Room destroyed - + You got kicked - - + + %1 *** %2 has joined the room - - %1 *** %2 has joined - - - - - + %1 *** %2 has left - - + %1 *** %2 has left (%3) - + Quit reason: @@ -902,6 +915,19 @@ + PageDataDownload + + + Loading, please wait. + + + + + This page requires an internet connection. + + + + PageDrawMap @@ -1022,12 +1048,22 @@ - + + Play again + + + + + Save + + + + The best shot award was won by <b>%1</b> with <b>%2</b> pts. - + The best killer is <b>%1</b> with <b>%2</b> kills in a turn. @@ -1036,7 +1072,7 @@ - + A total of <b>%1</b> hedgehog(s) were killed during this round. @@ -1045,7 +1081,7 @@ - + (%1 kill) @@ -1054,7 +1090,7 @@ - + <b>%1</b> thought it's good to shoot his own hedgehogs with <b>%2</b> pts. @@ -1063,7 +1099,7 @@ - + <b>%1</b> killed <b>%2</b> of his own hedgehogs. @@ -1072,7 +1108,7 @@ - + <b>%1</b> was scared and skipped turn <b>%2</b> times. @@ -1173,12 +1209,12 @@ PageMultiplayer - + Edit game preferences - + Start @@ -1338,97 +1374,97 @@ - + Frontend - + Custom colors - + Reset to default colors - + Game audio - + Frontend audio - + Account - + Proxy settings - - Proxy host - - - - - Proxy port - - - - Proxy login + Proxy host + Proxy port + + + + + Proxy login + + + + Proxy password - - No proxy - - - - - System proxy settings - - - - Socks5 proxy + No proxy + System proxy settings + + + + + Socks5 proxy + + + + HTTP proxy - + Miscellaneous - + Updates - + Check for updates - + Video recording options @@ -1449,52 +1485,52 @@ PageRoomsList - + Search for a room: - + Create room - + Join room - + Room state - + Rules: - + Weapons: - + Clear filters - + Admin features - + Open server administration page - + %1 players online @@ -1808,23 +1844,23 @@ - + Ignore - + Add friend - + Unignore - + Remove friend @@ -1844,12 +1880,12 @@ - + Show games in lobby - + Show games in-progress @@ -1857,75 +1893,75 @@ QCheckBox - + Show ammo menu tooltips - + Alternative damage show - + Visual effects - - + + Sound - + In-game sound effects - - + + Music - + In-game music - + Frontend sound effects - + Frontend music - + Append date and time to record file name - + Check for updates at startup - + Fullscreen - + Show FPS - + Save password @@ -1940,12 +1976,12 @@ - + Record audio - + Use game resolution @@ -1968,88 +2004,88 @@ - + (System default) - - Disabled - - - - - Red/Cyan - - - - Cyan/Red + Disabled - Red/Blue + Red/Cyan - Blue/Red + Cyan/Red - Red/Green + Red/Blue + Blue/Red + + + + + Red/Green + + + + Green/Red + + Side-by-side + + + + + Top-Bottom + + + + + Red/Cyan grayscale + + + + + Cyan/Red grayscale + + + + + Red/Blue grayscale + + + + + Blue/Red grayscale + + + - Side-by-side + Red/Green grayscale - Top-Bottom - - - - - Red/Cyan grayscale - - - - - Cyan/Red grayscale - - - - - Red/Blue grayscale - - - - - Blue/Red grayscale - - - - - Red/Green grayscale - - - - Green/Red grayscale - - + + Any @@ -2087,7 +2123,7 @@ - + Playing teams @@ -2185,22 +2221,27 @@ - + Locale - + Nickname - + + This setting will be effective at next restart. + + + + Resolution - + Quality @@ -2220,17 +2261,17 @@ - + Stereo rendering - + Initial sound volume - + FPS limit @@ -2352,52 +2393,52 @@ - + Your Email - + Summary - + Send system information - + Description - + Type the security code: - + Format - + Audio codec - + Video codec - + Framerate - + Bitrate (Kbps) @@ -2405,7 +2446,7 @@ QLineEdit - + unnamed @@ -2416,7 +2457,7 @@ - + anonymous @@ -2447,82 +2488,82 @@ - + Cannot delete default scheme '%1'! - + Please select a record from the list - + Hedgewars - Nick not registered - + Unable to start server - + Connection to server is lost - + Not all players are ready - + Are you sure you want to start this game? Not all players are ready. - + Hedgewars - Error - + System Information Preview - - + + Failed to generate captcha - + Failed to download captcha - + Please fill out all fields. Email is optional. - - + + Hedgewars - Success - + All file associations have been set - + File association failed. @@ -2600,22 +2641,22 @@ - + Room Name - Error - + Please select room from the list - + Room Name - Are you sure? - + The game you are trying to join has started. Do you still want to join the room? @@ -2664,7 +2705,7 @@ - + File error @@ -2675,7 +2716,7 @@ - + Cannot open '%1' for reading @@ -2791,7 +2832,7 @@ - + Associate file extensions @@ -2824,12 +2865,12 @@ - + Set default options - + Restore default coding parameters @@ -3027,7 +3068,7 @@ TeamSelWidget - + At least two teams are required to play! @@ -3426,7 +3467,7 @@ - + Keyboard @@ -3786,147 +3827,4 @@ - - server - - - No checker rights - - - - - Authentication failed - - - - - 60 seconds cooldown after kick - - - - - kicked - - - - - Ping timeout - - - - - bye - - - - - Empty config entry - - - - - Not room master - - - - - Corrupted hedgehogs info - - - - - too many teams - - - - - too many hedgehogs - - - - - There's already a team with same name in the list - - - - - round in progress - - - - - restricted - - - - - REMOVE_TEAM: no such team - - - - - Not team owner! - - - - - Less than two clans! - - - - - Room with such name already exists - - - - - Illegal room name - - - - - No such room - - - - - Joining restricted - - - - - Registered users only - - - - - You are banned in this room - - - - - Nickname already chosen - - - - - Illegal nickname - - - - - Protocol already known - - - - - Bad number - - - - - Nickname is already in use - - - diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Locale/hedgewars_ms.ts --- a/share/hedgewars/Data/Locale/hedgewars_ms.ts Sun Apr 21 01:36:08 2013 +0200 +++ b/share/hedgewars/Data/Locale/hedgewars_ms.ts Wed May 29 22:52:37 2013 +0400 @@ -97,7 +97,7 @@ DataManager - + Use Default @@ -105,37 +105,37 @@ FeedbackDialog - - Please give us feedback! - - - - + We are always happy about suggestions, ideas, or bug reports. - - If you found a bug, you can see if it's already known here (english): - - - - Your email address is optional, but we may want to contact you. - - - - + Send us feedback! + + + + + If you found a bug, you can see if it's already been reported here: + + + + + Your email address is optional, but necessary if you want us to get back at you. + + + + View - + Cancel - + Send Feedback @@ -255,52 +255,67 @@ HWChatWidget - + + %1 has joined + + + + + %1 has left + + + + + %1 has left (%2) + + + + %1 has been removed from your ignore list - + %1 has been added to your ignore list - + %1 has been removed from your friends list - + %1 has been added to your friends list - + Stylesheet imported from %1 - + Enter %1 if you want to use the current StyleSheet in future, enter %2 to reset! - + Couldn't read %1 - + StyleSheet discarded - + StyleSheet saved to %1 - + Failed to save StyleSheet to %1 @@ -318,17 +333,17 @@ - + Game aborted - + Hedgewars - Nick registered - + This nick is registered, and you haven't specified a password. If this nick isn't yours, please register your own nick at www.hedgewars.org @@ -337,107 +352,112 @@ - + Your nickname is not registered. To prevent someone else from using it, please register it at www.hedgewars.org - + Your password wasn't saved either. - + Nickname - + Someone already uses your nickname %1 on the server. Please pick another nickname: - - + + No nickname supplied. - - + + Hedgewars - Empty nickname - + Hedgewars - Wrong password - + You entered a wrong password. - + Try Again - + Hedgewars - Connection error - + You reconnected too fast. Please wait a few seconds and try again. - - + + Cannot save record to file %1 - + Hedgewars Demo File File Types - + Hedgewars Save File File Types - + Demo name - + Demo name: + + + This page requires an internet connection. + + HWGame - + en.txt ms.txt - + Cannot open demofile %1 @@ -445,158 +465,158 @@ HWMapContainer - + Map type: - - Image map - - - - Mission map + Image map - Hand-drawn + Mission map - Randomly generated + Hand-drawn + Randomly generated + + + + Random maze - + Random - + Map preview: - + Load map drawing - + Edit map drawing - - All - - - - - Small - - - - - Medium - - - - Large + All - Cavern + Small + Medium + + + + + Large + + + + + Cavern + + + + Wacky - - Large tunnels - - - - - Small islands - - - - - Medium islands - - - + Large tunnels + + + + + Small islands + + + + + Medium islands + + + + Large islands - + Map size: - + Maze style: - + Mission: - + Map: - - - Theme: - - - - + + + Theme: %1 + + + + Load drawn map - + Drawn Maps - + All files - + Small tunnels - + Medium tunnels - + Seed @@ -622,7 +642,7 @@ HWNewNet - + Quit reason: @@ -652,35 +672,28 @@ - + You got kicked - - %1 *** %2 has joined - - - - - + %1 *** %2 has left - - + %1 *** %2 has left (%3) - - + + %1 *** %2 has joined the room - + Room destroyed @@ -890,6 +903,19 @@ + PageDataDownload + + + Loading, please wait. + + + + + This page requires an internet connection. + + + + PageDrawMap @@ -1010,47 +1036,57 @@ - + + Play again + + + + + Save + + + + The best shot award was won by <b>%1</b> with <b>%2</b> pts. - + The best killer is <b>%1</b> with <b>%2</b> kills in a turn. - + A total of <b>%1</b> hedgehog(s) were killed during this round. - + (%1 kill) - + <b>%1</b> thought it's good to shoot his own hedgehogs with <b>%2</b> pts. - + <b>%1</b> killed <b>%2</b> of his own hedgehogs. - + <b>%1</b> was scared and skipped turn <b>%2</b> times. @@ -1149,12 +1185,12 @@ PageMultiplayer - + Edit game preferences - + Start @@ -1314,97 +1350,97 @@ - + Frontend - + Custom colors - + Reset to default colors - + Game audio - + Frontend audio - + Account - + Proxy settings - - Proxy host - - - - - Proxy port - - - - Proxy login + Proxy host + Proxy port + + + + + Proxy login + + + + Proxy password - - No proxy - - - - - System proxy settings - - - - Socks5 proxy + No proxy + System proxy settings + + + + + Socks5 proxy + + + + HTTP proxy - + Miscellaneous - + Updates - + Check for updates - + Video recording options @@ -1425,52 +1461,52 @@ PageRoomsList - + Search for a room: - + Create room - + Join room - + Room state - + Rules: - + Weapons: - + Clear filters - + Admin features - + Open server administration page - + %1 players online @@ -1795,33 +1831,33 @@ - + Ignore - + Add friend - + Unignore - + Remove friend - + Show games in lobby - + Show games in-progress @@ -1830,7 +1866,7 @@ QCheckBox - + Save password @@ -1845,79 +1881,79 @@ - + Check for updates at startup - + Fullscreen - + Alternative damage show - + Show FPS - + Show ammo menu tooltips - + Visual effects - - + + Sound - + In-game sound effects - - + + Music - + In-game music - + Frontend sound effects - + Frontend music - + Append date and time to record file name - + Record audio - + Use game resolution @@ -1940,88 +1976,88 @@ - + (System default) - - Disabled - - - - - Red/Cyan - - - - Cyan/Red + Disabled - Red/Blue + Red/Cyan - Blue/Red + Cyan/Red - Red/Green + Red/Blue + Blue/Red + + + + + Red/Green + + + + Green/Red + + Side-by-side + + + + + Top-Bottom + + + + + Red/Cyan grayscale + + + + + Cyan/Red grayscale + + + + + Red/Blue grayscale + + + + + Blue/Red grayscale + + + - Side-by-side + Red/Green grayscale - Top-Bottom - - - - - Red/Cyan grayscale - - - - - Cyan/Red grayscale - - - - - Red/Blue grayscale - - - - - Blue/Red grayscale - - - - - Red/Green grayscale - - - - Green/Red grayscale - - + + Any @@ -2069,7 +2105,7 @@ - + Playing teams @@ -2149,27 +2185,27 @@ - + Your Email - + Summary - + Send system information - + Description - + Type the security code: @@ -2199,22 +2235,27 @@ - + Locale - + Nickname - + + This setting will be effective at next restart. + + + + Resolution - + Quality @@ -2234,17 +2275,17 @@ - + Stereo rendering - + Initial sound volume - + FPS limit @@ -2329,27 +2370,27 @@ - + Format - + Audio codec - + Video codec - + Framerate - + Bitrate (Kbps) @@ -2377,7 +2418,7 @@ QLineEdit - + unnamed @@ -2388,7 +2429,7 @@ - + anonymous @@ -2419,82 +2460,82 @@ - + Cannot delete default scheme '%1'! - + Please select a record from the list - + Hedgewars - Nick not registered - + Unable to start server - + Connection to server is lost - + Not all players are ready - + Are you sure you want to start this game? Not all players are ready. - + Hedgewars - Error - + System Information Preview - - + + Failed to generate captcha - + Failed to download captcha - + Please fill out all fields. Email is optional. - - + + Hedgewars - Success - + All file associations have been set - + File association failed. @@ -2562,22 +2603,22 @@ - + Room Name - Error - + Please select room from the list - + Room Name - Are you sure? - + The game you are trying to join has started. Do you still want to join the room? @@ -2624,7 +2665,7 @@ - + File error @@ -2635,7 +2676,7 @@ - + Cannot open '%1' for reading @@ -2766,7 +2807,7 @@ - + Associate file extensions @@ -2794,12 +2835,12 @@ - + Set default options - + Restore default coding parameters @@ -2997,7 +3038,7 @@ TeamSelWidget - + At least two teams are required to play! @@ -3714,7 +3755,7 @@ - + Keyboard @@ -3756,147 +3797,4 @@ - - server - - - No checker rights - - - - - Authentication failed - - - - - 60 seconds cooldown after kick - - - - - kicked - - - - - Ping timeout - - - - - bye - - - - - Empty config entry - - - - - Not room master - - - - - Corrupted hedgehogs info - - - - - too many teams - - - - - too many hedgehogs - - - - - There's already a team with same name in the list - - - - - round in progress - - - - - restricted - - - - - REMOVE_TEAM: no such team - - - - - Not team owner! - - - - - Less than two clans! - - - - - Room with such name already exists - - - - - Illegal room name - - - - - No such room - - - - - Joining restricted - - - - - Registered users only - - - - - You are banned in this room - - - - - Nickname already chosen - - - - - Illegal nickname - - - - - Protocol already known - - - - - Bad number - - - - - Nickname is already in use - - - diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Locale/hedgewars_nl.ts --- a/share/hedgewars/Data/Locale/hedgewars_nl.ts Sun Apr 21 01:36:08 2013 +0200 +++ b/share/hedgewars/Data/Locale/hedgewars_nl.ts Wed May 29 22:52:37 2013 +0400 @@ -99,19 +99,19 @@ - Please give us feedback! - - - We are always happy about suggestions, ideas, or bug reports. - If you found a bug, you can see if it's already known here (english): - - - - Your email address is optional, but we may want to contact you. + Send us feedback! + + + + If you found a bug, you can see if it's already been reported here: + + + + Your email address is optional, but necessary if you want us to get back at you. @@ -254,6 +254,18 @@ Failed to save StyleSheet to %1 + + %1 has joined + + + + %1 has left + + + + %1 has left (%2) + + HWForm @@ -353,6 +365,10 @@ Please wait a few seconds and try again. + + This page requires an internet connection. + + HWGame @@ -472,10 +488,6 @@ - Theme: - - - Load drawn map @@ -491,6 +503,10 @@ Large tunnels + + Theme: %1 + + HWNetServersModel @@ -534,10 +550,6 @@ - %1 *** %2 has joined - - - %1 *** %2 has left (%3) @@ -729,6 +741,17 @@ + PageDataDownload + + Loading, please wait. + + + + This page requires an internet connection. + + + + PageDrawMap Undo @@ -870,6 +893,14 @@ + + Play again + + + + Save + + PageInGame @@ -1933,6 +1964,10 @@ This program is distributed under the %1 + + This setting will be effective at next restart. + + QLineEdit @@ -3026,119 +3061,4 @@ - - server - - No checker rights - - - - Authentication failed - - - - 60 seconds cooldown after kick - - - - kicked - - - - Ping timeout - - - - bye - - - - Empty config entry - - - - Not room master - - - - Corrupted hedgehogs info - - - - too many teams - - - - too many hedgehogs - - - - There's already a team with same name in the list - - - - round in progress - - - - restricted - - - - REMOVE_TEAM: no such team - - - - Not team owner! - - - - Less than two clans! - - - - Room with such name already exists - - - - Illegal room name - - - - No such room - - - - Joining restricted - - - - Registered users only - - - - You are banned in this room - - - - Nickname already chosen - - - - Illegal nickname - - - - Protocol already known - - - - Bad number - - - - Nickname is already in use - - - diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Locale/hedgewars_pl.ts --- a/share/hedgewars/Data/Locale/hedgewars_pl.ts Sun Apr 21 01:36:08 2013 +0200 +++ b/share/hedgewars/Data/Locale/hedgewars_pl.ts Wed May 29 22:52:37 2013 +0400 @@ -5,7 +5,7 @@ About Unknown Compiler - + Nieznany kompilator @@ -30,89 +30,89 @@ BanDialog IP - IP + IP Nick - + Nick IP/Nick - + IP/Nick Reason - + Powód Duration - + Czas trwania Ok - + Ok Cancel - Anuluj + Anuluj you know why - + Wiesz za co Warning - + Ostrzeżenie Please, specify %1 - + Proszę, opisz %1 nickname - + ksywka permanent - + dożywotni DataManager Use Default - + Użyj domyślnych FeedbackDialog View - + Pokaż Cancel - Anuluj + Anuluj Send Feedback - - - - Please give us feedback! - + Wyśłij opinię We are always happy about suggestions, ideas, or bug reports. - - - - If you found a bug, you can see if it's already known here (english): - - - - Your email address is optional, but we may want to contact you. - + Jesteśmy wdzięczni za sugestie, pomysły i znalezione błędy. + + + Send us feedback! + Wyślij swoją opinię! + + + If you found a bug, you can see if it's already been reported here: + Jeśli znalazłeś błąd, możesz sprawdzić czy został już zgłoszony w tym miejscu: + + + Your email address is optional, but necessary if you want us to get back at you. + E-mail jest opcjonalny chyba, że chcesz byśmy się z tobą skontaktowali. @@ -146,73 +146,80 @@ Game scheme will auto-select a weapon - + Schemat gry automatycznie wybierze uzbrojenie Map - Mapa + Mapa Game options - + Ustawienia gry + + + + GameUIConfig + + Guest + Gość HWApplication %1 minutes - - - - + + %1 minuta + %1 minuty + %1 minut %1 hour - - - - + + %1 godzina + %1 godziny + %1 godzin %1 hours - - - - + + %1 godziny + %1 godziny + %1 godzin %1 day - - - - + + %1 dzień + %1 dni + %1 dni %1 days - - - - + + %1 dni + %1 dni + %1 dni Scheme '%1' not supported - + Shemat '%1' nie jest wspierany Cannot create directory %1 - Nie można utworzyć katalogu %1 + Nie można utworzyć katalogu %1 Failed to open data directory: %1 Please check your installation! - Nie można otworzyć katalogu z danymi: + Nie można otworzyć katalogu z danymi: %1 Sprawdź poprawność instalacji! @@ -267,6 +274,18 @@ Failed to save StyleSheet to %1 Nie można było zapisać arkusza stylów jako %1 + + %1 has joined + %1 dołączył + + + %1 has left + %1 wyszedł + + + %1 has left (%2) + %1 wyszedł (%2) + HWForm @@ -316,11 +335,11 @@ %1's Team - + Zespół %1 Hedgewars - Nick registered - + Hedgewars - Zarejestrowany nick This nick is registered, and you haven't specified a password. @@ -328,44 +347,61 @@ If this nick isn't yours, please register your own nick at www.hedgewars.org Password: - + Ten nick jest zarejestrowany i musisz podać hasło. + +Jeżeli ten nick nie jest twój, zarejestrój własny na www.hedgewars.org + +Hasło: Your nickname is not registered. To prevent someone else from using it, please register it at www.hedgewars.org - + Twój nick nie jest zarejestrowany. +By zapobiec używania go przez kogoś innego +zarejestruj go na www.hedgewars.org Your password wasn't saved either. - + + +Twoje hasło nie zostało zapisane. Hedgewars - Empty nickname - + Hedgewars - Brak nicku Hedgewars - Wrong password - + Hedgewars - Złe hasło You entered a wrong password. - + Wpisałeś złe hasło. Try Again - + Spróbuj ponownie Hedgewars - Connection error - + Hedgewars - Błąd połączenia You reconnected too fast. Please wait a few seconds and try again. - + Za szybko połączyłes się ponownie. +Poczekaj kilka sekund i spróbuj ponownie. + + + This page requires an internet connection. + Ta strona wymaga połączenia z internetem. + + + Guest + Gość @@ -419,91 +455,91 @@ Map type: - + Typ mapy: Image map - + Mapa z obrazka Mission map - + Misja Hand-drawn - Rys. ręcznie + Rysowana ręcznie Randomly generated - + Losowa mapa Random maze - + Losowe labirynty Random - Losowo + Losowo Map preview: - + Podgląd: Load map drawing - + Wczytaj rysowana mapę Edit map drawing - + Edytuj mapę Small islands - + Małe wyspy Medium islands - + Średnie wyspy Large islands - + Duże wyspy Map size: - + Rozmiar mapy: Maze style: - + Styl labiryntu: Mission: - + Misja: Map: - - - - Theme: - + Mapa: Load drawn map - Załaduj mapę + Załaduj mapę Drawn Maps - Narysowane mapy + Narysowane mapy All files - Wszystkie pliki + Wszystkie pliki Large tunnels - + Duże tunele + + + Theme: %1 + Motyw: %1 @@ -549,7 +585,7 @@ %1 *** %2 has joined - %1 *** %2 dołączył + %1 *** %2 dołączył %1 *** %2 has left (%3) @@ -576,22 +612,25 @@ HWPasswordDialog Login - + Login To connect to the server, please log in. If you don't have an account on www.hedgewars.org, just enter your nickname. - + Zaloguj się by połączyć się z serwerem. + +Jeśli nie masz konta na www.hedgewars.org, +po prostu wpisz swój nick. Nickname: - + Nick: Password: - + Hasło: @@ -609,22 +648,22 @@ HatButton Change hat (%1) - + Zmień czapkę (%1) HatPrompt Cancel - Anuluj + Anuluj Use selected hat - + Użyj wybranej czapki Search for a hat: - + Szukaj czapki: @@ -638,7 +677,7 @@ KeyBinder Category - + Kategoria @@ -646,30 +685,30 @@ Duration: %1m %2s - Długość: %1m %2s + Długość: %1m %2s Video: %1x%2, - Wideo: %1x%2, + Wideo: %1x%2, %1 fps, - %1 kl/s, + %1 kl/s, Audio: - Audio: + Audio: unknown - + nieznany MapModel No description available. - + Brak opisu. @@ -704,35 +743,35 @@ General - Ogólne + Ogólne Bans - + Bany IP/Nick - + IP/Nick Expiration - + Wygaśnie Reason - + Powód Refresh - + Odśwież Add - + Dodaj Remove - + Usuń @@ -743,6 +782,17 @@ + PageDataDownload + + Loading, please wait. + Ładowanie, proszę czekać. + + + This page requires an internet connection. + Ta strona wymaga połączenia z internetem. + + + PageDrawMap Undo @@ -789,39 +839,39 @@ Select an action to choose a custom key bind for this team - + Wybierz czynność by przypisać klawisz dla tego zespołu Use my default - + Użyj domyślnych Reset all binds - + Zresetuj przypisania Custom Controls - + Własne ustawienia Hat - Grzybek + Czapka Name - Nazwa + Nazwa This hedgehog's name - + Imię jeża Randomize this hedgehog's name - + Losuj imię Random Team - Losowa Drużyna + Losowa Drużyna @@ -890,6 +940,14 @@ <b>%1</b> trząsł portkami i opuścił turę <b>%2</b> razy. + + Play again + Zagraj ponownie + + + Save + Zapisz + PageInGame @@ -945,23 +1003,23 @@ Play a game across a local area network - + Zagraj poprzez sieć lokalną Play a game on an official server - + Zagraj na oficjalnym serwerze Feedback - + Twoja opinia Play local network game - + Zagraj poprzez LAN Play official network game - + Zagraj na oficjalnym serwerze @@ -972,7 +1030,7 @@ Edit game preferences - Zmień ustawienia gry + Zmień ustawienia gry @@ -983,30 +1041,30 @@ Edit game preferences - Zmień ustawienia gry + Zmień ustawienia gry Start - Start + Start Update - + Aktualizuj Room controls - + Ustawienia pokoju PageNetServer Click here for details - + Pokaż szczegóły Insert your address here - + Wprowadź adres @@ -1093,91 +1151,91 @@ Select an action to change what key controls it - + Wybierz czynność by przypisać do niej klawisz Reset to default - + Przywróć domyślne Reset all binds - + Zresetuj klawisze Game - + Gra Graphics - + Grafika Audio - + Dźwięk Controls - + Sterowanie Video Recording - + Nagrywanie wideo Network - + Sieć Teams - Drużyny + Drużyny Schemes - + Schematy Weapons - Uzbrojenie + Uzbrojenie Frontend - + Interfejs Custom colors - Własne kolory + Własne kolory Game audio - + Dźwięki w grze Frontend audio - + Dźwięki interfejsu Account - + Konto Proxy settings - Ustawienia proxy + Ustawienia proxy Miscellaneous - Różne + Różne Updates - + Aktualizacja Check for updates - + Sprawdź aktualizacje Video recording options - Ustawienia nagrywania + Ustawienia nagrywania @@ -1235,27 +1293,27 @@ Search for a room: - + Szukaj pokoju: Create room - + Stwórz pokój Join room - + Dołącz do gry Room state - + Stan gry Clear filters - + Usuń filtry Open server administration page - + Otwórz ustawienia admina @@ -1378,7 +1436,7 @@ Add an indestructible border along the bottom - >Dodaje niezniszczalną ramkę u dołu mapy + Dodaje niezniszczalną ramkę u dołu mapy @@ -1479,12 +1537,12 @@ Date: %1 - + Data: %1 Size: %1 - + Rozmiar: %1 @@ -1535,15 +1593,15 @@ Restrict Unregistered Players Join - + Blokuj niezarejestrowanych graczy Show games in lobby - + Pokaż nierozpoczęte gry Show games in-progress - + Pokaż trwające gry @@ -1594,31 +1652,31 @@ Visual effects - + Efekty wizualne Sound - + Dźwięk In-game sound effects - + Efekty dźwiękowe w grze Music - + Muzyka In-game music - + Muzyka w grze Frontend sound effects - + Efekty dźwiękowe w menu Frontend music - + Muzyka w menu @@ -1963,43 +2021,47 @@ This development build is 'work in progress' and may not be compatible with other versions of the game, while some features might be broken or incomplete! - + Ta wersja deweloperska nie jest końcową wersją gry i może być niekompatybilna z innymi wersjami i niektóre funkcje mogą być niekompletne lub nie działać w ogóle! Fullscreen - Pełny ekran + Pełny ekran Fullscreen Resolution - + Rozdzielczość Windowed Resolution - + Rozmiar okna Your Email - + Twój e-mail Summary - + Krótki opis Send system information - + Wyśłij informacje o systemie Type the security code: - + Wpisz litery z obrazka: Revision - + Wersja This program is distributed under the %1 - + Ten program jest rozpowszechniany na licencji %1 + + + This setting will be effective at next restart. + Ustawienia zadziałają po restarcie gry. @@ -2025,7 +2087,7 @@ -r%1 (%2) - + -r%1 (%2) @@ -2242,40 +2304,41 @@ Hedgewars - Nick not registered - + Hedgewars - Niezarejestrowany nick System Information Preview - + Podgląd informacji o systemie Failed to generate captcha - + Nie udało się wygenerować captchy Failed to download captcha - + Nie udało się pobrać captchy Please fill out all fields. Email is optional. - + Wypełnij wszystkie pola. E-mail nie jest wymagany. Hedgewars - Warning - + Hedgewars - Ostrzeżenie Hedgewars - Information - + Hedgewars - Informacja Not all players are ready - + Nie wszyscy gracze są gotowi Are you sure you want to start this game? Not all players are ready. - + Jesteś pewien, że chcesz rozpocząc grę? +Nie wszyscy gracze są gotowi. @@ -2342,7 +2405,7 @@ Set default options - Zapisz jako domyśłne ustawienia + Przywróć domyślne ustawienia Open videos directory @@ -2362,58 +2425,58 @@ Restore default coding parameters - + Przywróć domyślne ustawienia Open the video directory in your system - + Otwórz katalog z filmami Play this video - + Odtwórz wideo Delete this video - + Usuń wideo Upload this video to your Youtube account - + Wyślij to wideo na konto Youtube Reset - + Zresetuj Set the default server port for Hedgewars - + Ustaw domyślny port serwera Hedgewars Invite your friends to your server in just 1 click! - + Zaproś swoich znajomych jednym kliknięciem! Click to copy your unique server URL in your clipboard. Send this link to your friends ands and they will be able to join you. - + Kliknij by skopiować unikalny link twojego serwera do schowka. Wyślij link swoim znajomym aby mogli dołączyć do gry. Start private server - + Uruchom prywatny serwer RoomNamePrompt Enter a name for your room. - + Wprowadź nazwę pokoju. Cancel - Anuluj + Anuluj Create room - + Stwórz pokój @@ -2467,19 +2530,19 @@ SeedPrompt The map seed is the basis for all random values generated by the game. - + Ziarno jest podstawą wszystkich losowych wartości tworzynych przez grę. Cancel - Anuluj + Anuluj Set seed - + Ustaw ziarno Close - + Zamknij @@ -2513,41 +2576,42 @@ TCPBase Unable to start server at %1. - + Nie można uruchomić serwera na %1. Unable to run engine at %1 Error code: %2 - + Nie można uruchomić silnika na %1 +Kod błędu: %2 TeamSelWidget At least two teams are required to play! - + Do rozpoczęcia gry potrzeba dwóch druzyn! TeamShowWidget %1's team - + Drużyna %1 ThemePrompt Cancel - Anuluj + Anuluj Search for a theme: - + Szukaj motywu: Use selected theme - + Użyj wybranego motywu @@ -2718,26 +2782,26 @@ hedgehog info - + informacje o jeżu binds (categories) Movement - + Ruch Weapons - Uzbrojenie + Uzbrojenie Camera - + Kamera Miscellaneous - Różne + Różne @@ -2808,7 +2872,7 @@ Hedgehog movement - + Poruszanie się jeżem @@ -3130,119 +3194,4 @@ DPad - - server - - No checker rights - - - - Authentication failed - - - - 60 seconds cooldown after kick - - - - kicked - - - - Ping timeout - - - - bye - - - - Empty config entry - - - - Not room master - - - - Corrupted hedgehogs info - - - - too many teams - - - - too many hedgehogs - - - - There's already a team with same name in the list - - - - round in progress - - - - restricted - - - - REMOVE_TEAM: no such team - - - - Not team owner! - - - - Less than two clans! - - - - Room with such name already exists - - - - Illegal room name - - - - No such room - - - - Joining restricted - - - - Registered users only - - - - You are banned in this room - - - - Nickname already chosen - - - - Illegal nickname - - - - Protocol already known - - - - Bad number - - - - Nickname is already in use - - - diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Locale/hedgewars_pt_BR.ts --- a/share/hedgewars/Data/Locale/hedgewars_pt_BR.ts Sun Apr 21 01:36:08 2013 +0200 +++ b/share/hedgewars/Data/Locale/hedgewars_pt_BR.ts Wed May 29 22:52:37 2013 +0400 @@ -99,19 +99,19 @@ - Please give us feedback! - - - We are always happy about suggestions, ideas, or bug reports. - If you found a bug, you can see if it's already known here (english): - - - - Your email address is optional, but we may want to contact you. + Send us feedback! + + + + If you found a bug, you can see if it's already been reported here: + + + + Your email address is optional, but necessary if you want us to get back at you. @@ -254,6 +254,18 @@ Failed to save StyleSheet to %1 + + %1 has joined + + + + %1 has left + + + + %1 has left (%2) + + HWForm @@ -353,6 +365,10 @@ Please wait a few seconds and try again. + + This page requires an internet connection. + + HWGame @@ -473,10 +489,6 @@ - Theme: - - - Load drawn map Carregar mapa @@ -492,6 +504,10 @@ Large tunnels + + Theme: %1 + + HWNetServersModel @@ -536,7 +552,7 @@ %1 *** %2 has joined - %1 *** %2 entrou + %1 *** %2 entrou %1 *** %2 has left (%3) @@ -730,6 +746,17 @@ + PageDataDownload + + Loading, please wait. + + + + This page requires an internet connection. + + + + PageDrawMap Undo @@ -871,6 +898,14 @@ <b>%1</b> estava assustado e passou o turno <b>%2</b> vezes.</p>. + + Play again + + + + Save + Salvar + PageInGame @@ -1974,6 +2009,10 @@ This program is distributed under the %1 + + This setting will be effective at next restart. + + QLineEdit @@ -3082,119 +3121,4 @@ DPad - - server - - No checker rights - - - - Authentication failed - - - - 60 seconds cooldown after kick - - - - kicked - - - - Ping timeout - - - - bye - - - - Empty config entry - - - - Not room master - - - - Corrupted hedgehogs info - - - - too many teams - - - - too many hedgehogs - - - - There's already a team with same name in the list - - - - round in progress - - - - restricted - - - - REMOVE_TEAM: no such team - - - - Not team owner! - - - - Less than two clans! - - - - Room with such name already exists - - - - Illegal room name - - - - No such room - - - - Joining restricted - - - - Registered users only - - - - You are banned in this room - - - - Nickname already chosen - - - - Illegal nickname - - - - Protocol already known - - - - Bad number - - - - Nickname is already in use - - - diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Locale/hedgewars_pt_PT.ts --- a/share/hedgewars/Data/Locale/hedgewars_pt_PT.ts Sun Apr 21 01:36:08 2013 +0200 +++ b/share/hedgewars/Data/Locale/hedgewars_pt_PT.ts Wed May 29 22:52:37 2013 +0400 @@ -99,19 +99,19 @@ Enviar Feedback - Please give us feedback! - - - We are always happy about suggestions, ideas, or bug reports. - If you found a bug, you can see if it's already known here (english): + Send us feedback! - Your email address is optional, but we may want to contact you. + If you found a bug, you can see if it's already been reported here: + + + + Your email address is optional, but necessary if you want us to get back at you. @@ -261,6 +261,18 @@ Failed to save StyleSheet to %1 Não foi possível gravar o StyleSheet em %1 + + %1 has joined + + + + %1 has left + + + + %1 has left (%2) + + HWForm @@ -370,6 +382,10 @@ Tentás-te voltar ao servidor num espaço de tempo demasiado curto. Por favor, aguarda alguns segundos e tenta novamente. + + This page requires an internet connection. + + HWGame @@ -494,7 +510,7 @@ Theme: - Tema: + Tema: Load drawn map @@ -508,6 +524,10 @@ All files Todos os ficheiros + + Theme: %1 + + HWNetServersModel @@ -552,7 +572,7 @@ %1 *** %2 has joined - %1 *** %2 entrou + %1 *** %2 entrou %1 *** %2 has left (%3) @@ -747,6 +767,17 @@ + PageDataDownload + + Loading, please wait. + + + + This page requires an internet connection. + + + + PageDrawMap Undo @@ -888,6 +919,14 @@ <b>%1</b> estava tão amedrontado que passou <b>%2</b> turnos. + + Play again + + + + Save + Gravar + PageInGame @@ -1955,6 +1994,10 @@ This program is distributed under the %1 Este programa é distribuído sob a %1 + + This setting will be effective at next restart. + + QLineEdit @@ -3094,115 +3137,115 @@ server Not room master - Não és o anfitrião da sala + Não és o anfitrião da sala Corrupted hedgehogs info - Informação dos ouriços corrompida + Informação dos ouriços corrompida too many teams - demasiadas equipas + demasiadas equipas too many hedgehogs - demasiados ouriços + demasiados ouriços There's already a team with same name in the list - Já existe uma equipa com o mesmo nome na lista + Já existe uma equipa com o mesmo nome na lista round in progress - partida em progresso + partida em progresso restricted - limitada + limitada REMOVE_TEAM: no such team - REMOVE_TEAM: equipa inexistente + REMOVE_TEAM: equipa inexistente Not team owner! - A equipa não te pertence! + A equipa não te pertence! Less than two clans! - Menos de 2 clãs! + Menos de 2 clãs! Room with such name already exists - Já existe uma sala com esse nome + Já existe uma sala com esse nome Nickname already chosen - Utilizador já em uso + Utilizador já em uso Illegal nickname - Nome de utilizador ilegal + Nome de utilizador ilegal Protocol already known - Protocolo já conhecido + Protocolo já conhecido Bad number - Número inválido + Número inválido Nickname is already in use - Nome de utilizador já em uso + Nome de utilizador já em uso No checker rights - Não possui permissões para verificar + Não possui permissões para verificar Authentication failed - A autenticação falhou + A autenticação falhou 60 seconds cooldown after kick - É necessário aguardar 60 segundos após uma expulsão + É necessário aguardar 60 segundos após uma expulsão kicked - expulso + expulso Ping timeout - Ping timeout + Ping timeout bye - tchau (bye) + tchau (bye) Illegal room name - Nome da sala ilegal + Nome da sala ilegal No such room - Sala inexistente + Sala inexistente Joining restricted - Entrada restrita + Entrada restrita Registered users only - Apenas utilizadores registados + Apenas utilizadores registados You are banned in this room - Estás banido desta sala + Estás banido desta sala Empty config entry - Campo vazio na configuração + Campo vazio na configuração diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Locale/hedgewars_ro.ts --- a/share/hedgewars/Data/Locale/hedgewars_ro.ts Sun Apr 21 01:36:08 2013 +0200 +++ b/share/hedgewars/Data/Locale/hedgewars_ro.ts Wed May 29 22:52:37 2013 +0400 @@ -99,19 +99,19 @@ - Please give us feedback! - - - We are always happy about suggestions, ideas, or bug reports. - If you found a bug, you can see if it's already known here (english): - - - - Your email address is optional, but we may want to contact you. + Send us feedback! + + + + If you found a bug, you can see if it's already been reported here: + + + + Your email address is optional, but necessary if you want us to get back at you. @@ -260,6 +260,18 @@ Failed to save StyleSheet to %1 + + %1 has joined + + + + %1 has left + + + + %1 has left (%2) + + HWForm @@ -359,6 +371,10 @@ Please wait a few seconds and try again. + + This page requires an internet connection. + + HWGame @@ -478,10 +494,6 @@ - Theme: - - - Load drawn map @@ -497,6 +509,10 @@ Large tunnels + + Theme: %1 + + HWNetServersModel @@ -541,7 +557,7 @@ %1 *** %2 has joined - %1 *** %2 has joined + %1 *** %2 has joined %1 *** %2 has left (%3) @@ -735,6 +751,17 @@ + PageDataDownload + + Loading, please wait. + + + + This page requires an internet connection. + + + + PageDrawMap Undo @@ -882,6 +909,14 @@ + + Play again + + + + Save + + PageInGame @@ -1971,6 +2006,10 @@ This program is distributed under the %1 + + This setting will be effective at next restart. + + QLineEdit @@ -3074,119 +3113,4 @@ - - server - - No checker rights - - - - Authentication failed - - - - 60 seconds cooldown after kick - - - - kicked - - - - Ping timeout - - - - bye - - - - Empty config entry - - - - Not room master - - - - Corrupted hedgehogs info - - - - too many teams - - - - too many hedgehogs - - - - There's already a team with same name in the list - - - - round in progress - - - - restricted - - - - REMOVE_TEAM: no such team - - - - Not team owner! - - - - Less than two clans! - - - - Room with such name already exists - - - - Illegal room name - - - - No such room - - - - Joining restricted - - - - Registered users only - - - - You are banned in this room - - - - Nickname already chosen - - - - Illegal nickname - - - - Protocol already known - - - - Bad number - - - - Nickname is already in use - - - diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Locale/hedgewars_ru.ts --- a/share/hedgewars/Data/Locale/hedgewars_ru.ts Sun Apr 21 01:36:08 2013 +0200 +++ b/share/hedgewars/Data/Locale/hedgewars_ru.ts Wed May 29 22:52:37 2013 +0400 @@ -5,7 +5,7 @@ About Unknown Compiler - + Неизвестный компилятор @@ -30,31 +30,31 @@ BanDialog IP - IP + IP Nick - + Псевдоним IP/Nick - + IP/Псевдоним Reason - + Причина Duration - + Длительность Ok - + ОК Cancel - Отмена + Отмена you know why @@ -62,57 +62,57 @@ Warning - + Предупреждение Please, specify %1 - + Пожалуйста, укажите %1 nickname - + псевдоним permanent - + постоянный DataManager Use Default - + Использовать значение по умолчанию FeedbackDialog View - + Вид Cancel - Отмена + Отмена Send Feedback - - - - Please give us feedback! - + Отослать отзыв We are always happy about suggestions, ideas, or bug reports. - - - - If you found a bug, you can see if it's already known here (english): - - - - Your email address is optional, but we may want to contact you. - + Мы всегда рады новым предложениям, идям или сообщениям об ошибках. + + + Send us feedback! + Пришлите нам отзыв! + + + If you found a bug, you can see if it's already been reported here: + Если вы нашли ошибку, можете проверить, не было ли уже сообщения о ней здесь: + + + Your email address is optional, but necessary if you want us to get back at you. + Адрес e-mail необязателен, но необходим, если вы хотите получить ответ. @@ -146,73 +146,76 @@ Game scheme will auto-select a weapon - + Схема игры определяет набор оружия Map - Карта + Карта Game options - + Настройки игры HWApplication %1 minutes - - - - + + %1 минута + %1 минуты + %1 минут %1 hour - - - - + + %1 час + %1 часа + %1 часов %1 hours - - - - + + %1 час + %1 часа + %1 часов %1 day - - - - + + %1 день + %1 дня + %1 дней %1 days - - - - + + %1 день + %1 дня + %1 дней Scheme '%1' not supported - + Схема "%1" не поддерживается Cannot create directory %1 - Не могу создать папку %1 + Не могу создать папку %1 Failed to open data directory: %1 Please check your installation! - + Не могу открыть папку: +%1 + +Пожалуйста, проверьте установку приложения! @@ -264,6 +267,18 @@ Failed to save StyleSheet to %1 Ошибка при сохранении стиля в %1 + + %1 has joined + %1 вошёл + + + %1 has left + %1 вышел + + + %1 has left (%2) + %1 вышел (%2) + HWForm @@ -313,7 +328,7 @@ %1's Team - + Команда %1 Hedgewars - Nick registered @@ -362,6 +377,11 @@ You reconnected too fast. Please wait a few seconds and try again. + Вы переподключились слишком быстро. +Пожалуйста, попробуйте снова через несколько секунд. + + + This page requires an internet connection. @@ -416,91 +436,91 @@ Map type: - + Тип карты: Image map - + Изображение Mission map - + Миссия Hand-drawn - Рисованная карта + Рисованная карта Randomly generated - + Случайно сгенерированная Random maze - + Случайный лабиринт Random - Случайно + Случайно Map preview: - + Предпросмотр карты: Load map drawing - + Загрузить рисованную карту Edit map drawing - + Редактировать рисованную карту Small islands - + Маленькие острова Medium islands - + Средние острова Large islands - + Большие острова Map size: - + Размер карты: Maze style: - + Стиль лабиринта: Mission: - + Миссия: Map: - - - - Theme: - + Карта: Load drawn map - Загрузить рисованную карту + Загрузить рисованную карту Drawn Maps - Рисованные карты + Рисованные карты All files - Все файлы + Все файлы Large tunnels - + Большие туннели + + + Theme: %1 + Тема: %1 @@ -546,7 +566,7 @@ %1 *** %2 has joined - %1 *** %2 вошёл + %1 *** %2 вошёл %1 *** %2 has left (%3) @@ -584,11 +604,11 @@ Nickname: - + Псевдоним: Password: - + Пароль: @@ -606,22 +626,22 @@ HatButton Change hat (%1) - + Сменить шляпу (%1) HatPrompt Cancel - Отмена + Отмена Use selected hat - + Использовать выбранную шляпу Search for a hat: - + Поиск по шляпам: @@ -635,7 +655,7 @@ KeyBinder Category - + Категория @@ -643,30 +663,30 @@ Duration: %1m %2s - Длительность: %1мин %2сек + Длительность: %1мин %2сек Video: %1x%2, - Видео: %1x%2, + Видео: %1x%2, %1 fps, - %1 кадров/сек, + %1 кадров/сек, Audio: - Аудио: + Аудио: unknown - + неизвестно MapModel No description available. - + Описание отсутствует. @@ -701,35 +721,35 @@ General - Основные настройки + Основные настройки Bans - + Баны IP/Nick - + IP/Псевдоним Expiration - + Окончание Reason - + Причина Refresh - + Обновить Add - + Добавить Remove - + Удалить @@ -740,6 +760,17 @@ + PageDataDownload + + Loading, please wait. + Идёт загрузка пожалуйста, подождите. + + + This page requires an internet connection. + + + + PageDrawMap Undo @@ -790,35 +821,35 @@ Use my default - + Использовать мои настройки по умолчанию Reset all binds - + Сбросить все привязки Custom Controls - + Настройка управления Hat - Шляпа + Шляпа Name - Название + Название This hedgehog's name - + Имя этого ежа Randomize this hedgehog's name - + Выбрать случайное имя для этого ежа Random Team - Случайная команда + Случайная команда @@ -887,6 +918,14 @@ <b>%1</b> испугался и пропустил <b>%2</b> ходов. + + Play again + + + + Save + Сохранить + PageInGame @@ -942,23 +981,23 @@ Play a game across a local area network - + Играть по локальной сети Play a game on an official server - + Играть на официальном сервере Feedback - + Отзыв Play local network game - + Играть по локальной сети Play official network game - + Играть на официальном сервере @@ -969,7 +1008,7 @@ Edit game preferences - Редактировать настройки игры + Редактировать настройки игры @@ -980,19 +1019,19 @@ Edit game preferences - Редактировать настройки игры + Редактировать настройки игры Start - Старт + Старт Update - Обновить + Обновить Room controls - + Управление комнатой @@ -1094,47 +1133,47 @@ Reset to default - + Сбросить на значения по умолчанию Reset all binds - + Сбросить все привязки Game - + Игра Graphics - + Графика Audio - + Звук Controls - + Управление Video Recording - + Запись видео Network - + Сеть Teams - Команды + Команды Schemes - + Схемы Weapons - Оружие + Оружие Frontend @@ -1142,7 +1181,7 @@ Custom colors - Свои цвета + Свои цвета Game audio @@ -1158,23 +1197,23 @@ Proxy settings - Настройки прокси + Настройки прокси Miscellaneous - Разное + Разное Updates - + Обновления Check for updates - + Проверить обновления Video recording options - Настройки видео + Настройки видео @@ -1232,27 +1271,27 @@ Search for a room: - + Искать комнату: Create room - + Создать комнату Join room - + Войти в комнату Room state - + Состояние комнаты Clear filters - + Очистить фильтры Open server administration page - + Открыть страницу администрирования сервера @@ -1476,12 +1515,12 @@ Date: %1 - + Дата: %1 Size: %1 - + Размер: %1 @@ -1532,7 +1571,7 @@ Restrict Unregistered Players Join - + Запретить вход незарегистрированным игрокам Show games in lobby @@ -1540,7 +1579,7 @@ Show games in-progress - + Показать текущие игры @@ -1591,11 +1630,11 @@ Visual effects - + Визуальные эффекты Sound - + Звук In-game sound effects @@ -1603,7 +1642,7 @@ Music - + Музыка In-game music @@ -1964,15 +2003,15 @@ Fullscreen - Полный экран + Полный экран Fullscreen Resolution - + Разрешение в полноэкранном режиме Windowed Resolution - + Разрешение в оконном режиме Your Email @@ -1998,6 +2037,10 @@ This program is distributed under the %1 + + This setting will be effective at next restart. + + QLineEdit @@ -2241,12 +2284,13 @@ Not all players are ready - + Не все игроки готовы Are you sure you want to start this game? Not all players are ready. - + Вы действительно хотите запустить игру? +Не все игроки готовы. @@ -2376,15 +2420,15 @@ RoomNamePrompt Enter a name for your room. - + Введите название для вашей комнаты. Cancel - Отмена + Отмена Create room - + Создать комнату @@ -2438,19 +2482,19 @@ SeedPrompt The map seed is the basis for all random values generated by the game. - + Зерно карты - это основа для всех псведослучайных значений, используемых в игре. Cancel - Отмена + Отмена Set seed - + Установить зерно Close - + Закрыть @@ -2496,29 +2540,29 @@ TeamSelWidget At least two teams are required to play! - + Для игры нужны как минимум две команды! TeamShowWidget %1's team - + Команда %1 ThemePrompt Cancel - Отмена + Отмена Search for a theme: - + Искать тему: Use selected theme - + Использовать выбранную тему @@ -2689,26 +2733,26 @@ hedgehog info - + информация о еже binds (categories) Movement - + Передвижение Weapons - Оружие + Оружие Camera - + Камера Miscellaneous - Разное + Разное @@ -2779,7 +2823,7 @@ Hedgehog movement - + Движение ежа @@ -3101,119 +3145,4 @@ - - server - - No checker rights - - - - Authentication failed - - - - 60 seconds cooldown after kick - - - - kicked - - - - Ping timeout - - - - bye - - - - Empty config entry - - - - Not room master - - - - Corrupted hedgehogs info - - - - too many teams - - - - too many hedgehogs - - - - There's already a team with same name in the list - - - - round in progress - - - - restricted - - - - REMOVE_TEAM: no such team - - - - Not team owner! - - - - Less than two clans! - - - - Room with such name already exists - - - - Illegal room name - - - - No such room - - - - Joining restricted - - - - Registered users only - - - - You are banned in this room - - - - Nickname already chosen - - - - Illegal nickname - - - - Protocol already known - - - - Bad number - - - - Nickname is already in use - - - diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Locale/hedgewars_sk.ts --- a/share/hedgewars/Data/Locale/hedgewars_sk.ts Sun Apr 21 01:36:08 2013 +0200 +++ b/share/hedgewars/Data/Locale/hedgewars_sk.ts Wed May 29 22:52:37 2013 +0400 @@ -99,19 +99,19 @@ - Please give us feedback! - - - We are always happy about suggestions, ideas, or bug reports. - If you found a bug, you can see if it's already known here (english): + Send us feedback! - Your email address is optional, but we may want to contact you. + If you found a bug, you can see if it's already been reported here: + + + + Your email address is optional, but necessary if you want us to get back at you. @@ -267,6 +267,18 @@ Failed to save StyleSheet to %1 Nepodarilo sa uložiť súbor so štýlom do %1 + + %1 has joined + + + + %1 has left + + + + %1 has left (%2) + + HWForm @@ -366,6 +378,10 @@ Please wait a few seconds and try again. + + This page requires an internet connection. + + HWGame @@ -485,10 +501,6 @@ - Theme: - - - Load drawn map Načítať nakreslenú mapu @@ -504,6 +516,10 @@ Large tunnels + + Theme: %1 + + HWNetServersModel @@ -548,7 +564,7 @@ %1 *** %2 has joined - %1 *** %2 sa pridal + %1 *** %2 sa pridal %1 *** %2 has left (%3) @@ -742,6 +758,17 @@ + PageDataDownload + + Loading, please wait. + + + + This page requires an internet connection. + + + + PageDrawMap Undo @@ -889,6 +916,14 @@ <b>%1</b> sa zľakol a preskočil ťah <b>%2</b>krát. + + Play again + + + + Save + Uložiť + PageInGame @@ -1998,6 +2033,10 @@ This program is distributed under the %1 + + This setting will be effective at next restart. + + QLineEdit @@ -3127,119 +3166,4 @@ Pravý joystick (Doľava) - - server - - No checker rights - - - - Authentication failed - - - - 60 seconds cooldown after kick - - - - kicked - - - - Ping timeout - - - - bye - - - - Empty config entry - - - - Not room master - - - - Corrupted hedgehogs info - - - - too many teams - - - - too many hedgehogs - - - - There's already a team with same name in the list - - - - round in progress - - - - restricted - - - - REMOVE_TEAM: no such team - - - - Not team owner! - - - - Less than two clans! - - - - Room with such name already exists - - - - Illegal room name - - - - No such room - - - - Joining restricted - - - - Registered users only - - - - You are banned in this room - - - - Nickname already chosen - - - - Illegal nickname - - - - Protocol already known - - - - Bad number - - - - Nickname is already in use - - - diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Locale/hedgewars_sv.ts --- a/share/hedgewars/Data/Locale/hedgewars_sv.ts Sun Apr 21 01:36:08 2013 +0200 +++ b/share/hedgewars/Data/Locale/hedgewars_sv.ts Wed May 29 22:52:37 2013 +0400 @@ -99,19 +99,19 @@ - Please give us feedback! - - - We are always happy about suggestions, ideas, or bug reports. - If you found a bug, you can see if it's already known here (english): + Send us feedback! - Your email address is optional, but we may want to contact you. + If you found a bug, you can see if it's already been reported here: + + + + Your email address is optional, but necessary if you want us to get back at you. @@ -258,6 +258,18 @@ Failed to save StyleSheet to %1 + + %1 has joined + + + + %1 has left + + + + %1 has left (%2) + + HWForm @@ -357,6 +369,10 @@ Please wait a few seconds and try again. + + This page requires an internet connection. + + HWGame @@ -476,10 +492,6 @@ - Theme: - - - Load drawn map Läs in ritad karta @@ -495,6 +507,10 @@ Large tunnels + + Theme: %1 + + HWNetServersModel @@ -539,7 +555,7 @@ %1 *** %2 has joined - %1 *** %2 har gått med + %1 *** %2 har gått med %1 *** %2 has left (%3) @@ -733,6 +749,17 @@ + PageDataDownload + + Loading, please wait. + + + + This page requires an internet connection. + + + + PageDrawMap Undo @@ -874,6 +901,14 @@ <b>%1</b> var rädd och hoppade över turer <b>%2</b> gånger. + + Play again + + + + Save + Spara + PageInGame @@ -1977,6 +2012,10 @@ This program is distributed under the %1 + + This setting will be effective at next restart. + + QLineEdit @@ -3079,119 +3118,4 @@ Styrkors - - server - - No checker rights - - - - Authentication failed - - - - 60 seconds cooldown after kick - - - - kicked - - - - Ping timeout - - - - bye - - - - Empty config entry - - - - Not room master - - - - Corrupted hedgehogs info - - - - too many teams - - - - too many hedgehogs - - - - There's already a team with same name in the list - - - - round in progress - - - - restricted - - - - REMOVE_TEAM: no such team - - - - Not team owner! - - - - Less than two clans! - - - - Room with such name already exists - - - - Illegal room name - - - - No such room - - - - Joining restricted - - - - Registered users only - - - - You are banned in this room - - - - Nickname already chosen - - - - Illegal nickname - - - - Protocol already known - - - - Bad number - - - - Nickname is already in use - - - diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Locale/hedgewars_tr_TR.ts --- a/share/hedgewars/Data/Locale/hedgewars_tr_TR.ts Sun Apr 21 01:36:08 2013 +0200 +++ b/share/hedgewars/Data/Locale/hedgewars_tr_TR.ts Wed May 29 22:52:37 2013 +0400 @@ -99,19 +99,19 @@ - Please give us feedback! - - - We are always happy about suggestions, ideas, or bug reports. - If you found a bug, you can see if it's already known here (english): - - - - Your email address is optional, but we may want to contact you. + Send us feedback! + + + + If you found a bug, you can see if it's already been reported here: + + + + Your email address is optional, but necessary if you want us to get back at you. @@ -248,6 +248,18 @@ Failed to save StyleSheet to %1 + + %1 has joined + + + + %1 has left + + + + %1 has left (%2) + + HWForm @@ -347,6 +359,10 @@ Please wait a few seconds and try again. + + This page requires an internet connection. + + HWGame @@ -466,10 +482,6 @@ - Theme: - - - Load drawn map @@ -485,6 +497,10 @@ Large tunnels + + Theme: %1 + + HWNetServersModel @@ -528,10 +544,6 @@ - %1 *** %2 has joined - - - %1 *** %2 has left @@ -723,6 +735,17 @@ + PageDataDownload + + Loading, please wait. + + + + This page requires an internet connection. + + + + PageDrawMap Undo @@ -858,6 +881,14 @@ + + Play again + + + + Save + + PageInGame @@ -1939,6 +1970,10 @@ This program is distributed under the %1 + + This setting will be effective at next restart. + + QLineEdit @@ -3039,119 +3074,4 @@ - - server - - No checker rights - - - - Authentication failed - - - - 60 seconds cooldown after kick - - - - kicked - - - - Ping timeout - - - - bye - - - - Empty config entry - - - - Not room master - - - - Corrupted hedgehogs info - - - - too many teams - - - - too many hedgehogs - - - - There's already a team with same name in the list - - - - round in progress - - - - restricted - - - - REMOVE_TEAM: no such team - - - - Not team owner! - - - - Less than two clans! - - - - Room with such name already exists - - - - Illegal room name - - - - No such room - - - - Joining restricted - - - - Registered users only - - - - You are banned in this room - - - - Nickname already chosen - - - - Illegal nickname - - - - Protocol already known - - - - Bad number - - - - Nickname is already in use - - - diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Locale/hedgewars_uk.ts --- a/share/hedgewars/Data/Locale/hedgewars_uk.ts Sun Apr 21 01:36:08 2013 +0200 +++ b/share/hedgewars/Data/Locale/hedgewars_uk.ts Wed May 29 22:52:37 2013 +0400 @@ -99,19 +99,19 @@ - Please give us feedback! - - - We are always happy about suggestions, ideas, or bug reports. - If you found a bug, you can see if it's already known here (english): - - - - Your email address is optional, but we may want to contact you. + Send us feedback! + + + + If you found a bug, you can see if it's already been reported here: + + + + Your email address is optional, but necessary if you want us to get back at you. @@ -264,6 +264,18 @@ Failed to save StyleSheet to %1 + + %1 has joined + + + + %1 has left + + + + %1 has left (%2) + + HWForm @@ -363,6 +375,10 @@ Please wait a few seconds and try again. + + This page requires an internet connection. + + HWGame @@ -482,10 +498,6 @@ - Theme: - - - Load drawn map Завантажити намальовану мапу @@ -501,6 +513,10 @@ Large tunnels + + Theme: %1 + + HWNetServersModel @@ -545,7 +561,7 @@ %1 *** %2 has joined - %1 *** %2 приєднався + %1 *** %2 приєднався %1 *** %2 has left (%3) @@ -739,6 +755,17 @@ + PageDataDownload + + Loading, please wait. + + + + This page requires an internet connection. + + + + PageDrawMap Undo @@ -886,6 +913,14 @@ + + Play again + + + + Save + Зберегти + PageInGame @@ -1991,6 +2026,10 @@ This program is distributed under the %1 + + This setting will be effective at next restart. + + QLineEdit @@ -3094,119 +3133,4 @@ - - server - - No checker rights - - - - Authentication failed - - - - 60 seconds cooldown after kick - - - - kicked - - - - Ping timeout - - - - bye - - - - Empty config entry - - - - Not room master - - - - Corrupted hedgehogs info - - - - too many teams - - - - too many hedgehogs - - - - There's already a team with same name in the list - - - - round in progress - - - - restricted - - - - REMOVE_TEAM: no such team - - - - Not team owner! - - - - Less than two clans! - - - - Room with such name already exists - - - - Illegal room name - - - - No such room - - - - Joining restricted - - - - Registered users only - - - - You are banned in this room - - - - Nickname already chosen - - - - Illegal nickname - - - - Protocol already known - - - - Bad number - - - - Nickname is already in use - - - diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Locale/hedgewars_zh_CN.ts --- a/share/hedgewars/Data/Locale/hedgewars_zh_CN.ts Sun Apr 21 01:36:08 2013 +0200 +++ b/share/hedgewars/Data/Locale/hedgewars_zh_CN.ts Wed May 29 22:52:37 2013 +0400 @@ -97,7 +97,7 @@ DataManager - + Use Default @@ -105,37 +105,37 @@ FeedbackDialog - - Please give us feedback! - - - - + We are always happy about suggestions, ideas, or bug reports. - - If you found a bug, you can see if it's already known here (english): - - - - Your email address is optional, but we may want to contact you. - - - - + Send us feedback! + + + + + If you found a bug, you can see if it's already been reported here: + + + + + Your email address is optional, but necessary if you want us to get back at you. + + + + View - + Cancel 取消 - + Send Feedback @@ -255,52 +255,67 @@ HWChatWidget - + + %1 has joined + + + + + %1 has left + + + + + %1 has left (%2) + + + + %1 has been removed from your ignore list - + %1 has been added to your ignore list - + %1 has been removed from your friends list - + %1 has been added to your friends list - + Stylesheet imported from %1 - + Enter %1 if you want to use the current StyleSheet in future, enter %2 to reset! - + Couldn't read %1 - + StyleSheet discarded - + StyleSheet saved to %1 - + Failed to save StyleSheet to %1 @@ -318,17 +333,17 @@ - + Game aborted - + Hedgewars - Nick registered - + This nick is registered, and you haven't specified a password. If this nick isn't yours, please register your own nick at www.hedgewars.org @@ -337,93 +352,98 @@ - + Your nickname is not registered. To prevent someone else from using it, please register it at www.hedgewars.org - + Your password wasn't saved either. - + Nickname - + Someone already uses your nickname %1 on the server. Please pick another nickname: - - + + No nickname supplied. - - + + Hedgewars - Empty nickname - + Hedgewars - Wrong password - + You entered a wrong password. - + Try Again - + Hedgewars - Connection error - + You reconnected too fast. Please wait a few seconds and try again. - + Hedgewars Demo File File Types - + Hedgewars Save File File Types - + Demo name - + Demo name: - - + + This page requires an internet connection. + + + + + Cannot save record to file %1 无法录入文件 %1 @@ -431,13 +451,13 @@ HWGame - + en.txt zh_CN.txt - + Cannot open demofile %1 DEMO %1 打不开 @@ -445,158 +465,158 @@ HWMapContainer - + Small tunnels - + Medium tunnels - + Seed - + Map type: - - Image map - - - - Mission map + Image map - Hand-drawn + Mission map - Randomly generated + Hand-drawn + Randomly generated + + + + Random maze - + Random - + Map preview: - + Load map drawing - + Edit map drawing - - All - 全部 - - - - Small - 小型 - - - - Medium - 中型 - - - Large - 大型 + All + 全部 - Cavern - 洞穴 + Small + 小型 + Medium + 中型 + + + + Large + 大型 + + + + Cavern + 洞穴 + + + Wacky 曲折 - - Large tunnels - - - - - Small islands - - - - - Medium islands - - - + Large tunnels + + + + + Small islands + + + + + Medium islands + + + + Large islands - + Map size: - + Maze style: - + Mission: - + Map: - - - Theme: - - - - + + + Theme: %1 + + + + Load drawn map - + Drawn Maps - + All files @@ -647,40 +667,33 @@ - - %1 *** %2 has joined - - - - - + %1 *** %2 has left - - + %1 *** %2 has left (%3) - - + + %1 *** %2 has joined the room - + Quit reason: 退出原因: - + Room destroyed 房间损坏 - + You got kicked 被踢出 @@ -890,6 +903,19 @@ + PageDataDownload + + + Loading, please wait. + + + + + This page requires an internet connection. + + + + PageDrawMap @@ -1010,47 +1036,57 @@ - + + Play again + + + + + Save + 保存 + + + The best shot award was won by <b>%1</b> with <b>%2</b> pts. - + The best killer is <b>%1</b> with <b>%2</b> kills in a turn. - + A total of <b>%1</b> hedgehog(s) were killed during this round. - + (%1 kill) - + <b>%1</b> thought it's good to shoot his own hedgehogs with <b>%2</b> pts. - + <b>%1</b> killed <b>%2</b> of his own hedgehogs. - + <b>%1</b> was scared and skipped turn <b>%2</b> times. @@ -1149,12 +1185,12 @@ PageMultiplayer - + Edit game preferences - + Start 开始 @@ -1318,97 +1354,97 @@ - + Frontend - + Custom colors - + Reset to default colors - + Game audio - + Frontend audio - + Account - + Proxy settings - - Proxy host - - - - - Proxy port - - - - Proxy login + Proxy host + Proxy port + + + + + Proxy login + + + + Proxy password - - No proxy - - - - - System proxy settings - - - - Socks5 proxy + No proxy + System proxy settings + + + + + Socks5 proxy + + + + HTTP proxy - + Miscellaneous - + Updates - + Check for updates - + Video recording options @@ -1429,42 +1465,42 @@ PageRoomsList - + Search for a room: - + Create room - + Join room - + Room state - + Rules: - + Weapons: - + Clear filters - + Open server administration page @@ -1477,14 +1513,14 @@ 加入 - + %1 players online - + Admin features 管理员功能 @@ -1811,33 +1847,33 @@ - + Ignore - + Add friend - + Unignore - + Remove friend - + Show games in lobby - + Show games in-progress @@ -1845,75 +1881,75 @@ QCheckBox - + Fullscreen 游戏全屏幕 - + Show FPS 显示帧率 (FPS) - + Alternative damage show 另一种伤害显示方式 - + Visual effects - - + + Sound - + In-game sound effects - - + + Music - + In-game music - + Frontend sound effects - + Frontend music - + Check for updates at startup - + Show ammo menu tooltips - + Append date and time to record file name 记录名称中包含具体时间日期 - + Save password @@ -1928,12 +1964,12 @@ - + Record audio - + Use game resolution @@ -1956,88 +1992,88 @@ Lv 级别 - + (System default) - - Disabled - - - - - Red/Cyan - - - - Cyan/Red + Disabled - Red/Blue + Red/Cyan - Blue/Red + Cyan/Red - Red/Green + Red/Blue + Blue/Red + + + + + Red/Green + + + + Green/Red + + Side-by-side + + + + + Top-Bottom + + + + + Red/Cyan grayscale + + + + + Cyan/Red grayscale + + + + + Red/Blue grayscale + + + + + Blue/Red grayscale + + + - Side-by-side + Red/Green grayscale - Top-Bottom - - - - - Red/Cyan grayscale - - - - - Cyan/Red grayscale - - - - - Red/Blue grayscale - - - - - Blue/Red grayscale - - - - - Red/Green grayscale - - - - Green/Red grayscale - - + + Any @@ -2060,7 +2096,7 @@ 城堡模式 - + Playing teams 玩家队伍 @@ -2093,22 +2129,27 @@ QLabel - + Locale - + Nickname - + + This setting will be effective at next restart. + + + + Resolution 分辨率 - + Quality @@ -2128,12 +2169,12 @@ - + Stereo rendering - + FPS limit FPS 上限 @@ -2177,7 +2218,7 @@ 版本 - + Initial sound volume 初始音量 @@ -2324,27 +2365,27 @@ - + Your Email - + Summary - + Send system information - + Description - + Type the security code: @@ -2359,27 +2400,27 @@ - + Format - + Audio codec - + Video codec - + Framerate - + Bitrate (Kbps) @@ -2397,7 +2438,7 @@ QLineEdit - + unnamed 无名 @@ -2408,7 +2449,7 @@ - + anonymous @@ -2449,82 +2490,82 @@ - + Cannot delete default scheme '%1'! - + Please select a record from the list - + Hedgewars - Nick not registered - + Unable to start server - + Connection to server is lost 服务器连接丢失 - + Not all players are ready - + Are you sure you want to start this game? Not all players are ready. - + Hedgewars - Error - + System Information Preview - - + + Failed to generate captcha - + Failed to download captcha - + Please fill out all fields. Email is optional. - - + + Hedgewars - Success - + All file associations have been set - + File association failed. @@ -2592,22 +2633,22 @@ - + Room Name - Error - + Please select room from the list - + Room Name - Are you sure? - + The game you are trying to join has started. Do you still want to join the room? @@ -2654,7 +2695,7 @@ - + File error @@ -2665,7 +2706,7 @@ - + Cannot open '%1' for reading @@ -2809,17 +2850,17 @@ - + Associate file extensions - + Set default options - + Restore default coding parameters @@ -3017,7 +3058,7 @@ TeamSelWidget - + At least two teams are required to play! @@ -3734,7 +3775,7 @@ - + Keyboard @@ -3776,147 +3817,4 @@ - - server - - - No checker rights - - - - - Authentication failed - - - - - 60 seconds cooldown after kick - - - - - kicked - - - - - Ping timeout - - - - - bye - - - - - Empty config entry - - - - - Not room master - - - - - Corrupted hedgehogs info - - - - - too many teams - - - - - too many hedgehogs - - - - - There's already a team with same name in the list - - - - - round in progress - - - - - restricted - - - - - REMOVE_TEAM: no such team - - - - - Not team owner! - - - - - Less than two clans! - - - - - Room with such name already exists - - - - - Illegal room name - - - - - No such room - - - - - Joining restricted - - - - - Registered users only - - - - - You are banned in this room - - - - - Nickname already chosen - - - - - Illegal nickname - - - - - Protocol already known - - - - - Bad number - - - - - Nickname is already in use - - - diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Locale/hedgewars_zh_TW.ts --- a/share/hedgewars/Data/Locale/hedgewars_zh_TW.ts Sun Apr 21 01:36:08 2013 +0200 +++ b/share/hedgewars/Data/Locale/hedgewars_zh_TW.ts Wed May 29 22:52:37 2013 +0400 @@ -99,19 +99,19 @@ - Please give us feedback! - - - We are always happy about suggestions, ideas, or bug reports. - If you found a bug, you can see if it's already known here (english): - - - - Your email address is optional, but we may want to contact you. + Send us feedback! + + + + If you found a bug, you can see if it's already been reported here: + + + + Your email address is optional, but necessary if you want us to get back at you. @@ -248,6 +248,18 @@ Failed to save StyleSheet to %1 + + %1 has joined + + + + %1 has left + + + + %1 has left (%2) + + HWForm @@ -347,6 +359,10 @@ Please wait a few seconds and try again. + + This page requires an internet connection. + + HWGame @@ -466,10 +482,6 @@ - Theme: - - - Load drawn map @@ -485,6 +497,10 @@ Large tunnels + + Theme: %1 + + HWNetServersModel @@ -529,7 +545,7 @@ %1 *** %2 has joined - %1***%2已經進入 + %1***%2已經進入 %1 *** %2 has left (%3) @@ -723,6 +739,17 @@ + PageDataDownload + + Loading, please wait. + + + + This page requires an internet connection. + + + + PageDrawMap Undo @@ -858,6 +885,14 @@ + + Play again + + + + Save + + PageInGame @@ -1947,6 +1982,10 @@ This program is distributed under the %1 + + This setting will be effective at next restart. + + QLineEdit @@ -3047,119 +3086,4 @@ - - server - - No checker rights - - - - Authentication failed - - - - 60 seconds cooldown after kick - - - - kicked - - - - Ping timeout - - - - bye - - - - Empty config entry - - - - Not room master - - - - Corrupted hedgehogs info - - - - too many teams - - - - too many hedgehogs - - - - There's already a team with same name in the list - - - - round in progress - - - - restricted - - - - REMOVE_TEAM: no such team - - - - Not team owner! - - - - Less than two clans! - - - - Room with such name already exists - - - - Illegal room name - - - - No such room - - - - Joining restricted - - - - Registered users only - - - - You are banned in this room - - - - Nickname already chosen - - - - Illegal nickname - - - - Protocol already known - - - - Bad number - - - - Nickname is already in use - - - diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Locale/it.txt --- a/share/hedgewars/Data/Locale/it.txt Sun Apr 21 01:36:08 2013 +0200 +++ b/share/hedgewars/Data/Locale/it.txt Wed May 29 22:52:37 2013 +0400 @@ -56,7 +56,7 @@ 00:53=Macchina Spazio-Temporale ; 00:54=Attrezzi da Costruzione 00:54=Terreno Spray -00:55=Congelatore +00:55=Raggio Congelatore 00:56=Mannarino 01:00=Combattiamo! @@ -453,7 +453,7 @@ 03:53=TARDIS Modello 40 ;03:54=(Arma in sviluppo) 03:54=Utilità di costruzione -03:55=(Arma in sviluppo) +03:55=Arma di ibernazione di massa 03:56=Ecco il grande chef! ; Weapon Descriptions (use | as line breaks) @@ -513,7 +513,7 @@ 04:53=Parti per un'avventura unica attraverso spazio e tempo,|lasciando i tuoi compagni da soli a combattere.|Preparati a ritornare in qualsiasi momento,|o per il Sudden Death o se sei l'ultimo sopravvissuto.|Attenzione! Non è utilizzabile durante il Sudden Death,|se sei rimasto da solo, o se sei il Re.|Attacco: Inzia la tua avventura nello spazio-tempo! ;04:54=DESCRIZIONE NON DISPONIBILE (arma ancora in sviluppo) 04:54=Con questo terreno spray non ti mancherà mai la terra |sotto ai piedi. Utilissimo per costruire ponti, |seppellire nemici e sigillare tunnel.|Ma fai attenzione a non usarlo a tuo svantaggio!|Attacco: Attiva|Su/Giù: Continua a mirare|Sinistra/Destra: Modifica la potenza di fuoriuscita del terreno -04:55=DESCRIZIONE NON DISPONIBILE +04:55=L'era glaciale non è mai stata così imminente!|Con questo potente raggio potrai congelare i ricci nemici,|rendere il terreno scivoloso e salvarti dalle cadute|in acqua trasformando il mare in una distesa di ghiaccio!|Attacco: Attiva|Su/Giù: Continua a mirare 04:56=Lancia due mannarini da cucina verso i tuoi nemici, se |lanciati con potenza possono rappresentare una... tagliente sorpresa!|Ricorda che rimarranno sul terreno dopo averli lanciati!|Attacco: Tieni premuto per lanciare con più forza ; Game goal strings diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Locale/missions_fr.txt --- a/share/hedgewars/Data/Locale/missions_fr.txt Sun Apr 21 01:36:08 2013 +0200 +++ b/share/hedgewars/Data/Locale/missions_fr.txt Wed May 29 22:52:37 2013 +0400 @@ -13,7 +13,7 @@ Basic_Training_-_Sniper_Rifle.name=Initiation au Sniper Basic_Training_-_Sniper_Rifle.desc="Pan ! En pleine tête !" -Basic_Training_-_Rope.name=Initiation à la Grappin +Basic_Training_-_Rope.name=Initiation au Grappin Basic_Training_-_Rope.desc="Bouge de là et Balance toi !" User_Mission_-_Dangerous_Ducklings.name=Mission: Canards dangereux @@ -44,4 +44,4 @@ User_Mission_-_Rope_Knock_Challenge.desc="Regarde derrière toi !" User_Mission_-_RCPlane_Challenge.name=Challenge: Avion télécommandé -User_Mission_-_RCPlane_Challenge.desc="Plutôt confiant, hein, aviateur ?" \ No newline at end of file +User_Mission_-_RCPlane_Challenge.desc="Plutôt confiant, hein, aviateur ?" diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Locale/pl.txt --- a/share/hedgewars/Data/Locale/pl.txt Sun Apr 21 01:36:08 2013 +0200 +++ b/share/hedgewars/Data/Locale/pl.txt Wed May 29 22:52:37 2013 +0400 @@ -174,7 +174,7 @@ 02:01=%1 śpi z rybami 02:01=%1 uważa, że fizyka płynów w tej grze jest do bani! 02:01=%1 wygląda na spragnionego -02:01=Morze Ciebie wzywa, %1 +02:01=Morze Cię wzywa, %1 02:01=%1 zaginął na morzu 02:01=%1 powinien przynieść zestaw do nurkowania 02:01=%1 ma pogrzeb na morzu @@ -286,7 +286,7 @@ 02:05=Dobre życie... w formie skrzyneczki! 02:05=Ktoś dzwonił po doktora? 02:05=Świeże bandaże! -02:05=To pomoże poczuć się Tobie lepiej +02:05=Po tym poczujesz sie lepiej! 02:05=Pomniejszy Eliksir Żywotności! Eeee... To chyba nie ta nazwa. 02:05=Zbierz mnie! 02:05=Zbierz to! @@ -309,6 +309,7 @@ 02:05=W Hedgewars opieka zdrowotna naprawdę wymiata! 02:05=Na zdrowie! 02:05=Szczepionka! +02:05=Ostatnio coś niewyraźnie wyglądasz. Weź tę apteczkę! ; New ammo crate 02:06=Więcej broni! @@ -541,6 +542,8 @@ 03:53=Typ 40 ;03:54=Zbuduj coś przydatnego 03:54=Narzędzie +03:55=Przełammy lody! +03:56=Nie przytnij sobie igieł! ; Weapon Descriptions (use | as line breaks) 04:00=Atakuj przeciwników zwykłym granatem.|Wybuchnie kiedy zapalnik skończy odliczanie.|1-5: Ustawia zapalnik|Atak: Przytrzymaj by rzucić z większą siłą @@ -599,6 +602,8 @@ 04:53=Wybierz się na podróż w czasie i przestrzeni|zostawiając inne jeże na polu walki.|Bądź przygotowany na powrót w dowolnym momencie.|Gdy rozpocznie się|Nagła Śmierć lub większość jeży zostanie wybita.|Uwaga. Nie zadziała podczas Nagłej Śmierci,|gdy jesteś sam lub jeśli jesteś Królem. ;04:54=INCOMPLETE 04:54=Wystrzel strumień kleistej mazi.|Buduj mosty, zasypuj wrogów, zatykaj tunele.|Uważaj by nie zasypać samego siebie! +04:55=Epoka lodowcowa powraca!!|Zamroź jeże, uczyń podłoże śliskim lub zapobiegnij|utonięciu zamrażając wodę.|Atak: Strzał +04:56=Rzuć w przeciwnika dwoma tasakami i zablokuj mu |drogę lub użyj ich do wspinaczki! Jednak uważaj! |Te tasaki są naprawdę ostre!|Atak: Przytrzymaj by rzucić z większą siłą (dwukrotnie) ; Game goal strings 05:00=Ustawienia gry diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Maps/CMakeLists.txt --- a/share/hedgewars/Data/Maps/CMakeLists.txt Sun Apr 21 01:36:08 2013 +0200 +++ b/share/hedgewars/Data/Maps/CMakeLists.txt Wed May 29 22:52:37 2013 +0400 @@ -33,6 +33,14 @@ portal Ropes Ruler + SB_Bones + SB_Crystal + SB_Grassy + SB_Grove + SB_Haunty + SB_Oaks + SB_Shrooms + SB_Tentacles Sheep ShoppaKing Sticks diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Maps/Eyes/preview.png Binary file share/hedgewars/Data/Maps/Eyes/preview.png has changed diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Maps/SB_Bones/CMakeLists.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/share/hedgewars/Data/Maps/SB_Bones/CMakeLists.txt Wed May 29 22:52:37 2013 +0400 @@ -0,0 +1,5 @@ +install(FILES + map.png + map.cfg + preview.png + DESTINATION ${SHAREPATH}Data/Maps/SB_Bones) diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Maps/SB_Bones/map.cfg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/share/hedgewars/Data/Maps/SB_Bones/map.cfg Wed May 29 22:52:37 2013 +0400 @@ -0,0 +1,2 @@ +Desert +48 diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Maps/SB_Bones/map.png Binary file share/hedgewars/Data/Maps/SB_Bones/map.png has changed diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Maps/SB_Bones/preview.png Binary file share/hedgewars/Data/Maps/SB_Bones/preview.png has changed diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Maps/SB_Crystal/CMakeLists.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/share/hedgewars/Data/Maps/SB_Crystal/CMakeLists.txt Wed May 29 22:52:37 2013 +0400 @@ -0,0 +1,6 @@ +install(FILES + map.png + mask.png + map.cfg + preview.png + DESTINATION ${SHAREPATH}Data/Maps/SB_Crystal) diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Maps/SB_Crystal/map.cfg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/share/hedgewars/Data/Maps/SB_Crystal/map.cfg Wed May 29 22:52:37 2013 +0400 @@ -0,0 +1,2 @@ +Cave +32 diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Maps/SB_Crystal/map.png Binary file share/hedgewars/Data/Maps/SB_Crystal/map.png has changed diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Maps/SB_Crystal/mask.png Binary file share/hedgewars/Data/Maps/SB_Crystal/mask.png has changed diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Maps/SB_Crystal/preview.png Binary file share/hedgewars/Data/Maps/SB_Crystal/preview.png has changed diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Maps/SB_Grassy/CMakeLists.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/share/hedgewars/Data/Maps/SB_Grassy/CMakeLists.txt Wed May 29 22:52:37 2013 +0400 @@ -0,0 +1,6 @@ +install(FILES + map.png + mask.png + map.cfg + preview.png + DESTINATION ${SHAREPATH}Data/Maps/SB_Grassy) diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Maps/SB_Grassy/map.cfg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/share/hedgewars/Data/Maps/SB_Grassy/map.cfg Wed May 29 22:52:37 2013 +0400 @@ -0,0 +1,2 @@ +Castle +40 diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Maps/SB_Grassy/map.png Binary file share/hedgewars/Data/Maps/SB_Grassy/map.png has changed diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Maps/SB_Grassy/mask.png Binary file share/hedgewars/Data/Maps/SB_Grassy/mask.png has changed diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Maps/SB_Grassy/preview.png Binary file share/hedgewars/Data/Maps/SB_Grassy/preview.png has changed diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Maps/SB_Grove/CMakeLists.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/share/hedgewars/Data/Maps/SB_Grove/CMakeLists.txt Wed May 29 22:52:37 2013 +0400 @@ -0,0 +1,6 @@ +install(FILES + map.png + mask.png + map.cfg + preview.png + DESTINATION ${SHAREPATH}Data/Maps/SB_Grove) diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Maps/SB_Grove/map.cfg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/share/hedgewars/Data/Maps/SB_Grove/map.cfg Wed May 29 22:52:37 2013 +0400 @@ -0,0 +1,2 @@ +Nature +48 diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Maps/SB_Grove/map.png Binary file share/hedgewars/Data/Maps/SB_Grove/map.png has changed diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Maps/SB_Grove/mask.png Binary file share/hedgewars/Data/Maps/SB_Grove/mask.png has changed diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Maps/SB_Grove/preview.png Binary file share/hedgewars/Data/Maps/SB_Grove/preview.png has changed diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Maps/SB_Haunty/CMakeLists.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/share/hedgewars/Data/Maps/SB_Haunty/CMakeLists.txt Wed May 29 22:52:37 2013 +0400 @@ -0,0 +1,6 @@ +install(FILES + map.png + mask.png + map.cfg + preview.png + DESTINATION ${SHAREPATH}Data/Maps/SB_Haunty) diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Maps/SB_Haunty/map.cfg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/share/hedgewars/Data/Maps/SB_Haunty/map.cfg Wed May 29 22:52:37 2013 +0400 @@ -0,0 +1,2 @@ +Halloween +24 diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Maps/SB_Haunty/map.png Binary file share/hedgewars/Data/Maps/SB_Haunty/map.png has changed diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Maps/SB_Haunty/mask.png Binary file share/hedgewars/Data/Maps/SB_Haunty/mask.png has changed diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Maps/SB_Haunty/preview.png Binary file share/hedgewars/Data/Maps/SB_Haunty/preview.png has changed diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Maps/SB_Oaks/CMakeLists.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/share/hedgewars/Data/Maps/SB_Oaks/CMakeLists.txt Wed May 29 22:52:37 2013 +0400 @@ -0,0 +1,6 @@ +install(FILES + map.png + mask.png + map.cfg + preview.png + DESTINATION ${SHAREPATH}Data/Maps/SB_Oaks) diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Maps/SB_Oaks/map.cfg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/share/hedgewars/Data/Maps/SB_Oaks/map.cfg Wed May 29 22:52:37 2013 +0400 @@ -0,0 +1,2 @@ +Nature +48 diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Maps/SB_Oaks/map.png Binary file share/hedgewars/Data/Maps/SB_Oaks/map.png has changed diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Maps/SB_Oaks/mask.png Binary file share/hedgewars/Data/Maps/SB_Oaks/mask.png has changed diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Maps/SB_Oaks/preview.png Binary file share/hedgewars/Data/Maps/SB_Oaks/preview.png has changed diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Maps/SB_Shrooms/CMakeLists.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/share/hedgewars/Data/Maps/SB_Shrooms/CMakeLists.txt Wed May 29 22:52:37 2013 +0400 @@ -0,0 +1,6 @@ +install(FILES + map.png + mask.png + map.cfg + preview.png + DESTINATION ${SHAREPATH}Data/Maps/SB_Shrooms) diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Maps/SB_Shrooms/map.cfg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/share/hedgewars/Data/Maps/SB_Shrooms/map.cfg Wed May 29 22:52:37 2013 +0400 @@ -0,0 +1,2 @@ +Nature +48 diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Maps/SB_Shrooms/map.png Binary file share/hedgewars/Data/Maps/SB_Shrooms/map.png has changed diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Maps/SB_Shrooms/mask.png Binary file share/hedgewars/Data/Maps/SB_Shrooms/mask.png has changed diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Maps/SB_Shrooms/preview.png Binary file share/hedgewars/Data/Maps/SB_Shrooms/preview.png has changed diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Maps/SB_Tentacles/CMakeLists.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/share/hedgewars/Data/Maps/SB_Tentacles/CMakeLists.txt Wed May 29 22:52:37 2013 +0400 @@ -0,0 +1,6 @@ +install(FILES + map.png + mask.png + map.cfg + preview.png + DESTINATION ${SHAREPATH}Data/Maps/SB_Tentacles) diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Maps/SB_Tentacles/map.cfg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/share/hedgewars/Data/Maps/SB_Tentacles/map.cfg Wed May 29 22:52:37 2013 +0400 @@ -0,0 +1,2 @@ +Hell +40 diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Maps/SB_Tentacles/map.png Binary file share/hedgewars/Data/Maps/SB_Tentacles/map.png has changed diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Maps/SB_Tentacles/mask.png Binary file share/hedgewars/Data/Maps/SB_Tentacles/mask.png has changed diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Maps/SB_Tentacles/preview.png Binary file share/hedgewars/Data/Maps/SB_Tentacles/preview.png has changed diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Missions/Campaign/A Classic Fairytale/CMakeLists.txt --- a/share/hedgewars/Data/Missions/Campaign/A Classic Fairytale/CMakeLists.txt Sun Apr 21 01:36:08 2013 +0200 +++ b/share/hedgewars/Data/Missions/Campaign/A Classic Fairytale/CMakeLists.txt Wed May 29 22:52:37 2013 +0400 @@ -1,7 +1,9 @@ file(GLOB Config *.ini) file(GLOB Missions *.lua) +file(GLOB Packs *.hwp) install(FILES ${Config} ${Missions} + ${Packs} DESTINATION "${SHAREPATH}Data/Missions/Campaign/A Classic Fairytale") diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Missions/Campaign/A Classic Fairytale/backstab.lua --- a/share/hedgewars/Data/Missions/Campaign/A Classic Fairytale/backstab.lua Sun Apr 21 01:36:08 2013 +0200 +++ b/share/hedgewars/Data/Missions/Campaign/A Classic Fairytale/backstab.lua Wed May 29 22:52:37 2013 +0400 @@ -760,7 +760,9 @@ SaveCampaignVar("M5ChiefDead", "0") end SaveCampaignVar("M5Choice", "" .. choice) - SaveCampaignVar("Progress", "5") + if progress and progress<5 then + SaveCampaignVar("Progress", "5") + end for i = 1, 7 do if natives[i] == deployedHog then @@ -814,6 +816,7 @@ end function GetVariables() + progress = tonumber(GetCampaignVar("Progress")) m2DenseDead = tonumber(GetCampaignVar("M2DenseDead")) m2Choice = tonumber(GetCampaignVar("M2Choice")) m4DenseDead = tonumber(GetCampaignVar("M4DenseDead")) diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Missions/Campaign/A Classic Fairytale/dragon.lua --- a/share/hedgewars/Data/Missions/Campaign/A Classic Fairytale/dragon.lua Sun Apr 21 01:36:08 2013 +0200 +++ b/share/hedgewars/Data/Missions/Campaign/A Classic Fairytale/dragon.lua Wed May 29 22:52:37 2013 +0400 @@ -399,7 +399,9 @@ function DoMissionFinished() AddCaption(loc("Salvation was one step closer now...")) - SaveCampaignVar("Progress", "6") + if progress and progress<6 then + SaveCampaignVar("Progress", "6") + end ParseCommand("teamgone " .. loc("011101001")) TurnTimeLeft = 0 end @@ -451,6 +453,7 @@ end function GetVariables() + progress = tonumber(GetCampaignVar("Progress")) m5DeployedNum = tonumber(GetCampaignVar("M5DeployedNum")) end diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Missions/Campaign/A Classic Fairytale/enemy.lua --- a/share/hedgewars/Data/Missions/Campaign/A Classic Fairytale/enemy.lua Sun Apr 21 01:36:08 2013 +0200 +++ b/share/hedgewars/Data/Missions/Campaign/A Classic Fairytale/enemy.lua Wed May 29 22:52:37 2013 +0400 @@ -400,7 +400,9 @@ end function WinMission() - SaveCampaignVar("Progress", "9") + if progress and progress<9 then + SaveCampaignVar("Progress", "9") + end ParseCommand("teamgone " .. loc("011101001")) TurnTimeLeft = 0 end @@ -420,6 +422,7 @@ end function GetVariables() + progress = tonumber(GetCampaignVar("Progress")) m5DeployedNum = tonumber(GetCampaignVar("M5DeployedNum")) m2Choice = tonumber(GetCampaignVar("M2Choice")) m5Choice = tonumber(GetCampaignVar("M5Choice")) diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Missions/Campaign/A Classic Fairytale/family.lua --- a/share/hedgewars/Data/Missions/Campaign/A Classic Fairytale/family.lua Sun Apr 21 01:36:08 2013 +0200 +++ b/share/hedgewars/Data/Missions/Campaign/A Classic Fairytale/family.lua Wed May 29 22:52:37 2013 +0400 @@ -284,7 +284,9 @@ function DoPrincessFreed() AnimSay(princess, loc("Thank you, my hero!"), SAY_SAY, 0) - SaveCampaignVar("Progress", "7") + if progress and progress<7 then + SaveCampaignVar("Progress", "7") + end ParseCommand("teamgone " .. loc("011101001")) TurnTimeLeft = 0 end @@ -390,6 +392,7 @@ end function GetVariables() + progress = tonumber(GetCampaignVar("Progress")) m5DeployedNum = tonumber(GetCampaignVar("M5DeployedNum")) m2Choice = tonumber(GetCampaignVar("M2Choice")) m5Choice = tonumber(GetCampaignVar("M5Choice")) diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Missions/Campaign/A Classic Fairytale/first_blood.hwp Binary file share/hedgewars/Data/Missions/Campaign/A Classic Fairytale/first_blood.hwp has changed diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Missions/Campaign/A Classic Fairytale/first_blood.lua --- a/share/hedgewars/Data/Missions/Campaign/A Classic Fairytale/first_blood.lua Sun Apr 21 01:36:08 2013 +0200 +++ b/share/hedgewars/Data/Missions/Campaign/A Classic Fairytale/first_blood.lua Wed May 29 22:52:37 2013 +0400 @@ -56,6 +56,7 @@ canKilled = false desertTaken = false challengeFailed = false +deleteCrate = false difficultyChoice = false princessFace = "Left" elderFace = "Left" @@ -220,6 +221,9 @@ end -----------------------------Events------------------------------------ function CheckNeedToTurn(gear) + if youngKilled then + return false + end if gear == princess then if princessKilled ~= true then if (GetX(princess) > GetX(youngh) and princessFace == "Right") @@ -466,6 +470,7 @@ function DoTimesUp() challengeFailed = true + deleteCrate = true DeleteGear(crates[1]) TurnTimeLeft = -1 AddCaption(loc("And so happenned that Leaks A Lot failed to complete the challenge! He landed, pressured by shame...")) @@ -538,7 +543,9 @@ function DoCannibalKilled() AddAnim(cannKilledAnim) - SaveCampaignVar("Progress", "1") + if not progress then + SaveCampaignVar("Progress", "1") + end end function DoCannibalKilledEarly() @@ -603,9 +610,7 @@ MinesTime = 3000 Explosives = 0 Delay = 10 - MapGen = 0 - TemplateFilter = 6 - TemplateNumber = 33 + Map = "A_Classic_Fairytale_first_blood" Theme = "Nature" @@ -630,6 +635,7 @@ end function onGameStart() + progress = tonumber(GetCampaignVar("Progress")) TurnTimeLeft = -1 FollowGear(youngh) ShowMission(loc("A Classic Fairytale"), loc("First Blood"), loc("Finish your training|Hint: Animations can be skipped with the [Precise] key."), -amSkip, 0) @@ -664,6 +670,8 @@ rope2Taken = true elseif gear == ropeCrate3 then rope3Taken = true + elseif gear == crates[1] and deleteCrate == true then + deleteCrate = false elseif gear == crates[1] and challengeFailed == false then crates[1] = nil cratesCollected = cratesCollected + 1 diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Missions/Campaign/A Classic Fairytale/journey.hwp Binary file share/hedgewars/Data/Missions/Campaign/A Classic Fairytale/journey.hwp has changed diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Missions/Campaign/A Classic Fairytale/journey.lua --- a/share/hedgewars/Data/Missions/Campaign/A Classic Fairytale/journey.lua Sun Apr 21 01:36:08 2013 +0200 +++ b/share/hedgewars/Data/Missions/Campaign/A Classic Fairytale/journey.lua Wed May 29 22:52:37 2013 +0400 @@ -903,7 +903,9 @@ end function DoWon() - SaveCampaignVar("Progress", "3") + if progress and progress<3 then + SaveCampaignVar("Progress", "3") + end AddAnim(winAnim) AddFunction({func = FinishWon, args = {}}) end @@ -939,11 +941,10 @@ MinesTime = 3000 Explosives = 0 Delay = 5 - MapGen = 0 - TemplateFilter = 6 - TemplateNumber = 27 - Theme = "Nature" - SuddenDeathTurns = 3000 + Map = "A_Classic_Fairytale_journey" + Theme = "Nature" + + SuddenDeathTurns = 3000 AddTeam(loc("Natives"), 29439, "Bone", "Island", "HillBilly", "cm_birdy") leaks = AddHog(loc("Leaks A Lot"), 0, 100, "Rambo") @@ -974,6 +975,7 @@ end function onGameStart() + progress = tonumber(GetCampaignVar("Progress")) m2Choice = tonumber(GetCampaignVar("M2Choice")) m2DenseDead = tonumber(GetCampaignVar("M2DenseDead")) m2RamonDead = tonumber(GetCampaignVar("M2RamonDead")) diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Missions/Campaign/A Classic Fairytale/queen.lua --- a/share/hedgewars/Data/Missions/Campaign/A Classic Fairytale/queen.lua Sun Apr 21 01:36:08 2013 +0200 +++ b/share/hedgewars/Data/Missions/Campaign/A Classic Fairytale/queen.lua Wed May 29 22:52:37 2013 +0400 @@ -575,6 +575,7 @@ end function GetVariables() + progress = tonumber(GetCampaignVar("Progress")) m5DeployedNum = tonumber(GetCampaignVar("M5DeployedNum")) m2Choice = tonumber(GetCampaignVar("M2Choice")) m5Choice = tonumber(GetCampaignVar("M5Choice")) @@ -606,7 +607,9 @@ SaveCampaignVar("M8PrincessLeader", princessLeader) SaveCampaignVar("M8EnemyFled", enemyFled) SaveCampaignVar("M8Scene", "" .. scene) - SaveCampaignVar("Progress", "8") + if progress and progress<8 then + SaveCampaignVar("Progress", "8") + end end function SetupPlace() diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Missions/Campaign/A Classic Fairytale/shadow.hwp Binary file share/hedgewars/Data/Missions/Campaign/A Classic Fairytale/shadow.hwp has changed diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Missions/Campaign/A Classic Fairytale/shadow.lua --- a/share/hedgewars/Data/Missions/Campaign/A Classic Fairytale/shadow.lua Sun Apr 21 01:36:08 2013 +0200 +++ b/share/hedgewars/Data/Missions/Campaign/A Classic Fairytale/shadow.lua Wed May 29 22:52:37 2013 +0400 @@ -761,7 +761,9 @@ SaveCampaignVar("M2RamonDead", "0") SaveCampaignVar("M2SpikyDead", "0") AddFunction({func = KillCyborg, args = {}}) - SaveCampaignVar("Progress", "2") + if progress and progress<2 then + SaveCampaignVar("Progress", "2") + end SaveCampaignVar("M2Choice", "" .. choice) end @@ -783,7 +785,9 @@ end AddAnim(refusedFinalAnim) AddFunction({func = KillCyborg, args = {}}) - SaveCampaignVar("Progress", "2") + if progress and progress<2 then + SaveCampaignVar("Progress", "2") + end SaveCampaignVar("M2Choice", "" .. choice) end @@ -791,7 +795,9 @@ SaveCampaignVar("M2DenseDead", "1") SaveCampaignVar("M2RamonDead", "0") SaveCampaignVar("M2SpikyDead", "0") - SaveCampaignVar("Progress", "2") + if progress and progress<2 then + SaveCampaignVar("Progress", "2") + end SaveCampaignVar("M2Choice", "" .. choice) AddAnim(attackedFinalAnim) AddFunction({func = KillCyborg, args = {}}) @@ -839,11 +845,9 @@ MinesTime = 3000 Explosives = 0 Delay = 10 - MapGen = 0 - TemplateFilter = 6 - TemplateNumber = 22 + Map = "A_Classic_Fairytale_shadow" Theme = "Nature" - SuddenDeathTurns = 3000 + SuddenDeathTurns = 3000 AddHogs() PlaceHogs() @@ -854,6 +858,7 @@ end function onGameStart() + progress = tonumber(GetCampaignVar("Progress")) HideHogs() AddAmmo(leaks, amSwitch, 100) AddAmmo(dense, amSwitch, 100) diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Missions/Campaign/A Classic Fairytale/united.lua --- a/share/hedgewars/Data/Missions/Campaign/A Classic Fairytale/united.lua Sun Apr 21 01:36:08 2013 +0200 +++ b/share/hedgewars/Data/Missions/Campaign/A Classic Fairytale/united.lua Wed May 29 22:52:37 2013 +0400 @@ -109,7 +109,9 @@ else SaveCampaignVar("M4DenseDead", "0") end - SaveCampaignVar("Progress", "4") + if progress and progress<4 then + SaveCampaignVar("Progress", "4") + end ParseCommand("teamgone " .. loc("011101001")) TurnTimeLeft = 0 end @@ -416,6 +418,7 @@ end function onGameStart() + progress = tonumber(GetCampaignVar("Progress")) GetVariables() SetupAmmo() SetupPlace() diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Scripts/Multiplayer/ShoppaMap.cfg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/share/hedgewars/Data/Scripts/Multiplayer/ShoppaMap.cfg Wed May 29 22:52:37 2013 +0400 @@ -0,0 +1,2 @@ +Default +Default diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Scripts/Multiplayer/ShoppaMap.lua --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/share/hedgewars/Data/Scripts/Multiplayer/ShoppaMap.lua Wed May 29 22:52:37 2013 +0400 @@ -0,0 +1,450 @@ +ObjectList = {} +PointsBuffer = '' -- A string to accumulate points in + +-- Overall padding for roping freedom +Padding = 430 + +function AddPoint(x, y, width, erase) + PointsBuffer = PointsBuffer .. string.char(band(x,0xff00) / 256 , band(x,0xff) , band(y,0xff00) / 256 , band(y,0xff)) + if width then + width = bor(width,0x80) + if erase then + width = bor(width,0x40) + end + PointsBuffer = PointsBuffer .. string.char(width) + else + PointsBuffer = PointsBuffer .. string.char(0) + end + if #PointsBuffer > 245 then + ParseCommand('draw '..PointsBuffer) + PointsBuffer = '' + end +end +function FlushPoints() + if #PointsBuffer > 0 then + ParseCommand('draw '..PointsBuffer) + PointsBuffer = '' + end +end + +-- This could probably use less points and more precision +-- 700x700 for object space +function DrawStar(x, y, d, f) +-- default scale is 700x700 or so + s = 700 + if not(d == 1) then s = div(s,d) end + if NoOverlap(x,y,s,s) then + AddCollision(x,y,s,s) + if not(d == 1) then + i = 6-d + j = math.min(div(5,d),1) + -- centre + AddPoint(x,y,div(20,d)) + -- arms + AddPoint(x-div(325,d),y-f*div(108,d),2) + AddPoint(x+div(325,d),y-f*div(108,d)) + AddPoint(x-div(205,d),y+f*div(270,d)) + AddPoint(x,y-f*div(345,d)) + AddPoint(x+div(205,d),y+f*div(270,d)) + AddPoint(x-div(325,d),y-f*div(108,d)) + if d < 4 then + -- fill in arm 1 + AddPoint(x-div(275,d),y-f*div(92,d),i) + AddPoint(x-div(50,d),y-f*div(92,d)) + AddPoint(x-div(105,d),y+f*div(25,d)) + AddPoint(x-div(250,d),y-f*div(80,d)) + AddPoint(x-div(115,d),y-f*div(70,d)) + AddPoint(x-div(130,d),y-f*div(25,d)) + AddPoint(x-div(175,d),y-f*div(60,d)) + -- fill in arm 2 + AddPoint(x+div(275,d),y-f*div(92,d),i) + AddPoint(x+div(50,d),y-f*div(92,d)) + AddPoint(x+div(105,d),y+f*div(25,d)) + AddPoint(x+div(250,d),y-f*div(80,d)) + AddPoint(x+div(115,d),y-f*div(70,d)) + AddPoint(x+div(130,d),y-f*div(25,d)) + AddPoint(x+div(175,d),y-f*div(60,d)) + -- fill in arm 3 + AddPoint(x-div(175,d),y+f*div(230,d),i) + AddPoint(x-div(110,d),y+f*div(60,d)) + AddPoint(x,y+f*div(120,d)) + AddPoint(x-div(155,d),y+f*div(215,d)) + AddPoint(x-div(105,d),y+f*div(95,d)) + AddPoint(x-div(60,d),y+f*div(130,d)) + AddPoint(x-div(85,d),y+f*div(155,d),j) + -- fill in arm 4 + AddPoint(x,y-f*div(300,d),3) + AddPoint(x+div(50,d),y-f*div(125,d)) + AddPoint(x-div(50,d),y-f*div(125,d)) + AddPoint(x,y-f*div(270,d)) + AddPoint(x-div(40,d),y-f*div(160,d)) + AddPoint(x+div(40,d),y-f*div(160,d)) + AddPoint(x,y-f*div(195,d),j) + -- fill in arm 5 + AddPoint(x+div(175,d),y+f*div(230,d),i) + AddPoint(x+div(110,d),y+f*div(60,d)) + AddPoint(x,y+f*div(120,d)) + AddPoint(x+div(155,d),y+f*div(215,d)) + AddPoint(x+div(105,d),y+f*div(95,d)) + AddPoint(x+div(60,d),y+f*div(130,d)) + AddPoint(x+div(85,d),y+f*div(155,d),j) + end + else + -- centre + AddPoint(x,y,20) + -- arms + AddPoint(x-325,y-f*108,1) + AddPoint(x+325,y-f*108) + AddPoint(x-205,y+f*270) + AddPoint(x,y-f*345) + AddPoint(x+205,y+f*270) + AddPoint(x-325,y-f*108) + -- fill in arm 1 + AddPoint(x-275,y-f*92,4) + AddPoint(x-50,y-f*92) + AddPoint(x-105,y+f*25) + AddPoint(x-250,y-f*80) + AddPoint(x-115,y-f*70) + AddPoint(x-130,y-f*25) + AddPoint(x-175,y-f*60) + -- fill in arm 2 + AddPoint(x+275,y-f*92,4) + AddPoint(x+50,y-f*92) + AddPoint(x+105,y+f*25) + AddPoint(x+250,y-f*80) + AddPoint(x+115,y-f*70) + AddPoint(x+130,y-f*25) + AddPoint(x+175,y-f*60) + -- fill in arm 3 + AddPoint(x-175,y+f*230,4) + AddPoint(x-110,y+f*60) + AddPoint(x-10,y+f*120) + AddPoint(x-155,y+f*215) + AddPoint(x-105,y+f*95) + AddPoint(x-60,y+f*130) + AddPoint(x-85,y+f*155,5) + -- fill in arm 4 + AddPoint(x,y-f*300,3) + AddPoint(x+50,y-f*125) + AddPoint(x-50,y-f*125) + AddPoint(x,y-f*270) + AddPoint(x-40,y-f*160) + AddPoint(x+40,y-f*160) + AddPoint(x,y-f*195,5) + -- fill in arm 5 + AddPoint(x+175,y+f*230,4) + AddPoint(x+110,y+f*60) + AddPoint(x+10,y+f*120) + AddPoint(x+155,y+f*215) + AddPoint(x+105,y+f*95) + AddPoint(x+60,y+f*130) + AddPoint(x+85,y+f*155,5) + end + return true + else + return false + end +end + +-- well. this was easy +function DrawCircle(x, y, w) + if NoOverlap(x,y,w*10+6,w*10+6) then + AddCollision(x,y,w*10+6,w*10+6) + AddPoint(x,y,w) + return true + else + return false + end +end + +function DrawCrescent(x, y, w, s) + b = div(w*(GetRandom(4)+1)*10+6,6) + + if NoOverlap(x,y,w*10+6,w*10+6) then + AddCollision(x,y,w*10+6,w*10+6) + AddPoint(x,y,w) + if s then -- side + if GetRandom(1) == 0 then + b = b*-1 + end + AddPoint(x-b,y,w,true) + else -- top + AddPoint(x,y-b,w,true) + end + return true + else + return false + end +end + +function DrawCones(x,w,h,c) + y = 2048-h + hw = div(w,2) + if NoOverlap(x+div(w*c,2),y+div(h,2),w*c,h) then + AddCollision(x+div(w*c,2),y+div(h,2),w*c,h) + x = x + hw + for i = 1,c do -- I'm guessing outlining is slightly more efficient than fanning at 16px brush + AddPoint(x,y,1) + AddPoint(x-hw+8,2048) + AddPoint(x+hw-8,2048) + AddPoint(x,y) + for j = x-hw+25,x+hw,34 do + AddPoint(x,y+30,3) + AddPoint(j,2048) + end + if GetRandom(2)==0 then + AddPoint(x,y-20,8) + end + x = x + w + end + else + return false + end + +end + +function DrawPlateau(x,y,l,t,b) + if NoOverlapXY(x-28,y-28,x+l+28,y+l+28) then + AddPoint(x,y,5) + AddPoint(x+l,y) + + to = GetRandom(6) + if not(to==0) then + if GetRandom(2)==0 then + to = div(l,to) + else + to = l-div(l,to) + end + end + if t>0 and NoOverlapXY(x+to-28,y-t-28,x+to+28,y+28) then + AddPoint(x+to,y-t,5) + AddPoint(x+to,y) + if GetRandom(2)==0 then + AddPoint(x+to,y-t+75,20) + else -- square off + AddPoint(x+to-20,y-t,1) + AddPoint(x+to-20,y-t-20) + AddPoint(x+to+20,y-t-20) + AddPoint(x+to+20,y-t) + end + tSucc = true + end + + if to > 120 and GetRandom(2)==0 then -- left bumper + AddPoint(x+15,y-20,9) + else -- square off + --AddPoint(x-50,y,2) + AddPoint(x,y+20,1) + AddPoint(x-20,y+20) + AddPoint(x-20,y-20) + AddPoint(x,y-20) + end + if to < (l-120) and GetRandom(2)==0 then -- right bumper + AddPoint(x+l-15,y-20,9) + else -- square off + --AddPoint(x+l+50,y,2) + AddPoint(x+l,y+20,1) + AddPoint(x+l+20,y+20) + AddPoint(x+l+20,y-20) + AddPoint(x+l,y-20) + end + bo = GetRandom(6) + if not(bo == 0) then + if GetRandom(2)==0 then + bo = div(l,bo) + else + bo = l-div(l,bo) + end + end + -- still consider a success even if we can't place this one. Might need to return more than true/false + if b>0 and NoOverlapXY(x+bo-28,y-28,x+bo+28,y+b+28) then + AddPoint(x+bo,y,5) + AddPoint(x+bo,y+b) + if GetRandom(2)==0 then + AddPoint(x+bo,y+b-75,20) + else -- square off + AddPoint(x+bo-20,y+b,1) + AddPoint(x+bo-20,y+b+20) + AddPoint(x+bo+20,y+b+20) + AddPoint(x+bo+20,y+b) + end + bSucc = true + end + if bSucc then AddCollisionXY(x+bo-28,y-28,x+bo+28,y+b+28) end + if tSucc then AddCollisionXY(x+to-28,y-t-28,x+to+28,y+28) end + AddCollisionXY(x-28,y-28,x+l+28,y+28) + return true + else + return false + end +end + +function AddCollision(x,y,w,h) + table.insert(ObjectList,{x-div(w+Padding,2), + y-div(h+Padding,2), + x+div(w+Padding,2), + y+div(h+Padding,2)}) +end + +function AddCollisionXY(x,y,x2,y2) + table.insert(ObjectList,{x-div(Padding,2), + y-div(Padding,2), + x2+div(Padding,2), + y2+div(Padding,2)}) +end + +-- bounding box check +function NoOverlap(x,y,w,h) + w = w + h = h + x = x-div(w,2) + y = y-div(h,2) + x2 = x+w + y2 = y+h + return NoOverlapXY(x,y,x2,y2) +end +function NoOverlapXY(x,y,x2,y2) + i=1 + l=table.getn(ObjectList) + while i<=l do + ox = ObjectList[i][1] + oy = ObjectList[i][2] + ox2 = ObjectList[i][3] + oy2 = ObjectList[i][4] + -- WriteLnToConsole(ox..' '..oy..' '..ox2..' '..oy2..' - '..x..' '..y..' '..x2..' '..y2) + --if (math.abs(ox + ox2 -x - x2) <= (ox2 - ox + x2 - x)) and (math.abs(oy + oy2 - y - y2) <= (oy - oy2 + y - y2)) then + if x < ox2 and ox < x2 and y < oy2 and oy < y2 then + return false + end + i=i+1 + end + return true +end + +function dbg() + i=1 + l=table.getn(ObjectList) + while i<=l do + ox = ObjectList[i][1] + oy = ObjectList[i][2] + ox2 = ObjectList[i][3] + oy2 = ObjectList[i][4] + AddPoint(ox,oy,1) + AddPoint(ox2,oy) + AddPoint(ox2,oy2) + AddPoint(ox,oy2) + AddPoint(ox,oy) + AddPoint(ox2,oy2) + i=i+1 + end +end + +function onGameInit() + MapGen = 2 + TemplateFilter = 0 + TotGen = 0 + Tries = 0 + if band(GameFlags,gfBottomBorder) == 0 and GetRandom(2) == 0 then + AddPoint(-50,2010,7) + AddPoint(4150,2010) + for i = 0,GetRandom(3) do + x = GetRandom(4096) + w = GetRandom(40)+10 + AddPoint(x,2200,w,true) + AddPoint(x,1900) + table.insert(ObjectList,{x-div(w*9,2), + 2010-div(100,2), + x+div(w*9,2), + 2010+div(100,2)}) + end + end + + if GetRandom(2) == 0 then + l = GetRandom(3)+1 + w = GetRandom(200)+200 + h = GetRandom(350)+200 + x = GetRandom(4096-w*l) + DrawCones(x,w,h,l) + --if DrawCones(x,w,h,l) then TotGen = TotGen+1 + end + if GetRandom(2) == 0 then + for i = 1,GetRandom(5)+1 do + w = GetRandom(35)+15 + x = GetRandom(4096-w*12)+w + if GetRandom(2)==0 then + y = 2048-GetRandom(w*10+6) + else + y = 2048 + end + -- if AddPoint(x,y,w) then TotGetn = TotGen+1 + DrawCircle(x,y,w) + end + end + if GetRandom(2)==0 then + x = GetRandom(3300)+350 + y = GetRandom(1300)+350 + if DrawStar(x,y, 1, 1+GetRandom(2)*-2) then + TotGen = TotGen+1 + end + end + + while (TotGen < 6) and (Tries < 100) do + l = GetRandom(1000-Tries*10)+300 + x = GetRandom(3900-l)+100 + y = GetRandom(1900)+100 + if GetRandom(2)==0 then b = GetRandom(800)+300 + else b = 0 end + if GetRandom(2)==0 then t = GetRandom(800)+300 + else t = 0 end + if y-t < 50 then t = y - 50 end + if t < 200 then t = 0 end + if DrawPlateau(x,y,l,t,b) then + TotGen = TotGen+1 + end + Tries = Tries + 1 + end + Tries = 0 + while (TotGen < 17) and (Tries < 1000) do + if Tries < 500 and GetRandom(2)==0 then + x = GetRandom(3300)+350 + y = GetRandom(1300)+350 + if DrawStar(x,y, 1, 1+GetRandom(2)*-2) then + TotGen = TotGen+1 + end + else + if Tries > 500 then d = GetRandom(2)+3 + else d = GetRandom(3)+2 end + x = GetRandom(4000-div(700,d))+div(700,d*2) + y = GetRandom(1300-div(700,d))+div(700,d*2) + if DrawStar(x,y, d, 1+GetRandom(2)*-2) then + TotGen = TotGen+1 + end + end + w = GetRandom(35-div(Tries,29))+15 + x = GetRandom(4050-w*20)+w*10 + y = GetRandom(2000-w*20)+w*10 + if DrawCircle(x,y,w) then + TotGen = TotGen+1 + end + w = GetRandom(35-div(Tries,29))+5 + x = GetRandom(4050-w*20)+w*10 + y = GetRandom(2000-w*20)+w*10 + if DrawCrescent(x,y,w,GetRandom(2)==0) then + TotGen = TotGen+1 + end + Tries = Tries + 1 + end +-- Padding = div(Padding,2) +-- Tries = 0 +-- while (TotGen < 21) and (Tries < 10000) do +-- r = GetRandom(20-div(Tries,223))+5 +-- x = GetRandom(4050-r*20)+r*10 +-- y = GetRandom(2000-r*20)+r*10 +-- if DrawCircle(x,y,r) then +-- TotGen = TotGen+1 +-- end +-- Tries = Tries + 1 +-- end + --dbg() + FlushPoints() +end diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Sounds/frozen_hog_impact.ogg Binary file share/hedgewars/Data/Sounds/frozen_hog_impact.ogg has changed diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Sounds/hog_freeze.ogg Binary file share/hedgewars/Data/Sounds/hog_freeze.ogg has changed diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Sounds/ice_beam.ogg Binary file share/hedgewars/Data/Sounds/ice_beam.ogg has changed diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Sounds/voices/Default_uk/JustYouwait.ogg Binary file share/hedgewars/Data/Sounds/voices/Default_uk/JustYouwait.ogg has changed diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Sounds/voices/Default_uk/Justyouwait.ogg Binary file share/hedgewars/Data/Sounds/voices/Default_uk/Justyouwait.ogg has changed diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Themes/Bamboo/Flake.png Binary file share/hedgewars/Data/Themes/Bamboo/Flake.png has changed diff -r e095e3023682 -r 7f04ad2cda54 share/hedgewars/Data/Themes/Blox/LandBackTex.png Binary file share/hedgewars/Data/Themes/Blox/LandBackTex.png has changed diff -r e095e3023682 -r 7f04ad2cda54 tools/CMakeLists.txt --- a/tools/CMakeLists.txt Sun Apr 21 01:36:08 2013 +0200 +++ b/tools/CMakeLists.txt Wed May 29 22:52:37 2013 +0400 @@ -33,6 +33,7 @@ if(NOT NOPNG) #get the neme of the library (harmelss if it is static) string(REGEX REPLACE ".*/(.*)$" "\\1" PNG_LIBNAME "${PNG_LIBRARY}") + string(REGEX REPLACE ".*/(.*)$" "\\1" ZLIB_LIBNAME "${ZLIB_LIBRARY}") endif() set(frameworks_dir ${CMAKE_INSTALL_PREFIX}/${target_library_install_dir}) diff -r e095e3023682 -r 7f04ad2cda54 tools/CreateMacBundle.cmake.in --- a/tools/CreateMacBundle.cmake.in Sun Apr 21 01:36:08 2013 +0200 +++ b/tools/CreateMacBundle.cmake.in Wed May 29 22:52:37 2013 +0400 @@ -16,6 +16,7 @@ #same here, for libpng and hwengine, let's assume the version pulled by macdeployqt is the same #(yes libpng is pulled by macdeployqt even when NOVIDEOREC is active) execute_process(COMMAND install_name_tool -change ${PNG_LIBRARY} @executable_path/../Frameworks/${PNG_LIBNAME} ${engine_full_path}) + execute_process(COMMAND install_name_tool -change ${ZLIB_LIBRARY} @executable_path/../Frameworks/${ZLIB_LIBNAME} ${engine_full_path}) endif() if(doBundle EQUAL 1) diff -r e095e3023682 -r 7f04ad2cda54 tools/build_windows.bat --- a/tools/build_windows.bat Sun Apr 21 01:36:08 2013 +0200 +++ b/tools/build_windows.bat Wed May 29 22:52:37 2013 +0400 @@ -13,7 +13,8 @@ if %BUILD_TYPE%=="Debug" ( for %%G in (QtCored4 QtGuid4 QtNetworkd4) do xcopy /d/y %QTDIR%\%%G.dll %CD%\bin\ ) -for %%G in (QtCore4 QtGui4 QtNetwork4 libgcc_s_dw2-1 mingwm10) do ( +:: should you libgcc dynamically you should try adding libgcc_s_dw2-1 and mingwm10 +for %%G in (QtCore4 QtGui4 QtNetwork4) do ( xcopy /d/y %QTDIR%\%%G.dll %CD%\bin\ ) diff -r e095e3023682 -r 7f04ad2cda54 tools/w32DownloadUnzip.vbs --- a/tools/w32DownloadUnzip.vbs Sun Apr 21 01:36:08 2013 +0200 +++ b/tools/w32DownloadUnzip.vbs Wed May 29 22:52:37 2013 +0400 @@ -7,6 +7,7 @@ ' References ' http://superuser.com/questions/59465/is-it-possible-to-download-using-the-windows-command-line ' http://stackoverflow.com/questions/1021557/how-to-unzip-a-file-using-the-command-line +' http://stackoverflow.com/questions/424331/get-the-current-temporary-directory-path-in-vbscript Set ArgObj = WScript.Arguments @@ -23,7 +24,8 @@ End if End if -strHDLocation = "C:\Windows\Temp\temp.zip" +' Temporary directory +strHDLocation = WScript.CreateObject("Scripting.FileSystemObject").GetSpecialFolder(2) + "\hwlibtemp.zip" ' Fetch the file WScript.Echo ( "Trying to download from " & strFileURL) @@ -37,7 +39,7 @@ objADOStream.Type = 1 'adTypeBinary objADOStream.Write objXMLHTTP.ResponseBody - objADOStream.Position = 0 'Set the stream position to the start + objADOStream.Position = 0 'Set the stream position to the start Set objFSO = Createobject("Scripting.FileSystemObject") If objFSO.Fileexists(strHDLocation) Then objFSO.DeleteFile strHDLocation @@ -46,12 +48,12 @@ objADOStream.SaveToFile strHDLocation objADOStream.Close Set objADOStream = Nothing + Set objXMLHTTP = Nothing Else WScript.Echo ("Error downloading file (error code: " & objXMLHTTP.Status & ")") Set objXMLHTTP = Nothing WScript.Quit End if -Set objXMLHTTP = Nothing WScript.Echo ( "Extracting file to " & strOutputPath) Set objShell = CreateObject( "Shell.Application" )