Commit ed757ec5 authored by DailyShana's avatar DailyShana

allow read jpg field textures

parent 03b986cb
......@@ -104,8 +104,15 @@ irr::video::ITexture* ImageManager::GetTextureField(int code) {
sprintf(file, "pics/field/%d.png", code);
irr::video::ITexture* img = driver->getTexture(file);
if(img == NULL) {
tFields[code] = NULL;
return NULL;
sprintf(file, "pics/field/%d.jpg", code);
irr::video::ITexture* img = driver->getTexture(file);
if(img == NULL) {
tFields[code] = NULL;
return NULL;
} else {
tFields[code] = img;
return img;
}
} else {
tFields[code] = img;
return img;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment