Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Owl releases payload just prior to leaving the sector bounds, fixes b…
…ug 877
  • Loading branch information
Daniela Ferraz authored and LMH0013 committed Jul 3, 2013
1 parent cabf498 commit ce5cd45
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/badguy/owl.cpp
Expand Up @@ -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. */

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;
Expand Down

0 comments on commit ce5cd45

Please sign in to comment.