From 1cac1de3b27c5c6a511bf86bd9cb1d763c5c7d5d Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Sun, 25 Mar 2012 14:47:51 +0300 Subject: Almost support loading sounds from server --- src/tile.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/tile.cpp') 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); -- cgit v1.2.3