summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2013-10-17 11:29:59 -0700
committerBen Longbons <b.r.longbons@gmail.com>2013-10-17 11:29:59 -0700
commitb22cdc00b2122414caa64063433d8a7dbabb7063 (patch)
tree4362da829a7172bc52e87546247ae77c0b010dac /src/map
parent5094d0859a7ca4116d59dcfd1dfb606472a69feb (diff)
downloadtmwa-b22cdc00b2122414caa64063433d8a7dbabb7063.tar.gz
tmwa-b22cdc00b2122414caa64063433d8a7dbabb7063.tar.bz2
tmwa-b22cdc00b2122414caa64063433d8a7dbabb7063.tar.xz
tmwa-b22cdc00b2122414caa64063433d8a7dbabb7063.zip
Allow @hide to persist across logout/login
Also document why the same can't be done for @invisible
Diffstat (limited to 'src/map')
-rw-r--r--src/map/pc.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/map/pc.cpp b/src/map/pc.cpp
index 4600aeb..042be3c 100644
--- a/src/map/pc.cpp
+++ b/src/map/pc.cpp
@@ -684,7 +684,20 @@ int pc_authok(int id, int login_id2, TimeT connect_until_time,
sd->sc_data[i].val1 = 0;
}
sd->sc_count = 0;
- sd->status.option = Option::ZERO;
+ {
+ Option old_option = sd->status.option;
+ sd->status.option = Option::ZERO;
+
+ // This would leak information.
+ // It's better to make it obvious that players can see you.
+ if (false && bool(old_option & Option::INVISIBILITY))
+ is_atcommand(sd->fd, sd, "@invisible", 0);
+
+ if (bool(old_option & Option::HIDE))
+ is_atcommand(sd->fd, sd, "@hide", 0);
+ // atcommand_hide might already send it, but also might not
+ clif_changeoption(sd);
+ }
// パーティー関係の初期化
sd->party_sended = 0;