From de35fdc450013ba6fe1635729bcf4875c40726dc Mon Sep 17 00:00:00 2001 From: Josh Perry Date: Tue, 13 Mar 2018 17:44:05 +0000 Subject: [PATCH] Fixed removed list not being cleared After an entity has a component removed from it, the apply function wasn't removing it from the removed list. This had weird side-effects like the inability to readd components after they were removed. For example: entity:give(Foo):apply() entity:remove(Foo):apply() entity:give(Foo):apply() -- This line would fail to add the Foo component again. --- fluid/entity.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/fluid/entity.lua b/fluid/entity.lua index 944dc30..169db4f 100644 --- a/fluid/entity.lua +++ b/fluid/entity.lua @@ -45,6 +45,7 @@ function Entity:apply() for component, _ in pairs(self.removed) do self.components[component] = nil + self.removed[component] = nil end return self