diff --git a/zecsy.hpp b/zecsy.hpp index 1d87661..a756813 100644 --- a/zecsy.hpp +++ b/zecsy.hpp @@ -250,6 +250,12 @@ namespace zecsy template inline void world::set(entity_id e, const T& comp) { + if(has(e)) + { + get(e) = comp; + return; + } + auto id = get_component_id(); auto& pool = pools[id];