summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
Diffstat (limited to 'src/map')
-rw-r--r--src/map/config/core.h6
-rw-r--r--src/map/skill.c4
-rw-r--r--src/map/unit.c11
3 files changed, 15 insertions, 6 deletions
diff --git a/src/map/config/core.h b/src/map/config/core.h
index 9963d38b9..848829ea2 100644
--- a/src/map/config/core.h
+++ b/src/map/config/core.h
@@ -18,6 +18,12 @@
**/
#define MAX_SUGGESTIONS 10
+//Comment to disable the official walk path
+// -- The official walkpath disables users from taking non-clear walk paths,
+// -- e.g. if they want to get around a obstacle they have to walk around it,
+// -- while with OFFICIAL_WALKPATH disabled if they click to walk around a obstacle the server will do it automatically
+#define OFFICIAL_WALKPATH
+
/// leave this line uncommented to enable callfunc checks when processing scripts.
/// while allowed, the script engine will attempt to match user-defined functions
/// in scripts allowing direct function callback (without the use of callfunc.)
diff --git a/src/map/skill.c b/src/map/skill.c
index 71a048b8a..31ec7acd1 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -8823,10 +8823,10 @@ int skill_castend_id(int tid, unsigned int tick, int id, intptr_t data)
else
skill_consume_requirement(sd,ud->skillid,ud->skilllv,1);
}
-
+#ifdef OFFICIAL_WALKPATH
if( !path_search_long(NULL, src->m, src->x, src->y, target->x, target->y, CELL_CHKWALL) )
break;
-
+#endif
if( (src->type == BL_MER || src->type == BL_HOM) && !skill_check_condition_mercenary(src, ud->skillid, ud->skilllv, 1) )
break;
diff --git a/src/map/unit.c b/src/map/unit.c
index ea114ea72..ed4035ebe 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -322,9 +322,9 @@ int unit_walktoxy( struct block_list *bl, short x, short y, int flag)
ud = unit_bl2ud(bl);
if( ud == NULL) return 0;
-
+#ifdef OFFICIAL_WALKPATH
if( !path_search_long(NULL, bl->m, bl->x, bl->y, x, y, CELL_CHKWALL) ) return 0;
-
+#endif
if (flag&4 && DIFF_TICK(ud->canmove_tick, gettick()) > 0 &&
DIFF_TICK(ud->canmove_tick, gettick()) < 2000)
{ // Delay walking command. [Skotlex]
@@ -1714,8 +1714,11 @@ static int unit_attack_timer_sub(struct block_list* src, int tid, unsigned int t
return 0;
if( status_isdead(src) || status_isdead(target) ||
- battle_check_target(src,target,BCT_ENEMY) <= 0 || !status_check_skilluse(src, target, 0, 0) ||
- !path_search_long(NULL, src->m, src->x, src->y, target->x, target->y, CELL_CHKWALL) )
+ battle_check_target(src,target,BCT_ENEMY) <= 0 || !status_check_skilluse(src, target, 0, 0)
+#ifdef OFFICIAL_WALKPATH
+ || !path_search_long(NULL, src->m, src->x, src->y, target->x, target->y, CELL_CHKWALL)
+#endif
+ )
return 0; // can't attack under these conditions
if( src->m != target->m )