Prevent boomerang going out of map
This commit is contained in:
@@ -4089,6 +4089,11 @@ boomhit(struct obj *obj, coordxy dx, coordxy dy)
|
||||
dy = ydir[i];
|
||||
gb.bhitpos.x += dx;
|
||||
gb.bhitpos.y += dy;
|
||||
if (!isok(gb.bhitpos.x, gb.bhitpos.y)) {
|
||||
gb.bhitpos.x -= dx;
|
||||
gb.bhitpos.y -= dy;
|
||||
break;
|
||||
}
|
||||
if ((mtmp = m_at(gb.bhitpos.x, gb.bhitpos.y)) != 0) {
|
||||
m_respond(mtmp);
|
||||
tmp_at(DISP_END, 0);
|
||||
|
||||
Reference in New Issue
Block a user