Changeset 5652 for code/branches/resource2/src/orxonox
- Timestamp:
- Aug 17, 2009, 3:35:34 PM (15 years ago)
- Location:
- code/branches/resource2/src/orxonox
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/resource2/src/orxonox/gamestates/GSDedicated.cc
r3370 r5652 28 28 29 29 #include "GSDedicated.h" 30 31 #include <iomanip> 32 #include <iostream> 33 #include <boost/bind.hpp> 30 34 31 35 #include "util/Debug.h" … … 37 41 #include "core/GameMode.h" 38 42 #include "network/Server.h" 39 40 #include <iostream>41 #include <iomanip>42 #include <boost/bind.hpp>43 43 44 44 #ifdef ORXONOX_PLATFORM_UNIX -
code/branches/resource2/src/orxonox/tools/ResourceCollection.cc
r5624 r5652 36 36 namespace orxonox 37 37 { 38 CreateFactory(ResourceCollection); 39 38 40 ResourceCollection::ResourceCollection(BaseObject* creator) 39 41 : BaseObject(creator) -
code/branches/resource2/src/orxonox/tools/ResourceLocation.cc
r5624 r5652 30 30 31 31 #include <OgreResourceGroupManager.h> 32 #include <boost/filesystem.hpp> 33 32 34 #include "util/Exception.h" 35 #include "core/Core.h" 33 36 #include "core/CoreIncludes.h" 37 #include "core/XMLFile.h" 34 38 #include "core/XMLPort.h" 35 39 36 40 namespace orxonox 37 41 { 42 CreateFactory(ResourceLocation); 43 38 44 ResourceLocation::ResourceLocation(BaseObject* creator) 39 45 : BaseObject(creator) … … 43 49 // Default values 44 50 archiveType_ = "FileSystem"; 45 bRecursive_ = false;51 bRecursive_ = true; 46 52 } 47 53 … … 63 69 if (path_.empty()) 64 70 ThrowException(InitialisationFailed, "ResourceLocation: Trying to add one without the path being set"); 71 72 // Find the path 73 boost::filesystem::path path; 74 if (boost::filesystem::exists(Core::getDataPath() / this->getPath())) 75 path = Core::getDataPath() / this->getPath(); 76 else if (Core::isDevelopmentRun() && boost::filesystem::exists(Core::getExternalDataPath() / this->getPath())) 77 path = Core::getExternalDataPath() / this->getPath(); 78 else 79 { 80 COUT(2) << "Warning: ResourceLocation '" << this->getPath() << "' does not seem to exist" << std::endl; 81 return; 82 } 83 65 84 // Add it to the Ogre paths 66 85 Ogre::ResourceGroupManager::getSingleton().addResourceLocation( 67 this->getPath(), this->getArchiveType(), resourceGroup, this->getRecursive());86 path.string(), this->getArchiveType(), resourceGroup, this->getRecursive()); 68 87 resourceGroup_ = resourceGroup; 69 88 }
Note: See TracChangeset
for help on using the changeset viewer.