Revision: 9848
http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=9848&view=rev
Author: hikerstk
Date: 2011-09-15 12:42:23 +0000 (Thu, 15 Sep 2011)
Log Message:
-----------
Minor cosmetic changes.
Modified Paths:
--------------
main/trunk/src/tracks/track_object.cpp
Modified: main/trunk/src/tracks/track_object.cpp
===================================================================
--- main/trunk/src/tracks/track_object.cpp 2011-09-15 02:10:49 UTC (rev 9847)
+++ main/trunk/src/tracks/track_object.cpp 2011-09-15 12:42:23 UTC (rev 9848)
@@ -55,8 +55,8 @@
std::string sound;
xml_node.get("sound", &sound );
- // FIXME: at this time sound emitters are just disabled in multiplayer otherwise
- // the sounds would be constantly heard
+ // FIXME: at this time sound emitters are just disabled in multiplayer
+ // otherwise the sounds would be constantly heard
if (sound.size() > 0 && race_manager->getNumLocalPlayers() == 1)
{
float rolloff = 0.5;
@@ -79,11 +79,13 @@
}
else
{
- fprintf(stderr, "[TrackObject] Sound emitter object could not be created\n");
+ fprintf(stderr,
+ "[TrackObject] Sound emitter object could not be created\n");
}
}
- // Some animated objects (billboards, sound emitters) don't use this scene node
+ // Some animated objects (billboards, sound emitters)
+ // don't use this scene node
if (model_name == "")
{
m_node = NULL;
@@ -91,7 +93,8 @@
}
else
{
- std::string full_path = World::getWorld()->getTrack()->getTrackFile(model_name);
+ std::string full_path =
+ World::getWorld()->getTrack()->getTrackFile(model_name);
if(file_manager->fileExists(full_path))
{
m_mesh = irr_driver->getAnimatedMesh(full_path);
@@ -104,7 +107,8 @@
m_mesh = irr_driver->getAnimatedMesh(full_path);
if(!m_mesh)
{
- fprintf(stderr, "Warning: '%s' in '%s' not found and is ignored.\n",
+ fprintf(stderr,
+ "Warning: '%s' in '%s' not found and is ignored.\n",
xml_node.getName().c_str(), model_name.c_str());
return;
} // if(!m_mesh)
@@ -112,7 +116,8 @@
m_mesh->grab();
irr_driver->grabAllTextures(m_mesh);
- scene::IAnimatedMeshSceneNode *node=irr_driver->addAnimatedMesh(m_mesh);
+ scene::IAnimatedMeshSceneNode *node =
+ irr_driver->addAnimatedMesh(m_mesh);
m_node = node;
#ifdef DEBUG
std::string debug_name = model_name+" (track-object)";
@@ -187,7 +192,9 @@
} // TrackObject
// ----------------------------------------------------------------------------
-
+/** Destructor. Removes the node from the scene graph, and also
+ * drops the textures of the mesh. Sound buffers are also freed.
+ */
TrackObject::~TrackObject()
{
if(m_node)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|