Copy attacks when copying a unit

This commit is contained in:
Celtic Minstrel 2016-09-08 14:51:05 -04:00
parent ac4b024fa6
commit e654fbbb49

View file

@ -316,6 +316,10 @@ unit::unit(const unit& o)
, small_profile_(o.small_profile_)
, invisibility_cache_()
{
// Copy the attacks rather than just copying references
for(auto& a : attacks_) {
a.reset(new attack_type(*a));
}
}
struct ptr_vector_pushback