summaryrefslogtreecommitdiff
path: root/src/map/unit.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/unit.c')
-rw-r--r--src/map/unit.c19
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;