r7440 - in packages/trunk/supertuxkart/debian: . patches

Christoph Egger christoph-guest at alioth.debian.org
Thu Jun 19 17:00:53 UTC 2008


Author: christoph-guest
Date: 2008-06-19 17:00:52 +0000 (Thu, 19 Jun 2008)
New Revision: 7440

Added:
   packages/trunk/supertuxkart/debian/patches/bug1996464.patch
Modified:
   packages/trunk/supertuxkart/debian/changelog
   packages/trunk/supertuxkart/debian/patches/series
Log:
 * Multiplayerbugfix + appropriate changelog entry


Modified: packages/trunk/supertuxkart/debian/changelog
===================================================================
--- packages/trunk/supertuxkart/debian/changelog	2008-06-18 22:24:04 UTC (rev 7439)
+++ packages/trunk/supertuxkart/debian/changelog	2008-06-19 17:00:52 UTC (rev 7440)
@@ -1,4 +1,4 @@
-supertuxkart (0.5-1) UNRELEASED; urgency=low
+supertuxkart (0.5-1) unstable; urgency=low
 
   * New upstream release (Closes: #484326)
     * Upstream no longer ships .desktop file 
@@ -6,8 +6,12 @@
   * Bumping Standards Version to 3.8.0
     * Adding debian/README.source
   * Adding myself to Uploaders
+  * Fixing multiplayer bug (First player gets
+    playerkart with best ranking after first map
+	in grandprix
+	* bug1996464.patch (from upstream bugtracker)
 
- -- Christoph Egger <Christoph.Egger at gmx.de>  Sat, 14 Jun 2008 17:35:28 +0200
+ -- Christoph Egger <Christoph.Egger at gmx.de>  Thu, 19 Jun 2008 18:58:49 +0200
 
 supertuxkart (0.4-1) unstable; urgency=low
 

Added: packages/trunk/supertuxkart/debian/patches/bug1996464.patch
===================================================================
--- packages/trunk/supertuxkart/debian/patches/bug1996464.patch	                        (rev 0)
+++ packages/trunk/supertuxkart/debian/patches/bug1996464.patch	2008-06-19 17:00:52 UTC (rev 7440)
@@ -0,0 +1,59 @@
+diff -Naur supertuxkart-0.5/src/race_manager.hpp supertuxkart-0.5-patched/src/race_manager.hpp
+--- supertuxkart-0.5/src/race_manager.hpp	2008-05-31 09:07:09.000000000 +0200
++++ supertuxkart-0.5-patched/src/race_manager.hpp	2008-06-18 20:10:50.000000000 +0200
+@@ -128,6 +128,7 @@
+     const std::string& getHerringStyle() const 
+                                              { return m_cup.getHerringStyle();   }
+     int     getKartScore(int krt)      const { return m_kart_status[krt].m_score;}
++    int     getKartPlayerId(int krt) const {return m_kart_status[krt].m_player_id;}
+     int     getPositionScore(int p)    const { return m_score_for_position[p-1]; }
+     double  getOverallTime(int kart)   const { return m_kart_status[kart].m_overall_time;}
+     int     getCoinTarget()            const { return m_coin_target;            }
+diff -Naur supertuxkart-0.5/src/world.cpp supertuxkart-0.5-patched/src/world.cpp
+--- supertuxkart-0.5/src/world.cpp	2008-05-31 09:07:09.000000000 +0200
++++ supertuxkart-0.5-patched/src/world.cpp	2008-06-18 20:10:18.000000000 +0200
+@@ -95,7 +95,8 @@
+     // karts can be positioned properly on (and not in) the tracks.
+     loadTrack() ;
+ 
+-    int playerIndex = 0;
++    m_player_karts.reserve(race_manager->getNumPlayers());
++
+     for(unsigned int i=0; i<race_manager->getNumKarts(); i++)
+     {
+         int position = i+1;   // position start with 1
+@@ -103,16 +104,18 @@
+         m_track->getStartCoords(i, &init_pos);
+         Kart* newkart;
+         const std::string& kart_name=race_manager->getKartName(i);
++        int playerId = race_manager->getKartPlayerId(i);
++
+         if(user_config->m_profile)
+         {
+             // In profile mode, load only the old kart
+             newkart = new DefaultRobot(kart_name, position, init_pos);
+     	    // Create a camera for the last kart (since this way more of the 
+-	        // karts can be seen.
++            // karts can be seen.
+             if(i==race_manager->getNumKarts()-1) 
+             {
+                 btVector3 startpos(init_pos.xyz[0], init_pos.xyz[1], init_pos.xyz[2]);
+-                scene->createCamera(playerIndex, newkart);
++                scene->createCamera(0, newkart);
+             }
+         }
+         else
+@@ -120,10 +123,9 @@
+             if (race_manager->isPlayer(i))
+             {
+                 newkart = new PlayerKart(kart_name, position,
+-                                         &(user_config->m_player[playerIndex]),
+-                                         init_pos, playerIndex);
+-                m_player_karts.push_back((PlayerKart*)newkart);
+-                playerIndex++;
++                                         &(user_config->m_player[playerId]),
++                                         init_pos, playerId);
++                m_player_karts[playerId] = (PlayerKart*)newkart;
+             }
+             else
+             {

Modified: packages/trunk/supertuxkart/debian/patches/series
===================================================================
--- packages/trunk/supertuxkart/debian/patches/series	2008-06-18 22:24:04 UTC (rev 7439)
+++ packages/trunk/supertuxkart/debian/patches/series	2008-06-19 17:00:52 UTC (rev 7440)
@@ -0,0 +1 @@
+bug1996464.patch




More information about the Pkg-games-commits mailing list