diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/map/atcommand.c | 1 | ||||
-rw-r--r-- | src/map/clif.c | 8 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c index aa25f11d6..c2c29d51d 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -950,6 +950,7 @@ ACMD(hide) { //bugreport:2266 map->foreachinmovearea(clif->insight, &sd->bl, AREA_SIZE, sd->bl.x, sd->bl.y, BL_ALL, &sd->bl); } else { + clif->clearunit_area(&sd->bl, CLR_OUTSIGHT); sd->sc.option |= OPTION_INVISIBLE; sd->vd.class = INVISIBLE_CLASS; clif->message(fd, msg_fd(fd,11)); // Invisible: On diff --git a/src/map/clif.c b/src/map/clif.c index 988e821e7..877a723fd 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -419,8 +419,14 @@ bool clif_send(const void* buf, int len, struct block_list* bl, enum send_target sd = BL_CAST(BL_PC, bl); - switch(type) { + if (sd != NULL && pc_isinvisible(sd)) { + if (type == AREA || type == BG || type == BG_AREA) + type = SELF; + else if (type == AREA_WOS || type == BG_WOS || type == BG_AREA_WOS) + return true; + } + switch(type) { case ALL_CLIENT: //All player clients. iter = mapit_getallusers(); while ((tsd = BL_UCAST(BL_PC, mapit->next(iter))) != NULL) { |