summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/config/core.h2
-rw-r--r--src/map/battle.c2
-rw-r--r--src/map/unit.c7
3 files changed, 8 insertions, 3 deletions
diff --git a/src/config/core.h b/src/config/core.h
index b091e6dee..5e62e2adb 100644
--- a/src/config/core.h
+++ b/src/config/core.h
@@ -31,7 +31,7 @@
/// The official walkpath disables users from taking non-clear walk paths,
/// e.g. if they want to get around an 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
+//#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
diff --git a/src/map/battle.c b/src/map/battle.c
index 72c3d8963..4f4d43bc3 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -7010,12 +7010,14 @@ static bool battle_check_range(struct block_list *src, struct block_list *bl, in
if( src->m != bl->m )
return false;
+/* [TMW2] Code removed - ManaPlus deals with squares, not circles.
#ifndef CIRCULAR_AREA
if( src->type == BL_PC ) { // Range for players' attacks and skills should always have a circular check. [Angezerus]
if ( !check_distance_client_bl(src, bl, range) )
return false;
} else
#endif
+*/
if( !check_distance_bl(src, bl, range) )
return false;
diff --git a/src/map/unit.c b/src/map/unit.c
index fb6d992ae..c93a69be3 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -460,6 +460,7 @@ static int unit_walk_toxy_timer(int tid, int64 tick, int id, intptr_t data)
timer->delete(ud->steptimer, unit->steptimer);
ud->steptimer = INVALID_TIMER;
}
+ /* [TMW2] Remove this, even if code is present on TMWA
// Delay stepactions by half a step (so they are executed at full step)
int timer_delay;
if ((ud->walkpath.path[ud->walkpath.path_pos] & 1) != 0)
@@ -467,6 +468,7 @@ static int unit_walk_toxy_timer(int tid, int64 tick, int id, intptr_t data)
else
timer_delay = status->get_speed(bl) / 2;
ud->steptimer = timer->add(tick + timer_delay, unit->steptimer, bl->id, 0);
+ */
}
if (ud->state.change_walk_target) {
@@ -1572,7 +1574,8 @@ static int unit_skilluse_id2(struct block_list *src, int target_id, uint16 skill
} else if( src->type == BL_MER && skill_id == MA_REMOVETRAP ) {
if( !battle->check_range(battle->get_master(src), target, range + 1) )
return 0; // Aegis calc remove trap based on Master position, ignoring mercenary O.O
- } else if (!battle->check_range(src, target, range)) {
+ // [TMW2] Reintroduce the arbitrary +1 range bonus (reduces lag)
+ } else if (!battle->check_range(src, target, range +1)) {
return 0; // Arrow-path check failed.
}
}
@@ -2305,7 +2308,7 @@ static int unit_attack_timer_sub(struct block_list *src, int tid, int64 tick)
}
sstatus = status->get_status_data(src);
- range = sstatus->rhw.range;
+ range = sstatus->rhw.range + 1; // [TMW2] Extra range for anti-lag
if( (unit->is_walking(target) || ud->state.step_attack)
&& (target->type == BL_PC || !map->getcell(target->m, src, target->x, target->y, CELL_CHKICEWALL)))