ScavTrap duplicate fix

This commit is contained in:
Angel Ortigosa Perez
2025-10-26 20:35:29 +01:00
parent c9e9e69c06
commit 8277d2c131

View File

@@ -30,17 +30,7 @@ ScavTrap::ScavTrap(std::string name) : ClapTrap(name)
<< std::endl; << std::endl;
} }
ScavTrap::ScavTrap(const ScavTrap &other) : ClapTrap(other) ScavTrap::ScavTrap(const ScavTrap &other) : ClapTrap(other) { }
{
this->name = other.name;
this->health = other.health;
this->energy = other.energy;
this->attackDamage = other.attackDamage;
std::cout << "ScavTrap copy constructor called for " << this->name << std::endl;
}
ScavTrap& ScavTrap::operator=(const ScavTrap &other) ScavTrap& ScavTrap::operator=(const ScavTrap &other)
{ {