- d = get_map_obj_def (world, o->type);
- c = d->mapchar;
- mvwaddch(win->frame.curses_win,
- o->pos.y - map->offset.y, o->pos.x - map->offset.x, c);
+ if ( o->pos.y >= map->offset.y
+ && o->pos.y < map->offset.y + win->frame.size.y
+ && o->pos.x >= map->offset.x
+ && o->pos.x < map->offset.x + win->frame.size.x)
+ {
+ d = get_map_obj_def (world, o->type);
+ c = d->mapchar;
+ mvwaddch(win->frame.curses_win,
+ o->pos.y - map->offset.y, o->pos.x - map->offset.x, c);
+ }