Parcourir la source

Add contributor credits. Re-add old behavior of also acquiring properties directly from tileElem in TmxFile2D, if defined.

Lasse Öörni il y a 8 ans
Parent
commit
ce98afc76e
3 fichiers modifiés avec 11 ajouts et 1 suppressions
  1. 2 0
      Docs/Urho3D.dox
  2. 2 0
      README.md
  3. 7 1
      Source/Urho3D/Urho2D/TmxFile2D.cpp

+ 2 - 0
Docs/Urho3D.dox

@@ -74,6 +74,7 @@ Urho3D development, contributions and bugfixes by:
 - Danny Boisvert
 - Sergey Bosko
 - Lisandro Bruzzo
+- Thomas Böhm
 - Carlo Carollo
 - Pete Chown
 - Christian Clavet
@@ -114,6 +115,7 @@ Urho3D development, contributions and bugfixes by:
 - David Palacios
 - Alex Parlett
 - Jordan Patterson
+- Georgii Pelageikin
 - Anton Petrov
 - Vladimir Pobedinsky
 - Franck Poulain

+ 2 - 0
README.md

@@ -29,6 +29,7 @@ Urho3D development, contributions and bugfixes by:
 - Danny Boisvert
 - Sergey Bosko
 - Lisandro Bruzzo
+- Thomas Böhm
 - Carlo Carollo
 - Pete Chown
 - Christian Clavet
@@ -69,6 +70,7 @@ Urho3D development, contributions and bugfixes by:
 - David Palacios
 - Alex Parlett
 - Jordan Patterson
+- Georgii Pelageikin
 - Anton Petrov
 - Vladimir Pobedinsky
 - Franck Poulain

+ 7 - 1
Source/Urho3D/Urho2D/TmxFile2D.cpp

@@ -578,7 +578,13 @@ bool TmxFile2D::LoadTileSet(const XMLElement& element)
 
     for (XMLElement tileElem = tileSetElem.GetChild("tile"); tileElem; tileElem = tileElem.GetNext("tile"))
     {
-        if(tileElem.HasChild("objectgroup"))
+        if (tileElem.HasChild("properties"))
+        {
+            SharedPtr<PropertySet2D> propertySet(new PropertySet2D());
+            propertySet->Load(tileElem.GetChild("properties"));
+            gidToPropertySetMapping_[firstgid + tileElem.GetInt("id")] = propertySet;
+        }
+        else if (tileElem.HasChild("objectgroup"))
         {
             XMLElement objectGroup = tileElem.GetChild("objectgroup");