projects
/
42
/
CPP_Module_03
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4164be0
)
Fix death detection durring getting attacked
author
Lukas Jiriste
<ljiriste@student.42prague.com>
Fri, 18 Oct 2024 07:59:52 +0000
(09:59 +0200)
committer
Lukas Jiriste
<ljiriste@student.42prague.com>
Fri, 18 Oct 2024 07:59:52 +0000
(09:59 +0200)
ex00/ClapTrap.cpp
patch
|
blob
|
history
diff --git
a/ex00/ClapTrap.cpp
b/ex00/ClapTrap.cpp
index b2695cebe09b4cad7e5af31f606a54954204990d..0acda6c4ccf3267e06c64c4208f7d3c27300f360 100644
(file)
--- a/
ex00/ClapTrap.cpp
+++ b/
ex00/ClapTrap.cpp
@@
-50,7
+50,7
@@
void ClapTrap::takeDamage(unsigned int amount)
{
if (m_hp == 0)
std::cout << "ClapTrap " << m_name << " is alread dead.\n";
- else if (amount > m_hp)
+ else if (amount >
=
m_hp)
{
std::cout << "ClapTrap " << m_name
<< " takes " << amount << " damage and dies\n";