Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/frontend/StarClientCommandProcessor.cpp
diff options
context:
space:
mode:
authorKae <80987908+Novaenia@users.noreply.github.com>2025-03-03 12:39:49 +1100
committerKae <80987908+Novaenia@users.noreply.github.com>2025-03-03 12:39:49 +1100
commit403aa42f119a28ab93d3211e6c940676ec56436f (patch)
tree0153f69675292690e7408ec91078f4970e784d2c /source/frontend/StarClientCommandProcessor.cpp
parent3893151fe217a684aba77669bab6ca3b828943e7 (diff)
/render bugfixes
Diffstat (limited to 'source/frontend/StarClientCommandProcessor.cpp')
-rw-r--r--source/frontend/StarClientCommandProcessor.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/source/frontend/StarClientCommandProcessor.cpp b/source/frontend/StarClientCommandProcessor.cpp
index da0cbd6..ec8d743 100644
--- a/source/frontend/StarClientCommandProcessor.cpp
+++ b/source/frontend/StarClientCommandProcessor.cpp
@@ -494,7 +494,7 @@ String ClientCommandProcessor::render(String const& path) {
return strf("^red;Invalid chest sheet type '{}'^reset;", sheet);
}
// recovery for custom chests made by a very old generator
- if (args.size() >= 2 && args[2].toLower() == "old" && assetPath.basePath.beginsWith("/items/armors/avian/avian-tier6separator/"))
+ if (args.size() > 2 && args[2].toLower() == "old" && assetPath.basePath.beginsWith("/items/armors/avian/avian-tier6separator/"))
assetPath.basePath = "/items/armors/avian/avian-tier6separator/old/" + assetPath.basePath.substr(41);
} else if (first.equals("legs")) {
assetPath.basePath = humanoid->legsArmorFrameset();
@@ -508,18 +508,22 @@ String ClientCommandProcessor::render(String const& path) {
} else if (first.equals("head")) {
outputSheet = false;
assetPath.basePath = humanoid->getHeadFromIdentity();
+ assetPath.subPath = String("normal");
assetPath.directives += identity.bodyDirectives;
} else if (first.equals("hair")) {
outputSheet = false;
assetPath.basePath = humanoid->getHairFromIdentity();
+ assetPath.subPath = String("normal");
assetPath.directives += identity.hairDirectives;
} else if (first.equals("facialhair")) {
outputSheet = false;
assetPath.basePath = humanoid->getFacialHairFromIdentity();
+ assetPath.subPath = String("normal");
assetPath.directives += identity.facialHairDirectives;
} else if (first.equals("facialmask")) {
outputSheet = false;
assetPath.basePath = humanoid->getFacialMaskFromIdentity();
+ assetPath.subPath = String("normal");
assetPath.directives += identity.facialMaskDirectives;
} else if (first.equals("frontarm")) {
assetPath.basePath = humanoid->getFrontArmFromIdentity();
@@ -531,11 +535,9 @@ String ClientCommandProcessor::render(String const& path) {
assetPath.basePath = humanoid->getFacialEmotesFromIdentity();
assetPath.directives += identity.emoteDirectives;
} else {
+ outputSheet = false;
outputName = "render";
}
-
- if (!outputSheet)
- assetPath.subPath = String("normal");
}
if (assetPath == AssetPath()) {
assetPath = AssetPath::split(path);
@@ -550,9 +552,9 @@ String ClientCommandProcessor::render(String const& path) {
AssetPath framePath = assetPath;
StringMap<pair<RectU, ImageConstPtr>> frames;
- auto imageFrames = assets->imageFrames(assetPath.basePath);
- for (auto& pair : imageFrames->frames)
- frames[pair.first] = make_pair(pair.second, ImageConstPtr());
+ if (auto imageFrames = assets->imageFrames(assetPath.basePath))
+ for (auto& pair : imageFrames->frames)
+ frames[pair.first] = make_pair(pair.second, ImageConstPtr());
if (frames.empty())
return "^red;Failed to save image^reset;";