Skip to content

Commit

Permalink
Simplified serialize of Entity position.
Browse files Browse the repository at this point in the history
  • Loading branch information
mercere99 committed Dec 11, 2023
1 parent 13efe59 commit 7d82565
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions source/core/Entity.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,7 @@ class Entity : public CoreObject {
SerializeValue(os, id);
SerializeValue(os, name);
SerializeValue(os, grid_id);
SerializeValue(os, position.GetX());
SerializeValue(os, position.GetY());
SerializeValue(os, position);
SerializeValue(os, inventory);

SerializeValue(os, property_map.size());
Expand All @@ -175,8 +174,7 @@ class Entity : public CoreObject {
DeserializeValue(is, id);
DeserializeValue(is, name);
DeserializeValue(is, grid_id);
DeserializeFunction<double>(is, [this](double x){ position.SetX(x); });
DeserializeFunction<double>(is, [this](double y){ position.SetX(y); });
DeserializeValue(is, position);
DeserializeValue(is, inventory);

size_t num_properties = 0;
Expand Down

0 comments on commit 7d82565

Please sign in to comment.