From: <au...@us...> - 2012-01-20 01:14:22
|
Revision: 10696 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=10696&view=rev Author: auria Date: 2012-01-20 01:14:15 +0000 (Fri, 20 Jan 2012) Log Message: ----------- Improve where rescue will drop you in overworld Modified Paths: -------------- main/trunk/src/modes/linear_world.hpp main/trunk/src/modes/overworld.hpp main/trunk/src/modes/world.hpp main/trunk/src/tracks/track.cpp Modified: main/trunk/src/modes/linear_world.hpp =================================================================== --- main/trunk/src/modes/linear_world.hpp 2012-01-20 00:43:51 UTC (rev 10695) +++ main/trunk/src/modes/linear_world.hpp 2012-01-20 01:14:15 UTC (rev 10696) @@ -136,6 +136,9 @@ /** Returns if this race mode has bonus items. */ virtual bool haveBonusBoxes(){ return true; } // ------------------------------------------------------------------------ + /** Override settings from base class */ + virtual bool computeChecklineRequirements() const { return true; } + // ------------------------------------------------------------------------ /** Returns true if the kart is on a valid driveline quad. * \param kart_index Index of the kart. */ bool isOnRoad(unsigned int kart_index) const Modified: main/trunk/src/modes/overworld.hpp =================================================================== --- main/trunk/src/modes/overworld.hpp 2012-01-20 00:43:51 UTC (rev 10695) +++ main/trunk/src/modes/overworld.hpp 2012-01-20 01:14:15 UTC (rev 10696) @@ -66,7 +66,9 @@ // ------------------------------------------------------------------------ /** Override base class method */ virtual void onFirePressed(Controller* who); - + // ------------------------------------------------------------------------ + /** Override settings from base class */ + virtual bool computeChecklineRequirements() const { return false; } }; #endif Modified: main/trunk/src/modes/world.hpp =================================================================== --- main/trunk/src/modes/world.hpp 2012-01-20 00:43:51 UTC (rev 10695) +++ main/trunk/src/modes/world.hpp 2012-01-20 01:14:15 UTC (rev 10696) @@ -277,6 +277,10 @@ /** Override if you want to know when a kart presses fire */ virtual void onFirePressed(Controller* who) {} + /** Whether to compute checkline requirements for each world on the + * quadgraph. Override to change value. */ + virtual bool computeChecklineRequirements() const { return false; } + }; // World #endif Modified: main/trunk/src/tracks/track.cpp =================================================================== --- main/trunk/src/tracks/track.cpp 2012-01-20 00:43:51 UTC (rev 10695) +++ main/trunk/src/tracks/track.cpp 2012-01-20 01:14:15 UTC (rev 10696) @@ -1524,7 +1524,7 @@ irr_driver->getSceneManager()->getMeshCache()->getMeshCount(), irr_driver->getVideoDriver()->getTextureCount()); - if (dynamic_cast<LinearWorld*>(World::getWorld()) != NULL) + if (World::getWorld()->computeChecklineRequirements()) { QuadGraph::get()->setChecklineRequirements(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |