Initialize TileAnimationParams to prevent crashes/bugs for legacy invocations of...
authorsfan5 <sfan5@live.de>
Tue, 24 Jan 2017 14:19:29 +0000 (15:19 +0100)
committersfan5 <sfan5@live.de>
Tue, 24 Jan 2017 14:19:29 +0000 (15:19 +0100)
src/script/lua_api/l_particles.cpp

index 7f415844a4b9ac99e4ebe12d0f14aaa2841295a4..2f3e9a58df22b645b9d6d784ce5f7a9b2f9751af 100644 (file)
@@ -51,6 +51,7 @@ int ModApiParticles::l_add_particle(lua_State *L)
        bool collisiondetection, vertical, collision_removal;
        collisiondetection = vertical = collision_removal = false;
        struct TileAnimationParams animation;
+       animation.type = TAT_NONE;
 
        std::string texture = "";
        std::string playername = "";
@@ -155,6 +156,7 @@ int ModApiParticles::l_add_particlespawner(lua_State *L)
        bool collisiondetection, vertical, collision_removal;
             collisiondetection = vertical = collision_removal = false;
        struct TileAnimationParams animation;
+       animation.type = TAT_NONE;
        ServerActiveObject *attached = NULL;
        std::string texture = "";
        std::string playername = "";