diff options
author | Perttu Ahola <celeron55@gmail.com> | 2012-03-25 14:47:51 +0300 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2012-03-25 14:48:22 +0300 |
commit | 1cac1de3b27c5c6a511bf86bd9cb1d763c5c7d5d (patch) | |
tree | db4e9d92380de549834efc6b50603ac933127c7a /src/tile.cpp | |
parent | 524c78a8d696e2ff980db7c60272032b4028864b (diff) | |
download | minetest-1cac1de3b27c5c6a511bf86bd9cb1d763c5c7d5d.tar.gz minetest-1cac1de3b27c5c6a511bf86bd9cb1d763c5c7d5d.tar.bz2 minetest-1cac1de3b27c5c6a511bf86bd9cb1d763c5c7d5d.zip |
Almost support loading sounds from server
Diffstat (limited to 'src/tile.cpp')
-rw-r--r-- | src/tile.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/tile.cpp b/src/tile.cpp index 4af7a3272..c35952b78 100644 --- a/src/tile.cpp +++ b/src/tile.cpp @@ -29,6 +29,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "mapnode.h" // For texture atlas making #include "nodedef.h" // For texture atlas making #include "gamedef.h" +#include "utility_string.h" /* A cache from texture name to texture path @@ -82,7 +83,10 @@ static std::string getImagePath(std::string path) "pcx", "ppm", "psd", "wal", "rgb", NULL }; - + // If there is no extension, add one + if(removeStringEnd(path, extensions) == "") + path = path + ".png"; + // Check paths until something is found to exist const char **ext = extensions; do{ bool r = replace_ext(path, *ext); |