diff options
author | shennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-07-23 01:19:48 +0000 |
---|---|---|
committer | shennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-07-23 01:19:48 +0000 |
commit | 79db43cb10fafb3a7a7b04a964c0a7a4d407c363 (patch) | |
tree | dd089246dbab9a254e28ace3678a417c4a7c9d91 /src/map/unit.c | |
parent | 14aca94442c6b6cd353373dd33b45423575f48d2 (diff) | |
download | hercules-79db43cb10fafb3a7a7b04a964c0a7a4d407c363.tar.gz hercules-79db43cb10fafb3a7a7b04a964c0a7a4d407c363.tar.bz2 hercules-79db43cb10fafb3a7a7b04a964c0a7a4d407c363.tar.xz hercules-79db43cb10fafb3a7a7b04a964c0a7a4d407c363.zip |
Follow up r16470 adjusted the fix for the longing of freedom
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16479 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/unit.c')
-rw-r--r-- | src/map/unit.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/map/unit.c b/src/map/unit.c index 507bfbb07..1e0bad280 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -920,16 +920,15 @@ int unit_can_move(struct block_list *bl) return 0; //Can't move if (sc) { - // Ensemble checks to prevent freezing characters - if( sc->cant.move && sc->data[SC_LONGING] && !((sc->data[SC_DANCING]->val1&0xFFFF) == CG_MOONLIT)) - { - // allow movement - sc->cant.move = 0; - return 1; - } - - if( sc->cant.move || (sc->data[SC_FEAR] && sc->data[SC_FEAR]->val2 > 0) || (sc->data[SC_SPIDERWEB] && sc->data[SC_SPIDERWEB]->val1) ) - return 0; + if( sc->cant.move /* status placed here are ones that cannot be cached by sc->cant.move for they depend on other conditions other than their availability */ + || (sc->data[SC_FEAR] && sc->data[SC_FEAR]->val2 > 0) + || (sc->data[SC_SPIDERWEB] && sc->data[SC_SPIDERWEB]->val1) + || (sc->data[SC_DANCING] && sc->data[SC_DANCING]->val4 && ( + !sc->data[SC_LONGING] || + (sc->data[SC_DANCING]->val1&0xFFFF) == CG_MOONLIT || + (sc->data[SC_DANCING]->val1&0xFFFF) == CG_HERMODE + ) ) + ) if (sc->opt1 > 0 && sc->opt1 != OPT1_STONEWAIT && sc->opt1 != OPT1_BURNING && (sc->opt1 != OPT1_CRYSTALIZE && bl->type != BL_MOB)) return 0; |