diff --git a/data/gui/edit_track.stkgui b/data/gui/edit_track.stkgui index 89d48f18c..115adfdb9 100644 --- a/data/gui/edit_track.stkgui +++ b/data/gui/edit_track.stkgui @@ -2,25 +2,26 @@
-
- - + + - + -
+
@@ -40,8 +41,10 @@
+ + -
+
+ +
diff --git a/data/gui/general_text_field_dialog.stkgui b/data/gui/general_text_field_dialog.stkgui index d910cc997..9bec063dd 100644 --- a/data/gui/general_text_field_dialog.stkgui +++ b/data/gui/general_text_field_dialog.stkgui @@ -3,13 +3,13 @@
diff --git a/data/gui/grand_prix_editor.stkgui b/data/gui/grand_prix_editor.stkgui index c27c72dc6..71b72cc36 100644 --- a/data/gui/grand_prix_editor.stkgui +++ b/data/gui/grand_prix_editor.stkgui @@ -7,9 +7,9 @@
- + - + @@ -20,7 +20,7 @@ - +
-
- - +
+ + -
-
diff --git a/data/gui/online/online.stkgui b/data/gui/online/online.stkgui index d10cce826..6a9e0030e 100644 --- a/data/gui/online/online.stkgui +++ b/data/gui/online/online.stkgui @@ -6,13 +6,13 @@
diff --git a/src/graphics/cpu_particle_manager.cpp b/src/graphics/cpu_particle_manager.cpp index 3b5026428..582d34775 100644 --- a/src/graphics/cpu_particle_manager.cpp +++ b/src/graphics/cpu_particle_manager.cpp @@ -137,6 +137,8 @@ CPUParticleManager::GLParticle::GLParticle(bool flips) // ---------------------------------------------------------------------------- CPUParticleManager::CPUParticleManager() { + assert(CVS->isGLSL()); + const float vertices[] = { -0.5f, 0.5f, 0.0f, 0.0f, @@ -150,11 +152,8 @@ CPUParticleManager::CPUParticleManager() glBindBuffer(GL_ARRAY_BUFFER, 0); // For preloading shaders - if (CVS->isGLSL()) - { - ParticleRenderer::getInstance(); - AlphaTestParticleRenderer::getInstance(); - } + ParticleRenderer::getInstance(); + AlphaTestParticleRenderer::getInstance(); } // CPUParticleManager // ---------------------------------------------------------------------------- diff --git a/src/items/network_item_manager.cpp b/src/items/network_item_manager.cpp index b1070f228..383a2a73c 100644 --- a/src/items/network_item_manager.cpp +++ b/src/items/network_item_manager.cpp @@ -137,17 +137,17 @@ Item* NetworkItemManager::dropNewItem(ItemState::ItemType type, // Server: store the data for this event: m_item_events.lock(); m_item_events.getData().emplace_back(World::getWorld()->getTicksSinceStart(), - type, item->getItemId(), - kart->getWorldKartId(), - kart->getXYZ()); + type, item->getItemId(), + kart->getWorldKartId(), + kart->getXYZ() ); m_item_events.unlock(); return item; } // newItem // ---------------------------------------------------------------------------- /** Called by the GameProtocol when a confirmation for an item event is - * received by a host. Once all hosts have confirmed an event, it can be - * deleted and won't be send to any clients again. + * received by the server. Once all hosts have confirmed an event, it can be + * deleted and won't be sent to any clients again. * \param peer Peer confirming the latest event time received. * \param ticks Time at which the last event was received. */ @@ -251,8 +251,8 @@ void NetworkItemManager::restoreState(BareNetworkString *buffer, int count) // forward this confirmed state to the current time (i.e. world time). // This is done in several steps: // 1) First remove all client-side predicted items from the list of all - // items, and store them for now in a predictem_item cache. Predicted - // item only happen between m_confirmed_state_time and 'now'. + // items. Predicted item only happen between m_confirmed_state_time + // and 'now'. // 2) Apply all events included in this state to the confirmed state. // a) When a collection event is found, adjust the confirmed item state // only (this state will later be copied to the current item state). @@ -338,7 +338,7 @@ void NetworkItemManager::restoreState(BareNetworkString *buffer, int count) gp->sendItemEventConfirmation(World::getWorld()->getTicksSinceStart()); } - // Forward the confirmed item state till the world time: + // Forward the confirmed item state to the world time: int dt = World::getWorld()->getTicksSinceStart() - current_time; if(dt>0) forwardTime(dt); @@ -359,6 +359,7 @@ void NetworkItemManager::restoreState(BareNetworkString *buffer, int count) item_new->setPredicted(false); item_new->setItemId(i); m_all_items[i] = item_new; + *((ItemState*)m_all_items[i]) = *is; } else if (!is && item) { diff --git a/src/states_screens/dialogs/ghost_replay_info_dialog.cpp b/src/states_screens/dialogs/ghost_replay_info_dialog.cpp index cf377ed7a..06b103542 100644 --- a/src/states_screens/dialogs/ghost_replay_info_dialog.cpp +++ b/src/states_screens/dialogs/ghost_replay_info_dialog.cpp @@ -75,7 +75,7 @@ GhostReplayInfoDialog::GhostReplayInfoDialog(unsigned int replay_id, /* Used to display kart icons for the selected replay(s) */ irr::gui::STKModifiedSpriteBank *icon_bank = GhostReplaySelection::getInstance()->getIconBank(); - int icon_height = getHeight()/18.0f; + int icon_height = getHeight()/18; m_replay_info_widget->setIcons(icon_bank, (int)icon_height); updateReplayDisplayedInfo(); diff --git a/src/states_screens/ghost_replay_selection.cpp b/src/states_screens/ghost_replay_selection.cpp index 770081413..90993de21 100644 --- a/src/states_screens/ghost_replay_selection.cpp +++ b/src/states_screens/ghost_replay_selection.cpp @@ -160,7 +160,7 @@ void GhostReplaySelection::init() m_icon_unknown_kart = m_icon_bank->addTextureAsSprite(kart_not_found); - int icon_height = getHeight()/24.0f; + int icon_height = getHeight()/24; // 128 is the height of the image file //FIXME : this isn't guaranteed // Amanda's icon is 300x300 diff --git a/src/states_screens/soccer_setup_screen.cpp b/src/states_screens/soccer_setup_screen.cpp index 80db9cc98..520f09097 100644 --- a/src/states_screens/soccer_setup_screen.cpp +++ b/src/states_screens/soccer_setup_screen.cpp @@ -120,11 +120,11 @@ void SoccerSetupScreen::beforeAddingWidget() // Add red/blue team icon above the karts IconButtonWidget* red = getWidget("red_team"); IconButtonWidget* blue = getWidget("blue_team"); - red->m_x = central_div->m_x + central_div->m_w/4; - red->m_y = central_div->m_y + red->m_h; + red->m_x = central_div->m_x + central_div->m_w/4 - red->m_w/2; + red->m_y = central_div->m_y + (int)(red->m_h * 0.5f); - blue->m_x = central_div->m_x + (central_div->m_w/4)*3; - blue->m_y = central_div->m_y + blue->m_h; + blue->m_x = central_div->m_x + (central_div->m_w/4)*3 - blue->m_w/2; + blue->m_y = central_div->m_y + (int)(blue->m_h * 0.5f); // Add the 3D views for the karts int nb_players = race_manager->getNumPlayers(); @@ -463,7 +463,7 @@ void SoccerSetupScreen::updateKartViewsLayout() // Compute/get some dimensions const int nb_columns = 2; // two karts maximum per column - const int kart_area_width = (central_div->m_w) / 2; // size of one half of the screen + const int kart_area_width = (int)((central_div->m_w) / 2 * 0.8f); // size of one half of the screen with some margin const int kart_view_size = kart_area_width/nb_columns; // Size (width and height) of a kart view const int center_x = central_div->m_x + central_div->m_w/2; const int center_y = central_div->m_y + central_div->m_h/2; diff --git a/src/tracks/track.cpp b/src/tracks/track.cpp index 874119bdc..982c71358 100644 --- a/src/tracks/track.cpp +++ b/src/tracks/track.cpp @@ -308,12 +308,13 @@ void Track::cleanup() Graph::destroy(); ItemManager::destroy(); #ifndef SERVER_ONLY - if (!ProfileWorld::isNoGraphics()) - { - CPUParticleManager::getInstance()->cleanMaterialMap(); - } if (CVS->isGLSL()) { + if (!ProfileWorld::isNoGraphics()) + { + CPUParticleManager::getInstance()->cleanMaterialMap(); + } + SP::resetEmptyFogColor(); } ParticleKindManager::get()->cleanUpTrackSpecificGfx();