1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-28 08:48:48 +02:00

Entities are now non-copyable

This commit is contained in:
Ivan Savenko 2024-05-17 14:02:51 +00:00
parent 07813c9a79
commit 0d427980bc
2 changed files with 1 additions and 6 deletions

View File

@ -30,7 +30,7 @@ public:
virtual bool isNativeTerrain(TerrainId terrain) const;
};
class DLL_LINKAGE Entity
class DLL_LINKAGE Entity : boost::noncopyable
{
public:
using IconRegistar = std::function<void(int32_t index, int32_t group, const std::string & listName, const std::string & imageName)>;

View File

@ -107,7 +107,6 @@ SpellID CObstacleInstance::getTrigger() const
void CObstacleInstance::serializeJson(JsonSerializeFormat & handler)
{
auto obstacleInfo = getInfo();
auto hidden = false;
auto needAnimationOffsetFix = obstacleType == CObstacleInstance::USUAL;
int animationYOffset = 0;
@ -117,11 +116,7 @@ void CObstacleInstance::serializeJson(JsonSerializeFormat & handler)
//We need only a subset of obstacle info for correct render
handler.serializeInt("position", pos);
handler.serializeStruct("appearSound", obstacleInfo.appearSound);
handler.serializeStruct("appearAnimation", obstacleInfo.appearAnimation);
handler.serializeStruct("animation", obstacleInfo.animation);
handler.serializeInt("animationYOffset", animationYOffset);
handler.serializeBool("hidden", hidden);
handler.serializeBool("needAnimationOffsetFix", needAnimationOffsetFix);
}