Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
GCCProg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Claudio Hoffmann
GCCProg
Commits
1c6df614
Commit
1c6df614
authored
4 years ago
by
Claudio Hoffmann
Browse files
Options
Downloads
Patches
Plain Diff
Entity: Don't takeDamage on 0 hit points
parent
5fb2c135
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
Entity.cpp
+4
-1
4 additions, 1 deletion
Entity.cpp
with
4 additions
and
1 deletion
Entity.cpp
+
4
−
1
View file @
1c6df614
...
...
@@ -62,7 +62,10 @@ bool Entity::step(Position const &PlayerPos, FloatSeconds const & Frametime, Lev
int
Entity
::
takeDamage
(
Color
color
)
{
hitpoints
=
std
::
max
((
hitpoints
-
1
),
0
);
if
(
hitpoints
==
0
)
{
return
hitpoints
;
}
hitpoints
--
;
hittime
=
HIT_TIME
;
hitcolor
=
color
;
return
hitpoints
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment