mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
small fixes
This commit is contained in:
parent
6afb5c8c0f
commit
1cf4fb8703
2 changed files with 9 additions and 5 deletions
|
|
@ -7,7 +7,7 @@
|
|||
```lua
|
||||
-- Запрашивает фоновую загрузку текстуры
|
||||
assets.request_texture(
|
||||
-- Файла изображения
|
||||
-- Файл изображения
|
||||
filename: string,
|
||||
-- Имя текстуры после загрузки
|
||||
name: string,
|
||||
|
|
|
|||
|
|
@ -327,10 +327,14 @@ bool AssetsLoader::loadExternalTexture(
|
|||
return true;
|
||||
}
|
||||
for (auto& path : alternatives) {
|
||||
logger.info() << (path.string() + ".png");
|
||||
if (io::exists(path.string() + ".png")) {
|
||||
loader.add(AssetType::TEXTURE, path.string(), name, nullptr);
|
||||
return true; // TODO: fallbacks support
|
||||
if (io::exists(path)) {
|
||||
loader.add(
|
||||
AssetType::TEXTURE,
|
||||
(path.parent() / path.stem()).string(),
|
||||
name,
|
||||
nullptr
|
||||
);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue