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

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/game/StarWorldClient.cpp2
-rw-r--r--source/game/items/StarTools.cpp6
2 files changed, 5 insertions, 3 deletions
diff --git a/source/game/StarWorldClient.cpp b/source/game/StarWorldClient.cpp
index be5a56b..91f1d39 100644
--- a/source/game/StarWorldClient.cpp
+++ b/source/game/StarWorldClient.cpp
@@ -497,7 +497,7 @@ void WorldClient::render(WorldRenderData& renderData, unsigned bufferTiles) {
Logger::error("WorldClient: Exception caught in {}::render ({}): {}", EntityTypeNames.getRight(entity->entityType()), entity->entityId(), e.what());
auto toolUser = as<ToolUserEntity>(entity);
String image = toolUser ? strf("/rendering/error_{}.png", DirectionNames.getRight(toolUser->facingDirection())) : "/rendering/error.png";
- Color color = Color::rgbf(0.8f + (float)sin(m_currentTime * Constants::pi * 0.5) * 0.2f, 0.0f, 0.0f);
+ Color color = Color::rgbf(0.8f + (float)sin(m_currentTime * Constants::pi * 2.0) * 0.2f, 0.0f, 0.0f);
auto drawable = Drawable::makeImage(image, 1.0f / TilePixels, true, entity->position(), color);
drawable.fullbright = true;
renderCallback.addDrawable(std::move(drawable), RenderLayerMiddleParticle);
diff --git a/source/game/items/StarTools.cpp b/source/game/items/StarTools.cpp
index cde44b8..6c84c12 100644
--- a/source/game/items/StarTools.cpp
+++ b/source/game/items/StarTools.cpp
@@ -620,8 +620,10 @@ ItemPtr PaintingBeamTool::clone() const {
List<Drawable> PaintingBeamTool::drawables() const {
auto result = BeamItem::drawables();
for (auto& entry : result) {
- if (entry.isImage())
- entry.imagePart().image.directives += m_colorKeys[m_colorIndex];
+ if (entry.isImage()) {
+ auto& image = entry.imagePart().image;
+ image.subPath = image.subPath.value("0") + m_colorKeys[m_colorIndex];
+ }
}
return result;
}