diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-11-29 13:11:33 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-11-29 13:11:33 +0000 |
commit | c78e2df7e04a41e3a69cc49a14022ccf0402f406 (patch) | |
tree | 36230ca1271b43269bf12ca1b4a4af9db794c0fa /src/map/pc.c | |
parent | a3002eabaa37d2fc60903d8500ac1ec21c0de8fd (diff) | |
download | hercules-c78e2df7e04a41e3a69cc49a14022ccf0402f406.tar.gz hercules-c78e2df7e04a41e3a69cc49a14022ccf0402f406.tar.bz2 hercules-c78e2df7e04a41e3a69cc49a14022ccf0402f406.tar.xz hercules-c78e2df7e04a41e3a69cc49a14022ccf0402f406.zip |
- Allowed disguising while riding a peco-peco (this does not seem to cause problems anymore)
- Adjusted pc_disguise to work properly if invoked while a player is not in a map.
- The pvp rank packet is no longer sent to other players when disguised, as this leads to crashes when you die.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11842 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pc.c')
-rw-r--r-- | src/map/pc.c | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/src/map/pc.c b/src/map/pc.c index 1a47458ca..fc39ea88d 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -1209,7 +1209,7 @@ int pc_disguise(struct map_session_data *sd, int class_) { if (!class_ && !sd->disguise) return 0; - if (class_ && (sd->disguise == class_ || pc_isriding(sd))) + if (class_ && sd->disguise == class_) return 0; if(sd->sc.option&OPTION_INVISIBLE) @@ -1217,9 +1217,11 @@ int pc_disguise(struct map_session_data *sd, int class_) sd->disguise = class_; //viewdata is set on uncloaking. return 2; } - - pc_stop_walking(sd, 0); - clif_clearunit_area(&sd->bl, 0); + + if (sd->bl.prev != NULL) { + pc_stop_walking(sd, 0); + clif_clearunit_area(&sd->bl, 0); + } if (!class_) { sd->disguise = 0; @@ -1229,13 +1231,15 @@ int pc_disguise(struct map_session_data *sd, int class_) status_set_viewdata(&sd->bl, class_); clif_changeoption(&sd->bl); - clif_spawn(&sd->bl); - if (class_ == sd->status.class_ && pc_iscarton(sd)) - { //It seems the cart info is lost on undisguise. - clif_cartlist(sd); - clif_updatestatus(sd,SP_CARTINFO); - } + if (sd->bl.prev != NULL) { + clif_spawn(&sd->bl); + if (class_ == sd->status.class_ && pc_iscarton(sd)) + { //It seems the cart info is lost on undisguise. + clif_cartlist(sd); + clif_updatestatus(sd,SP_CARTINFO); + } + } return 1; } |