diff options
author | momacabu <momacabu@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-11-20 02:26:02 +0000 |
---|---|---|
committer | momacabu <momacabu@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-11-20 02:26:02 +0000 |
commit | 669bc9f2af16b07615996e040ce4927bd87da016 (patch) | |
tree | 801c64d589aa3f08efd405f6aa29f5b589d97f00 /src/map/pc.c | |
parent | 8e75d22e0b6db54d45d09f497d4fe636778bc505 (diff) | |
download | hercules-669bc9f2af16b07615996e040ce4927bd87da016.tar.gz hercules-669bc9f2af16b07615996e040ce4927bd87da016.tar.bz2 hercules-669bc9f2af16b07615996e040ce4927bd87da016.tar.xz hercules-669bc9f2af16b07615996e040ce4927bd87da016.zip |
- Fixed bugreport:6915, where @follow would still be enabled when the target/source died;
- Fixed a exploit on the creation char process, the hair color and style could be bypassed (bugreport:6916).
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16930 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pc.c')
-rw-r--r-- | src/map/pc.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/map/pc.c b/src/map/pc.c index 5da11f4a4..2b9401841 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -5458,14 +5458,13 @@ int pc_follow_timer(int tid, unsigned int tick, int id, intptr_t data) } sd->followtimer = INVALID_TIMER; - if (pc_isdead(sd)) - return 0; - - if ((tbl = map_id2bl(sd->followtarget)) == NULL) - return 0; + tbl = map_id2bl(sd->followtarget); - if(status_isdead(tbl)) + if (tbl == NULL || pc_isdead(sd) || status_isdead(tbl)) + { + pc_stop_following(sd); return 0; + } // either player or target is currently detached from map blocks (could be teleporting), // but still connected to this map, so we'll just increment the timer and check back later |