Browse Source

Correct the values of SpriteInfo x and y

When we has only one texture in the scml file, we will get wrong x and y values of SpriteInfo, and then the code in line 490 would cause invalid rectangle area.
Hualin Song 10 years ago
parent
commit
c35e4283e0
1 changed files with 2 additions and 0 deletions
  1. 2 0
      Source/Urho3D/Urho2D/AnimationSet2D.cpp

+ 2 - 0
Source/Urho3D/Urho2D/AnimationSet2D.cpp

@@ -427,6 +427,8 @@ bool AnimationSet2D::EndLoadSpriter()
                 }
 
                 SpriteInfo def;
+                def.x = 0;
+                def.y = 0;
                 def.file_ = file;
                 def.image_ = image;
                 spriteInfos.Push(def);