- Applied some changes in unit.c to make mobs pick chase paths as they should.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6330 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
a5e5db6539
commit
7a07d3c6ec
@ -3,6 +3,8 @@ Date Added
|
|||||||
AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
|
AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
|
||||||
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
|
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
|
||||||
2006/04/27
|
2006/04/27
|
||||||
|
* Applied some changes in unit.c to make mobs pick chase paths as they
|
||||||
|
should. [Skotlex]
|
||||||
* unit_remove_map will reset attackable-time, canact and canwalk delays.
|
* unit_remove_map will reset attackable-time, canact and canwalk delays.
|
||||||
[Skotlex]
|
[Skotlex]
|
||||||
* Added a timer in clif.c so that walk requests that are done while your
|
* Added a timer in clif.c so that walk requests that are done while your
|
||||||
|
@ -57,7 +57,9 @@ int unit_walktoxy_sub(struct block_list *bl)
|
|||||||
|
|
||||||
memcpy(&ud->walkpath,&wpd,sizeof(wpd));
|
memcpy(&ud->walkpath,&wpd,sizeof(wpd));
|
||||||
|
|
||||||
if (ud->target && ud->chaserange >0) {
|
if (ud->target && ud->chaserange>1) {
|
||||||
|
//Generally speaking, the walk path is already to an adjacent tile
|
||||||
|
//so we only need to shorten the path if the range is greater than 1.
|
||||||
int dir;
|
int dir;
|
||||||
//Trim the last part of the path to account for range,
|
//Trim the last part of the path to account for range,
|
||||||
//but always move at least one cell when requested to move.
|
//but always move at least one cell when requested to move.
|
||||||
@ -1150,15 +1152,6 @@ int unit_can_reach_bl(struct block_list *bl,struct block_list *tbl, int range, i
|
|||||||
wpd.path_pos=0;
|
wpd.path_pos=0;
|
||||||
wpd.path_half=0;
|
wpd.path_half=0;
|
||||||
|
|
||||||
#ifndef CELL_NOSTACK
|
|
||||||
//Skip direct path seeking when in nostacking mode.
|
|
||||||
if(path_search_real(&wpd,bl->m,bl->x,bl->y,tbl->x,tbl->y,easy,CELL_CHKNOREACH)!=-1) {
|
|
||||||
if (x) *x = tbl->x;
|
|
||||||
if (y) *y = tbl->y;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// It judges whether it can adjoin or not.
|
// It judges whether it can adjoin or not.
|
||||||
dx=tbl->x - bl->x;
|
dx=tbl->x - bl->x;
|
||||||
dy=tbl->y - bl->y;
|
dy=tbl->y - bl->y;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user