From b22cdc00b2122414caa64063433d8a7dbabb7063 Mon Sep 17 00:00:00 2001 From: Ben Longbons Date: Thu, 17 Oct 2013 11:29:59 -0700 Subject: Allow @hide to persist across logout/login Also document why the same can't be done for @invisible --- src/map/pc.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src/map/pc.cpp') 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; -- cgit v1.2.3-60-g2f50