summaryrefslogtreecommitdiff
path: root/src/map/pc.cpp
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2014-10-16 11:05:17 -0700
committerBen Longbons <b.r.longbons@gmail.com>2014-10-16 11:05:17 -0700
commite5549ae35fed284799115aed7e67049e5107c988 (patch)
treede041d9e81e7576272fcb8b8ab7fc09f1f203b80 /src/map/pc.cpp
parent33bbbf30f461b030c04e4de866cafafce19d5232 (diff)
downloadtmwa-e5549ae35fed284799115aed7e67049e5107c988.tar.gz
tmwa-e5549ae35fed284799115aed7e67049e5107c988.tar.bz2
tmwa-e5549ae35fed284799115aed7e67049e5107c988.tar.xz
tmwa-e5549ae35fed284799115aed7e67049e5107c988.zip
Fix crash on login due to invalid map
Diffstat (limited to 'src/map/pc.cpp')
-rw-r--r--src/map/pc.cpp29
1 files changed, 15 insertions, 14 deletions
diff --git a/src/map/pc.cpp b/src/map/pc.cpp
index 0497e5b..68d478e 100644
--- a/src/map/pc.cpp
+++ b/src/map/pc.cpp
@@ -685,20 +685,6 @@ int pc_authok(AccountId id, int login_id2, TimeT connect_until_time,
sd->sc_data[i].val1 = 0;
}
sd->sc_count = 0;
- {
- Opt0 old_option = sd->status.option;
- sd->status.option = Opt0::ZERO;
-
- // This would leak information.
- // It's better to make it obvious that players can see you.
- if (false && bool(old_option & Opt0::INVISIBILITY))
- is_atcommand(sd->sess, sd, "@invisible"_s, GmLevel());
-
- if (bool(old_option & Opt0::HIDE))
- is_atcommand(sd->sess, sd, "@hide"_s, GmLevel());
- // atcommand_hide might already send it, but also might not
- clif_changeoption(sd);
- }
// パーティー関係の初期化
sd->party_sended = 0;
@@ -714,6 +700,21 @@ int pc_authok(AccountId id, int login_id2, TimeT connect_until_time,
pc_setpos(sd, sd->status.last_point.map_, sd->status.last_point.x,
sd->status.last_point.y, BeingRemoveWhy::GONE);
+ {
+ Opt0 old_option = sd->status.option;
+ sd->status.option = Opt0::ZERO;
+
+ // This would leak information.
+ // It's better to make it obvious that players can see you.
+ if (false && bool(old_option & Opt0::INVISIBILITY))
+ is_atcommand(sd->sess, sd, "@invisible"_s, GmLevel());
+
+ if (bool(old_option & Opt0::HIDE))
+ is_atcommand(sd->sess, sd, "@hide"_s, GmLevel());
+ // atcommand_hide might already send it, but also might not
+ clif_changeoption(sd);
+ }
+
// パーティ、ギルドデータの要求
if (sd->status.party_id
&& party_search(sd->status.party_id).is_none())