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:
parent
07813c9a79
commit
0d427980bc
@ -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)>;
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user