From: <au...@us...> - 2013-04-10 23:04:57
|
Revision: 12634 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=12634&view=rev Author: auria Date: 2013-04-10 23:04:51 +0000 (Wed, 10 Apr 2013) Log Message: ----------- Fix challenge orbs missing on overworld Modified Paths: -------------- main/trunk/src/tracks/track.cpp Modified: main/trunk/src/tracks/track.cpp =================================================================== --- main/trunk/src/tracks/track.cpp 2013-04-10 22:57:33 UTC (rev 12633) +++ main/trunk/src/tracks/track.cpp 2013-04-10 23:04:51 UTC (rev 12634) @@ -1109,6 +1109,7 @@ LODNode* lod_node = new LODNode("challenge_orb", irr_driver->getSceneManager()->getRootSceneNode(), irr_driver->getSceneManager()); + lod_node->setPosition(xyz); lod_node->add(50, scene_node, true /* reparent */); m_all_nodes.push_back( lod_node ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hik...@us...> - 2013-05-14 13:53:51
|
Revision: 12756 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=12756&view=rev Author: hikerstk Date: 2013-05-14 13:53:43 +0000 (Tue, 14 May 2013) Log Message: ----------- Fixed #973: the main track mesh added to the bullet physics twice, since the index 'main_track' was set at the wrong location (before the main track was loaded, see r9757). Also removed unnecessary loop when reading track.xml files. Revision Links: -------------- http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=9757&view=rev Modified Paths: -------------- main/trunk/src/tracks/track.cpp Modified: main/trunk/src/tracks/track.cpp =================================================================== --- main/trunk/src/tracks/track.cpp 2013-05-14 11:16:13 UTC (rev 12755) +++ main/trunk/src/tracks/track.cpp 2013-05-14 13:53:43 UTC (rev 12756) @@ -1406,30 +1406,24 @@ upwards_distance); } - unsigned int main_track_count = m_all_nodes.size(); unsigned int start_position_counter = 0; // we need to check for fog before loading the main track model - for(unsigned int i=0; i<root->getNumNodes(); i++) + if(const XMLNode *node = root->getNode("sun")) { - const XMLNode *node = root->getNode(i); - const std::string name = node->getName(); - - if(name=="sun") - { - node->get("xyz", &m_sun_position ); - node->get("ambient", &m_default_ambient_color); - node->get("sun-specular", &m_sun_specular_color); - node->get("sun-diffuse", &m_sun_diffuse_color); - node->get("fog", &m_use_fog); - node->get("fog-color", &m_fog_color); - node->get("fog-density", &m_fog_density); - node->get("fog-start", &m_fog_start); - node->get("fog-end", &m_fog_end); - } + node->get("xyz", &m_sun_position ); + node->get("ambient", &m_default_ambient_color); + node->get("sun-specular", &m_sun_specular_color); + node->get("sun-diffuse", &m_sun_diffuse_color); + node->get("fog", &m_use_fog); + node->get("fog-color", &m_fog_color); + node->get("fog-density", &m_fog_density); + node->get("fog-start", &m_fog_start); + node->get("fog-end", &m_fog_end); } loadMainTrack(*root); + unsigned int main_track_count = m_all_nodes.size(); LodNodeLoader lod_loader; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hik...@us...> - 2013-06-13 07:39:00
|
Revision: 12858 http://sourceforge.net/p/supertuxkart/code/12858 Author: hikerstk Date: 2013-06-13 07:38:57 +0000 (Thu, 13 Jun 2013) Log Message: ----------- Fix #199: speed of 0 makes water disappear. Modified Paths: -------------- main/trunk/src/tracks/track.cpp Modified: main/trunk/src/tracks/track.cpp =================================================================== --- main/trunk/src/tracks/track.cpp 2013-06-09 20:04:07 UTC (rev 12857) +++ main/trunk/src/tracks/track.cpp 2013-06-13 07:38:57 UTC (rev 12858) @@ -1238,6 +1238,15 @@ float wave_length = 10.0f; node.get("height", &wave_height); node.get("speed", &wave_speed); + if(wave_speed==0) + { + // A speed of 0 results in a division by zero, so avoid this. + // The actual time for a wave from one maximum to the next is + // given by 2*M_PI*speed/1000. + Log::warn("Track", + "Wave-speed is 0, resetting it to the default of 300."); + wave_speed =300.0f; + } node.get("length", &wave_length); scene::ISceneNode* scene_node = NULL; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hik...@us...> - 2013-06-13 10:49:16
|
Revision: 12859 http://sourceforge.net/p/supertuxkart/code/12859 Author: hikerstk Date: 2013-06-13 10:49:14 +0000 (Thu, 13 Jun 2013) Log Message: ----------- Added support for specifying the 'time' for waves, since the old way of using 'speed' it is very hard to make sense of the value (2*pi*speed/1000 = time in seconds). This still needs to be supported in the exporter though. Modified Paths: -------------- main/trunk/src/tracks/track.cpp Modified: main/trunk/src/tracks/track.cpp =================================================================== --- main/trunk/src/tracks/track.cpp 2013-06-13 07:38:57 UTC (rev 12858) +++ main/trunk/src/tracks/track.cpp 2013-06-13 10:49:14 UTC (rev 12859) @@ -1237,14 +1237,20 @@ float wave_speed = 300.0f; float wave_length = 10.0f; node.get("height", &wave_height); - node.get("speed", &wave_speed); + float time; + if(node.get("time", &time)) + { + wave_speed = time * 1000.0f/(2.0f*M_PI); + } + else + node.get("speed", &wave_speed); if(wave_speed==0) { // A speed of 0 results in a division by zero, so avoid this. // The actual time for a wave from one maximum to the next is // given by 2*M_PI*speed/1000. Log::warn("Track", - "Wave-speed is 0, resetting it to the default of 300."); + "Wave-speed or time is 0, resetting it to the default."); wave_speed =300.0f; } node.get("length", &wave_length); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hik...@us...> - 2013-07-10 22:47:56
|
Revision: 13166 http://sourceforge.net/p/supertuxkart/code/13166 Author: hikerstk Date: 2013-07-10 22:47:53 +0000 (Wed, 10 Jul 2013) Log Message: ----------- Fixed indentation. Modified Paths: -------------- main/trunk/src/tracks/track.cpp Modified: main/trunk/src/tracks/track.cpp =================================================================== --- main/trunk/src/tracks/track.cpp 2013-07-10 22:47:12 UTC (rev 13165) +++ main/trunk/src/tracks/track.cpp 2013-07-10 22:47:53 UTC (rev 13166) @@ -2068,17 +2068,17 @@ } - btTransform t = kart->getBody()->getCenterOfMassTransform(); - // The computer offset is slightly too large, it should take - // the default suspension rest insteat of suspension rest (i.e. the - // length of the suspension with the weight of the kart resting on - // it). On the other hand this initial bouncing looks nice imho - // - so I'll leave it in for now. - float offset = kart->getKartProperties()->getSuspensionRest() + - kart->getKartProperties()->getWheelRadius(); - t.setOrigin(hit_point+Vec3(0, offset, 0) ); - kart->getBody()->setCenterOfMassTransform(t); - kart->setTrans(t); + btTransform t = kart->getBody()->getCenterOfMassTransform(); + // The computer offset is slightly too large, it should take + // the default suspension rest insteat of suspension rest (i.e. the + // length of the suspension with the weight of the kart resting on + // it). On the other hand this initial bouncing looks nice imho + // - so I'll leave it in for now. + float offset = kart->getKartProperties()->getSuspensionRest() + + kart->getKartProperties()->getWheelRadius(); + t.setOrigin(hit_point+Vec3(0, offset, 0) ); + kart->getBody()->setCenterOfMassTransform(t); + kart->setTrans(t); return true; } // findGround This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <de...@us...> - 2013-08-31 07:51:41
|
Revision: 13613 http://sourceforge.net/p/supertuxkart/code/13613 Author: deveee Date: 2013-08-31 07:51:37 +0000 (Sat, 31 Aug 2013) Log Message: ----------- Add patch by lennartack to avoid segfault when game is running with --no-graphics parameter Ticket #1029 Modified Paths: -------------- main/trunk/src/tracks/track.cpp Modified: main/trunk/src/tracks/track.cpp =================================================================== --- main/trunk/src/tracks/track.cpp 2013-08-31 02:06:56 UTC (rev 13612) +++ main/trunk/src/tracks/track.cpp 2013-08-31 07:51:37 UTC (rev 13613) @@ -494,8 +494,16 @@ core::dimension2du size = m_mini_map_size .getOptimalSize(!nonpower,!nonsquare); m_mini_map = QuadGraph::get()->makeMiniMap(size, "minimap::"+m_ident); - m_minimap_x_scale = float(m_mini_map_size.Width) / float(m_mini_map->getSize().Width); - m_minimap_y_scale = float(m_mini_map_size.Height) / float(m_mini_map->getSize().Height); + if (m_mini_map) + { + m_minimap_x_scale = float(m_mini_map_size.Width) / float(m_mini_map->getSize().Width); + m_minimap_y_scale = float(m_mini_map_size.Height) / float(m_mini_map->getSize().Height); + } + else + { + m_minimap_x_scale = 0; + m_minimap_y_scale = 0; + } } } // loadQuadGraph // ----------------------------------------------------------------------------- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <de...@us...> - 2013-10-29 07:38:37
|
Revision: 14342 http://sourceforge.net/p/supertuxkart/code/14342 Author: deveee Date: 2013-10-29 07:38:34 +0000 (Tue, 29 Oct 2013) Log Message: ----------- Check if a track really has easter egg mode. Eggs, but more colorful ;) Modified Paths: -------------- main/trunk/src/tracks/track.cpp Modified: main/trunk/src/tracks/track.cpp =================================================================== --- main/trunk/src/tracks/track.cpp 2013-10-29 06:22:03 UTC (rev 14341) +++ main/trunk/src/tracks/track.cpp 2013-10-29 07:38:34 UTC (rev 14342) @@ -387,7 +387,21 @@ std::string dir = StringUtils::getPath(m_filename); std::string easter_name = dir+"/easter_eggs.xml"; - m_has_easter_eggs = file_manager->fileExists(easter_name); + + XMLNode *easter = file_manager->createXMLTree(easter_name); + + if(easter) + { + for(unsigned int i=0; i<easter->getNumNodes(); i++) + { + const XMLNode *eggs = easter->getNode(i); + if(eggs->getNumNodes() > 0) + { + m_has_easter_eggs = true; + break; + } + } + } } // loadTrackInfo //----------------------------------------------------------------------------- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <au...@us...> - 2013-12-31 19:49:58
|
Revision: 14857 http://sourceforge.net/p/supertuxkart/code/14857 Author: auria Date: 2013-12-31 19:49:53 +0000 (Tue, 31 Dec 2013) Log Message: ----------- Add support for a new way of loading LOD definitions, that should eventually fully replace the previous method (instead of exporting LOD definitions as standard objects that can appear anywhere in the XML file, group them in a <lod> section, this way we can load all LOD definitions right at the start of the load sequence, instead of the delayed creation hacks we do atm). Old code still in place for now, since we have a lot of tracks using the old way Modified Paths: -------------- main/trunk/src/tracks/track.cpp Modified: main/trunk/src/tracks/track.cpp =================================================================== --- main/trunk/src/tracks/track.cpp 2013-12-31 19:22:05 UTC (rev 14856) +++ main/trunk/src/tracks/track.cpp 2013-12-31 19:49:53 UTC (rev 14857) @@ -789,7 +789,7 @@ m_track_mesh = new TriangleMesh(); m_gfx_effect_mesh = new TriangleMesh(); - const XMLNode *track_node= root.getNode("track"); + const XMLNode *track_node = root.getNode("track"); std::string model_name; track_node->get("model", &model_name); std::string full_path = m_root+model_name; @@ -856,8 +856,25 @@ LodNodeLoader lodLoader; - for(unsigned int i=0; i<track_node->getNumNodes(); i++) + // Load LOD groups + const XMLNode *lod_xml_node = root.getNode("lod"); + if (lod_xml_node != NULL) { + for (unsigned int i = 0; i < lod_xml_node->getNumNodes(); i++) + { + const XMLNode* lod_group_xml = lod_xml_node->getNode(i); + for (unsigned int j = 0; j < lod_group_xml->getNumNodes(); j++) + { + // TODO: eventually, remove support for the old way of specifying LOD + // definitions among node, and support only the new way of using + // a <lod> section. Then, the LOD loading sequence can be simplified a lot + lodLoader.check(lod_group_xml->getNode(j), NULL); + } + } + } + + for (unsigned int i=0; i<track_node->getNumNodes(); i++) + { const XMLNode *n=track_node->getNode(i); // Animated textures have already been handled if(n->getName()=="animated-texture") continue; @@ -1763,6 +1780,23 @@ file_manager->pushTextureSearchPath(lib_path + "/"); file_manager->pushModelSearchPath (lib_path); library_nodes[name] = libroot; + + // Load LOD groups + const XMLNode *lod_xml_node = libroot->getNode("lod"); + if (lod_xml_node != NULL) + { + for (unsigned int i = 0; i < lod_xml_node->getNumNodes(); i++) + { + const XMLNode* lod_group_xml = lod_xml_node->getNode(i); + for (unsigned int j = 0; j < lod_group_xml->getNumNodes(); j++) + { + // TODO: eventually, remove support for the old way of specifying LOD + // definitions among node, and support only the new way of using + // a <lod> section. Then, the LOD loading sequence can be simplified a lot + lod_loader.check(lod_group_xml->getNode(j), NULL); + } + } + } } else { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <au...@us...> - 2013-12-31 20:27:18
|
Revision: 14860 http://sourceforge.net/p/supertuxkart/code/14860 Author: auria Date: 2013-12-31 20:27:13 +0000 (Tue, 31 Dec 2013) Log Message: ----------- Do not report the new <lod> XML node as an unknown node type Modified Paths: -------------- main/trunk/src/tracks/track.cpp Modified: main/trunk/src/tracks/track.cpp =================================================================== --- main/trunk/src/tracks/track.cpp 2013-12-31 20:26:47 UTC (rev 14859) +++ main/trunk/src/tracks/track.cpp 2013-12-31 20:27:13 UTC (rev 14860) @@ -1900,6 +1900,10 @@ { // handled above } + else if (name == "lod") + { + // handled above + } else if (name == "subtitles") { std::vector<XMLNode*> subtitles; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <au...@us...> - 2014-01-02 01:42:50
|
Revision: 14886 http://sourceforge.net/p/supertuxkart/code/14886 Author: auria Date: 2014-01-02 01:42:45 +0000 (Thu, 02 Jan 2014) Log Message: ----------- support rotation and scale on library objects Modified Paths: -------------- main/trunk/src/tracks/track.cpp Modified: main/trunk/src/tracks/track.cpp =================================================================== --- main/trunk/src/tracks/track.cpp 2014-01-02 01:35:42 UTC (rev 14885) +++ main/trunk/src/tracks/track.cpp 2014-01-02 01:42:45 UTC (rev 14886) @@ -1735,6 +1735,12 @@ core::vector3df xyz; node->get("xyz", &xyz); + core::vector3df hpr; + node->get("hpr", &hpr); + + core::vector3df scale; + node->get("scale", &scale); + XMLNode* libroot; std::string lib_path = file_manager->getAsset("library/" + name); bool create_lod_definitions = true; @@ -1776,6 +1782,8 @@ scene::ISceneNode* parent = irr_driver->getSceneManager()->addEmptySceneNode(); parent->setPosition(xyz); + parent->setRotation(hpr); + parent->setScale(scale); parent->updateAbsolutePosition(); loadObjects(libroot, lib_path, lod_loader, create_lod_definitions, parent, library_nodes); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <au...@us...> - 2014-01-02 23:44:16
|
Revision: 14895 http://sourceforge.net/p/supertuxkart/code/14895 Author: auria Date: 2014-01-02 23:44:13 +0000 (Thu, 02 Jan 2014) Log Message: ----------- Bugfix with new lod Modified Paths: -------------- main/trunk/src/tracks/track.cpp Modified: main/trunk/src/tracks/track.cpp =================================================================== --- main/trunk/src/tracks/track.cpp 2014-01-02 20:01:09 UTC (rev 14894) +++ main/trunk/src/tracks/track.cpp 2014-01-02 23:44:13 UTC (rev 14895) @@ -609,6 +609,7 @@ "This track contains an empty LOD group."); return; } + node->updateAbsolutePosition(); } node->updateAbsolutePosition(); @@ -1084,6 +1085,7 @@ node->setPosition(xyz); node->setRotation(hpr); node->setScale(scale); + node->updateAbsolutePosition(); m_all_nodes.push_back( node ); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <au...@us...> - 2014-01-06 23:29:16
|
Revision: 14946 http://sourceforge.net/p/supertuxkart/code/14946 Author: auria Date: 2014-01-06 23:29:12 +0000 (Mon, 06 Jan 2014) Log Message: ----------- load material.xml from libraries Modified Paths: -------------- main/trunk/src/tracks/track.cpp Modified: main/trunk/src/tracks/track.cpp =================================================================== --- main/trunk/src/tracks/track.cpp 2014-01-06 22:58:04 UTC (rev 14945) +++ main/trunk/src/tracks/track.cpp 2014-01-06 23:29:12 UTC (rev 14946) @@ -1761,6 +1761,7 @@ file_manager->pushTextureSearchPath(lib_path + "/"); file_manager->pushModelSearchPath (lib_path); + material_manager->pushTempMaterial(lib_path + "/materials.xml"); library_nodes[name] = libroot; // Load LOD groups This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hik...@us...> - 2014-01-07 05:48:21
|
Revision: 14959 http://sourceforge.net/p/supertuxkart/code/14959 Author: hikerstk Date: 2014-01-07 05:48:16 +0000 (Tue, 07 Jan 2014) Log Message: ----------- Fixed #1143 - untextured ground is not a valid start position. Modified Paths: -------------- main/trunk/src/tracks/track.cpp Modified: main/trunk/src/tracks/track.cpp =================================================================== --- main/trunk/src/tracks/track.cpp 2014-01-07 02:22:03 UTC (rev 14958) +++ main/trunk/src/tracks/track.cpp 2014-01-07 05:48:16 UTC (rev 14959) @@ -2210,7 +2210,7 @@ bool over_ground = m_track_mesh->castRay(kart->getXYZ(), to, &hit_point, &m, &normal); const Vec3 &xyz = kart->getXYZ(); - if(!over_ground || !m) + if(!over_ground) { Log::warn("physics", "Kart at (%f %f %f) can not be dropped.", xyz.getX(),xyz.getY(),xyz.getZ()); @@ -2219,11 +2219,11 @@ // Check if the material the kart is about to be placed on would trigger // a reset. If so, this is not a valid position. - if(m->isDriveReset()) + if(m && m->isDriveReset()) { Log::warn("physics","Kart at (%f %f %f) over reset terrain '%s'", xyz.getX(),xyz.getY(),xyz.getZ(), - m->getTexFname().c_str()); + m->getTexFname().c_str()); return false; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |