mirror of
https://github.com/4ian/GDevelop.git
synced 2025-10-15 10:19:04 +00:00
Fix Object behaviors and SpriteObject animations not properly unserialized with an exisiting object
This commit is contained in:
12
.travis.yml
12
.travis.yml
@@ -38,12 +38,10 @@ before_install:
|
||||
|
||||
install:
|
||||
#Install newIDE tests dependencies
|
||||
- cd newIDE/app
|
||||
- npm install
|
||||
- cd newIDE/app && npm install
|
||||
- cd ../..
|
||||
#Install GDJS tests dependencies
|
||||
- cd GDJS/tests
|
||||
- npm install
|
||||
- cd GDJS/tests && npm install
|
||||
- cd ../..
|
||||
#Get the correct version of gcc/g++
|
||||
- if [ "$CXX" = "g++" ]; then export CXX="g++-${GCC_VERSION}" CC="gcc-${GCC_VERSION}"; fi
|
||||
@@ -56,9 +54,11 @@ install:
|
||||
|
||||
script:
|
||||
#newIDE tests:
|
||||
- cd newIDE/app && npm test && cd ../..
|
||||
- cd newIDE/app && npm test
|
||||
- cd ../..
|
||||
#GDJS game engine tests:
|
||||
- cd GDJS/tests && npm test && cd ../..
|
||||
- cd GDJS/tests && npm test
|
||||
- cd ../..
|
||||
#GDCore and GDCpp game engine tests:
|
||||
- cd .build-tests
|
||||
- Core/GDCore_tests
|
||||
|
@@ -47,6 +47,7 @@ void SpriteObject::DoUnserializeFrom(gd::Project & project, const gd::Serializer
|
||||
{
|
||||
updateIfNotVisible = element.GetBoolAttribute("updateIfNotVisible", true);
|
||||
|
||||
RemoveAllAnimations();
|
||||
const gd::SerializerElement & animationsElement = element.GetChild("animations", 0, "Animations");
|
||||
animationsElement.ConsiderAsArrayOf("animation", "Animation");
|
||||
for (std::size_t i = 0; i < animationsElement.GetChildrenCount(); ++i)
|
||||
|
@@ -154,6 +154,7 @@ void Object::UnserializeFrom(gd::Project & project, const SerializerElement & el
|
||||
{
|
||||
//Name and type are already loaded.
|
||||
objectVariables.UnserializeFrom(element.GetChild("variables", 0, "Variables"));
|
||||
behaviors.clear();
|
||||
|
||||
//Compatibility with GD <= 3.3
|
||||
if (element.HasChild("Automatism"))
|
||||
|
Reference in New Issue
Block a user