Copy attacks when copying a unit
This commit is contained in:
parent
ac4b024fa6
commit
e654fbbb49
1 changed files with 4 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue