Skip to content

Commit

Permalink
[Particle System] Fix writing of animation affector.
Browse files Browse the repository at this point in the history
  • Loading branch information
sweetkristas committed Feb 21, 2017
1 parent 1800d1e commit 6817c09
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/kre/ParticleSystemAffectors.cpp
Expand Up @@ -1306,12 +1306,12 @@ namespace KRE
void AnimationAffector::handleWrite(variant_builder* build) const
{
build->add("pixel_coords", pixel_coords_);
variant_builder res;
for(const auto& uv : uv_data_) {
variant_builder res;
res.add("time", uv.first);
res.add("area", uv.second.write());
build->add("time_uv", res.build());
}
build->add("time_uv", res.build());
}

void AnimationAffector::sort_uv_data()
Expand Down
4 changes: 2 additions & 2 deletions src/kre/ParticleSystemUI.cpp
Expand Up @@ -933,8 +933,8 @@ namespace KRE
static_cast<int>(tc.second.x2()),
static_cast<int>(tc.second.y2()) };
bool changed = false;
int width = psystem->getTexture()->surfaceWidth();
int height = psystem->getTexture()->surfaceHeight();
int width = psystem->getTexture()->surfaceWidth() - 1;
int height = psystem->getTexture()->surfaceHeight() - 1;
if(ImGui::DragInt("x1", &r[0], 1, 0, width)) {
changed |= true;
}
Expand Down

0 comments on commit 6817c09

Please sign in to comment.