diff --git a/include/Avatar/Avatar.hpp b/include/Avatar/Avatar.hpp index 3bc07483..4da16fa8 100644 --- a/include/Avatar/Avatar.hpp +++ b/include/Avatar/Avatar.hpp @@ -20,8 +20,10 @@ class Avatar : public Util::GameObject, public Selectable, public Huntable { public: Avatar(){}; - Avatar(UnitType unit, HouseType house) - : m_ID(GameObjectID(UnitType::NONE, house)){}; + Avatar(UnitType unit, HouseType house, Weapon weapon = COLT_45) + : m_ID(GameObjectID(UnitType::NONE, house)) { + getAttackAndDamage()->setWeapon(std::make_shared(weapon)); + }; ~Avatar() override{}; virtual void Start(glm::vec2 spawnlocationcell); diff --git a/include/Avatar/Weapon.hpp b/include/Avatar/Weapon.hpp index 36b32bab..b05d7a41 100644 --- a/include/Avatar/Weapon.hpp +++ b/include/Avatar/Weapon.hpp @@ -72,6 +72,6 @@ class Weapon { WeaponType m_Type; }; -const Weapon COLT_45(180, 5.75, 100, 100, WeaponType::COLT_45); +const Weapon COLT_45(180, 4, 100, 100, WeaponType::COLT_45); #endif // PRACTICALTOOLSFORSIMPLEDESIGN_WEAPON_HPP diff --git a/include/Mechanics/NemesisManager.hpp b/include/Mechanics/NemesisManager.hpp index 9b0d4a56..187fcc7c 100644 --- a/include/Mechanics/NemesisManager.hpp +++ b/include/Mechanics/NemesisManager.hpp @@ -35,8 +35,9 @@ class NemesisManager { } if (hunter->getDistance( m_Nemesis[hunter]->getCurrentLocationInCell()) <= - hunter->getAttackAndDamage()->getWeapon()->getFireRange() * - CELL_SIZE.x) // check with in range + hunter->getAttackAndDamage() + ->getWeapon() + ->getFireRange()) // check with in range { return true; } else {