Prevent kicking an object accessing out of map location
This commit is contained in:
@@ -594,7 +594,8 @@ really_kick_object(coordxy x, coordxy y)
|
||||
range = 1;
|
||||
|
||||
/* see if the object has a place to move into */
|
||||
if (!ZAP_POS(levl[x + u.dx][y + u.dy].typ)
|
||||
if (!isok(x + u.dx, y + u.dy)
|
||||
|| !ZAP_POS(levl[x + u.dx][y + u.dy].typ)
|
||||
|| closed_door(x + u.dx, y + u.dy))
|
||||
range = 1;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user