projects
/
supertux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
cabf498
)
Owl releases payload just prior to leaving the sector bounds, fixes bug 877
author
Daniela Ferraz
<danielaafferraz@gmail.com>
Wed, 3 Jul 2013 22:03:15 +0000
(12:03 -1000)
committer
LMH
<lmh.0013@gmail.com>
Wed, 3 Jul 2013 22:03:15 +0000
(12:03 -1000)
src/badguy/owl.cpp
patch
|
blob
|
history
diff --git
a/src/badguy/owl.cpp
b/src/badguy/owl.cpp
index
db8b2fe
..
20886d4
100644
(file)
--- a/
src/badguy/owl.cpp
+++ b/
src/badguy/owl.cpp
@@
-104,8
+104,15
@@
Owl::active_update (float elapsed_time)
obj_pos.x -= 16.0; /* FIXME: Actually do use the half width of the carried object here. */
obj_pos.y += 3.0; /* Move a little away from the hitbox (the body). Looks nicer. */
obj_pos.x -= 16.0; /* FIXME: Actually do use the half width of the carried object here. */
obj_pos.y += 3.0; /* Move a little away from the hitbox (the body). Looks nicer. */
- carried_object->grab (*this, obj_pos, dir);
+ //To drop enemie before leave the screen
+ if (obj_pos.x<=16 || obj_pos.x+16>=Sector::current()->get_width()){
+ carried_object->ungrab (*this, dir);
+ carried_object = NULL;
+ }
+ else
+ carried_object->grab (*this, obj_pos, dir);
}
}
+
else { /* if (is_above_player) */
carried_object->ungrab (*this, dir);
carried_object = NULL;
else { /* if (is_above_player) */
carried_object->ungrab (*this, dir);
carried_object = NULL;