diff options
author | Ben Longbons <b.r.longbons@gmail.com> | 2014-09-05 09:42:47 -0700 |
---|---|---|
committer | Ben Longbons <b.r.longbons@gmail.com> | 2014-09-05 09:42:47 -0700 |
commit | dafb447729edd6755492e9207d16ab8bfce4a8cf (patch) | |
tree | 444104cd961bb2ee37516ee1fda3acca3d9b1885 /src | |
parent | 98253f8cd9ad6e3b4443556aa5bda6d735a0bf3b (diff) | |
download | tmwa-dafb447729edd6755492e9207d16ab8bfce4a8cf.tar.gz tmwa-dafb447729edd6755492e9207d16ab8bfce4a8cf.tar.bz2 tmwa-dafb447729edd6755492e9207d16ab8bfce4a8cf.tar.xz tmwa-dafb447729edd6755492e9207d16ab8bfce4a8cf.zip |
Fix a couple of bugs exposed by stricter server checks
Diffstat (limited to 'src')
-rw-r--r-- | src/char/inter.cpp | 1 | ||||
-rw-r--r-- | src/map/magic-expr.cpp | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/char/inter.cpp b/src/char/inter.cpp index 1cf41ff..f757991 100644 --- a/src/char/inter.cpp +++ b/src/char/inter.cpp @@ -369,6 +369,7 @@ RecvResult mapif_parse_WisReply(Session *tms) CharName from = smcs->key.name; Session *sms = server_for(smcs); + if (sms) { mapif_wis_end(sms, from, flag); // flag: 0: success to send wisper, 1: target character is not loged in?, 2: ignored by target } diff --git a/src/map/magic-expr.cpp b/src/map/magic-expr.cpp index 4acce91..674c850 100644 --- a/src/map/magic-expr.cpp +++ b/src/map/magic-expr.cpp @@ -1339,7 +1339,7 @@ int fun_dir_towards(dumb_ptr<env_t>, val_t *result, Slice<val_t> args) dx = ARGLOCATION(1).x - ARGLOCATION(0).x; dy = ARGLOCATION(1).y - ARGLOCATION(0).y; - if (ARGINT(1)) + if (ARGINT(2)) { /* 8-direction mode */ if (abs(dx) > abs(dy) * 2) |